STM32CubeMX

Table Of Contents

- STM32CubeMX documentation
- CubeMX User Manual
  - 1 STM32Cube overview
  - 2 Getting started with STM32CubeMX
  - 3 Installing and running STM32CubeMX
  - 4 STM32CubeMX user interface
  - 5 STM32CubeMX tools
  - 6 STM32CubeMX C Code generation overview
  - 7 Code generation for dual-core MCUs (STM32H7 dual-core product lines only)
  - 8 Code generation with TrustZone enabled (STM32L5 series only)
  - 9 Device tree generation (STM32MPUs only)
  - 10 Support of additional software components using CMSIS-Pack standard
  - 11 Tutorial 1: From pinout to project C code generation using an MCU of the STM32F4 series
  - 12 Tutorial 2 - Example of FatFs on an SD card using STM32429I-EVAL evaluation board
  - 13 Tutorial 3 - Using the Power Consumption Calculator to optimize the embedded application consumption and more
  - 14 Tutorial 4 - Example of UART communications with an STM32L053xx Nucleo board
  - 15 Tutorial 5: Exporting current project configuration to a compatible MCU
  - 16 Tutorial 6 - Adding embedded software packs to user projects
  - 17 Tutorial 7 - Using the X-Cube-BLE1 software pack
  - 18 Creating LPBAM projects
  - Appendix A STM32CubeMX pin assignment rules
  - Appendix B STM32CubeMX C code generation design choices and limitations
  - Appendix C STM32 microcontrollers power consumption parameters
  - Appendix D STM32Cube embedded software packages
  - Revision history
- Release Notes
  - Release details
  - Release fixes
  - Known limitations
    - Miscellaneous
    - 2.1. When selecting microcontrollers in the STM32C0 series
    - 2.2. When selecting microcontrollers in the STM32G0 series
    - 2.3. When selecting microcontrollers in the STM32G4 series
    - 2.4. When selecting microcontrollers in the STM32H5 series
    - 2.5. When selecting microcontrollers in the STM32H7 series
    - 2.6. When selecting dual-core microcontrollers in the STM32H7 series
    - 2.7. When selecting microcontrollers in the STM32L5 series
    - 3.4. How to improve the wake-up from Stop sequences without relying on the global SystemClock_Config()
    - 3.3. List pinout-compatible microcontrollers
    - 3.2. DDR binaries for the STM32MP1 boards
    - 3.1. Command line authentication required
    - 2.21. Symbolic links on Ubuntu
    - 2.20. User manual
    - 2.19. DDR test suite
    - 2.18. STM32CubeIDE toolchain
    - 2.13. When selecting microcontrollers in the STM32WL series
    - 2.11. When selecting microcontrollers in the STM32WB series
    - 2.17. When using additional software packs
    - 2.16. When using the Example Selector
    - 2.15. When using the Memory Management Tool
    - 2.14. When selecting microprocessors in the STM32MP1 series
    - 2.11.1. When selecting microcontrollers in the STM32WB0 product lines
    - 2.12. When selecting microcontrollers in the STM32WBA series
    - 2.13.1. When selecting microcontrollers in the STM32WL33 product lines
    - 2.10. When selecting microcontrollers in the STM32U5 series
    - 2.9. When selecting microcontrollers in the STM32U3 series
    - 2.8. When selecting microcontrollers in the STM32N6 series
- Running STM32CubeMX in command-line mode
- FAQ
- Community

# 12 Tutorial 2 - Example of FatFs on an SD card using STM32429I-EVAL evaluation board

| | | | | | | | Calculator view, Figure 377: Power consumption sequence: New Step default view, Figure 384: Power Consumption Calculator view after sequence building, Figure 83: Power consumption sequence: new step configured (STM32F4 example), and Figure 383: Power Consumption Calculator configuration window: ADC enabled using import pinout. Added Figure 386: Power Consumption: Peripherals consumption chart and updated Figure 100: Peripheral power consumption tooltip. Updated Section 5.3.4: Power sequence step parameters glossary. | | | | | | | | | | Updated Section 6: STM32CubeMX C Code generation overview. | | | | | | | | | | Updated Section 11.1: Creating a new STM32CubeMX project and Section 11.2: Configuring the MCU pinout. | | | | | | | | | | Added Section 12: Tutorial 2 - Example of FatFs on an SD card using | | | | | | | | | | STM32429I-EVAL evaluation board and updated Section 8: Tutorial 3- Generating GPIO initialization C code (STM32F1 Series only). | | | | | | | | | | Updated Section 5.3.2: Configuring a step in the power sequence. | +—————–+—————–+——————————–+—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————–+

