Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello,For some reason, I'm not able to enable LWIP on CubeMX 6.11.1, it looks grayed out. I have enabled ETH in RMII mode and CPU DCache.However, if I enable both Cortex M7 and M4, then I'm able to enable LWIP. Is this the expected behavior?
im using stm32h743zi2 nucleo board . im triyng to do programming in ethernet with udp without freeRTOS . using firmware version of 1.10.0 but it is not pinging . anybody did programming with this FW . please let me know the reasons for not ping.or send me the working code for ping. thanks
..
Hi, is any possibility to protect editing code generated with in STM32Cube. I sometimes made some mistake and change the generated code. It would by good, if it is in STMCube some toggle button, that I can enable disable editing the the code generated with STMCube. The user code would be editable every time. The best solution would be if the not editable text code will be sad or grey.
Hello,in CubeIDE (MX) RS485-direction switching is only selectable for UART4 and UART5 (by hardware, not by SW-GPIO). According to user manual, it should be possible for all UARTs/USARTs (Pin DE/RTS). Is this feature missing in CubeIDE or is this hardware-feature only available for UART4/5 (manual is incorrect)? RegardsSteffen
Hi all,I recently updated to the latest STM32CubeMX version 6.12 in order to take advantage of the ability for CubeMX to generate a CMake project for a dual-core MCU (specifically for the STM32H7 family). However, I'm a little confused on the implementation of this feature, specifically with how it compares to the CMake projects generated for single-core MCUs.Could anyone help me understand why the CMake project is now generate as PRIVATE, in a separate mx-generated.cmake file, rather than as an INTERFACE library as it was with single-core projects? Having the code generated in this way allowed me to use the generated CMakeLists file (the one with all of the HAL driver source files and include paths, I think it's typically located at [cubeMX project location]/cmake/stm32cubemx) as a way to easily add the HAL driver for a given micro to my app, and I was able to build the same app targeting multiple different micros thanks to this.Ultimately, my issue is with how the CMake project gener
HI Forum,I am configuring my USART as a synchronous slave receive only, the cube software configures clock, receive and transmit GPIO and I cannot remove the transmit GPIO configuration in the GUI without it removing the entire peripheral. Is their a way to configure this properly. I can configure the USART with clock and receive manually and the and use the TX pin for some other GPIO in code without a problem. When receive or transmit only is selected from the data direction option the corresponding unused pin should become free.
We are using MIPI-DSI on a STM32U5G9NJ.First bug: There are 2 pins missing in the Pinout View: D4 and J9. Both are VDD11 pins. Second bug:After Enabling LTDC and DSI in STM32CubeMX I can't select "Active High" for "Data Enable Polarity" in LTDC -> Parameter settings. To reproduce:* Create project with STM32U5G9NJ (or a different STM32U5G9 package)* Enable HSE (System Core -> RCC -> HSE)* Enable LTDC (with a DSI setting; which one doesn't matter)* Now I'm able to choose "Active High" for "Data Enable Polarity"* Enable DSI (mode doesn't matter)* Now I can only select "Active Low" for "Data Enable Polarity" (if "Active High" was selected previously, LTDC displays an error telling me to select something different)We use a display where we need DE polarity "Active high". So we can see that this setting is applied and making a huge difference when changing it manually in the source code.
The documentation from Eclipse ThreadX states you must call context save/restore assembly routines for ISRs when using ThreadX calls (e.g. tx_thread_resume) in the ISR. https://github.com/eclipse-threadx/rtos-docs/blob/71a7c00f369b9cd648f73dfddb0d5ca6d5a1b855/rtos-docs/threadx/chapter3.md#isr-template In our MX generated code, the EXTI9_5_IRQHandler is a C function, its doesn't have the ThreadX calls to save/restore. _tx_thread_context_save_tx_thread_context_restore
I just configured an MCU using the latest configurator, in STM32CubeIDE V1.16.0. Set up a bunch of GPIOs no problem, gave them useful names.One pin though wouldn't let me: each time I entered the desired nae ("5V_ENA") I'd get "The label '*' on pin '*' should start with a character or an underscore"If I started it with an underscore, it was ok, but 5V_ENA was rejected. What did I miss? [UPDATE] A number ('5') is not considered a character apparently. "ENA_5V" was ok. Solved, leaving here for reference.
I am trying to generate code using CubeMX (version 6.11.1), using the NUCLEO-H563ZI board to start the project. But, I am getting the following pop-up when trying to use the USART3 peripheral which seems to be unavailable:Because of this, I had to downgrade the version of CubeMX to 6.10.0 to use USART3. However, I observed that even after saving the ioc file, later when we opened the file again CubeMX had overwritten the pins to the default state.Why is this happening and is there any workaround for it?
I'm using cubemx for stm32f401.I have to address several SPI devices using a sing spi bus, and different chip selects.Each SPI device requires a different configuration of CPOL/CPHA.So when the bus is idle (when all the chip selects are high) I use HAL_SPI_Init () to change the settings SPI settings accordingly. This works fine with the exception of the initial idle clock level.Apparantly the SPI controller does not set SCK to the correct idle value until after the first message is sent.The reference manual (RM0368 Rev 5) states on page 564 that:The idle state of SCK must correspond to the polarity selected in the SPI_CR1 register (by pulling up SCK if CPOL=1 or pulling down SCK if CPOL=0) It seems that this isn't implemented in the HAL SPI driver?
"I am using your program and made some changes, but when I use it in the function HAL_DAC_Start_DMA(&hdac, DAC_CHANNEL_1, (uint32_t*)value, 89, DAC_ALIGN_12B_R); HAL_TIM_Base_Start(&htim4); the signal result on the oscilloscope is not continuous. What I mean is, when I use a very long array, the result does not match what I expected. To help you understand, I am attaching two photos comparing the result I want and the result from the program. I have a signal result like the one on the left, but I want it to be like the one on the right. After investigating, it turns out that the length value in HAL_DAC_Start_DMA was manually changed. If it can be done automatically, please give suggestions so I don't have to set it manually.program to check uint16_t hold_samples = 50; uint16_t firstHalf[64] = { 2100, 2149, 2250, 2350, 2450, 2549, 2646, 2742, 2837, 2929, 3020, 3108, 3193, 3275, 3355, 3431, 3504, 3574, 3639, 3701, 3759, 3812, 3861, 3906, 3946, 398
My platform is Windows 11. I had to run STM32CubeMX in a command-line mode. According to the video tutorial and UM1718:jre\bin\java -jar STM32CubeMX.exe -iruns STM32CubeMX in interactive command-line mode.It took me a long time to find out that it works only if I append a Project.ioc. Otherwise, the cursor is not in the desired MX> position. My apologies if this happens only in my case. If it is common, I expect ST to exhibit more maturity in providing documentation.
FreeRtos V2 generates errors in compiler version 6. May I ask when this problem can be solved? Currently, this problem can be solved by porting the portmacro.h and port.c files, but you need to report each time you update the package version. Very troublesome
I am trying to use stm32f407 and w25q128 to get a usb drive, for this I wrote a driver to control the flash drive and initialized the USB MSC using CubeMX. When I connect the stm32 to the PC (Ubuntu) I see the new storage device in the Disks app but it doesn't mount, I tried to erase it but the process freezes until I reboot the boardw251128 has:PageSize = 256SectorSize = 4096SectorCount = 4096PageCount = 65536BlockSize = 65536CapacityInKiloByte = 16MbBased on this information, I set the defines in `usbd_storage_if.c`:```#define STORAGE_LUN_NBR 1#define STORAGE_BLK_NBR 0x1000#define STORAGE_BLK_SIZ 0x1000int8_t STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len){w25q_readSector(buf, blk_addr, 0, blk_len * 4096); // 0 is offsetreturn USBD_OK;}int8_t STORAGE_Write_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len){w25q_eraseBlock(blk_addr);w25q_writeBlock(buf, blk_addr, 0, blk_len * 4096);return USBD_OK;}```I added some printfs inside these met
Hi guysI want to generate a time base by a general purpose timer interrupt (TIM6) on a F334 with low level library. I do not know why, I get init functions fine but no interrupt request handler is generated, nowhere.It should be very simple, I thought, but I did nothing with STM32 for a longer time. I remember to did this (and more...) with old HAL library years ago, but even though if I select HAL in advanced settigs, I get nothing better. I use the last firmware package version (CubeMX says its version 1.11.5) and tried many things before, including that here:https://community.st.com/t5/stm32cubemx-mcus/how-to-generate-callback-functions-in-stm32cubemx/td-p/130320So I come up here, maybe someone else know what is going wrong here? I attach the cubemx file, maybe somebody can ivestigate what I've forgotten?
I am trying to use IKS4A1 with IDB05A2 together with F446RE.Each of these expansion boards works fine with F446RE. However, when I try to use STM32CubeMX to create a combined project, I cannot add the BLE1_applications. I assume this configuration should work so I can use MEMS data over a BLE1. Is my assumption correct?If yes, then what is the best way to solve my issue in STM32CubeMX?
I can not download software from Stm32 anymore because I do not receive download links via mail anymore, but I still receive emails for webinar invites.How could I get the software I need from stm32 now?
Hello ST,in my recent design I faced trivial task of synchronizing several outputs based on common timers and external events. I picked STM32G474 for this task as I found HRTimer perfect due to its architecture. What I didn't foresee is the fact that It's not possible to reduce APB2 frequency for this timer below 100MHz which in conjunction with HRTIM div4 allows going down only to 25MHz which results in maximum period of ~2.6ms (timer is only 16 bit). For my application I need at least 10ms. I understand this is limited due to High Resolution feature which I don't need in this case so I keep it disabled. What I'm currently forced to do is to generate the code and then manually modify APB2 prescaler from div2 to div16. Hardware seems to be working perfectly fine in this configuration (at least we didn't notice any strange behaviour) however cube is "not aware" of my change so all other timebases are not properly recalculated and I'm forced to do the modification after every code r
We are pleased to announce you that the official release of STM32CubeMX V6.12.0 is available. What is new in STM32CubeMX V6.12.0? New MCUs/MPUs series : STM32WB0 ,STM32MP25XX and STM32C071XX Add support new CPNs STM32G4: Add support STM32G4 'Z’ and STM32G414 New Boards are supported: NUCLEO-C071RB , NUCLEO-WB09KE ,NUCLEO-WB07CC ,NUCLEO-WB05KZ ,STM32MP257F-DK , STM32MP257F-EV1 Remove STM32MP15 obsolete boards from CubeMX board selector ( STM32MP157A-DK1 , STM32MP157A-EV1, STM32MP157C-DK2, STM32MP157C-EV1) New Boards are supported by the Start from Board feature: Nucleo-WB09xx Nucleo-WB07xx ,Nucleo-WB05xx ,Nucleo-C0 , NUCLEO-G431RB ,NUCLEO-G474RE ,NUCLEO-G491RE ,NUCLEO-H503RB ,NUCLEO-U545RE ,NUCLEO-WB15CC ,NUCLEO-WB55RG ,P-NUCLEO-WB55 ,P-NUCLEO-WB55 ,NUCLEO-WL55JC1 ,NUCLEO-WL55JC2 ,NUCLEO-WBA52CG ,NUCLEO-WBA55CG Add CMake support for multicontext projects (Multi-Context ,Trust zone , Multi-core) Add the support of the memo
Hello dear community,I'm using a STM32U5A9J-DK.I want to start in CubeMX a project based on this board, X-CUBE-TOUCHGFX and X-CUBE-GNSS softwares.However, CubeMX warns me (in the "Software Packs Component Selector") that theses are incompatibles between them.For example, if I choose X-CUBE-GNSS first then try to choose TouchGFX, it tells "This component cannot be selected: this application cannot be selected while the application from pack STMicrolectronics.X-CUBE-GNSS1.6.0.0 is selected":and vice versa.I guess that is because the touch screen use PI6 (DSI_BL_CTRL) pin that can be used as reset pin or wake up pin for GNSS: is this correct ?Is there a way to "force" or bypass this recommendation ?Thanks a lot in advance for your help
I'm trying to use the DSP Library on the STM32WLE5CCU6 and some error messages appear on STM32CubeIDE. I have the same code tested and running on STM32F103C8T6 and STM32F407VET6 without any problem.STM32CubeIDE Version: 1.14.0 Build: 19471_20231121_1200 (UTC)STM32CubeMX Version 6.10.0STM32CubeWL Firmware Package v1.3.0 / 09-November-2022STMicroelectronics.X-CUBE-ALGOBUILD DSP Library Library 1.3.0I'm seriously thinking about switching to using any other STM32 with an external SX1262 chip via SPI interface than the STM32WL with its related libraries. The LoRa middleware is impossible to work with, I am forced to provide an UART interface (Why not use SWV / ITM interface ?) and the ADC , I cannot disable it.This kind of thing sometimes makes me think about giving up on ST!
Hi. I am using NUCLE-F439ZI board STM32CubeIDE Version: 1.16.0Build: 21983_20240628_1741 (UTC) Lately I am experiencing problem, when I make changes in .IOC file and save and generate code it is messing my main.c file. It is copying big portion of main.c lines and adding them again in main.c file. It is impossible to continue working. Is this a setting problem or a bug in the software? Please help. Thank you. Rasem
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.