Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
For a customer, I needed to write up our workflow for using STM32CubeIDE, especially all the steps required to work around assorted issues in CubeMX, HAL, LL, and CubeMX-generated glue code. I'd appreciate any comments, especially if I missed anything. Perhaps others will find this useful!Thanks in advance for any (constructive) comments,Best Regards, Davehttp://www.nadler.com/backups/20200111_draft2_STM_Cube_Issues_and_Workflow.html
The original post is here: https://community.st.com/s/question/0D50X0000AVU8zXSQT/cubemx-usb-bugNobody responded to the OP and I have the same issue. Are there any actual ST employees on here, or are the users of STM32CubeMX on our own?
Hi!I found three bugs I want to report. It's about the STM32 version 1.24.2. I'm using Nucleo STM32F401RE board.First bug is that MX_DMA_Init() need to be before MX_USART2_UART_Init() like this:/* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DMA_Init(); MX_USART2_UART_Init(); MX_ADC1_Init(); MX_TIM1_Init(); MX_TIM2_Init(); /* USER CODE BEGIN 2 */Second bug is that if you place HAL_GPIO_WritePin inside the function HAL_UART_RxCpltCallback, you need to manually turn the GPIO pin FALSE, before you can even use it.Like this:void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { // Check if we are going to ONLY set PWM's(0) or set digitals(1). Last RXData have the send state element uint8_t send_state = RXData[sizeof(RXData) / sizeof(RXData[0]) - 1]; if (send_state == 0) { // Set PWM counters period by convert short -> byte htim1.Instance->CCR1 = (uint32_t) ((RXData[0] << 8) | RXData[1]); htim1.Instance->CCR2 = (uint32_t) ((RXData[2] &
As title says, i get spinning wheel when trying to open my project MCU configuration.I now have to load the IOC into cubeMX and generate sources through it, which brings its own bag of problems. (duplicate files, ...)Is there something that can be done?Thanks.
Hello,in the last days I worked a lot with STM32CubeMX without any problems (STM32L432KC). I2C, SPI, UART and CAN work pretty well.Now, I try to configure a simple PWM timer. When I only activate a timer (lets say TIM15 / The behaviour is the same for other timers) and I just generate code the following line will be created in main.c.MX_TIM15_Init();This seems to be exactely the same like for all other peripherals... But when I compile the project, it says, that MX_TIM15_Init(); is not defined. An overall search confirms, that there is just a declaration in tim.h but no implementation.Can anyone reproduce this issue? Best regards!
Update: Complete bad generated project attached, picture of build failure added.Note this problem is produced with the CubeMX plug-in inside the IDE, not the stand-alone CubeMX.F439, latest CubeIDE, included RubeMX 5.4.0, and HAL/LL stuff all downloaded in last couple days.Attached IOC generates code with many bugs:Does not compile. Completely hopelessly wrong include paths.Include paths are generated trying to guess number of "../" required by source in multiple directory depths, and getting it wrong.Generated include paths should be workspace/project relative but are notNo less than 3 copies of cmsis_os.h are generated, etc, etc.Multiple copies of 3rd party middleware sources (for both lwip and freertos) are emitted, for example under both Middlewares\FreeRTOS and Middlewares\Middlewares\Third_Party\FreeRTOS, with differing directory structures!!!This is absolutely, absurdly, and completely broken.Has anybody ever tested any of this software?STM, Please confirm you have reproduced th
Hello,I think the correct range for TCPIP_THREAD_PRIO, DEFAULT_THREAD_PRIO, SLIPIF_THREAD_PRIO and possible others in CubeMX LWIP configuration should be -3 to +3 and not 0 to 6.And the default value should be lower than 3 (osPriorityRealtime) definitely to avoid conflicts with low level ETH send/receive threads.
So I am using Nucleo64 (303RE) board for USB HID mouse project.As you know, it does not have second USB port for USB applications but it does have PINS that can act as DM, DP (USB minus, plus data). When I configured everything, I run debug and it was telling me that packet has been send successfully, but I could not see any signal on oscilloscope. NOTE that I checked clock output for USB and it was a good looking 48MHz clock. Can anybody tell me what am I doing wrong ? Maybe its necessary that board has another USB port and these GPIO pins cannnot be directly used in that way. To be honest I am frustrated and this thread is my last hope.
When attempting to set the regular channel trigger source in the ADC, only EXTI 11 appears as a choice. If I switch to injected channels, all possible trigger sources appear. A bug? or am not not setting things up correctly? (I did enable a timer's TRGO to update, to make it available as a trigger.)
For example, using CubeMX to set the I2C, 400K rate, the TIMING parameter is automatically generated, but it is not 400K in actual operation. The timing value of the program in ST DEMO is different from that in CubeMX, so how can I use CubeMX to set the correct I2C timing?D:\STMicroelectronics\STM32Cube\Repository\STM32Cube_FW_G0_V1.3.0\Projects\NUCLEO-G070RB\Examples\I2C\I2C_TwoBoards_ComDMA:
I have a ready project that was created with cubemx 4.19, It's ok when I compile this project by keil version 5.15, but when I generate it by cubemx 5.4 I have some errors after compile it by keil version 5.15for example "undefined dword"What is the problem in it?
In the help document concerning .extSettings file the information is unclear.As I read it the Groups section is supposed to create/add directories and files.It does not. I have generated the project for SystemWorkbench and EWarm.I downloaded a test version of IAR to verify. None of the directories or files are added as described.The only change I can find is an entry in .mxproject file.The specified file is added to SourceFiles in PreviousUsedSW4STM32Files section.Can anybody explain how to use the Groups section.
..
STM32F429 Nucleo-144 and STM32F413 Nucleo-144 are there, but no 439...Applies to both stand-alone CubeMX and CumeMX within STM32cubeIDE.Windows 10, IDE v1.1.0, CubeMX v5.4.0.STM, Please confirm you have checked and ticketed this,Thanks,Best Regards, Dave
Hello STM-Team,new CubeMX 5.5.0 generates a wrong standard definition for ff_free in file "ffconf.h":(if FATFS and FreeRTOS are used)#define ff_free vportFreeCorrect syntax with upper case P would be:#define ff_free vPortFreeCould you verify this problem?Thank you!
Hi,I need create UDP server on STM32F407 with PHY DP83848 in RMII mode. I started with CubeMx, but it support only LAN8720 in this mode.What is the solution?Thank you.Peter
Hello Community:What I am doing should be easy and straightforward, but the results are not. On this card (NUCLEO-L433) I am using CubeMX to do just one thing - set USART1 to transmit and receive, with only the receive set up for DMA. I set it up in Cube as DMA1 Channel 5, Circular, with byte increment to memory. USART global interrupt 1 is not enabled.The base code is generated, I then added the function handler HAL_UART_RxCpltCallback. To set up the DMA, I added HAL_UART_Receive_DMA(&huart1, (uint8_t*)rxChar, 1);I use a jumper to connect PA9 to PA10. I then run the code, sending a 6 byte buffer with: HAL_UART_Transmit(&huart1, (uint8_t*)&myByte,6,0xFFFFFFFF);The issue: I put a break point in the interrupt handler:void DMA1_Channel5_IRQHandler(void){ HAL_DMA_IRQHandler(&hdma_usart1_rx);}and it never reaches there. I have looked at examples but cannot find any reason why this DMA is not running to the interrupt. I veririfed that all the DMA and USART functions are
Hi i have a B-F446E-96B01A development Board.but i don't know this board's reference setting in cubeMX.plz help me
Hello i am working on stm32h7 and i want to use DAC channal output as ADC REF voltage intenally.can any please tell how to do it
I am having a problem with a timer. I use CubeMX LL drivers, with basic time-base timer configuration.STM32L100RCT6, TIM6 and TIM7. Core Clock = 32MHz, PCLK1 (TIM6 and TIM7) = 32MHzPrescaller = 31, which should set timer to tick at 1us. ARR value is set to max, 65535, interrupts are disabled.Although my timer does tick at 1us, starting and stopping timer adds another few microsecond, which is unacceptable for my application. I added GPIO writes (directly using registers) and check timings with logic analyzer.Here is the pseudo-code of my test:// start timer <GPIO HIGH> LL_TIM_SetCounter(TIM6, 0); <GPIO LOW> LL_TIM_EnableCounter(TIM6); <GPIO HIGH> while(LL_TIM_IsEnabledCounter(TIM6) == 0) {}; <GPIO LOW> // poll timer until value match while(getUsDelayTimerValue() < 99) {}; <GPIO HIGH> // stop timer LL_TIM_DisableCounter(TIM6); <GPIO LOW>I assume that any of LL_TIM_x call would be in a range of a few nanoseconds, or at least far below
BUG REPORT:Using STM32CubeIDE 1.1.0 with a new STM32F401VE project, under the CubeMX perspective, when I change the system core priority grouping, it correctly limits the range of values that I can enter for the interrupt pre-emption priority and sub-priority for the various enabled interrupts.If I click save it correctly writes the setting to the ioc file, but when I regenerate the code it doesn't actually issue a call to HAL_NVIC_SetPriorityGrouping (or equivalent), so the setting never happens to the hardware when the project is run.Can anyone reproduce this, or fix it?Thanks,
I have used stm32cubeMX and atollic truestudio in this case. I'm attaching my project folder which contains the ioc file and the code files. I would be highly obliged if anyone can tell me the mistakes in either the cubeMX settings or the code or both.BRMANASKANT MISHRA
Dear communityWe are pleased to announce the release of STM32CubeMX v5.4.0What is new in STM32CubeMX V5.4.0? • Added the support of the STM32L5 Series (beta support)(a): – Possibility to create projects with no TrustZone® security (user Option Byte TZEN = 0 with legacy project structure) or with TrustZone® security (TZEN = 1 with new project structure for secure and non-secure images). For TrustZone® projects (TZEN=1), in order to match default IDAU/SAU and secure and non-secure linker files, special Option Bytes setting is required. – Possibility to assign peripheral or middleware to secure (CM33S) or non-secure (CM33NS) context. – Possibility to secure RCC resources via the Clock Configuration tab. Securable resources are highlighted with a "key" icon. – Support of microcontrollers in the STM32L5 Series: STM32L552CCTx, STM32L552CETx, STM32L552CETxP, STM32L552CCUx, STM32L552CEUx, STM32L552CEUxP, STM32L552MEYxP, STM32L552MEYxQ, STM32L552QEIx, STM32L552QEIxP, STM32L552QCIxQ, STM32L552QE
I'm using an STM32F411RET6 MCU to make a keyboard. Attached is the full schematic. Using CubeMX to generate the USB code. I'm a hobby-ist and I apologize in advance if there's a very basic issue that I've overlooked.The problem is it works sometimes but most times it doesn't. I get the error in Windows "USB Device has malfunctioned". Looking in USB Device Viewer, i see the following error:[Port2] FailedEnumeration : Unknown USB Device (Device Descriptor Request Failed) Is Port User Connectable: yes Is Port Debug Capable: no Companion Port Number: 0 Companion Hub Symbolic Link Name: Protocols Supported: USB 1.1: yes USB 2.0: yes USB 3.0: no ---===>Device Information<===--- ConnectionStatus: FailedEnumeration Current Config Value: 0x00 -> Device Bus Speed: Low Device Address: 0x00 Open Pipes: 0 *!*ERROR: No open pipes! ===>Device Descriptor<=== *!*ERROR: bLength of 0 incorrect, should be 18 bLength: 0x00 bDescriptorType: 0x00 bcdUSB
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.