> Date | Revision | STM32CubeMX release number | Changes
> 19-Jan-2015 | 6 | 4.6 | Complete project generation, power consumption calculation and clock tree configuration now available on all STM32 Series. Updated Section 2.2: Key features and Section 2.3: Rules and limitations. Updated Eclipse IDEs in Section 3.1.3: Software requirements. Updated Figure 18: Updater Settings window, Figure 21: Embedded Software Packages Manager window and Figure 42: New Project window - Board selector, Updated Section 4.11: Project Manager view and Section 4.14: Update Manager windows. Updated Figure 355: About window. Removed Figure STM32CubeMX Configuration view - STM32F1 Series. Updated Table 17: STM32CubeMX Chip view - Icons and color scheme. Updated Section 5.14.1: Peripherals and Middleware Configuration window. Updated Figure 86: Adding a new DMA request and Figure 88: DMA MemToMem configuration. Updated Section 4.10.1: Clock tree configuration functions. Updated Figure 375: Battery selection, Figure 87: Building a power consumption sequence, Figure 88: PCC Edit Step window. Added Section 6.3: Custom code generation. Updated Figure 600: Clock tree view and Figure 605: Pinout & Configuration view. Updated peripheral configuration sequence and Figure 607: Timer 3 configuration window in Section 11.6.2: Configuring the peripherals. Removed Tutorial 3: Generating GPIO initialization C code (STM32F1 Series only). Updated Figure 611: GPIO mode configuration. Updated Figure 651: Power Consumption Calculation example and Figure 155: Sequence table. Updated Appendix A.1: Block consistency, A.2: Block interdependency and A.3: One block = one peripheral mode. Appendix A.4: Block remapping (STM32F10x only): updated Section : Example. Appendix A.6: Block shifting (only for STM32F10x and when “Keep Current Signals placement” is unchecked): updated Section : Example Updated Appendix A.8: Mapping a function individually. Updated Appendix B.3.1: Overview. Updated Appendix C.1.3: STM32L0 series.

> Date | Revision | STM32CubeMX release number | Changes
> 19-Mar-2015 | 7 | 4.7 | Section 2.2: Key features: removed Pinout initialization C code generation for STM32F1 Series from; updated Complete project generation. Updated Figure 21: Embedded Software Packages Manager window, Figure 42: New Project window - Board selector. Updated IDE list in Section 4.11: Project Manager view and modified Figure 187: Project Settings window. Updated Section 4.10.1: Clock tree configuration functions. Updated Figure 183: STM32F469NIHx clock tree configuration view. Section 5.3: Power Consumption Calculator view: added transition checker option. Updated Figure 374: Power Consumption Calculator default view, Figure 375: Battery selection and Figure 87: Building a power consumption sequence. Added Figure 378: Enabling the transition checker option on an already configured sequence - All transitions valid, Figure 379: Enabling the transition checker option on an already configured sequence - At least one transition invalid and Figure 380: Transition checker option - Show log. Updated Figure 384: Power Consumption Calculator view after sequence building. Updated Section : Managing sequence steps, Section : Managing the whole sequence (load, save and compare). Updated Figure 88: PCC Edit Step window and Figure 387: Description of the Results area. Updated Figure 651: Power Consumption Calculation example, Figure 155: Sequence table, Figure 156: Power Consumption Calculation results and Figure 158: Power consumption results - IP consumption chart. Updated Appendix B.3.1: Overview and B.3.5: FreeRTOS.
> 28-May-2015 | 8 | 4.8 | Added Section 3.2.2: Installing STM32CubeMX from command line and Section 3.3.2: Running STM32CubeMX in command-line mode.
> 09-Jul-2015 | 9 | 4.9 | Added STLM32F7 and STM32L4 microcontroller Series. Added Import project feature. Added Import function in Table 13: File menu functions. Added Section 4.12: Import Project window. Updated Figure 377: Power consumption sequence: New Step default view, Figure 88: PCC Edit Step window, Figure 83: Power consumption sequence: new step configured (STM32F4 example), Figure 383: Power Consumption Calculator configuration window: ADC enabled using import pinout and Figure 87: Peripheral power consumption tooltip. Updated command line to run STM32CubeMX in Section 3.3.2: Running STM32CubeMX in command-line mode. Updated note in Section 5.16: Configuration view. Added new clock tree configuration functions in Section 4.10.1. Updated Figure 613: Middleware tooltip. Modified code example in Appendix B.1: STM32CubeMX generated C code and user sections. Updated Appendix B.3.1: Overview. Updated generated .h files in Appendix B.3.4: FatFs.

