Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I'm using the STM32H743 and the it will not allow me to choose fast mode for a 400kHz clock speed. Is that a bug in the IDE?
Hi, I'm trying to load my Keras model (built for CamVid dataset) into STM tool, but when I try to analyze even with compression set to 8 it gives me the "Required Ram or flash size for network is bigger than available Ram or Flash" alert.I tried to modify my model also trying to eliminate various layers, but nothing.the model is:and this is what I have after the analyze:any idea? thank you!!
Hi,I am trying to generate code for STM32L010C6T6.using CubeMX5.5.0 & Atollic 9.0.1 IDE..After generating a code, I build it. I found errors likeselected processor does not support `cpsid i' in Thumb mode selected processor does not support `dsb 0xF' in Thumb modeCan any one help me to solve this issue?I have attached my code zip file here..Thanks in advance.
Attached is a CubeMX 4.26.0 project file (.IOC) with custom settings for the SDMMC1 interface (SDMMC1 hardware control ENABLED, among many other things). Yet when I generate code, for an Atollic project (or any kind of other project), and look at the HAL_SD_Init_Card() function in "Drivers\STM32F7xx_HAL_Driver\Src\stm32f7xx_hal_sd.c" I see SDMMC_HARDWARE_FLOW_CONTROL_DISABLE... As a matter of fact, none of my custom interface configurations are in any of the HAL files... It looks like all the files are unmodified, just copied from the CubeMX repository (modified data is over 2 weeks ago for every file)... Please help, I'm ripping my hair out over this...
I am on macOS 10.13.6 High Sierra. I own a NUCLEO-F446RE board.I am trying to build a simple test project with SystemWorkbench, i.e. SW4STM32.I open STM32CubeMX, I select my NUCLEO board, I select SW4STM32 as Toolchain/IDE, I press "generate code" and in the project folder there are no *.ld files, that is why when I try to build in SystemWorkbench app i get this error:Building target: 00test.elf Invoking: MCU GCC Linker arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -specs=nosys.specs -specs=nano.specs -T"../" -Wl,-Map=output.map -Wl,--gc-sections -o "00test.elf" @"objects.list" -lm /Applications/Ac6/SystemWorkbench.app/Contents/Eclipse/plugins/fr.ac6.mcu.externaltools.arm-none.macos64_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: read in flex scanner failed collect2: error: ld returned 1 exit status make: *** [00test.elf] Error 1Instead if I choose STM32CubeIDE as Toolchain/IDE both "STM32F446RETX_FLASH.ld" and "STM
I am aware I am using a slight outdated version and so apologise if this fix has already been implemented.When selecting a Custom HID Class under the middleware tab there is no option to enable or disable the USBD_SUPPORT_USER_STRING parameter, and is then set to 1 by default after generating code. This resulted in a 2 day headache trying to debug why my device was hard faulting!During enumeration if this parameter is set to 1 Windows will ask for a special descriptor, if this descriptor has not been coded/provided then the device will throw a hard fault.
As titleI generate USB CDC with STM32CubeMX,and try to send data by using interrupt transfer end point 0x81I try to usb Bushound to receive data, but it could not revive any data from CDC interrupt IN.Is there any things that i should be modify?Experiment In main while send 1 byte,(1) OK(2) FAIL1 [Bulk]USBD_LL_Transmit(&hUsbDeviceFS,CDC_IN_EP ,&data, 1)2 [Interrupt]USBD_LL_Transmit(&hUsbDeviceFS,CDC_CMD_EP,&data, 1)
Dear ST Hello,I am using Cubmx to create an RTOS for stm32f429I discovery board.I generated the default project for this board with FreeRTOS.I have an error compilation,Middlewares/Third_Party/FreeRTOS/Source/tasks.o: In function `prvAddNewTaskToReadyList':C:/Users/STarikUser/STM32CubeIDE/workspace_1.3.0/TS_RtosForTrace/Debug/../Middlewares/Third_Party/FreeRTOS/Source/tasks.c:1127: undefined reference to `prvTraceGetObjectHandle'C:/Users/STarikUser/STM32CubeIDE/workspace_1.3.0/TS_RtosForTrace/Debug/../Middlewares/Third_Party/FreeRTOS/Source/tasks.c:1127: undefined reference to `prvTraceSetTaskNumberLow16'C:/Users/STarikUser/STM32CubeIDE/workspace_1.3.0/TS_RtosForTrace/Debug/../Middlewares/Third_Party/FreeRTOS/Source/tasks.c:1127: undefined reference to `prvTraceSetTaskNumberHigh16'C:/Users/STarikUser/STM32CubeIDE/workspace_1.3.0/TS_RtosForTrace/Debug/../Middlewares/Third_Party/FreeRTOS/Source/tasks.c:1127: undefined reference to `prvTraceGetTaskNumberLow16'C:/Users/STarikUser/STM32Cube
I generated SPI1 on CubeMX. Does CubeMX SPI configuration include GPIO functionalities for the SPI pins, or do we need to programme GPIO manually? I enabled SPI1 on CubeMX using STM32L433 on pins 11(SPI-CLK), 16(MISO), 17(MOSI). I am interfacing it to a Kionix MEMS sensor on SPI. I detect no signals on the pins. Do I need to separately write configuration for GPIO for the SPI pins?I could not find any code generated by MX which allocates GPIO functions, incl AF to these pins.I am wondering if it so, why is it not a part of MX code generated?
STM32CubeMX v6.1.0, H7 lib v 1.8.0is generating code where main() calls MX_USB_DEVICE_Init();, but MX_USB_DEVICE_Init does not seem to be defined anywhere.int main(void) { ... /* Initialize all configured peripherals */ MX_GPIO_Init(); ... MX_USB_DEVICE_Init(); ...}Also worth noticing that MX_USB_DEVICE_Init "line" can be seen in Project Manager-> Advanced Settings, but the Visibility (Static) box cannot be marked:Change the order/rank of MX_USB_DEVICE_Init did not work around the issue :( Is this a know issue or do I need to set something extra to get that function's implementation?
..
Hello @Khouloud ZEMMELI ,STM32CubeMX 6.0.1 not allowing same text for Task Name and Entry Function.As per my understanding the text entered against property Task Name will be encapsulated in double quotes and will be assigned to variable name. The text assigned to Entry Function will become the name of the Task that will execute.Why is the STM32CubeMX not accepting text EH_Task as a valid value and rather reporting "Multiple definition error"?Please help with a fix.Thanks,Rajeev
Hello,I had both the ProjectManager.TemplateDestinationPath and ProjectManager.TemplateSourcePath pointing to folder which did not exist.So, I updated `ProjectManager.TemplateSourcePath` to`ProjectManager.TemplateSourcePath=C\:\\STM32CubeMX\\db\\extra_templates` as the STM32CubeMX folder is present in C Drive in the ROOT C directory.What is the use of `ProjectManager.TemplateDestinationPath`? I am not sure what should be the value passed to `ProjectManager.TemplateDestinationPath`. For now I have assigned the path where the IOC file containing these settings exist:`ProjectManager.TemplateDestinationPath=E\:\\DEPT197\\GIT\\Gateway-H7-All-Codes\\Gateway-H7\\Gateway-H7-App`Can I safely remove these two settings / variables, as others might have a different setup / folder for STM32CubeMX, templates, etc.Please suggest.Thanks and regards,Rajeev
Hi,I have generated and built code by STM32CubeIDE but the SysTick and Timer not work. I set breakpoint but the interrupt function just not run. GPIO feature work normal. But when I create the project by STM32CubeMX with the same configuration and built code by KeilC then everything work good. So is that a bug of SMT32CubeIDE? I'm using STM32F103C8T6 on board Bluepill. I don't want to use KeilC anymore because it not free. What should i do now?Thank for your advice.
Hi,I noticed that if I enable an alarm for the RTC using CubeMX 6.1.0 with date/weekday mask enabled, it results in this line being generated:RTC_AlarmStruct.AlarmMask = RTC_ALARMMASK_DATEWEEKDAYHowever, that flag is undefined. In my case, it should be:RTC_AlarmStruct.AlarmMask = LL_RTC_ALMA_MASK_DATEWEEKDAY(This is with L4_V1.16.0 and LL drivers, targeting an STM32L475, if that matters.)
After reading the Oscillator Design Guide, I picked a LSE crystal for my F7 from the list provided in that guide.But how do I know what the appropriate drive level is? My crystal has a max drive level of 1 uW. But does that corresponds to Low, MediumLow, MediumHigh, or High as described in the Reference?In none of the documents provided by ST I have found numerical descriptions of the drive levels provided by a F7. There is a drive level list for the HSE, but I'm not sure if I can use that for the LSE as well.
When I want to generate code with STM32CubeMX 5.3.0 for STM32CudeIDE, a new folder is created instead of using the folder containing the .ioc file when the .ioc file isn't named like the folder containg it. Only the .mxproject is created at the right place, but when I switch to TrueStudio, the code is generated at the good place.Initial structure for STM32CudeIDE:another-nameprojectname.iocResulting structure for STM32CudeIDE:another-nameIncSrc.mxprojectprojectname.iocprojectnameDriversSrcStartup.cproject.projectSTM32...ld
CubeIDE V1.2CubeMX V5.6.1Have not been able to pin down exactly what is happening here, but I have seen it several times. I believe it has something to do with closing the .ioc file in CubeIDE. Or possibly with changing certain settings causing other settings to auto reset or change. Note the last time I saw this was between testing this .ioc with the 1st LED LD1 on PB0. And when I added the 3rd LED LD3 into the .ioc and an additional task the checkbox was unchecked. When following the steps below I was able to get it to work without seeing the issue. It would be helpful to have someone try to reproduce this successfully, but also attempt different .ioc modification and save and close the .ioc between editing and try to get the NVIC1 TIM7 Call HAL checkbox to uncheck. The exact cause is unknown, but it is very frustrating, to bring into question if something that was once previously checked is still currently checked. Steps:Copied working .ioc to new locationOpen CubeIDE workspace in n
Hello!I created a standard LwIP NO-OS project with static IP. Everything works perfectly, but it takes ~ 15 seconds for the first PING response.After that the ping times ~1.4 ms.I tried what happens when I disconnect the Ethernet cable and then reconnect it.It took another 15 seconds to re-establish the connection (the first ping response arrived).The MCU core clock is 168 MHz. SysTick is 1ms.Why can this be?
Hello, I would like to report an issue with CubeMX configuration and code generation for USB_OTG_HS when interfacing a PHY on a custom board in Device Mode .The problem stems from the Maximum GPIO speed setting on all pins in CubeMX can only be set to "High".We were unable to enumerate the USB device and spent quite amount of time debugging this issue.Manually changing the GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH in USB_DEVICE/Target/usbd_conf.c solved the issue.Also remember to change this whenever generating code with cubeMX as this will get overwritten.Hope this may help others :o)
I have a NUCLEO-H745ZI-Q and am trying to teach myself how to use FreeRTOS on it. I can't figure out how to change the HAL timebase away from systick to one of the other timers, as is strongly recommended for FreeRTOS use. I start a new STM32 project, specify my board, and say "yes" to initialing peripherals to their default modes. I enable TIM6 for the Cortex-M7 context and enable the TIM6 interrupt. Then I go to the "SYS" panel and see the message "This peripheral has no parameters to be configured." All the TIMx timers in the Timebase Source pulldown are grayed out.I'm stuck!Thanks. Mike
These two bugs seem related. Bug 1 on STM32CubeIDE. After modifying an ioc file, when you regenerate, the IDE wipes all the contents of the Drivers folder and all subfolders, and doesn't replace them! Yow.Bug2 on STM32CubeMx. When generating code, the Core files are successfully created, but then STM32CubeMx hangs indefintely trying to create libraries. Probably some problem with write permissions on Mac Catalina...
Code generated using LL : (Issue)------------------------------------------void SystemClock_Config(void){ LL_FLASH_SetLatency(LL_FLASH_LATENCY_0); if(LL_FLASH_GetLatency() != LL_FLASH_LATENCY_0) { Error_Handler(); } LL_RCC_HSI_Enable(); /* Wait till HSI is ready */ while(LL_RCC_HSI_IsReady() != 1) { } LL_RCC_HSI_SetCalibTrimming(16); LL_RCC_HSI48_Enable(); /* Wait till HSI48 is ready */ while(LL_RCC_HSI48_IsReady() != 1) { } LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_HSI, LL_RCC_PLL_MUL_6, LL_RCC_PREDIV_DIV_1); LL_RCC_PLL_Enable(); /* Wait till PLL is ready */ while(LL_RCC_PLL_IsReady() != 1) { } LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_2); LL_RCC_SetAPB1Prescaler(LL_RCC_APB1_DIV_1); LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_PLL); /* Wait till System clock is ready */&nbs
Dear Experts,I ported I2S RX and TX program from F401 to F302R8 Nucleo board. And I encountered **unexpected** phenomenon.When I use I2S for receiving data (Half-duplex, Master-Receive mode, 48kHz, 24bit data on 32bit frame), it works fine. That means, CubeMx initialize I2S as I2SxPR = 0x10b, I2SxCFGR = 0Xb03 and output frequencies are I2S_CK = 3.130 MHz and I2S_WS = 48.91kHz. (==> OK)However, when I set it in Master-Transmit mode (rest are no change), CubeMx initialize I2S with the same parameter I2SxPR = 0x10b, I2SxCFGR = 0xa03 [changed as master-transmit], but OUTPUT FREQUENCIES are HALF of correct one. (I2S_CK = 1.535 MHz and I2S_WS = 23.99kHz). Master clock out is also changed from 11.99MHz to 6.143MHz.And if I use lower sampling rate such as 16kHz or 8kHz, such frequencies deviate further. (some are one-third of correct one.)I have not found any problem on F401 MCU like this.Can anyone kindly let me know how I can avoid this phenomenon. (Or does STM issued any errata on this i
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.