Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Error downloading crdb.zipI have tried on both STM32CubeMX 6.18.0 and STM32CubeIde 18.1. Attempting on MacOS(Intel)Tried changing proxy server type to “Use System Proxy Server” Tried different networks. Tried removing cache directories. Tried deleting crdb.zip Previous posts mention downloading (http://xsel.stmcufinder.com/refresh/v2/crdb.zip) manually - appears to be a server issue?Any help appreciated… thanks
Hi Everyone,after enabling RTC for the STM32L432KC in STM32CubeMX (version 6.18.0) RTC_WKUP_IRQn doesn't show up in the CubeMX NVIC panel for this MCU but is present in the vector table.Is that a bug or am I missing something?Best regardsGolfBravoRTC configurationMissing RTC wake-up timer interrupt through EXTI line 20?
Hi,I have been using the H755 Nucleo board for some time and always struggled with the firmware/libraries. To make matters worse, there are no examples for this board. I was using CubeIde 1.15 and decided to upgrade to 2.2.0 to see if the libraries handling improved. I started an empty project with the BSP included and added a simple code on CM7 to blink some leds with a HAL_Delay(), and it worked fine. Later I only added a timer (TIM1) on CubeMX, regenerated the code and now the CM4 does not compile. There is and never was any code added/modified to this core. The errors I get are related to the inclusion of libraries:arm-none-eabi-gcc -o "AFE16_Burn-in_Controller_CM4.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\Users\rafael.puyol\Documents\Reliability\afe16_burn-in_controller\AFE16_Burn-in_Controller\CM4\STM32H755ZITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="AFE16_Burn-in_Controller_CM4.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--st
Hi, I was making a demo project so needed a really straightforward way to use the ADC of my STM32F446RE.I configured the ADC1 with only channel. Default parameter everywhere except I enabled ‘Continuous Conversion Mode’ as I understood it, all I had to do with it was to start the ADC (HAL_ADC_Start(&hadc1)) and pick the values every time my loop needed it. I was surprised to notice that ‘HAL_ADC_PollForConversion(&hadc1, 100)’ worked only the first call then always yield HAL_TIMEOUT as I was expecting the ‘Continuous Conversion’ mode to allow me to not call HAL_ADC_Start and stop every time.After finding the linked post, I found the solution was to change the ADC setting from hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV Into hadc1.Init.EOCSelection = DISABLE The thing is this option is not available in STM32CubeMX (V6.17.0) so I have to pick either ADC_EOC_SINGLE_CONV or ADC_EOC_SEQ_CONV.I have the behavior I wanted but I wonder if this can be improved in STM32CUBEMX or is the
This is more of a suggestion, really... but I would love to see CubeMX (along with other standalone programs) fully integrated as a VS Code extension. For instance, the development environment for the nRF54 series allows you to handle everything from pin mapping to clock configuration directly within VS Code.In contrast, CubeMX requires installing far too many components, and compatibility issues are a major problem. I really don't understand why every tool has to be created separately and installed natively. I am certain that a setup involving just a single SDK installation and a VS Code extension would be far more convenient for users. Furthermore, this approach offers significant advantages for remote development; traditional native development environments require extensive configuration—such as X11 forwarding or RDP—just to access the GUI. However, if everything could be handled via an extension, the user would simply need to connect to the server via SSH in VS Code and install th
On STM32U375KGU6 pull up on D+ does not work when calling function HAL_PCD_Start, USB hardware works because if I start chip with BOOT0 pin to “VDD” it boots in DFU bootloader. What did I miss?
Dear All!I’m try to handle my Thesis project. With ETH block, when i download program to STM32H732Z nucleo kit, it can Pìn IP correctly. But when i download to my custom board, it fail to Pin IP, i compare schematic with STM32H732Z nucleo kit→ it same. right now i supplt 25Mhz from NB3L553DG( page 1, oscillator block), reset Pin use deafault( just have 1 pull-up resistor). 2 indicator led( green, and yellow) still blink. On RJ45 connector: The orange led is on, the green led flashes at first then stays on.I use oscilloscope to check some signal:signal REF_Clock to pin PA1: 50Mhz,MDC SIgnal: 2.5Khz,MDIO signal: 100~220Khz,VDDCR=1.244V,votage at pin 24 Rbias 1.248V, some can you share how to fix this issue. I tried many sample( FrerRTOS & non FreeRtos) already but stil can’t fix this issue.
Hello,I am using the STM32G031F4P6 (TSSOP20) and have a question regarding the PA11[PA9] and PA12[PA10] remapping.According to RM0444, PA11_RMP and PA12_RMP remap PA11→PA9 and PA12→PA10. However, in STM32CubeMX, the shared pins PA11[PA9] and PA12[PA10] only expose the Alternate Functions of PA11/PA12 (e.g., USART1_CTS, USART1_RTS/DE/CK), and USART1_TX/RX are not available.Could you please clarify:Is this a limitation of STM32CubeMX? Or is it not possible to use the PA9/PA10 Alternate Functions (e.g., USART1_TX/RX) on the physical PA11/PA12 pins after enabling PA11_RMP/PA12_RMP?If it is supported in hardware, what is the recommended way to configure it?Thank you.
STM32H7 series MCU package version: V1.13.0SPI4 clock is selected as PCLK2, but in the actual generated project, the SPI4 initialization function incorrectly sets RCC_SPI45CLKSOURCE_D2PCLK1 instead. The clock tree diagram and code snippet are shown below.
I'm configuring SAI4 (Block A) to receive I2S audio from an external microphone (Knowles SPH0645), using HPDMA3 for continuous circular DMA transfer, targeting the Cortex-M33 (Cube) context.Configuration so far:SAI4 → SAI A → Mode: Master, I2S/PCM Protocol, Audio Mode: Master Receive, Data Size: 24 bits, Mono HPDMA3 Channel (currently CH2) → Request: SAI4_A Circular Mode: Enable Direction: Peripheral To Memory Priority: HighProblem:The field "DMA Handle in IP Structure" under Request Configuration shows a red ⊗ error icon, with the value stuck as a placeholder. When I try to click the dropdown to select a proper handle (e.g. DMA_Handle1, DMA_Handle2), the available options appear grayed out / not selectable — I cannot click or choose any of them. This leaves the field marked invalid (red cross), which propagates up to the HPDMA3 channel, CH tab, and Features tab all showing red crosses.I confirmed:SAI4's runtime context is properly checked (currently testing M33NS) The Request field co
Hello ST community,I am trying to understand the current support status of USB composite devices when using the classic stm32-mw-usb-device middleware.I know that the classic USB Device middleware already contains `CompositeBuilder`, and I have seen ST tutorials using it to build composite devices. For example, the STM32H5 CDC + HID tutorial and the dual CDC ACM tutorial.However, those tutorials still require a lot of manual integration: editing `usbd_conf.h`, editing `usbd_conf.c`, manually writing class registration code, and manually maintaining the generated `USB_DEVICE` folder. This is quite fragile because future CubeMX regeneration can overwrite important changes.For newer stacks, USBX seems to have much better composite support, where all the relevant code for composite could be generated by CubeMX. My questions are:1. Is there currently any STM32CubeMX-supported MCU package that can directly generate a classic `stm32-mw-usb-device` composite project using `CompositeBuilder`, i
HiMost of you are using the HAL library, if you want to do something standard and if it works out of the box, what was generated, it speeds up your project. Sometimes it is not the case… so we need to adapt the HAL to make it work. Now the main issue, when we need to regenerate the project al the changes are gone and we need to change everything again by hand… Maybe this sound familiar to you?It this is the case how did you handle this? Patch file, list al the changes and do it again by hand?@ST, is it possible to support user code blocks added by the user and not only where CUBE decide to add. Or make it possible to generate / add code for some specific parts/ hardware? For example, I want to add or change UARTx, there is no need to update the SPI code…
STM32CubeMX version 6.18.0.When generating “cmake/stm32cubemx/CMakeLists.txt” does not include source files from directory “Middlewares/ST/usbx/common/usbx_stm32_device_controllers”. My workaround is to add those sources in project CMakeLists.txt:# Set usbx_stm32_device_controllers code filesset(USBD_STM32_DEVICE_CONTROLLERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Middlewares/ST/usbx/common/usbx_stm32_device_controllers)set(USBD_STM32_DEVICE_CONTROLLERS_SRCS ${USBD_STM32_DEVICE_CONTROLLERS_DIR}/ux_dcd_stm32_callback.c ${USBD_STM32_DEVICE_CONTROLLERS_DIR}/ux_dcd_stm32_endpoint_create.c ${USBD_STM32_DEVICE_CONTROLLERS_DIR}/ux_dcd_stm32_endpoint_destroy.c ${USBD_STM32_DEVICE_CONTROLLERS_DIR}/ux_dcd_stm32_endpoint_reset.c ${USBD_STM32_DEVICE_CONTROLLERS_DIR}/ux_dcd_stm32_endpoint_stall.c ${USBD_STM32_DEVICE_CONTROLLERS_DIR}/ux_dcd_stm32_endpoint_status.c ${USBD_STM32_DEVICE_CONTROLLERS_DIR}/ux_dcd_stm32_frame_number_get.c ${USBD_STM32_DEVICE_CONTROLLERS_DIR}/ux_dcd_stm32_fu
after selecting the pins from cube MX, it will generate code in c but i want that in cpp
Hi, i would like to use relative path to firmware. UI has option to enter “Firmware Relative Path” but only option is to select trough Browse dialog and resulting paths in cmake are absolute. There is no way to enter path manually, as UI applet for that is read-only.Also i have noticed, that clone of firmware without submodules causes CubeMX to error out with cryptic message on code generation.
其它网络功能如升级版本,MCU包安装正常
I’m working on a new project based on the STM32H5E4, and hit a weird problem, that smells like a CubeMX bug, with PLL3 init.Seems CubeMX is putting out incorrect values for the VCI Range (PLL3RGE bits in the init structure), relative to the comments in the H5 HAL RCCEX header.I’ve got a 12MHz HSE, divided by 3 [PLL3M] for 4MHz, then multiplied by 48 [PLL3N] in the PLL for 192MHz, then divided by 4 [PLL3Q] for 48MHz for the USB 48MHz clock.Here’s it’s generated code:PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_OTGFS;PeriphClkInitStruct.PLL3.PLL3Source = RCC_PLL3_SOURCE_HSE;PeriphClkInitStruct.PLL3.PLL3M = 3;PeriphClkInitStruct.PLL3.PLL3N = 48;PeriphClkInitStruct.PLL3.PLL3P = 2;PeriphClkInitStruct.PLL3.PLL3Q = 4;PeriphClkInitStruct.PLL3.PLL3R = 2;PeriphClkInitStruct.PLL3.PLL3RGE = RCC_PLL3_VCIRANGE_0;PeriphClkInitStruct.PLL3.PLL3VCOSEL = RCC_PLL3_VCORANGE_MEDIUM;PeriphClkInitStruct.PLL3.PLL3FRACN = 0;PeriphClkInitStruct.PLL3.PLL3ClockOut = RCC_PLL3_DIVQ;PeriphClkInitStruct.Ot
I am using the STM32WBA55C 48-pin package, and TSC Group 4 cannot be set as a sampling capacitor. Does this mean I cannot use TSC in Group 4? I plan to use 12 TSC channels, 1 SPI channel, and 1 ADC channel, so please give me some advice.
When adding the VectU2F function to a processing list, it defaults to creating three buffers: pDst (float32_t), pSrc (float32_t), and pSrcuint32_t (uint32_t), instead of just pDst and pSrcuint32_t.There seems to be no way to select a different uint32_t input in the GUI. There is a field pSrcuint32_t, but this only allows me to select a float32_t buffer. I believe the type checking in the GUI for this buffer is incorrectly set to float32_t instead of uint32_t, and as a result it both creates the extra unused float32_t buffer (pSrc), and won’t let me change the actual pSrcuint32_t buffer it uses. This is supported by the VectItoF function which correctly checks that pSrcInt32_t is an Int32_t, and creates only two buffers. This results in extra memory used in the BRAM section, and means I can only ever have one buffer that converts uint32_t into float32_t. I suspect I will be forced to bypass the GUI to create this processing list as a result. (As an aside, the function naming in the Vect
Helloi’m using USBX 6.4.0 with CUBEMX to make a custom id device on a stm32H5 everything work fine BUT my report descriptor have four report ID i wanto to use :hid_event.ux_device_class_hid_event_report_id = 3;// some data in the bufferux_device_class_hid_event_set(hid_custom, &hid_event); and in order to do that i have to change custom_hid_parameter.ux_device_class_hid_parameter_report_id = UX_FALSE;to custom_hid_parameter.ux_device_class_hid_parameter_report_id = UX_TRUE;in the function: UINT MX_USBX_Device_Stack_Init(void) i can’t find in cube MX the property to change.. where is it?? thank you in advancebest reguards
Hello,I wish to report what I believe to be a bug in the new version of CubeMX (6.18.0).When configuring an STM32H743IIT6, I encounter an error in the Clock Configuration view (please refer to the attached screenshot). The same procedure carried out with CubeMX 6.17.0 works correctly.I have therefore reverted to CubeMX 6.17.0, which is not a critical issue for me, but I thought it important to bring this to your attention.Yours faithfully,Philippe
Similar problems with STM2CubeMX v6.18.0 when generating STM32CubeIDE project and sub-projects structure for STM32N657X0HxQ processor. The only way to succeed is to have ‘Use Default Firmware Location’ checked and ‘Generate Under Root’ NOT checked.Since I need to use ‘private’ SDK, later manually edited the .cproject and .project files accordingly :-( In my previous project I was able to use custom path (‘Generate Under Root’ NOT checked), that was STM2CubeMX v6.12.0 and the target was STM32U5 (SDK was STM32Cube_FW_U5_V1.5.0). I still have to adjust the paths manually from time to time and manually add required files.In short, STM2CubeMX always seems to be broken one way or another ...
I discovered some strange behavior in the STM32CubeMX code generation for Keil µVision.I created a project with STM32CubeMX that I compile using Keil µVision. In Keil µVision, I configured two user commands in the "Options for Target" dialog under "User" in the "After Build/Rebuild" section. These commands must be executed after the software has been compiled.Whenever I regenerate the project in CubeMX due to configuration changes, the "After Build/Rebuild Run #2" command is always removed.I then tested all commands and was able to narrow the issue down exclusively to "After Build/Rebuild Run #2".Is this a bug in CubeMX, or do I need to change a setting somewhere to ensure that these commands are preserved?Please also refer to the attached screenshots.Best regards,Kai RiekBefore running CubeMX:After running CubeMX:
这个是安装了很多版本后还是出现的问题,虽然点了ok后可以正常进入选择芯片的界面,但是最终生成的代码有问题,串口发不出去了(检查过了人为问题)重新下载了很多次,依然是有问题,希望有解答,谢谢
Hello,I would like to report what appears to be a code generation issue in STM32CubeMX 6.16.1.My configuration is:MCU: STM32H7R3 STM32CubeMX: 6.16.1 STM32Cube FW_H7RS: 1.3.0 SAI2 Block A configured as Master TX SAI2 Block B configured as Synchronous RX GPDMA channels 10 and 11 configured in Standard Request Mode and Circular Mode The generated HAL code internally creates a linked list with a single node for each DMA channel. In the generated sai.c file I get:DMA_NodeTypeDef Node_GPDMA1_Channel11;DMA_NodeTypeDef Node_GPDMA1_Channel10;However, these DMA node structures are not placed in a non-cacheable memory region.If I instead use the LinkedList Utility and configure the channels in Linked List Mode, CubeMX generates:DMA_NodeTypeDef Node_SAI2_A __attribute__((section("noncacheable_buffer")));DMA_NodeTypeDef Node_SAI2_B __attribute__((section("noncacheable_buffer")));The "noncacheable_buffer" section is defined in the linker script in a memory region accessible by the GPDMA and I confi
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.