STM32CubeMX software features
The STM32CubeMX official version includes every series of ST products except STM8, and the platform includes STM32Cube Hardware abstraction layer (an STM32 abstraction layer for embedded software, ensuring maximum portability in the STM32 family) and a set of middleware components (RTOS, USB, FatFs, TCP/IP, Graphics, etc.).
Intuitive STM32 microcontroller selection and clock tree configuration
Microcontroller graphically configures functional modes and initialization parameters of peripheral devices and middleware
The C code generation project covers initialization of STM32 microcontrollers with IAR®, Keil® and GCC compilers.
For product design, the STM32CubeMX official version undoubtedly facilitates the unified management of products, instead of a messy team development situation. It saves a lot of management time.
How to use STM32CubeMX
1. New construction project
Open the STM32cubeMX software and click New Project. Select the corresponding open-board MCU (STM32F429IG LQFP).
After selecting the project, enter the project interface, as shown in the figure below
2. Configure peripherals.
RCC settings, select HSE (external high-speed clock) as Crystal/Ceramic Resonator (crystal oscillator/ceramic resonator)
GPIO port function selection, PB0 and PB1 are LED1-LED2. Find the corresponding pin and set it to GPIO_Output mode. It will change from the gray state to the activated green state (the yellow pin for the GPIO function has been used for other functions and can be ignored. Green indicates that the pin is used)
3. Clock configuration
The clock configuration uses graphic configuration, which is intuitive and simple. Each peripheral clock is clear at a glance. The maximum clock of STM32F429 is 180M. Here, you only need to enter 72 at HCLK, and the software can automatically configure it. (RCC selects an external high-speed clock).
4. Functional peripheral configuration
Compared with the old version, the function setting interface of the new version is relatively hidden. Name: System view is on the upper right (the familiar function interface is displayed again), but it is a bit longer.
In the configuration box, we can see that there are several areas, and the corresponding function settings are as follows
Multimedia (multimedia): audio video, LCD
Timers (control): timer
Analog (analog): DAC, ADC
Connectivity (communication connection): serial port, SPI, I2C, USB, ETH
SYStem Core (system core): DMA (direct memory access), GPIO, NVIC, RCC
Middlewares (middleware): FreeRTOS, FATFS, LwIP, USB
Security: Security
Computing: computing
In this project, DMA is useless and does not need to be configured. NVIC (Nested Vectored Interrupt Controller) Controller)) configure interrupt priority. RCC does not need to be configured.
GPIO Pin Level (pin status): high level
GPIO mode (pin mode): push-pull output
Maximum output speed: high speed
User Label: Opt_Led0
-- be changed.
4. Power consumption calculation
This calculates power consumption based on the configured peripherals, so don't bother with it.
5. Generate engineering report
Enter the project name and select the project path (be careful not to have Chinese characters, otherwise an error may occur). Select MDK-ARM V5 for tool chain/IDE. The stack size can be set at the end, and it is not modified by default.
Find the Generated files box in Code Generator and check Generated periphera initialization as a pair of ‘.c/.h‘ files per IP. Peripherals are initialized as separate C files and header files.
Click Project –>Generate Reports or click the shortcut icon to generate a report. The system will prompt you to create a project first. Click Yes to set up the project.
After the generation is completed, OpenProject Then enter Option, select the Debugger branch, select ST-LINK for the downloader, and modify the options inside to automatically restart after each download. Save, close the project and reopen it to start your development journey.
STM32CubeMX update log
Working day and night just so you can be happier
are all gone!
Huajun editor recommends:
It is one of the best in mechanical electronics. With its comprehensive functions and simple operation, it has won unanimous praise from users. Come and download it and give it a try. The editor has also prepared for youCruzr,FastCAM automatic programming nesting software,Hanwen production planning and scheduling software,Green apple weighing software,Machining process quota calculator
it works
it works
it works