Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Thank you for helping.environmentSTM32CubeIDE Ver1.3.0Unable to open ioc file.The following message is displayed when building.'STM32F769I_DISCO.ioc' is requiring code generation.Click OK to build without invoking Device Configuration Tool code regeneration.How do I open an ioc file in the IDE?
hi, I am working with the NUCLEO-F207ZG card and I have configured USART2 on port D.Now CubeMx offers me the setting of the RX pin in Push-pull mode !!!!!! The same for CTS !!!And there is no way to set the pin in any other way !!!Can anyone give me an explanation ???
Using an operating system such as free-rtos, it is common to send a message from the interrupt to a thread, but if the handle to the thread is not yet created - a hard-fault is usually seen. Testing a flag in the interrupt routine activated when the system is initialized can be used, but the best solution would be to let the user code take care of the NVIC enable instead of Cube-MX. Is there a way I can achive this?BrgMads-l
I just installed the STM32CubeMX IDE and the packages for the STM32F7xx MCU. (I have used IDE's from IAR, Atmel and other sources for decades.) Unlike other IDE's, it appears that the current version of the STM32CubeMX does not contain any example projects!! In a previous post, there were instructions to click on Help -> Updater Settings. On my version of the IDE, there is no Updater Settings menu item. I would appreciate any help to locate the example projects.
Hi, I wanted to use DMA with ADC, I configured all parameters in CubeMX in STM32IDE but it did not work. I analysed that and the problem was in init functions. CUBEMX calls first the ADC_init function and later the DMA_init function. ADC_init configures also the DMA but the DMA's clock is not at this time enabled, so all the configuration will be discard. I change manually the sequence of the init functions, first the DMA_init and after the ADC_init.After this change everything is working properly.
HiI've flashed my device STM32L496VG with the Cube FreeRTOS Low Power example from STM32Cube_FW_L4_V1.15.0. Now I cannot flash my device again, using both Segger j-flash and IAR.I'm getting the "connecting to CPU via connect under reset fails".Any suggestions? how can I re-flash my device if it is constantly entering sleep mode?Thanks all!
HiI installed STM32CubeMX on my system(Windows 10 OS) but it isn't running!When I try to open it, welcome window pops on but after fading nothing would be opened.I tried to run it as administrator and also I uninstalled and reinstalled it and even restarted my PC, but nothing has changed.#not_running #CubeMX -Ben-
I used STM32CubeMX to generate a simple project, have a simple breakout board with nothing connected to it other than power, programmer, and ground.
Hello, I am using STM32H7 and Stm32CubeMX. In my current application, I perform a user interface (using UART), and then the system performs a measurement task. However, I need to change the system to perform the user interface and measurement task in the following manner:The measurement is performed anyways. The UART interface is activated as soon as the user enters something in the Serial Terminal. I am really confused as to how to do this. I really appreciate any help. Best regards, Vouria
Hi, I'm use the STM32F429This is my FREERTOSConfig.h#define configUSE_PREEMPTION 1 #define configSUPPORT_STATIC_ALLOCATION 0 #define configSUPPORT_DYNAMIC_ALLOCATION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) #define configTICK_RATE_HZ ((TickType_t)1000) #define configMAX_PRIORITIES ( 7 ) #define configMINIMAL_STACK_SIZE ((uint16_t)128) #define configTOTAL_HEAP_SIZE ((size_t)15360) //#define configTOTAL_HEAP_SIZE ((size_t)17*1024) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_16_BIT_TICKS 0 #define configUSE_MUTEXES 1 #define configQUEUE_REGISTRY_SIZE 8 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 /* Co-routine definitions. */ #define configUSE_CO_ROUTINES 0 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ #define INCLUDE_vTaskPrioritySet 1 #define INCLUDE_uxTaskPriorityGet 1 #define INCLU
I am trying to set up the config for a new ST project, but I cannot make the FMC configuration select SDRAM. The tool lets me select the SDRAM mode for different package versions, like the BGA configuration, but not for the 100pin alternative. This has been mentioned in forum posts like this, and I follow the advice to see, in table 9 of DS12110 Rev7 that I should be able to use the SDRAM pins on the 100pin package. I need to exercise the ADC/DMA to write to SDRAM because the application requires a long collection that would be much too big to store internally. Please help me understand how to configure this part to use SDRAM. Or definitively confirm that SDDRAM controller is not possible with the 100pin package.Thanks, Darren
Hi, I can't fix why cubemx is stucking while copying files for code generation. I'm using Win 10 (64bit) and Java_Runtime_Environment_(64bit)_v8_Update_45. Can someone please help understand how to fix it ?
Where should the fsdata_custom.c be located? It works fine in the Middlewares/Third_Party/LwIP/src/apps/http directory however it is deleted by CubeMX with code generation when I save the .ioc file. Logical should be be Src together with the other custom files. This gives an error: fc.c cannot find fsdata_custom. My Src is included in the Source locations. Thanks
I have some problems with the USB/CDC communication. I have simplified the problem to the following:I'm using STM32CubeIDE and I've used CubeMX to configure a new project with STM32H743IIT6. I set up the clock and the USB/CDC device.The communication works fine at the beginning, but if I add commands, even some asm("nop") before the infinite loop it stops working:int main(void) { HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_USB_DEVICE_Init(); asm("nop"); asm("nop"); while (1) { } }One "nop" is ok, but two or more are bad. I have found, that if the function size exceeds 24 byte, the problem occours. What can be the problem?RegeardsMatthias
I have tried communication through SPI by following a lot of youtube tutorials. As there is no ready made library to take care of this through SPI, I decided to give SD mode a try. I am using the STM32L476RG microcontroller that has the SDMMC peripheral. For now, I am trying a simple mount, open, write and close program. I keep getting a FR_NOT_READY as the return value right at the f_mount function. Also, during code generation from cubeMX, I keep getting the following warning:These IPs still have some not configured or wrong parameter values: [FATFS, Verify the Platform Settings Tab]Also, please confirm the SD card wiring. I am using it in SD 1bit mode and so, I assume the only wires I had to connect were Data0, CMD, CLK and power lines.I am using a Sandisk class 10 8Gb microSD card and I am using 1.3.0 cubeIDE version. I have attached my project (STM32L476RG_USARTtest) here.
We are using an STM32L452, running directly from an HSE crystal at 8 MHz (i.e. no PLL), using the SDMMC peripheral with an SD clock of 8 MHz, and DMA for transferring data to and from SDMMC.HAL_SD_IRQHandler() relies on the value of hsd->Context to determine which actions to take, rather than on, say, the value of CMDINDEX or RESPCMD.Unfortunately, SD_DMAReceiveCplt() - called from the DMA interrupt - modifies hsd->Context, and as reported in another bug report, it's possible for the DMA interrupt to trigger before the SD interrupt, meaning that the value of Context will be wrong, and hence the SD interrupt will execute the wrong action.We found that this could be avoided by instead checking CMDINDEX (in register SDMMC_CMD) to see which command was last issued. This eliminated this race condition.Similarly, SD_DMAReceiveCplt() is also dependent on hsd->Context, which means that if the SD interrupt fires first and changes Context, the function may take the wrong action. As ment
Hi Community, I use a STM32F405 to access a uSDCard.Software: CubeMX V5.3 and SW4STM32 (Eclipse Neon.3 Release (4.6.3))The good news, I can communicate with the SDCard (create files, write content and delete files. So far so good, but now the questions:Q1: How to check if DMA is working?Where can I see/check that I actually use the DMA which is added in CubeMX in the SDIO section?Because if I remove the two DMA lines for RX and TX and press the "GENERATE CODE" button again, after re-compiling my unchanged user-code is still working perfectly. I thought there should be a problem now...Of course I checked the www for information and I found a tutorial on youtube (https://www.youtube.com/watch?v=0NbBem8U80Y) where the guy changes the content of the library functions BSP_SD_ReadBlocks_DMA() and BSP_SD_WriteBlocks_DMA() from bsp_driver_sd.c and he changes the content of SD_read() and SD_write() from sd_diskio.c to use the DMA.Are these steps still necessary? (I haven`t changed my code so fa
Hi All,I am using STM32F407 development board and I am trying to do flash write operation but I am facing problem to erase a sector (I am using Sector no - 11 Block base addresses -0x080E 0000 - 0x080F FFFF size-128 Kbytes ) so that I can perform multiple write operations :According to PM0059 Programming manual:Sector Erase To erase a sector, follow the procedure below:1. Check that no Flash memory operation is ongoing by checking the BSY bit in the FLASH_SR register2. Set the SER bit and select the sector (out of the 12 sectors in the main memory block) you wish to erase (SNB) in the FLASH_CR register3. Set the STRT bit in the FLASH_CR register4. Wait for the BSY bit to be clearedBut, while performing step no 3 from above mention steps it causing an error while debugging"cannot access target shutting down debugging section". and its come out of debug session I am using code generator by STM32cubeMXvoid FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange){ uint32_t tmp_p
I get some bug. I use mcu stm32l152ve. Version 1.9.0. After update i got some errors.When i init, timer 6, 7, i got assert error in assert_param(IS_TIM_SYNCHRO_INSTANCE(htim->Instance));because #define IS_TIM_MASTER_INSTANCE(INSTANCE) (((INSTANCE) == TIM2) || \ ((INSTANCE) == TIM3) || \ ((INSTANCE) == TIM4) || \ ((INSTANCE) == TIM5) || \ ((INSTANCE) == TIM9)) #define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)In previous versions was#define IS_TIM_MASTER_INSTANCE(INSTANCE) (((INSTANCE) == TIM2) || \ ((INSTANCE) == TIM3) || \ ((INSTANCE) == TIM4) || \ ((INSTANCE) == TIM5) || \ ((INSTANCE) == TIM6) || \ ((INSTANCE) == TIM7) || \ ((INSTANCE) == TIM9))it work perfect
Hello, Currently cubeMx provides a pinout view usefull to see what is in use and to choose alternatesdepending of board layout constraints.Would it be possible to add an "eval board" view which would allow to see basically the same information but on a nucleo or any other compatible eval board.Today, if I want to wire a nucleo board from a cubemx configuration, I need to look, at cubeMx,look at nucleo datasheet, found the the pin I'm looking in the 64 or more available (remember that they are not sorted on the CNx connectors). It's long and error prone.Add that if I'm using a nucleo32 :PA0 is on pin A0PA1 is on pin A1PA2 is on pin A3and so on.That's another reason for a mistake.Something like this:would be very usefull imho.ThanksJulien
I am using LWIP with FREERTOS. I see that CUBE has put the LWIP init function in the default thread but it did does not create the MX_LWIP_Process(); that you would normally call in the always loop if useing LWIP without freertos. Is this just a bug or does this work in a different way
I tried to generate a simple LL code CubeMX for NUCLEO - H745ZI. I cleared all pinouts, made PB0 as GPIO output, assigned context M7 to GPIO, change clock to HSI from HSE and generate code.Observation: They are still so many functions used in main.c and corresponding files not included, hence the code doesn't build. Has anyone generated pure LL code using CubeMX ?Thank You.
Hi, I just noticed that since I upgraded from 5.3.0 to 5.6.0 user-labels no longer not get exported as #define's to main.h. This occurs only in following conditions: * if the 'pin-stacking' option is set AND * if more than one signal is 'stacked on' (=reserved for) that pinPins with only one signal assigned to (whether 'pin-stacking' activated or not) will export normally.This behavior is new, I didn't have this problem in 5.3.0.Is it a bug, or am I using the 'pin-stacking' funcion incorrectly?Best regards, Bernd
Pop us says the application can't be opened.Are they're plans to support this MacOS?Are there any work-arounds?Best,Matt
Hello!I was able to successfully run the LwIP_HTTP_Server_Netconn_RTOS application for the STM32F767ZI-Nucleo board included in the STM32Cube_FW_V1.16.0 package. I was even able to add UDP send and receive tasks which work.But now, since I will be adding more functionality to the chip, I want to be able to use the STM32CubeMX software to help me in putting in new peripherals. I migrated to this. Unfortunately I am not able to make the program run anymore. I looked at the article https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working for some clues as it pertains to STM32H7 and not STM32F7 as is my case.Basically, any LWIP related functionality does not seem to be working. I attached the whole package. I've run out of ideas. Any help would greatly be aprreciated.Thanks!
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.