Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Currently text all over the GUI is VERY small!Is it possible to make text of CubeMX 5 to be bigger for 4K monitors as it was in CubeMX4?Who can easy read any text from such interface I wonder (see screenshot). The only advantage of CubeMX5 seems to be GUI (I did not found in explanations about v5 any other big changes) but GUI was made really worse because of total ignorance of high DPI :(If this is a bug and not a design decision then how such things are reported to ST? Is there somewhere bugreporting service for CubeMX??
Hello, I have an issue with Cube IDE and a Nucleo-F722ZE board. When I want a baud rate of 9600 for the UART port I need to set it to 28800 inside Cube IDE for it to be the desired value. I've tested this with two different UART adapters and both indicate that this is really happening. UART parametersClock configuration of the board (the default one, I haven't changed anything here)Thank you very much for your help!
I am working on an embedded application using the STM32F103C8T6 (black pill). I've been slowly adding the functionality I need and adding different peripherals one by one. For USART I was using the excellent code written by Tilen Majerle here. Everything was working great until I added something via CubeMX and my USART 'broke' - stopped sending. I stepped through the code and discovered the issue. In Tilen Majerle's code usart_send_string("READY\n");Calls the following functions:void usart_send_string(const char* str) { usart_process_data(str, strlen(str)); /* Then try to start transfer */ } void usart_process_data(const void* data, size_t len){ lwrb_write(&usart_tx_ringbuff, data, len); usart_start_tx_dma_transfer(); } uint8_t usart_start_tx_dma_transfer(void){ uint32_t old_primask; uint8_t started = 0; old_primask = __get_PRIMASK(); __disable_irq(); if(usart_tx_dma_current_len ==0){ usart_tx_dma_current_len = lwrb_get_linear_block_read_length
There is a bug that haunts me since I started using Cube, which was 2017. It is very simple: for some reason in Clock Configuration panel whenever I touch any of the Input frequency fields, the value I am leaving in there gets divided by 1000000 (one milion). The workaround was to put the intended value multiplies by milion.It happened in all versions of Cube I tried (I am updating Cube regularly). I am using Cube as Eclipse plugin or the modified Eclipse called System Workbench for STM32 (SW4STM32). I recall reporting it at least once before, still it wasn't fixed - only made worse, as LSE field was blocked from being edited at some point, which made perfect sense, as only one value was accepted - but not if the field is given an incorrect value by Cube itself! Now Cube is constantly screaming at me that my project has a problem in Clock configuration, which was created by the Cube and I am prohibited from changing anything. That's ********. Also, as I am releasing my frustration, two
With CubeMx, I've set up the DMA in Circular Mode, Data Width Half Word, Increment Address Memory. When I get the generated code, I only see the code below. Where are the other initialization parameters? Is it because the DMA channel interrupt is enabled that they're hidden? static void MX_DMA_Init(void) { /* DMA controller clock enable */ __HAL_RCC_DMA1_CLK_ENABLE(); /* DMA interrupt init */ /* DMA1_Channel1_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn); }In the file stm32g0xx_hal_dma.c , I see the generic initialization routine shown below. But why I don't see it in the generated code?HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma) { /* Check the DMA handle allocation */ if (hdma == NULL) { return HAL_ERROR; } /* Check the parameters */ assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance)); assert_param(IS_DMA_DIRECTION(hdma->Init.Direction)); assert_param(IS_
I am using a Chinese low-cost "Blue Pill" board with an STM32F103C8T6, and developping in EmBitz IDE using init code generated by STM32CubeMX. On this board, the PC13 output is connected to an LED, but the code generated by STM32CubeMX will not allow to control this output.The root cause is that the init code sets the ASOE bit (b8) in BKP_RTCCR, which reserves the PC13 pin for the "Alarm or second output".This is an error, because in STM32CubeMX I correctly set PC13 as an output GPIO and no error was indicated.Once you know it, the solution is easy, just adding the following line after the standard initialization:BKP->RTCCR &= ~BKP_RTCCR_ASOE;This bug was specially difficult to find, because there is also a bug in the file STM32F103.svd:In the file, RTCCR is at offset 0x28 and CR at offset 0x2C, but according to the reference manual RTCCR is at offset 0x2C and CR at offset 0x30.As a result, the faulty bug is RTCCR is displayed as a non-existing bit in CR.So please fix these two
Hi,I am trying to install the X-CuBE-Azure expansion for STM32Cube. See expansion packages page: https://my.st.com/content/my_st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-azure.htmlI tried to integrate it the cube by using the Manage Software Pack in the Device configuration tool:Then I select "From local" and select the en.x-cube-azure.zip file. I get the following error:any ideas how to import that expansion into the cube?Is it better to do my own porting of azure to my STM32F7 from the original GIT?Regards
We are developing an application based on Wi-Fi connectivity. For that purpose, we took your example: “WiFi_HTTP_Server�? from “STM32Cube_FW_L4_V1.13.0�?. We are using B-L475E-IOT with SW4STM32. The application can control the LED, but after 3 or 4 time to try to change the LED, the page stops. No more loads after reset the board.We tried on two boards B-L475E-IOT with the same result.
Hello,Microcontroller used STM32H753BIIssue: STM32CubeMX 6.0.0 Macro concernsCase Number informed by ST (internal community): 00112804Issue details below:Please check the attached files.The STM32CubeMX 6.0.1 now allows adding alphanumeric values constant values, after I had requested for this. This feature was not available with STM32CubeMX 5.6.1Initial behavior when macros are declared and used:Some examples of macros that will get added to main.c as a result of adding the macros under USER CONSTANTS are:#define MaxStdFIFOs (u8CAN1MaxStandardFIFO) #define RS485RCUBaudRate (47600UL)in the above example u8CAN1MaxStandardFIFO is an unsigned char variable, which is defined only in my code and is also appropriately externed.Once I add the macro and its alphanumeric value, I am able to use the macro as value for USART3 baudrate, Defining some other values etc.The code also generates without any concern until the project is not closed.Observation & Concerns:Whenever
I am working with a Nucleo-H743ZI on a Makefile C project using STM32CubeMX generated project code (Fiirmware version V1.3.0) to troubleshoot a problem with SPI transmit using DMA.The project uses SPI1 to transmit to SPI2 on the same board at 25 megabits per second using 4 inch wires for both data and SCLK. The wiring has been proven by running a test in polling mode sending 32 bit random numbers and comparing. The polling works, so the wiring is good.The end project needs DMA, so I've re-written the code to support DMA. The DMA hardware setup was performed in CubeMX. SPI1 is the DMA transmitter.The project prints (to virtual com port) messages showing SPI status as it goes long. Once the first DMA operation is started, the program reports that a transmission is ongoing and never ends. If I scope MOSI from SPI1, there is no signal. (There is a signal, however, when the same test is done with polling).After several days of web search and research, I am
In STM32CubeIDE V1.4.2, if the CubeMX Project Manager has the "Generate peripheral initialization as a pair of '.c/.h' files per peripheral" setting enabled after the project had been built with it previously disabled, when the project code is re-generated, the existing user code in the regenerated FreeRTOS tasks is deleted and replaced with the default code. The expectation is that the user code in those tasks would have been retained.This problem also seems to occur from other changes by CubeMX that result in the task code being re-generated (i.e. renaming the task).
I have a bootstrap in internal FLASH that configures the FMC driver to setup external FLASH and SDRAM. After setting them up it jumps to the application stored in external FLASH and executes it from there. The application also needs to use the FMC driver, but if it is included in the application project, the FMC clocks are initialised a second time - first in the bootstrap and then in the application. Initialising the FMC while executing using it causes bad juju.I would like an option to include a HAL driver, but don't initialise it in any way, including the clocks.The same goes for the MPU driver.CheersDavid
Strangely, it only works if I activate both ports (then disable one, if you are not going to use both).I'm trying to create a project with RTOS, I've tried everything I've found on the internet, but it still hasn't worked.I already have a project working with two USB ports in Host mode, the HS port in MSC mode and the FS port in HID mode.I have two identical bords with STM32F407VG, and the same symptom occurs on both.I have a pendrive with built-in LED indicator, to facilitate access monitoring.When creating a project without RTOS, I noticed that the flash drive's LED did not blink. The USB debug messages were also not displayed.This is true for both FS and HS ports.Using STM32CubeIDE 1.4.2 and package STM32Cube_FW_F4_V1.25.1Please check.
Hello guys , I am using the stm32f072 microcontroller as a usb peripheral device to use it as Serial Device . I have programmed it successfully and it works fine almost time but sometime it crashes the usb interface of my system. I have tried it on other devices also but find same result . It works well but suddenly it crashes all usb and we have to restart our PC. SO i want to know that why this is happened as i am new to this . If needed i will provide you the code and the schematic of design also.Please help soon.
Hello everyone, I've brought a new NUCLEO-F207ZG for some development purpose. and it is working really fine. And thanks to ST support I've found so many good sample code with STM32CubeMX ( en.stm32cubef2 ) . As one of my important task is to implement TCP/IP ECHO CLEINT/SERVER application which is not available with NUCLEO-f207ZG but available with STM322xG EVAL BOARD. so I want to know whether I can use that library to implement TCP/IP ECHO CLEINT/SERVER application in my NUCLEO-f207ZG or any other resources available. Also while going through code files and initialization I've notice that ETHERNET PHY connection in NUCLEO-f207ZG is RMII and MII in STM322xG EVAL BOARD, hence does that make any difference firmware related part?@Community member @Imen DAHMEN @Community member @Amel NASRI @Khouloud GARSI Thanking with regardsAatif Shaikh
I disable “DMA1 stream0 global interrupt�?,and then click Fiel-》save project ,then close STM32CubeMX。But when I open the project next time, “DMA1 stream0 global interrupt�? is still enabled。I do not know why? hwo can help me,think you�?
What is new in STM32CubeMX V6.0.1? Minor release fixing the issues reported belowFixed issues 90615 Unexpected project data deletion when some utilities are used. 90636 IRQ priorities for some "Non-System" IPs are set to minimal values after project migration. 90934 Some boards do not boot after enabling FreeRTOS™.
I have the problem, that the following code does not update the registers.// The update events, as mentioned below, can be: MSTU, TFU, TEU, TDU, TCU, TBU, TAU, TxRSTU,TxREPU LL_HRTIM_TIM_SetUpdateGating(HRTIM1, LL_HRTIM_TIMER_E, LL_HRTIM_UPDATEGATING_DMABURST_UPDATE); LL_HRTIM_TIM_SetUpdateTrig(HRTIM1, LL_HRTIM_TIMER_E, LL_HRTIM_UPDATETRIG_RESET);However, if if leave the update event out, it works.// The update events, as mentioned below, can be: MSTU, TFU, TEU, TDU, TCU, TBU, TAU, TxRSTU,TxREPU LL_HRTIM_TIM_SetUpdateGating(HRTIM1, LL_HRTIM_TIMER_E, LL_HRTIM_UPDATEGATING_DMABURST); LL_HRTIM_TIM_SetUpdateTrig(HRTIM1, LL_HRTIM_TIMER_E, LL_HRTIM_UPDATETRIG_RESET);And this is the total time codeLL_HRTIM_TIM_SetPrescaler(HRTIM1, LL_HRTIM_TIMER_E, LL_HRTIM_PRESCALERRATIO_MUL32); LL_HRTIM_TIM_SetCounterMode(HRTIM1, LL_HRTIM_TIMER_E, LL_HRTIM_MODE_CONTINUOUS); LL_HRTIM_TIM_SetPeriod(HRTIM1, LL_HRTIM_TIMER_E, 0x4000); LL_HRTIM_TIM_SetRepetition(HRTIM1, LL_HRTIM_TIMER_E, 0x00); // The update eve
There are several places in the code generated by STM32CubeMX where the comments contain the phrase "in this example". For example we have the following in stm32l4xx_hal_msp.c./** * @brief I2C MSP Initialization * This function configures the hardware resources used in this example * @param hi2c: I2C handle pointer * @retval None */ void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)It was my understanding that the generated code is suitable for production use and not merely as an example.
But there's an example project behind the scenes showing how to enable MPU (STM32CubeF4\Projects\STM324x9I_EVAL\Applications\FreeRTOS\FreeRTOS_MPU).I would really like to use STM32CubeMx to configure the project - but it looks to me like its not possible if I want to enable MPU.If there's a way to make MPU available, please let me know.This is the STM32CubeMx 6.0.1 options for FreeRTOS (CMSIS_V2 API):(image was attached - however key is ENABLE_MPU is disabled by default and option greyed out).Thank You,Torben
Hello!I have last version of CubeMXI try to add DMA to SDMMC1but I can't see "DMA" option sheet. How can I add DMA?
..
Hello,I got a problem with the flash latency setting when starting a project with a STM32G4 series MCU and the newest version of CubeMX (6.0.1) and the Firmware package V1.3.0.The MCU series reference manual (RM0440, table 9) says that 8 WaitStates are needed when using the device at its maximal clock speed of 170 MHz. Cube MX calculates this value automaticly with the known clock and VDD to a value of only 4 WS, which seems to be wrong. This value is grayed out in the GUI, so it can not be changed by the user. The former version of the FW package V1.2.0 seems to use the values as seen in the MCUs reference manual.To reproduce the problem, you can start up a new project with the NUCLEO-G474RE board. This is preconfigured to a 170 MHz clock and uses, as seen in the tab "RCC", only 4 WS insted of 8 WS.Is there a mistake in my understanding of the flash configuration or a bug in the CubeMX firmware package?Thanks,Eddy
I want to use the combined reset and trigger mode as a slave mode for timer configuration, but I cannot find this option in stm32CubeIDE, however this mode exists in stm32 MXThanks
Hi,I downloaded the some expansion packages from following link:https://www.st.com/en/embedded-software/stm32cube-expansion-packages.html#products and tried to install using STM32CubeMX but i get error... screenshot attached.... Shri
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.