1. About using peripheral library and chip selection
Need to define USE_STDPERIPH_DRIVER and STM32F40_41xxx
Specifically defined in stm32f4xx.h or configured in Target Options
2. About clock configuration
This project uses an external crystal oscillator of 8M
Therefore, it is necessary to modify the external crystal oscillator and PLL related macro definitions
Configuration in stm32f4xx.h
#define HSE_VALUE ((uint32_t)8000000)
Configuration in system_stm32f4xx.c
#define PLL_M 8
3. Porting lwip, no RTOS
The first step is to initialize ETH_MAC_DMA and PHY chip. Here we test it in project f407_eth.
Step 2: Add lwip file
The src file contains the files in the lwip official library:
lwip-1.4.1\src
The port contains the official ST transplant file:
STM32F4x7_ETH_LwIP_V1.1.1\Utilities\Third_Party\lwip-1.4.1\port\STM32F4x7
Migrate network application files:
STM32F4x7_ETH_LwIP_V1.1.1\Project\Standalone\udp_echo_client
Step 3: Modify some files
main.h is changed to
net_config.h configures IP/MAC/NETMASK/GW/DHCP, etc. DHCP is not used here
When there is no operating system, you need to initialize systick to use lwip as the time base. Initialize it in the main function and implement SysTick_Handler
ethernetif.c is the file that needs to be ported when there is no RTOS (st has already done it), which is actually initialization, sending, receiving
Previous article:STM32 system clock CAN UART
Next article:Using 12M external crystal oscillator with stm32 under IAR
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Industry first! Xiaopeng announces P7 car chip crowdfunding is completed: upgraded to Snapdragon 8295, fluency doubled
- P22-009_Butterfly E3106 Cord Board Solution
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- 【Mil MYD-YA15XC-T】- 0: How to power on?
- Xilinx Zynq-7015 SoC Industrial Core Board SOM-XQ7Z15 Cortex-A9 + Artix-7
- ADI Power Supply Expert Training Course Advanced Edition is in progress! What are you waiting for?
- ARM Architecture and Programming
- Gigabit RISC-V GD32VF103USB CDC debugging
- Problems encountered in debugging the Southchip SC8721 high-efficiency synchronous buck-boost converter
- (A-Current signal detection device) Chongqing "TI Cup" Award_Chongqing University of Posts and Telecommunications
- This appears and I can't choose it. It's grayed out.
- 【AT-START-F403A Review】3. Try USB Composite_Device
- Today at 10:00 AM, live broadcast with prizes: Protecting clean water sources - ADI water quality monitoring solutions