Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I have a working project in Atollic 9.1 with the CubeMX 5.0 plugin.I imported the project into STCubeIDE per instructions in UM2578.The import process reported no errors.The release config is gone - destroyed during import (see separate bug report here: https://community.st.com/s/question/0D50X0000AnuVOVSQ2/stm32cubeide-import-from-atollic-deletes-release-configuration)However, the debug configuration properly builds and loads/debugs.In the CubeMX perspective, I can open the IOC file from the project (written by the CubeMX 5.0 plug-in), but...'Generate Code' completely obliterates the entire contents of the project (everything is deleted from disk and IDE).To help you debug this problem, the IOC file is attached.Are you aware of this problem? @Markus GIRDLAND ?Is there going to be a version of this software that actually works any time soon?Thanks!Best Regards, Dave
Hello,I'm unable to install X-CUBE-NFC3 and X-CUBE-IAP-USART extension packs to my CubeMX 5.2 installation. I'm using a downloaded zip and I get this error:What should I do to resolve this? Thanks!
Hello,I'm rather new at MCU programming but have been a SWE for 20+ years working in low-level Linux (libraries and device drivers) and I understand the basics of multi-threaded programming. I have several STM32 eval boards including P-Nucleo-STM32WB55 and Nucleo-32 STM32466RE and would like to delve into FreeRTOS middleware.I have managed to create a microcode which flashes the LED every second running in a thread but I still feel like I'm missing quite a bit. I have been `googling` this topic for the last 2 days and have not found anything specific to the STM32CubeMX/TrueStudio toolchain.I figured the best way to learn would be to ask those who know. That is why I came here to the ST forum for advice.Thank you,Michael UmanSr. SW EngineerWunder-Bar
I have a project in Atollic 9.1, which I can build (both debug and release) and debug.I imported the project into STCubeIDE per instructions in UM2578.The import process reported no errors.The release config is gone - destroyed during importWhat's going on? Is there a work-around other than tediously recreating the configuration?Thanks,Best Regards, DavePS: To help you debug this, I've attached the original .cproject, the converter log, and the converted . cproject file.
I am using the ethernet and lwip drivers provided by the STM32CubeMX software on a nucleo-144. I have a program, which upon start, sends out a UDP packet. I set the program to soft reset after a few seconds to characterize this issue. Using a GPIO line, I set a point in the code to toggle after successful initialization (i.e. all initialization functions return a non error status). I found that the board would continuously reach the toggle command periodically, though the UDP packet which I am sending was not periodic, often missing 1/3 of the time. As a guess based on some debugging patterns I noticed, I decided to add in a 1 second delay before sending the first UDP packet. After doing this, I see a huge improvement, with almost all the first packets being sent out correctly. Why would this be? Is there someone else I should be watching for to reach a certain state before I send the first packet? Somewhere in the STM32 driver, or the PHY (LAN8742A)?
HiSeems the new cube L4 package has some updates on the USB driver. The Battery charging functionality no longer works because the BCDEN bit is never enabled in the `HAL_PCDEx_ActivateBCD` function. In the screenshot, left is the previous version of Cube L4 driver and right is V1.14.0. Solution is to keep the line ` USBx->BCDR |= (USB_BCDR_BCDEN); ` as it was doing fine in the old version. I don't know why it's removed?
I want to generate sample from STM32CubeMX, but STM32H745 is not in the device list. How can I add this chip type? Thanks.I have already update H7 MCU packages.
I can able to create project by configuring our deiscovery kit (STM32F413ZHT6) but need to include Free RTOS into it, So can one help out this. How to include FreeRTOS ?Thanks, RegardsNitish
Hello there.I have an encoder connected to timer 3 (TIM3) and I'd like to set this timer to generate an interrupt when a certain amount of ticks have been reached (1658 ticks). I'd like to program the timer's counter to 1658 ticks and let the encoder count up to this value and generate an interrupt. I'm using the STM32F7 using the CubeMX generator. Could somebody please point me in the right direction in how I could achieve this please?
The functions SD_read() and SD_write() in sd_diskio.c do 32-bit DMA accessed to the SDMMC FIFO. As a result, any buffer passed to these functions must be 32-bit aligned, as otherwise data can be lost or corrupted.However, it is not enough to pass an aligned buffer to f_write() and f_read(), as there are various scenarios where the buffers passed to SD_write() and SD_read() are still not aligned.So the latter functions need to check for an unaligned buffer, and take some action to correct this. We found that the simplest fix is to have a local aligned buffer, one sector in size, which can be used for DMA operations, with data transferred between it and the buffer passed to the function.We've never seen a case where more than one sector is read/written and an unaligned buffer is passed in; it's possible that this scenario is impossible.Incidentally, this post mentions a scratchpad, which sounds similar to our solution. If this isn't already included in the version of this file for STM32L
When I try to installcubeMX on my fresh installed fedora 29, I get following error messages:[sage@linux cubeMX]$ ./SetupSTM32CubeMX-5.1.0.linux chdir /home/sage/Downloads/cubeMX/.current dir /home/sage/Downloads/cubeMXMar 22, 2019 6:06:24 PM INFO: Logging initialized at level 'INFO'Mar 22, 2019 6:06:24 PM INFO: Commandline arguments: Mar 22, 2019 6:06:25 PM INFO: Detected platform: fedora_linux,version=4.20.16-200.fc29.x86_64,arch=x64,symbolicName=null,javaVersion=1.8.0_201Mar 22, 2019 6:06:25 PM WARNING: No console implementation of panel: com.st.microxplorer.install.MXAnalyticsPanelConsole installation is not supported by this installer[ Console installation FAILED! ]Anyone any idea?ThanksMartin
Hi, I'm developing a sensor tag wich uses STM32F411CC and I use an USB connector to communicate with the PC over VCP. I'm using the newest cube, keil, DFP, etc. After setting the 48MHz clock(for USB) i can't adjust the core frequency - only just to 32MHz, I use an 16MHz crystal for HSE. If I set the clocks(48MHz is untouched) to another value, like 16,48,96 MHz etc, the windows tool manager cant see the device or can't start the device with error code 10. This is still standing when i want to use mass storage usb device. If the clock is not 32Mhz I can't see the device. I missed something ?Thanks Attila
I'm learning about CAN with stm32, currently I'm using a STM32F3 discovery, the Cube MX, freeRTOS and VS Code. I created a project for CAN, calculated the S1 and S2 from 8MHz processor, enabled automatic wake-up, Receive FIFO and Transmit FIFO. Then I generated the code using freeRTOS as _weak and I set it up all pre-defineds fields, but when I go work in my task the function can.h doesn't enable function as HAL_CAN_GetRxMessage(), HAL_CAN_AddTxMessage() and HAL_CAN_GetTxTimestamp().So how solve this problem?
I hope to get a tutorial on designing Expansion Packages
I'm using the STM32H743ZI with STM32CubeMX and Autollic. with external ADC and DAC with SPI. I have 4 ADC, different CSs, connected to the SPI1 and 1 DAC to SPI2. My DAC works but I get zeros from ADCs. I tested to connected another ADC to SPI3 and disabled SPI1. I saw that when I only used the SPI3, it worked but when I enabled SPI2 (my DAC), SPI3 stopped working. I send some values to my DAC once and read the ADC inside the While(1) loop. SPI1- mood (Recieve only Master) connected to ADCsSPI2- mood( transmit only Master) connected to DAC. I have already checked the spi settings for both ADC and DAC in separate test-board
..
I'm having a problem to make USB CDC device driver work with FreeRTOS. If FreeRTOS is configured without TICKLESS_IDLE mode, USB CDC works fine. However, once TICKLESS_IDLE is enabled (or WFI is executed), I no longer able to finish USB enumeration process. It looks I can't get EP0 interrupt which indicates arrival of incoming SETUP packet. Why?My code is generated by attached CubeMX configs, then main loop is modified to make it sure that FreeRTOS idle task runs.void StartDefaultTask(void const * argument) { /* init code for USB_DEVICE */ MX_USB_DEVICE_Init(); /* USER CODE BEGIN 5 */ HAL_PWREx_EnableUSBVoltageDetector(); /* Infinite loop */ for(;;) { osDelay(10); } /* USER CODE END 5 */ }I have checked RCC_AHB1LPENR settings, but USBOTG clocks are enabled.I also tested similar configuration on STM32F767 and confirmed that USB CDC works with TICKLESS_IDLE mode enabled. That is, I imagine there is a some settings missing specific for H7, but I can't find it.Does
Hello Vaibhav here.I am interfacing SD card by SPI protocol with STM32F103C8T6 microcontroller.My aim is to write data with .txt file in SD card.I have enable the option for FatFs middleware from CubeMX but do not have any idea about how to merge SD card initialized by SPI protocol with FatFs middleware.Sample code for the same would be highly appreciated.Just in need of some simple code for operations like 1) write to SD card with "Example.txt" file name. 2) Read from SD card with "Example.txt" file name. etc. etc.Please resolve the above mention issue as soon as possible as i have dead line to submit my work .Eagerly waiting for positive
I have STM32F0DISCOVERY (STM32F051R8Tx). I work on CubeMX and Eclipse. I have a problem with setting EXTI interrupts. Please help.
when I select the version of cubemx in downloading link it just kept in a loop of license agreement to download option but not downloaded the software .Is this because of some downloading issue ?
UM1722 mentions osWait as a feature supported by CubeMX via CMSIS-RTOS but cannot be enabled from the user interface or by defining #define osFeature_Wait on cmsis_os.h.
Hy allI have a STM32469NI_Disco Board and start a project using CubeMX 5.2.0 as following:Select board by Board Selector.Let initialize standard peripherals.Connectivity - USB_OTG_FS: Select "Host_Only" and "Activate_VBUS"Middleware - USB_HOST: Select "Mass Storage Host Class" for FS IP.Generate Code for Atollic TrueSTUDIO (or Keil, if you like).Open the ProjectFix the errors generated by CubeMX:Src\freertos.c: Task name, replace "1" by an name e.g. "StartDefaultTask" and add a prototype in the header. Correct the osThreadStaticDef arguments to: osThreadStaticDef(defaultTask, StartDefaultTask, osPriorityNormal, 0 , 4096, NULL, NULL);Add code to enable the USB power in Src\usbh_conf.c, USBH_LL_DriverVBUS(..):/* USER CODE BEGIN 0 */ if(state == 0) { HAL_GPIO_WritePin(OTG_FS1_PowerSwitchOn_GPIO_Port, OTG_FS1_PowerSwitchOn_Pin, GPIO_PIN_RESET); } else { HAL_GPIO_WritePin(OTG_FS1_PowerSwitchOn_GPIO_Port, OTG_FS1_PowerSwitchOn_Pin, GPIO_PIN_SET); } /* USER CODE END 0*/Compile and start deb
Hello, I have a STM32F0 which needs to be able to read data from an 8 bit parallel interface.I therefore used the GPIOC-Port to connect the 8 bits and PA3 for the clock. The parallel clock operates at minimum 3MHz, so i configured the clocks in CubeMX to have 48 MHz at the peripherals.Then I tried to toggle another pin (with HAL-Toggle function) whenever a rising edge of the data clock is detected. I tried this in 3 ways:in the while-loop using if-then, connecting the clock to Exticonnecting the clock to TIM15_CH2 using input capture mode, presc.=0Fastest here was #1 which resulted in about 1MHz of square signal, but if this is the maximum sample speed it wouldn't work.The goal is to get that data outputted via UART or SPI when a certain identifier is detected.So is it possible to achieve this with the F0?Any help or hint is appreciated
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.