> Date | Revision | STM32CubeMX release number | Changes
> 27-Aug-2015 | 10 | 4.10 | Replace UM1742 by UM1940 in Section : Introduction. Updated command line to run STM32CubeMX in command-line mode in Section 3.3.2: Running STM32CubeMX in command-line mode. Modified Table 1: Command line summary. Updated board selection in Section 4.2: New Project window. Updated Section 5.16: Configuration view overview. Updated Section 5.14.1: Peripherals and Middleware Configuration window, Section 4.5.12: GPIO configuration window and Section 4.5.13: DMA configuration window. Added Section 4.5.11: User Constants configuration window. Updated Section 4.10: Clock Configuration view and added reserve path. Updated Section 11.1: Creating a new STM32CubeMX project, Section 11.5: Configuring the MCU clock tree, Section 11.6: Configuring the MCU initialization parameters, Section 11.7.2: Downloading firmware package and generating the C code, Section 11.8: Building and updating the C code project. Added Section 11.9: Switching to another MCU. Updated Section 12: Tutorial 2 - Example of FatFs on an SD card using STM32429I-EVAL evaluation board and replaced STM32F429IEVAL by STM32429I-EVAL.
> 16-Oct-2015 | 11 | 4.11 | Updated Figure 21: Embedded Software Packages Manager window and Section 3.4.7: Checking for updates. Character string constant supported in Section 4.5.11: User Constants configuration window. Updated Section 4.10: Clock Configuration view. Updated Section 5.3: Power Consumption Calculator view. Modified Figure 651: Power Consumption Calculation example. Updated Section 13: Tutorial 3 - Using the Power Consumption Calculator to optimize the embedded application consumption and more. Added Eclipse Mars in Section 3.1.3: Software requirements
> 03-Dec-2015 | 12 | 4.12 | Code generation options now supported by the Project Settings menu. Updated Section 3.1.3: Software requirements. Added Project Settings in Section 4.12: Import Project window. Updated Figure 201: Automatic project import; modified Manual project import step and updated Figure 202: Manual project import and Figure 203: Import Project menu - Try Import with errors; modified third step of the import sequence. Updated Figure 83: Clock Tree configuration view with errors. Added mxconstants.h in Section 6.1: STM32Cube code generation using only HAL drivers (default mode). Updated Figure 651: Power Consumption Calculation example to Figure 660: Step 10 optimization. Updated Figure 661: Power sequence results after optimizations.

