Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello, I have an issue trying to download CubeMX v6.8.1.The website keeps asking me to log in while I am already logged in. So I log in again and the cycle never ends.I tried to clear the cache and also tried with a different browser.Any help will be higly appreciated!Ivan
Hi,After I migrated my .ioc file from CubeMX 6.9.2 to CubeMX 6.10.0 I get everytime the warning below. I did only the migration. There is now warning available in the "PWR" tab.What do I have to configure that this warning disappears?Or is it a bug in CubeMXOr is it a bug in the STMU5 Firmware? Thanks in advancenobody
According to RM0456, section 11.4 RCC clock functional description, p. 482:"The RCC feeds the Cortex system timer (SysTick) external clock with the AHB clock (HCLK) divided by eight, or LSE or LSI. The SysTick can work either with this clock or directly with the Cortex clock (HCLK), configurable in the SysTick control and status register."However, the corresponding clock settings, at least for STM32U5A5 seem to make no impact. Regardless of what is set, the generated source code is exactly the same. The SysTick source is controlled by RCC_CCIPR1.SYSTICKSEL register Figure 36. Clock tree for STM32U5 SeriesRM0456 does not clearly explain where the related STCALIB register mentioned in section 22.2 is located and how to set SysTick to work directly with HCLK. RCC_CCIPR1.SYSTICKSEL register (section 11.8.46) allows only for three values:00: HCLK/8 selected,01: LSI selected,10: LSE selectedI am puzzled. Probably those who tried to implement this CubeM
In datasheet it's NC while stm32cubemx says it's VSSIt doesn't matter I think
I am working with CubeMX 4.26.0. All my projects are using the latest firmware package version available on my computer:Project - Settings - Mcu and Firmware packageFirmware Package Name and VersionSTM32Cube FW_F4 V1.21.0Use Default Firmware LocationC:/Users/username/STM32Cube/Repository/STM32Cube_FW_F4_V1.21.0One project still points to the old version:Firmware Package Name and VersionSTM32Cube FW_F4 V1.18.0Use Default Firmware LocationC:/Users/username/STM32Cube/Repository/STM32Cube_FW_F4_V1.18.0How can I change firmware version in this project to the latest one?Every time when I install new STM21CubeMX version and firmware package, and then open existing project, CubeMX suggests to upgrade the project. I always accept this, keeping all projects up-to-date. For this specific project, I probably asked "No", and it still points to the old firmware package. I cannot find a way in CubeMX UI to update firmware package version.
We are pleased to announce you that the official release of STM32CubeMX V6.10.0 is available. What is new in STM32CubeMX V6.10.0? Added the support for STM32CubeMP13: bare-metal firmware for the STM32MP13xx microprocessors. Added the support for new microcontrollers in the STM32WBA series Added the support for new boards based on the STM32U5 series and STM32WBA series Added the support of the memory management tool for the STM32WB series and STM32WBA series Added the possibility to install STM32CubeMX without administration rights Added the Start From Board new feature Main fixed issues: 130929 Enable access to LSI/LSE by enabling an access to backup domain to configure them. 158979 [Boot path configuration] [Secure manager: Wrong location of RAM in linker file for secure manager. 158982 [Boot path configuration] [Secure manager] Missing secure manager API files in STM32CubeIDE generation 159253 Bad number of Sink or Source PDO generated by STM32Cube
Hello,I am trying to figure out what is the version of the LL drivers used in a project. Where can I find this information, is it stated in any header file? I could not find anything so far.Thanks in advance!Andreea
In file stm32c0xx_hal_conf_template.h there are duplicated lines at 239 row.#ifdef HAL_UART_MODULE_ENABLED#include "stm32c0xx_hal_uart.h"#endif /* HAL_UART_MODULE_ENABLED */ if you are using Cube MX you can't compile.
I am wondering, if one only downloads MX, then how the software is built? Is the standard arm-eabi-none toolchain enough? Are in the standard toolchain all the needed include files and libs present? Or ST used its own version of the toolchain, libs, etc?
Where can I get demo of Ethernet and lwIP with Nucleo-F207ZG? Why can't i find Nucleo-F207ZG example in STM32cubemx6.01? Thanks.
Hello, i am using the STM32H725ZGT6 on a custom layout.As comparison i am also using the STM32H723ZGT6U on a NUCLEO-H723ZG Board.I am using STM32CubeMX, Keil µVision and the ULINK2 debugger. To test the Serial Wire Flashing procedure, i created an empty Cube Projext (using HSI and no controller pins), compiled itand flashed it to the controller. The Nucleo Board works perfectly fine with this setup. However when i do the exact same procedure (of corse with correct controller), my custom Board has a problem:I can only flash the software when the BOOT0-Pin is set to +3V3 (but not use any peripherals). When the BOOT0-pin is set to GND, i cannot program anymore and there is "SWD Communication Failure" according to Keil. I also tried to toggle a GPIO but had no acces with my custom board so far.Any ideas on this?If you need more infos, please let me know.See Layout files attached. Thanks.
Hello,When creating a C++ Project for STM32F7 (my Board: Nucleo F767Zi) with LwIP and FreeRTOS with CMSIS V2 Layer, after 30 seconds up to a few minutes Ethernet communication stops working (Stuck in cmsis_os2.c at xSemaphoreTake (hMutex, timeout) ).Steps to recreate the Bug:Create new STM32 Project for Nucleo F767Zi with targeted language C++ (CubeIDE 1.5.1 with STM32Cube_FW_F7_V1.16.0)In CubeMX change Systick to TIM6, enable LwIP and FreeRTOS with CMSIS V2 Build and flash Boardcontinuously ping the board and wait for it to crashSee also my previous post: https://community.st.com/s/question/0D53W00000aqa2WSAQ/freertos-lwip-in-c-project-on-stm32f7It works if I either:convert Project to C in CubeIDEswitch to CMSIS V1Greetings
Hello,I try to build the STM32CubeExpansion_SBSFU_V2.6.2 for STM32H750B-DK. I use STM32CubeIDE Version: 1.14.0 Build: 19471_20231121_1200 (UTC) on Windows 10.I got several environment issues:Building SECoreBin failed for multiple reasons.It needed prepareimage.py at C:\. I copied it there.The prebuild.sh had issues with the "pwd" command that returns nothing.I specified basedir and current_directory with the absolute path values.Everything pass.Finally I got problems when prepareimage.py tries to encrypt the binaries with the command:python /prepareimage.py enc -k ../../../2_Images_SECoreBin/STM32CubeIDE/../Binary/OEM_KEY_COMPANY1_key_AES_CBC.bin -i ../../../2_Images_SECoreBin/STM32CubeIDE/../Binary/iv.bin ../UserApp.bin ..//../Binary/UserApp.sfu I found that the prepareimage.py uses Python module "keys" that is missing on my build machine.I didn't find a way to install it.I believe that I missed the step to configure the bu
While looking at the HAL's RTC code, I noticed that in the IRQ handler for WakeUpTimer, there is no enabling of access to backup domain registers before clearing flag WUTF in RTC register ISR...Should this not be needed?When testing in my own implementation, WUTF flag cannot be cleared unless I first enable access to the backup domain registers.The reference manual (RM0090) does not feel very clear about if this is needed for clearing WUTF.(this is just one of numerous issues I have with the HAL RTC code and the documentation, but I feel that I may need to know more to determine if it's an error in the HAL code)
Hello, i installed STM32 CubeMX 6.2.9 today. I tried to add software packages by clicking "help" -> "Manage embedded software packages", but nothing happens. Then i tried to log in using "myST" -> "Login", but again nothing happens and i can not log in. I tried using ALT U and ALT L but it did not work.I attached the log file of STM32CubeMXThanks,Marisa
Hi, <1> Recently I noticed the important of the Linker setting when I configured USB support(Someone say that need to increase the value in case of going wrong). So I am wondering how large I could set.How does it relate to System SRAM or somthing else? And how can I find it in codes? I took over a project with USB problem that was not created by CubeMX. <2>I am also a FreeRTOS new user.I was told I should set a large stack when create a task in the first time. But how maximum I could set? All task stack add up can not be more than what? Does someone know or think about these questions? Thanks for your reply.
Standalone STM32CubeMX 6.9.2 allows the user to configure the 3 SPI interfaces, the embedded CubeMX in STM32CudeIDE at version 6.10.0 has them all greyed out and unavailable. The hint says to disable the corresponding I2S1/I2S2/I2S3 peripherals. These peripherals not available on the L476RG and thus can't be disabled.For now I dare not upgrade my standalone version of CubeMX as I suspect this will break as well! Please can we have a fix?Ta
Hello,most devices define helper definitions, like selecting the system clock source. E.g. L412:#define RCC_CFGR_SWS_MSI (0x00000000UL) /*!< MSI oscillator used as system clock */#define RCC_CFGR_SWS_HSI (0x00000004UL) /*!< HSI16 oscillator used as system clock */#define RCC_CFGR_SWS_HSE (0x00000008UL) /*!< HSE oscillator used as system clock */#define RCC_CFGR_SWS_PLL (0x0000000CUL) /*!< PLL used as system clock */E.g. The U5 headers miss these definition. What a pity. That makes writing portabe code harder.Please consider adding.Regards
float init_sensor(void){ uint32_t numTicks; float distance; RCC->AHB1ENR |= (1U<<1); GPIOB->MODER &=~ (1U<<19); // pin 9 as output GPIOB->MODER |= (1U<<18); // pin 9 as output GPIOB->MODER &=~ (1U<<16); // pin 8 as input GPIOB->MODER &=~ (1U<<17); // pin 8 as input GPIOA->MODER |= (1U<<10); GPIOA->MODER &=~ (1U<<11); RCC->CFGR |= (1U<<4); RCC->CFGR |= (1U<<5); RCC->CFGR &=~ (1U<<6); RCC->CFGR |= (1U<<7); while(1){ //generate 10uS pulse and 250uS delay GPIOB->ODR |= (1U<<9); delay_us(10); GPIOB->ODR &=~ (1U<<9); delay_us(200); numTicks=0; while((GPIOB->IDR) & (1U<<8)){ numTicks++; } distance = (numTicks)/58; } return distance; } Hello,I wrote this code,and the code get stuck in the while GPIOB condition and I don't know why..it's also happens when I tried sim
Hi @Imen.D ,Please help me with a way to enable clocks to RAM_D2 and RAM_D3 section via STM32CubeMX.I am assuming somehow by default the clocks to RAM_D1 is enabled in code,I do not find a call to RCC->AHB2ENR which is enabled (i.e., not commented out) in the code generated using STM32CubeMX.My team mates are asking me not to modify code (like enabling macro DATA_IN_D2_SRAM or adding assembly code in Reset_Handler section) and rather use some setting with the STM32CubeMX to enable the clocks to RAM_D1, RAM_D2 and RAM_D3 sections.Please share your inputs.Thanks!Rajeev
Hi, i get this error, can someone please help me, thanks. I use Cube MX(STM32-cube-ide).I tried to follow the steps but it didn't work.
Posted on May 03, 2018 at 14:53Hello,I am currently learning about STM32 devices and I am working with a Nucleo-F767ZI which I am programing using a toolchain that consists of Simulink with the STM32-MAT/TARGET support package, STM32CubeMX with the STM32F7 FW V1.11.0, and TrueSTUDIO.I am interested in configuring and using the CAN interface available on the Nucleo F767ZI and I have built a simple example in Simulink with a CAN1 Send block and a MCU Config block. The code generation is successful and I can load the project in TrueSTUDIO. However, when compiling I get the following error: 'unknown type name 'CanTxMsgTypeDef'After some reading I found out that the HAL CAN Driver has been changed since STM32F7 FW V1.9.0 and there is no typedef struct with the above name any longer. It has been replaced by the following structure which can be found in stm32f7xx_hal_can.h:/** * @brief CAN Tx message header structure definition */typedef struct{ uint32_t StdId; /*!< Specifies the sta
Hello,I am wondering how to set the DHCP hostname for LwIP when using STMCubeMX. The CubeMX tool creates a definition for the hostname in ethernetif.c: #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip";#endif /* LWIP_NETIF_HOSTNAME */However, this is "hard wired" in CubeMX. If I change it manually in ethernetif.c, CubeMX rewrites it to the default value "lwip" after each change in the IOC definition. There is no option in CubeMX for the DHCP hostname.I am using the latest FW, latest Cube tools (CubeIDE version 1.11.0, CubeMX version 6.7.0).BTW, I found the same question in the forum, four years old( but with no satisfactory answer.Thanks in advance for helpBest RegardsZdenek
Hello All,We've been struggling with getting hard faults originating in FreeRTOS generated code, but triggered by initialization of a USB optical mouse. The symptoms and stack trace are nearly identical to a previous unreproduced / unresolved post:https://community.st.com/t5/stm32cubemx-mcus/problem-with-usb-host-library/td-p/57379 Environment:MCU STM32H7B3NIHxSTM32CubeMX 6.8.1IAR EW IDE 8.50.9FreeRTOS 10.3.1CMSIS 2.00 We decided to start from scratch with a new CubeMX project with nothing enabled but UBS_HS_OTG and USB_Host. (attached) The application ran great and mouse actions were accurately received. When FreeRTOS was enabled a hard fault was generated when the mouse was plugged in. Stack Trace:HardFault_Handler<Exception frame>uxListRemovexTaskRemoveFromEventListxQueueGenericSendFromISRosMessageQueuePutUSBH_LL_PortEnabledHAL_HCD_PortEnabled_CallbackHCD_Port_IRQHandlerHAL_HCD_IRQHandlerOTG_HS_IRQHandler<Exception fra
Hi,I have created a project using STM32CubeMX and Keil uVision.The generated CubeMX comes with its own main.c and main function.What I want to do is disable that main.c build in the project and create my main.cpp file,where I can put my main function.The problem I'm now facing is that the compiler is giving the following warning- Object file renamed main.o to main_1.o While going through this documentation it says to configure the linker and scatter file.https://developer.arm.com/documentation/ka004041/latest/But I'm not able to figure it out. is there some other document I can go through?
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.