Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello,I recently developed a board to use the STM32G030K8T6 under the assumption that it could support an external crystal oscillator (given what is said in the datasheet) and as I was setting it up in the CubeMX tool I noticed that the HSE was only activated in the Clock Configuration menu, if I checked the BYPASS Clock Source option in RCC Mode settings. However this does not seem to work in order to activate the HSE crystal, and the generated code sets the HSE as bypassed.Does this MCU actually support an external crystal, or is CubeMX not correctly displaying all the options for this MCU?Thank you!
Apologies for what might be a simple question but this is my first time working with an STM32 MCU. I am working on a project to make an RPN calculator from someone who never fully completed the project documentation. I am trying to currently flash firmware to an STM32L476 and the only files given to me under the "firmware" section of the documentation are an .ioc file, some C files, and header files. I have tried using Cube IDE and Cube Programmer but even with looking at documentation and searching via google, I have no idea how I'm supposed to turn those files into something that I can actually put onto the processor. If someone could help guide me on what I have to do it would be greatly appreciated.
I have tried following some online tutorials for Memory Protection Unit (MPU) setup, but I do not see the option for the `CORTEX-M4` in the STM32CubeMX window.
Hello.I'm using the lastest version of STM32CubeIDE, 1.12.1.The problem occurs after configuring al the STM32CubeMX perifereals and I try to build the project so it generates al the files that I need. But when I press the yellow wheel icon, the project doesn't generates well, it leaves MXTmpFiles in the project list of files, like you can see in the first image: After that, if I try to click on any peripheral to configure it, I can't, the click doesn't work.Sometimes if I click many times on the wheel it deletes the MXTmpFiles folder and compile the project, but it's not deterministic, it can occur the first time or the fifth (or sometimes never).I tried to delete and re install the program but it didn't work, it still happens, in all my projects.Is it a kind of bug or is there something that I'm missing?
Hi,On my Nucleo-F756ZG, when I generate code for USART3 that's by default connected to ST-LINK , Cube sets pins for morpho connector (PB10 PB11) instead of alternate function (PD8 PD9). I also use Nucleo-L476RG and for this board, Cube set alternate funtion pin for Usart2 default connected to ST-LINK.
Hi,try setup clock above 200 Mhz (try for revision Y and V) and get error: Error has occured also if you try set D1PRE set above 200 Mhz:
I have been reading reading anything i could find on Timers, but I'm still confused about the setup in CubeMx.I just want to trigger a timer in software, that generates a SINGLE pulse with a set width (and if possible after a set dely) on a pin, but the CubeMx configuration is incredibly badly documented and pretty confusing, if you don't already know what you are doing.can someone please point me in the right direction?Also please don't post a bunch of register setups and then say "I don't use CubeMx", that's not what i am asking, and I have seen it on so many forum posts.
I ran "SetupSTM32CubeMX-6.8.0.sh", it was prompt:Check exe path on linux FullExe path1 is: /usr/bin/SetupSTM32CubeMX-6.8.0 Exe path is: /usr/bin Search java from relative path ---- Checking java in /usr/bin/./jre/bin/java Checking java in /usr/bin/../jre/bin/java Checking java in /usr/bin/../../jre/bin/java Checking java in /usr/bin/../../../jre/bin/java Please install Java JRE 11.0.10 or a more recent versionsince I have installed java, and the address was:/usr/bin/javahow could I told the Setup*.sh where java is.
Hello, what is meaning of the "Modified" column in GPIO configuration? When given pin is considered as modified? I am not able to find that information in CubeMX user manual...
Good day,There seems to be an error in the implementation of the NUCLEO-C031C6 when generating code for the project after updating the peripherals. After loading an example project and compiling and testing all is well but once you update the project by adding a peripheral or changing the peripheral parameters the contents of the Driver\STM32C0xx_HAL_Driver are removed. See attached screenshots.Regards,Charles
I'm trying to attempt CAN on a STM32G473 MCU. While transmission seems to be fine, I'm not receiving any data back. The receive call back function is not triggering.Following is my setup:Below is the TxHeader and RxHeader initialization along with the call back function. I have a breakpoint in the call-back function which never gets triggered.FDCAN_TxHeaderTypeDef TxHeader; FDCAN_RxHeaderTypeDef RxHeader; //uint32_t TxMailbox; uint8_t TxData[12]; uint8_t RxData[12]; int indx = 0; void HAL_FDCAN_RxFifo0Callback(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo0ITs) { if((RxFifo0ITs & FDCAN_IT_RX_FIFO0_NEW_MESSAGE) != RESET) { /* Retreive Rx messages from RX FIFO0 */ HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13, 1); if (HAL_FDCAN_GetRxMessage(hfdcan, FDCAN_RX_FIFO0, &RxHeader, RxData) != HAL_OK) { /* Reception Error */ Error_Handler(); } if (HAL_FDCAN_ActivateNotification(hfdcan, FDCAN_IT_RX_FIFO0_NEW_MESSAGE, 0) != HAL_OK) { /* Notification Error */ Error_H
..
Yesterday's post herehttps://community.st.com/s/question/0D53W00002F4MHrSAN/is-there-a-bug-in-the-newlib-heap-on-the-32f417-cube-ide-library?t=1682872893044refers.This articlehttps://nadler.com/embedded/newlibAndFreeRTOS.htmlsuggests that the freertosconfig.h file can contain configUSE_NEWLIB_REENTRANT =1 and this causes MX to build libc.a with the proper mutex calls.That suggests MX has the sources. But I have Cube IDE installed (been using it for a couple of years, but have never used MX) and there are no sources there for this stuff.I find this amazing because I have never seen ST supply any sources for these parts of stdlib. And the many supplied versions of libc.a (which can be found in c:\ST - there are 66 of these) come only in a compiled form, and not "weak" so the mutex calls, which are dummy functions, cannot be fixed by making use of the "weak" override mechanism. I had to weaken the whole libc.a and then I could do it.
Recently I’ve run a code with stm32f429 in freertos in which usb host fs is enabled for mass storage class. I generated the init code with stm32cubemx ver. 6.4. At first only usb host is enabled and when the flash drive is inserted the usb host core detects it and shows its state as “APPLICATION_READY�?. But when I add other tasks with different priorities and runtimes, sometimes the usb flash drive detection doesn’t complete. It means that when usb host core reaches “HOST_CLASS�? state and calls the class process function (USBH_MSC_Process) to handle the class background process, it can’t detect the MSC device as “ready�?. In MSC request state machine when the USBH_MSC_SCSI_Inquiry function is called to test if media ready or not, the ready_state remains busy (USBH_BUSY) and no longer becomes ready (USBH_OK), so the application state remains as “APPLICATION_START�?.Clearly, some changes in other parts of the code has impacts on usb msc readiness in an irrelevant way. This may be
This is a prerequisite for the VSCode extension which is why I am asking here.Steps to reproduce:Download the setup filePer Readme.html, open a terminal, navigate to the en folder and run the following command: sudo xattr -cr ./SetupSTMCUFinder-5.0.0.app Enter passwordExit the terminalOpen Finder in the en folder, double click on SetupStMCUFinder-5.0.0Setup always complains that "java" cannot be opened because the developer cannot be verifiedShow package contents of SetupStMCUFinder-5.0.0Right click on SetupTMCUFInder-5_0_0 and select OpenSetup always complains that "java" cannot be opened because the developer cannot be verifiedI need to get VSCode running but until I can get this prerequisite running, I don't believe it will have full functionality.Thank you in advance for your assistance!Clark
Hi, I'm using an STM32H755ZIQ Nucleo and migrating an old project in CubeMX 6.8.The RCC > supply source > PWR_DIRECT_SMPS_SUPPLY option has been removed from CubeMX, which was the default previously. I tried the two available options (External / LDO), both lock up the board and require full chip erase to continue.I have read this knowledge article which suggests that the solution is to "Make sure that you fixed the power-supply configuration in your project". However the only available options do not work. If I manually put int the SMPS option again, it works.I've read many posts relating to this issue, mostly about how to revive the board, but I haven't found an explanation for why the option is removed form CubeMX and why I (presumably) shouldn't be using that option any more. If anyone can shed some light on how I'm supposed to configure the project so that the Nucleo is powered properly, that would be great.Thanks, Matt
I have a project using a STM32H743 (LQFP144). I want to migrate it to a STM32HA3. It seems like it should be fairly pin compatible, but in Stm32CubeMX when I use the Alt-L (Pinout Compatible) option, the STM32HA3 isn't there. Is this a lag in the CubeMX software update or is the device really not pin compatible?CubeMX Ver 6.8.1.Thanks for your help!Dan
Hi,I start STM32CubeMx with this command /mydir/STM32CubeMX/STM32CubeMX -q /mydir/myscriptInside the file myscript there are this lines:swmgr refreshswmgr install STM32Cube_FW_G0_V1.6.0 askexitWhen run this line "swmgr install STM32Cube_FW_G0_V1.6.0 ask" the output in the terminal is 2023-05-05 09:27:39,236 [INFO] MainUpdater:1566 - Unknown pack: STM32Cube_FW_G0_V1.6.0KOwhere can i find the correct pack name?Best regards
I have a problem using the NUCLEO-G431KB. After set-up of UART2_RX_INT, the interrupt seems to trigger and goes straight into the interrupt before any data has been put onto the receive pin of the UART. I have used Cube MX to generate the initalise. What could be causing this?These two lines of code are used as part of the UART2 set-up.__HAL_UART_ENABLE_IT(&huart2, UART_IT_RXNE );HAL_UART_Receive_IT(&huart2, Rx2Buff, Uart2BuffLen);Thanks
I'm using STM32CubeIDE 1.12.0 with a TrustZone enabled project and observed incorrect initialization of GTZC when the option "Generate peripheral initialization as a pair of '.c/.h' files per peripheral" is active: If this option is not active the function HAL_MspInit() in stm32XXXX_hal_msp.c contains some code to enable the clock of GTZC1 and/or GTZC2, depending on the further configuration e.g.:/** * Initializes the Global MSP. */ void HAL_MspInit(void) { /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ __HAL_RCC_GTZC1_CLK_ENABLE(); /* System interrupt init*/ /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ }If this option is active the GTZC clocks are not enabled in stm32XXXX_hal_msp.c any more. This is as expected. But the generated gtzc_s.c, which then contains the whole initialization of the GTZC, misses the code to enable the clock of GTZC1 and/or GTZC2.Of course GTZC peripheral must be enabled (I enabled
I am using the Nucleo L476RG board and I have configured TIM2 to output PWM in Channel 1. I have very basic code that should output a 25% duty cycle because I set the PWM pulse in the TIM2 parameters settings to 250. I have tested several pwm pins and watched many tutorials but I cannot observe any PWM signal using my oscilloscope. I have used the project example in the STM32Cube_FW_L4 folder from ST, but I cannot understand why my current code does not generate a pwm.
The following message pops up when installing/updating STM32CubeMX. ...but what should I do if want the installation to complete successfully, and not abort / terminate (in an incomplete state) ?
I'm using stm32f103 in my hardware, I didn't put pull-up resistor to USB _ D+ pin.The device doesnot appear on PC.Is there any way to make it work without Hardware changes?
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.