> Date | Revision | STM32CubeMX release number | Changes
> 03-Feb-2016 | 13 | 4.13 | Updated Section 2.2: Key features: Information related to .ioc files. Clock tree configuration Automatic updates of STM32CubeMX and STM32Cube. Updated limitation related to STM32CubeMX C code generation in Section 2.3: Rules and limitations. Added Linux in Section 3.1.1: Supported operating systems and architectures. Updated Java Run Time Environment release number in Section 3.1.3: Software requirements. Updated Section 3.2.1: Installing STM32CubeMX standalone version, Section 3.2.3: Uninstalling STM32CubeMX standalone version and Section 3.3.1: Downloading STM32CubeMX plug-in installation package. Updated Section 3.3.1: Running STM32CubeMX as a standalone application. Updated Section 4.11: Project Manager view and Section 4.14: Update Manager windows. Updated Section 5.15.1: Pinning and labeling signals on pins. Added Section 4.5.16: Setting HAL timebase source Updated Figure 143: Configuration window tabs for GPIO, DMA and NVIC settings (STM32F4 Series). Added note related to GPIO configuration in output mode in Section 4.5.12: GPIO configuration window; updated Figure 83: GPIO configuration window - GPIO selection. Modified Figure 374: Power Consumption Calculator default view, Figure 86: Building a power consumption sequence, Figure 376: Step management functions, Figure 378: Enabling the transition checker option on an already configured sequence - All transitions valid, Figure 379: Enabling the transition checker option on an already configured sequence - At least one transition invalid. Added import pinout button icon in Section : Importing pinout. Added Section : Selecting/deselecting all peripherals. Modified Figure 384: Power Consumption Calculator view after sequence building. Updated Section : Managing the whole sequence (load, save and compare). Updated Figure 387: Description of the Results area and Figure 100: Peripheral power consumption tooltip. Updated Figure 651: Power Consumption Calculation example and Figure 653: Sequence table. Updated Section 6.3: Custom code generation. Updated Figure 592: Pinout view with MCUs selection and Figure 593: Pinout view without MCUs selection window in Section 11.1: Creating a new STM32CubeMX project. Updated Section 11.6.2: Configuring the peripherals. Updated Figure 618: Project Settings and toolchain selection and Figure 619: Project Manager menu - Code Generator tab in Section 11.7.1: Setting project options, and Figure 620: Warning message for missing firmware package in Section 11.7.2: Downloading firmware package and generating the C code.

> Date | Revision | STM32CubeMX release number | Changes
> 15-Mar-2016 | 14 | 4.14 | Upgraded STM32CubeMX released number to 4.14.0. Added import of previously saved projects and generation of user files from templates in Section 2.2: Key features. Added MacOS in Section 3.1.1: Supported operating systems and architectures, Section 3.2.1: Installing STM32CubeMX standalone version, Section 3.2.3: Uninstalling STM32CubeMX standalone version and Section 3.4.3: Running STM32CubeMX plug-in from Eclipse IDE. Added command lines allowing the generation of user files from templates in Section 3.3.2: Running STM32CubeMX in command-line mode. Updated new library installation sequence in Section 3.4.2: Updater configuration. Updated Figure 107: Pinout menus (Pinout tab selected) and Figure 108: Pinout menus (Pinout tab not selected) in Section 5.7.3: Pinout menu. Modified Table 16: Window menu. Updated Section 5.7: Output windows. Updated Figure 187: Project Settings window and Section 4.11.1: Project tab. Updated Figure 101: NVIC settings when using SysTick as HAL timebase, no FreeRTOS and Figure 102: NVIC settings when using FreeRTOS and SysTick as HAL timebase in Section 4.5.16: Setting HAL timebase source. Updated Figure 74: User Constants tab and Figure 75: Extract of the generated main.h file in Section 4.5.11: User Constants configuration window. Section 4.5.12: GPIO configuration window: updated Figure 83: GPIO configuration window - GPIO selection, Figure 84: GPIO configuration grouped by peripheral and Figure 85: Multiple pins configuration. Updated Section 4.5.14: NVIC configuration window.
> 18-May-2016 | 15 | 4.15 | Import project function is no more limited to MCUs of the same Series (see Section 2.2: Key features, Section 5.7.1: File menu and Section 4.12: Import Project window). Updated command lines in Section 3.3.2: Running STM32CubeMX in command-line mode. Table 1: Command line summary: modified all examples related to config comands as well as set dest_path <path> example. Added caution note for Load Project menu in Table 13: File menu functions. Updated Generate Code menu description in Table 14: Project menu. Updated Set unused GPIOs menu in Table 15: Pinout menu. Added case where FreeRTOS in enabled in Section : Enabling interruptions using the NVIC tab view. Added Section 4.5.15: FreeRTOS configuration panel. Updated Appendix B.3.5: FreeRTOS and B.3.6: LwIP.

> Date | Revision | STM32CubeMX release number | Changes

> Date | Revision | STM32CubeMX release number | Changes |