Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
We are using the STM32WL55CCU6 processor and generating code for two cores. For GPIO it is not possible to specify which core will initialize the GPIO (of course, it is not necessary) but the code and definitions are not generated for any core.STM32CubeIDE Version: 1.18.0ioc file included...
Hello,I am new to the STM32N657x0H3Q MCU and trying to generate code from latest CubeMX with the following peripherals enabled:UARTEthernetDCMIUSBNon-secure region onlyHowever, after generating the code and compiling it in Keli, I am encountering multiple errors. Additionally, CubeMX shows a warning:" - Generating AppNS project without AppS, compilation errors maybe generated."I am trying to understand why this issue occurs.Is there a strict limitation in this MCU series that requires defining a secure region?If not, how can I properly generate code with only a non-secure region and avoid these errors?Also, I am planning to buy the STM32N6570-DK board for my project.thanks.....
I'm freezing on the following screen, is there anything I can do?TK
Hello,I am working on a project for the STM32F3348-DISCO board using STM32 IDE 1.18.0.I have created a new project with the following settings:- Target Reference: STM32F3348-DISCO- Firmware Package Name and Version: STM32Cube FW_F3 v1.11.5- Initialize all peripherals with their default Mode ? Yes STM32CubeMX shows there are multiple conflicts with the default configuration. Do you have any suggestions on how to resolve these issues?
Hi, I dont know the reason of this issue, I just generate code via STM32cubeMX after enabling UART4 and below there is the main program!: But my program cannot neither receive nor transmit any data and stuck in UART_WaitOnFlagUntilTimeout. Help please#include "main.h"/* Private includes ----------------------------------------------------------*//* USER CODE BEGIN Includes *//* USER CODE END Includes *//* Private typedef -----------------------------------------------------------*//* USER CODE BEGIN PTD *//* USER CODE END PTD *//* Private define ------------------------------------------------------------*//* USER CODE BEGIN PD *//* USER CODE END PD *//* Private macro -------------------------------------------------------------*//* USER CODE BEGIN PM *//* USER CODE END PM *//* Private variables ---------------------------------------------------------*/UART_HandleTypeDef huart4;/* USER CODE BEGIN PV */uint8_t data[]="hello world \n";uint8_t data1[10];/* USER CODE END PV *//* Private f
Is there a way to select the dark theme to STM32CubeMX?
STM32H7 SeriesI have enabled generation of linker script (need to redefine memory layout).There is no possibility to change state of checkboxes of both CPU caches if this generation has been enabled.The state of the checkboxes may be on or off, but grayed out.You have to:- disable linker script generator- enable chaches- reenable linker script genSetup of the cache strictly follows the state of the checkboxes.
Trying to export LQFP144 pinout to Altium CAD models with cubeMX. But CubeMX is trying add pin #204 #202 #158, etc, on symbol for an L471 micro that doesn't even come in packages bigger than 144 pins. Altium chokes on this symbol, I imagine that's because the foot print only has 144pins.See screenshot below. Will attach .ioc file if possible.
Title edited to reflect the correct board used. Changed from NUCLEO-H7A3ZI-Q to NUCLEO-H7S3L8.Hi,I’m trying to set up UART communication using UART3 on the NUCLEO-H7A3ZI-Q board. I have the UART3 pins (PD8 and PD9) connected to the ST-Link VCP on this board.Do I need an external USB-UART converter to communicate through other UART pins, or should the onboard ST-Link handle the UART3 communication through VCP?It's showing USART3 is not available. I’m new to this board, so I want to confirm if there’s anything I might be missing in the configuration or connections. Any guidance would be appreciated!Thanksin advance!
I am facing a persistent issue with the Nucleo H755ZI-Q board that is driving me crazy! The issue I am having is : Error: Unable to get core IDError: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug AuthenticationEncountered Error when opening C:\ST\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.0.202409170845\tools\bin\STM32_Programmer_CLI.exeError in STM32CubeProgrammer Here's the setup and steps I've followed:Chip Configuration:Selected STM32H755ZIT6 in STM32CubeMX.Disabled HSE and enabled LSE with a crystal resonator.Set M7 clock to 400 MHz and M4 clock to 200 MHz.Power settings:Supply source: PWR_DIRECT_SMPS_SUPPLY.Power regulator voltage scale: 1. Peripheral Configuration:I2C1: PB8, PB9.USART1: PB14, PB15.USART2: PA2, PA3.Configured GPIO for onboard LEDs and user switch. 2. Debug Configur
I am having and issue with a STM32H725RGV6.After powering my board, I can see the SMPS output at 1.36V, which I have connected to the VCAP inputs.I can also connect to the µC using the STM32CubeProgrammer.However, after flashing a simple firmware, the SMSP output drops to 0V and I can not connect anymore. I am aware that this can be the result of an improper SMPS configuration (https://community.st.com/t5/stm32-mcus/unable-to-connect-to-stm32h7-devices/ta-p/49296). However, in my (cube generated) project am am callingHAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY)so this should be correct. Additionally, I tried to upload a program with nothing but an infinite loop in main, and the problem still occurs. When pulling BOOT0 high, the SMSP output becomes 1.36V again and I can connect again. This makes me believe, that everything is set-up correctly hardware-wise. Otherwise, the bootloader would not run. thank you for your help
Hello,I am now using STM32CubeMX to config STM32G030F6P6, I want to use TIM14 to capture pulse, so I configged to Input Capture direct mode, which is obviously input port, but GPIO setting becomes GPIO output Low. is this a stm32cubeMX bug?please confirm.Thanks@GMA
I have a project on a H563ZI Nucleo board, and noticed an issue when I enable both the Board Support Package (BSP) options and ThreadX.The MX-generated code in main.c places the BSP initialisation after the call to MX_ThreadX_Init() - see snippet below. This means the BSP code is unreachable and the components are not initialised.The workaround is simple (copy the BSP code into the USER CODE 2 section), but it should probably be looked at. Snippet of automatically MX-generated code from main.c: /* USER CODE END 2 */ MX_ThreadX_Init(); /* Initialize leds */BSP_LED_Init(LED_GREEN);BSP_LED_Init(LED_YELLOW);BSP_LED_Init(LED_RED); /* Initialize USER push-button, will be used to trigger an interrupt each time it's pressed.*/BSP_PB_Init(BUTTON_USER, BUTTON_MODE_EXTI); /* Initialize COM1 port (115200, 8 bits (7-bit data + 1 stop bit), no parity */BspCOMInit.BaudRate = 115200;BspCOMInit.WordLength = COM_WORDLENGTH_8B;BspCOMInit.StopBits = COM_STOPBITS_1
Hi,I am using the STM32U5G9VJT6Q and in CubeMX I configured the clock to the full 160MHz for all busses including the core (first screenshot). According to the documentation for 160MHz I need to set 4 Wait States for those speeds and VCORE voltage needs to be in Range 1 (second screenshot).Two questions if someone could please help:1. after setting the clock in MX, where can I check that the wait states have been set correctly (in MX - not programmatically, debug or other ways) ?2. in MX, where do I set the VCORE? If it is set automatically, where can I check that it is set correctly (in MX - not programmatically, debug or other ways)?Thank you :)Ricko
I am using STM32F7 or STM32H7 to test SDRAM using FMC controller. Initially I could ot se a clock output. Seaching here has got that going. I have tried theSTM32CubeIDE and even set SDRAM bank 2 the same as Bank1 after reading there may be an issue.So far nothing. I stepped through and see a clock being anabled. It is mapped to PG8 on both H7 and F7 but I see not output there. I have tried various HCLK speeds with no joy.I saw a message about needing static void BSP_SDRAM_Initialization_Sequence(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command)but I cannot find a reference to original documentaton so am using it from the github repository.Also what is the 16-bit byte enable, I already have 16bit wide bus enabled. Thanks for help with this... I see it enles extra lines for how it writes but agin I cannot fd documentation about it. just a presentaion saying everything it can do, but not how to do it!What simple thing am I missing? Most other things work through STM32CubeIDE
I'm migrating a project from STM32G431KB to STM32G431CBT6. Both projects were generated using STM32CubeMX and are developed in Keil (MDK ARM), so I only transferred the user code. However when debugging code on the new chip, random breakpoint commands in the disassembly window appear (not the user-defined red dots, but the BKPT mnemonic specifically).It's always first 3 times between _sys_open and _sys_close, then one time between _sys_istty and_sys_seek and another one between _sys_write, _sys_read, then my program runs normally. I tried a full chip wipe, code regeneration, code rebuilds all without any luck. I'm guessing there might be a setting I forgot somewhere that could cause this or a library from CubeMX, but so far I haven't been able to figure out what it could be.The CubeMX software packs I use:Selected features:
Good day all, USBX crashes at line 171 of the file ux_dcd_stm32_initialize_complete.c, as the dcd structure is not initialized at this point. I have tried this on two different MCUs, U575 and H753. In concert, on the H753 the code generator does not generate the call to MX_USBX_Device_Init() and in both cases the call to HAL_PCD_Start() is not generated as well, so this functionality will not work out of the box either. I suppose that I should insert some more calls for initialization, does anyone have idea? Regards,Dmitry
This appears to be loosely related tohttps://community.st.com/t5/stm32cubemx-mcus/warning-during-stm3cubemx-setting-in-usb-host-on-platform/m-p/194919#M8793If I start with Cube IDE:File -> New -> STM32 Project then select NUCLEO-C071RB and then Ux_Host_HID_Standaloneall goes swimmingly well. However, if I start with CubeMX, then choose the same example I get errors:I can make the Platform Settings error go away by assigning a GPIO to who knows what, per the related post, but I don't want to waste a GPIO and furthermore, I want to make changes to the project that I cannot do using the IDE-only method. Is there some other setting I'm missing in the CubeMX example creation?
I'm using ADC regular and injected channels in STM32G4. I need different oversampling ratio for regular and injected channels, in STM32CubeMX it's possible to configure the oversampling ratio independently for regular and injection channels, but when I took a look at the generated code I saw that the same function has been called for oversampling configuration. It seems like the second function call is overriding the first configuration.Also I've checked on oscilloscope to measure both channels acquisition times. When I'm modifying the parameters of the first function call (which is the oversampling ratio of the regular channels), I see no changes in acquisition time of the regular channels, it's just following the parameters of the second call (injected channels oversampling ratio).I have 2 questions:Why we have configurations for oversampling ratio of both channels in STM32CubeMX, when it's not possible to control them independently?Is there a way to have different ratios other than
Is there a way to prevent CubeMX from constantly messing up the source code formatting? I spent time setting up the preferences in the CubeIDE tool, but every time CubeMx touches the files, it resets the code formatting. After the CubeMX returns to the IDE, is there a way to run the IDE source->reformat command?if not possible today, can this be added to the development wish list?thanksMatthew
I would like to use the CAN interface with a CANOPEN library on my STM32F723.As I have found there is a Library for STM chips provided by emotas: https://www.st.com/en/partner-products-and-services/canopen.htmlI have downloaded the Lib on my STM32CubeIDE an now are trying to add it in my CubeMX to the Project: The problem is, it says, its not supporting my MCU. But in the description of the Library it says it should support the F7 chips.Is the library not "free" and I have first to contact emotas or did I forget to install something? Best regards,CO
Hi,I have problem with LTC7106 and STM32G431CBT6.LTC7106 use PMBUS. I never used SMBUS or PMBUS before.I tried to use normal SMBUS implementation and:I can find device (it find 0xC, 0x2A, 0x5A, 0x5B devices. First one is strange but maybe I don’t know something) - the device should have 0x2A address - so I assume that it work properly.I can’t force it to send or receive any data from the device.I tried to do everything as described in: SMBUS/SMBUS_TSENSOR/readme.txt in terms of configuration – but I have no idea what cause the problem.So I have a question – does PMBUS device should be accessible via standard implementation od SMBUS in STM32? I mean should it read and write registers without any problems?To solve the problem I tried to use X-CUBE-SMBUS – I tried to do everything like in: https://community.st.com/t5/stm32-mcus-products/this-is-an-issue-related-to-the-initialization-of-the-x-cube/m-p/751304 and in AN4502But it hang in STACK_SMBUS_Init -> SMBUS_Enable_IRQ ->
Hi,I'm trying to configure LevelX using CubeMX. Does any one know how to link the component driver to LevelX? under file system interfaces, under bsp,The QuadSPI is different from the one listed under bsp, but I included in the project so I can figure out how to write my version. But I can't seem to figure out how I can define a new driver. Under LevelX configuration:It says the QSPI component name is MT25TL01G. How do I change this so I can provide my own driver?
Dear All,I have created a project where I have placed the APS6408L memory on the HSPI1 peripheral of the STM32U5G9NJH6Q.On CubeMX, I am setting this in the peripheral configuration:And in the memory management tab I see this:I was expecting to see 16MB there.Using this setup my project does not work as the device hard faults when I try to access the second half of the external RAM.Doing this in the configuration:leads to this:And I have tested the code allocating a buffer at the end of the external RAM, playing with it and it works, but I believe that the configuration should be the that of the first image and the result should be that of the second image.Is this an issue of CubeMX?Thanks in advance
Hi,i am using CubeIDE 1.16.1 and if i import the BLE_p2pServer example for NUCLEO-WBA55CG, a few pins (GPIOs for LEDs and buttons) are marked in reset state.Can somebodey explain why they are in reset state and not in GPIO_Input or GPIO_Output?
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.