STM32CubeMX installation1、Software download1.1、Download URL1.2、Choosing a platform1.3、Filling in information2、Software Installation2.1、Open the installer2.2、Installation Process - Setup3、Software configuration3.1、Open the application3.2、Sign-up - Login to your account3.3、Installing the firmware package4、Software Usage4.1、Chip selection4.2、Pin layout and configuration4.3、Clock configuration4.4、Project management4.5、Generative engineering5、Project folder5.1、Demo5.2、Writing the code
The development tool used for the tutorial is the STM32CubeIDE software,STM32CubeMX is integrated in the STM32CubeIDE software, so learning STM32CubeMX is beneficial to understand the STM32CubeIDE graphical configuration interface.
ST Official website:https://www.st.com/content/st_com/en/stm32cubemx.html

platform:Windows

Agree to the agreement

Filling in information

The email address needs to be filled in accurately, and the software download link will be sent to you by email
Complete submission

Email to download the installer

xxxxxxxxxxClick on the link to go to the official website, the website will automatically jump out of the software compressed package download window
Administrator
Open the installation package as an administrator

xIf you open the software installation package, then you see "NSIS ERROR: error launching installer" error:Please put the package in the path without Chinese characters
Next

Check the Agreement and Privacy Policy→ Next


Location of installation → Next
xxxxxxxxxxThe following are recommended to use the default installation location of the software and the path does not contain Chinese characters



Waiting for installation → Next

Installation Completed

Familiar with software options and functions.
Click on Left mouse button:Double click the desktop "STM32CubeMX" app

Unable to download firmware package without login account.

Create an account

Fill in the information and submit it

xxxxxxxxxxEmail information Fill in accurate information

Verify email

Set a password and submit

xxxxxxxxxxOn the right is the password format requirement. Sometimes if the submission is unsuccessful, wait a few minutes or re-enter this page.
Login account
xxxxxxxxxxOn the right is the password format requirements, sometimes if the submission is not successful, wait a few minutes or re-enter this page


Help → Manage embedded software packages

Install the latest STM32F1 firmware package

xxxxxxxxxxInstall or uninstall is to check the box in front of the chip firmware package, click this option will not have install and uninstall options
Waiting to download

Close the screen

Not logged in account prompt
xxxxxxxxxxLogin to your account before downloading

Using STM32CubeMX is mainly used for STM32 configuration and initialization code generation.
xxxxxxxxxxThis article mainly introduces the common function options, and will not demonstrate the peripheral driver
Chip selection

Introduction

xxxxxxxxxxDouble-click the left mouse button on the specific chip model to enter the engineering interface

xxxxxxxxxxSystem Core:Configure DMA (DMA controller), GPIO (General Input and Output), IWDG (Independent watchdog), NVIC (Nested Vector Interrupt controller), RCC (Clock controller), SYS (system debug), WWDG (window watchdog)Analog:Configure ADC (analog to digital conversion), DAC (digital to analog conversion) peripheralsTimers:Configure RTC(real-time clock) and TIM (timer) peripheralsConnectivity:Configure CAN, I2C, SPI, USART, USB and other connection peripheralsMultimedia:Configure I2S and other audio data transmission peripheralsComputing:Configure the CRC check peripheralMiddleware and Software Packs:Configure middleware such as RTOS

xxxxxxxxxxRefer to the options involved in the red line
Project

xxxxxxxxxxSTM32CubeMX can generate MDK-ARM, STM32CubeIDE, EWARM and other project filesMDK-ARM project file is generated here
Code Generator

Advance Settings

xxxxxxxxxxChoose the library to use for your initialization code: the HAL library is demonstrated here

Open the project folder

①:Use the STM32CubeMX software to open the file and reconfigure the project
②:Corresponding MDK-ARM project file

USER CODE must be somewhere between USER CODE BEGIN and User code END,otherwise the next project file generated with STM32CubeMX will remove code outside that location
