Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi all,I'm trying to use STM32CubeIDE to create a project for this board from the list of "Examples Selector". I picked "Demonstrations" as seen in the picture. I don't see a ".ioc" file and when I try to build I get these errors:Description Resource Path Location Typemake: *** No rule to make target 'C:/Users/myUserName/STM32W/Demonstrations/STM32CubeIDE/Utilities/lcd/stm32_lcd.c', needed by 'Utilities/stm32_lcd.o'. Stop. Demonstrations_CM4 C/C++ Problemmake: *** No rule to make target 'C:/Users/myUserName/STM32W/Demonstrations/STM32CubeIDE/Utilities/lcd/stm32_lcd.c', needed by 'Utilities/stm32_lcd.o'. Stop. Demonstrations_CM7 C/C++ ProblemI tried 3 different projects and all 3 don't have the ".ioc" file. That's the file that shows the visual configurator pinout among other things. In a effort to find out more I picked a different board (NUCLEO-L476RG, example "GPO"). This time I get an ".ioc" file and the project builds without errors. I'm new to STM32 and the wh
I am using the STMicroelectronics.X-CUBE-AI.8.0.1 with the board STM32U5A5ZJTxQ Here is what I did: Applauded a keras model under the form .h5. Putting PD9 and PD8 on the USART3_RX and USART3_TX respectively Using the connectivity to USART3 in mode Asynchronous and Hardware Flow Control disable Systel Core RCC: Put HSE to BYPASS Clock Source Put LSE to BYPASS Clock Source Clock Configuration: Activate the CRC Software Packs Component Selector Put STMicroelectronics.X-CUBE-AI Application to validation Activate the AI X-CUBE-AI and Device Application Put the Platform Settings to COM Port: USART:Asynchronous USART3 Question: at the network place: is it possible to add two datasets, so two files, in the inputs into the validation inputs section or/and in the validation outputs? If yes, is it possible to do it for several datasets?Thank you in advance,
Sees Error codes attached This errors codes pop up when I try to upload codes TUT_Can_F103 and TUT_ Can _F446Re ( STM32 Can Commincation ) into the my F103 and F446RE ( reference STM 32 Can Communication// Normal Mode by Controller Tech -tutorial) -see attached My ST- Link and Blue pill ( F103C8T6 ) have no serial #'s How do i null or delete or modify to complete my upload and debug run
I have a bunch(May be 200+ files) of cubeMx files(.ioc files) which were created using STM32CubeMx v6.4.0. Now I want to migrate all them to v6.8.0.I do not want to open each and every file manually and select "Migrate". Wanted to know if there are any command line instruction/ API to migrate the ioc from one version to other.Thank you.
Hello,Is it possible to change the format of the generated code from CubeMX? In other words, is it possible to configure the indentation and header comments that get generated from CubeMX, either with a template or some user option?Thanks!
Hello, I would like to ask about the clock configuration of STM32F429.I use STMcubeIDE for project configuration and my clock configuration is as follows: The GPIO port is configured as follows: I tried to turn on an LED light, but the program froze.When using STMcubeIDE1.11.0, the program is in SystemClock_Config()if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) ! = HAL_OK){Error_Handler();}An error occurs, and it is stuckWhen using STMcubeIDE1.7.0, the LED light flashed quickly with the naked eye, and the simulation found that after running for a period of time, it ran out, about 1ms, and the suspect was still the reason for the clock configuration. Can you answer the question for me
Typical user symptom: sprintf with floating point doesn't work or crashes.I've provided a complete explanation and required fixes here:http://www.nadler.com/embedded/newlibAndFreeRTOS.htmlTo illustrate the crash in minimal test application, I've provided this example project ready to run for a Nucleo 429:http://www.nadler.com/embedded/20190804_STM_malloc-Kaboom_demo.zipSet breakpoints at:sysmem.c: on the line with errno = ENOMEM;main.c, in default task, on line kaboomP1 = malloc(16);Enjoy the fireworks.Comments on (one of) the problems are provided in sysmem.cThe fixes are explained in the web page linked above, and illustrated in this corrected minimal project:http://www.nadler.com/embedded/20191115_malloc-Kaboom_fixed.zipIt would be great if STM could:- confirm they understand this set of bugs- fix them in a prompt release of ST32cubeIDE/CubeMX/etc.OK, we can dream, right?Thanks,Best Regards, Dave
Hi!I'm using stm32f105vct6, project generated with CubeMx, Usb Host CDC with FreeRTOS (cmsis v2)usb_cdc.cUSBH_FindInterface(phost, COMMUNICATION_INTERFACE_CLASS_CODE, ABSTRACT_CONTROL_MODEL, COMMON_AT_COMMAND);was changed toUSBH_FindInterface(phost, COMMUNICATION_INTERFACE_CLASS_CODE, ABSTRACT_CONTROL_MODEL, NO_CLASS_SPECIFIC_PROTOCOL_CODE);otherwise there was no enumeration #define CDC_RX_BUFFER_SIZE 512uint8_t CDC_RxBuffer[CDC_RX_BUFFER_SIZE];After Appli_state == APPLICATION_READY I setmemset(CDC_RxBuffer, 0, CDC_RX_BUFFER_SIZE);USBH_CDC_Receive(&hUsbHostFS, CDC_RxBuffer, CDC_RX_BUFFER_SIZE); and USBH_CDC_ReceiveCallback:// Handles the data recived from the USB CDC hostrx_size = USBH_CDC_GetLastReceivedDataSize(phost);for (int i = 0; i < rx_size; i++){ pp_circle_buf[pp_iend++] = CDC_RxBuffer[i]; if(pp_iend >= PP_CIRCLE_BUF_SIZE) pp_iend = 0;}USBH_CDC_Receive(phost, CDC_RxBuffer, CDC_RX_BUFFER_SIZE);osSemaphore
I have a project in which I have a specific flash section dedicated to device calibrations (.factory_variables). This allows me to to create a full_program.elf file and an update.elf file with different linkers. full_program.elf file: used in productionupdate.elf: used in to updateHaving to maintain two linkers is not efficient (compile time, binary management ,etc). I am trying to do a single compilation and then use arm-none-eabi-objcopy.exe to remove the calibration section. However when trying to update with the update.elf and stm32cubeprogrammer the following error appears:The reason for this error is that stm32cubeprogrammer incorrectly detects the .elf headers with size = 0.I am currently creating the update with the following command:cp full_program.elf update.elf arm-none-eabi-objcopy.exe --remove-section .factory_variables .\update.elfUsing readelf tool I can see that update.elf is correctly created. Section 3 is "emptied" and leaved with 0 spaceORIGINAL F
Hi,I am trying to integrate ETH & TFT LCD i nto my application using STm32H757 MCUTFT LCD display interface is working properly unless ETH is configured ETH is configured through below linkhttps://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-workingEthernet module is able to get the IP address connected to DHCP serverMPU is configured and I-Cache & D-Cache Enabled as given in above linkOne problem with ETH configuration is - Application is not executing in normal mode.Need to click on F5 (3-5 times) in debug mode as in the below link'https://community.st.com/t5/stm32cubemx-mcu/start-code-execution-problem-with-mx-lwip-init/td-p/167691When enabling D-Cache for ETH irrespective of MPU region configurations, TFT LCD is not displaying clearly Disabling D-Cache makes LCD display clearUnable to find the proper solution for both issuesPlease extend your valuable support to fix it
I have problem with using stm32 drivers for connection to eMMC.https://datasheet.lcsc.com/lcsc/2205071500_Zetta-ZDEMMC04GA_C3010207.pdfProblem is that the initialization pop up error, because timeout occures in function static uint32_t SDMMC_GetCmdError(SDIO_TypeDef *SDIOx). I'm using sdio MMC 4bus connection. With default configuration generated with cube MX. Whole CubeIDE project: https://drive.google.com/file/d/17Y-EmB60kiUhar9B0o4DANVTT_GUKXUu/view?usp=drive_linkINITIALIZATION FUNCTION:static void SDIO_MMC_Init(void){ hmmc.Instance = SDIO; hmmc.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING; hmmc.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE; hmmc.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE; hmmc.Init.BusWide = SDIO_BUS_WIDE_4B; hmmc.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE; hmmc.Init.ClockDiv = 0; if (HAL_MMC_Init(&hmmc) != HAL_OK){ Error_Handler(); } if (HAL_MMC_ConfigWideBusOperation(&hmmc, SDIO_BUS_WIDE_4B) != HAL_OK){ Error_Ha
Hi,I am trying to generate my project from CubeMX from the command line. If i do this from the standalone STM32CubeMX installation (version 6.6.1) then all works as expected. I am using the instructions from UM1718 section 3,3.2, and running from the command line without gui using a script.my script is essentially:config load <my exisiting config file.ioc>project generate exitAll works great. The .ioc file specifies the STM32CubeIDE toolchain, and to generate under root. All files generated as expected.Now, if I try and do the same thing but using the version of CubeMX installed as part of STM32CubeIDE 1.10.1, the generation changes the .ioc file to use the EWARM toolchain, and to not generate under root. I have tried adding the lines generate toolchain STM32CubeIDE and generate generateunderroot 1 to my script but this makes no difference.If I compare the output of the generate process between the two, I can see no difference apart from the timestamps and the tool locations
Hello ST electronics,I wanted to know if there are any implementation of T= 1 protocol available with cube MX configurations.Please do let me know.Regards,Adarsh T R
Hello,I'm working on an application on the STM32U575 platform, involving the usage of the ADC1, GPDMA and TIM15 peripherals.During operations, the TIM15 is running in OC mode and has an effective period of 1kHz. The trgo event of said timer should also drive the sampling of a single channel on ADC1, which then sends samples to a buffer via DMA.I'm using the latest version of the U5 HAL.I managed to accomplish the first part of the operation (i.e. TIM15 --> ADC1), which works fine in interrupt mode, however I'm unable to implement a good solution involving the use of DMA. The issues I'm facing is overrun on the ADC1 in certain implementations, and DMA related errors in others.What I tried so far:>> Using GPDMA in simple mode, with a single buffer, kicking off operations after initialization and restarting it afterwards when conversion is complete.// Operation is started once after initialization HAL_ADC_Start_DMA(&hadc1, (uint16_t *)buffer, 64); // Start TIM15 HAL_TIM_OC_St
Feature request: For Makefile projects in STM32CubeMx, the beginning of the file starts with:########################################################################################################################### File automatically-generated by tool: [projectgenerator] version: [4.1.0] date: [Tue Jul 18 10:26:49 MDT 2023] ##########################################################################################################################The date is annoying for version control systems, and it would be really nice if the message stopped after the version.Related to https://community.st.com/t5/stm32-mcu-products/stm32cubemx-feature-request-remove-date-time-in-generated-files/td-p/458017Best regards,Cory
The new version of CubeMX (6.9.0) no mater of options in Project Manager / Code Generator, if Keil Toolchain / IDE is choosen, the project regeneration delete the previous .uvprojx file and generates a new one, LOOSING ALL changes made by the user in the project. For now, I uninstalled the new version and went back to the previous one (6.8.1). Any solutions I haven't seen?Meanwhile, I continue with the aforementioned problem (CubeMX messed up) and there is no way to solve it (I'm honestly disappointed...)
Dear @KDJEM.1 I need to write the data to flash memory also read from the flash memory. I am using STM32L4P5-Dk(1MB of flash is available) in that ,say 0xABFF23 should be stored in the flash memory. How it can be done ?which hal function should be used?
I'm using stm32f207zg mcu with LAN8742 device for an ethernet based application that implements a server with multiple client connections. We are using non RTOS, LwIP with RAW interface and HAL drivers. During validation test we realized that link was unable to initiate when ethernet wire is not connected. When ethernet connector is unplugged when server starts, if the connector is plugged after this, link stills down. We were trying to call the MX_LWIP_Init function after link up detection but it doesn't work.The source code generated by CubeMx: void MX_LWIP_Init(void) { /* IP addresses initialization */ IP_ADDRESS[0] = 192; IP_ADDRESS[1] = 168; IP_ADDRESS[2] = 1; IP_ADDRESS[3] = 32; NETMASK_ADDRESS[0] = 255; NETMASK_ADDRESS[1] = 255; NETMASK_ADDRESS[2] = 255; NETMASK_ADDRESS[3] = 0; GATEWAY_ADDRESS[0] = 192; GATEWAY_ADDRESS[1] = 168; GATEWAY_ADDRESS[2] = 1; GATEWAY_ADDRESS[3] = 1; /* USER CODE BEGIN IP_ADDRESSES */ IP_ADDRESS[3] = App_GPIO_Rea
Hi,I've found three bugs in CubeMX for the DCMI code generation.uC: STM32H7A3IITxQCubeMX Version: 6.5.0Firmware Package: STM32Cube FW_H7 V1.10.0The IOC-file is attached.1.Following lines are getting generated in HAL_DCMI_MspDeInit:HAL_DMA_DeInit(dcmiHandle->DMA_Handle); HAL_DMA_DeInit(dcmiHandle->hdmarx); HAL_DMA_DeInit(dcmiHandle->hdmatx);=> The dcmiHandle has no members named "hdmarx" and "hdmatx". (Compile Error)2.Following lines are getting generated in HAL_DCMI_MspInit:__HAL_LINKDMA(dcmiHandle,DMA_Handle,hdma_dcmi_pssi); __HAL_LINKDMA(dcmiHandle,hdmarx,hdma_dcmi_pssi); __HAL_LINKDMA(dcmiHandle,hdmatx,hdma_dcmi_pssi);=> Same thing here, "hdmarx" and "hdmatx" are no members of the dcmiHandle. (Compile Error)3.In the main function, following lines are getting generated:MX_GPIO_Init(); MX_FMC_Init(); MX_DCMI_Init(); MX_DMA2D_Init(); MX_LTDC_Init(); MX_TIM2_Init(); MX_I2S1_Init(); MX_I2C1_Init(); MX_I2C2_Init(); MX_SPI2_Init(); MX_CRC_Init(); MX_DMA_Init(); MX_JPEG_Init(
Hello, Just a quick heads up regarding LL implementation of LSI.It fails to start, while same setup generated for HAL works as it should.Now looking in detail whats wrong in register level calls, will post my results.ST, I hope you will find and fix this issue with LL code generation, thank you !
Auto-conversion from a CubeMX 6.2.1 File to a CubeMX 6.8.1 compatible file through CubeMX 6.8.1 does NOT retain the UART4 GPIO Pull-up/Pull-down settings from the original file. Thought I'd share it here in case someone else is running into this problem as well.
There is a newly introduced bug in the freshly upgraded package coming with the IDE 1.11. MX_SDMMC1_SD_Init(void) does not configure hsd1.Init.BusWide = SDMMC_BUS_WIDE_1B but directly to the final state choosen in CubeMX (in my case 4B). But the SD requires to be started and configured with 1B before switching to the final configuration. Forcing manually to 1B makes the job, but CubeMX changes it back to 4B after each generation. The easy workaround is to force 1B in the user code at the end of SD_init function.Could you confirm this is a bug and roll back to the correct version ?
Hello,Im working on a Project, which i use with it STM32F750N8H6 with external Memory and im trying to interface them to each other.I have so far now done the Configuation of GPIO, TimingParameters..etc but i wanted giving too the Value of the Clock Frequncy for SDRAM in Clock-Configuation, then i have not found the FMC-Clock Mux!Where can i entering the Value in order to make the Interface well working?Thanks,
Hello,I started the upgrade process as always under administrator rights, the download and installation finished successfully and then I need to restart with administrator rights again to fulfil the installation and I get this:I close all the other application, I even restart the PC but still I get this.
Hi,I have a cube ide project that has started to consistently crash the codegenerator module whenever I try to reopen the .ioc file. It displays the usual dialogs about rendering interface then nothing happens. At the console I can see the backtrace of the crash: java.util.NoSuchElementException: No value present at java.base/java.util.Optional.get(Optional.java:148) at com.st.microxplorer.codegenerator.CodeGenerator.sortFunctionList(CodeGenerator.java:7386) at com.st.microxplorer.codegenerator.CodeGenerator.getAllFunctionList(CodeGenerator.java:7495) at com.st.microxplorer.plugins.projectmanager.gui.CodeGenSorting.updateSettings(CodeGenSorting.java:827) at com.st.microxplorer.plugins.projectmanager.gui.ProjectSettingsPanel.UpdateDialog(ProjectSettingsPanel.java:247) at com.st.microxplorer.plugins.projectmanager.engine.MainProjectManager.loadConfig(MainProjectManager.java:588) at com.st.stm32cube.common.mx.editor.CubeMxEditor.setProjectSettings(CubeMxEditor.java:1342) at c
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.