Record the general process of how to use STM32CubeMX software to establish a project to generate code
Preparation: stm32f103RCT6 development board, j-link emulator, MDK5.21.1.0, STM32CubeMX and corresponding libraries (Java environment needs to be installed for running).
Take a program that flashes an LED light as an example
1. Open the STM32CubeMX software
Then the update loading window may appear (mine did) just wait.
2. Select the corresponding development board model
3. Enter the clock source selection interface. Since I am a beginner in setting up a project, I will choose the default one.
4. Configure GPIO. Here I choose to control PA8 to control the flashing of the LED light.
5. Choose to configure the clock, crystal oscillator, frequency multiplication and division, etc. Mine is the default selection.
6. Enter the project management interface
7. Select the other default options, and a basic executable project file will be configured. Click Generate.
8. Add test code
Insert the LED flashing code into the newly created main function to test whether the program can run correctly
HAL_Delay(500);
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_8);
No errors, no warnings, the program is running correctly.
9. Download test
Let's actually test it.
Success, this is the general process, I will study it in depth later.
Previous article:ARM working mode - how to use exceptions and interrupts
Next article:ARM Cortex-M core interrupt/exception system, interrupt priority/nesting details
Recommended ReadingLatest update time:2024-11-15 10:58
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
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
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- Learn about C2000 32-bit microcontrollers
- Migrate ssh service to EK200-zlib-openssl-openssh
- Cost less than 5 yuan, reliable single-fire power supply solution (using NP101A chip, including PDF...
- Mobile station development board TI MSP430FR5969LaunchPad is here!
- ADS LNA
- Summary and sharing of PCB files imported into BRD in AD software,,,,
- 【micropython】How to use serial port interrupt
- Share: Solution to the problem that the PLL dies when the DSP debugging of TMS320C6713 is enabled
- Basic sample code for microcontrollers using C/C++
- [RTT & Renesas high-performance CPK-RA6M4] After FSP, the board_cfg.h header file cannot be found and the Jlink driver is missing