Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,I have come across an unusal problem and I can't seem to figure out.I am using an RC transmitter to send signals to a receiver that is hooked up to an STM32F411VE board. I am reading the receiver signal using input capture direct mode (timer 2, channel 2). I am reading a consistent range of values. It works, and I am able to calculate an angle which steers a servo. All good up until this point.The Problem:After flashing the board via USB (Visual GDB) the code works perfectly, as expected. However, if I hit the reset button on the dev board when it's running, the board resets and my input captured values suddenly change (much lower than before). The same thing happens if I power up the board via USB/Battery Pack or VDD pin. This does not happen during a software reset from IDE, only on hard reset or power up. The code is not crashing (it is still running, no hardfaults). What could be causing my input capture values to be correct on the inital run after flashing the code, but differe
Hi,HTTP connection is banned in my company (only HTTPS is allowed), so I'm getting errors regarding this issue at the startup of STM32CubeMX and STM32CubeIDE. They work fine afterwards, but they cannot update themselves.Is there a workaround for this issue, or can you please fix this by moving to HTTPS.Thanks.Ogulcan
I have a 100pin STM32F746VGT or STM32F746VET project and I would like change that to an 100pin STM32H750 project. That is, I want to keep pin functions the same as much as possible.
I have attached the main file.I am using nucleo 144 board and have setup the stm32 core for 480MHz(max), so max QSPI clock allowed is 240M/2=120MHz. But am not able to generate clock pulses if I set QSPI clock prescalar less than 8 (30MHz). I have tried for different qspi clock source selection.Please help me to fix it. Is there anything am missing?What is the maximum allowable qspi clock frequency in nucleo h743?
Hello! I am using a stm32f765 chip. I need to connect 8 microphones to the DFSDM, but there are only 4 filters in the chip and I cannot use the regular read mode from all 8 channels of the DFSDM. I found information that the dfsdm filter allows to read values in an injection mode from several channels, but in this case the frequency and quality of the audio drops and this method is not suitable for audio. Also, I did not find examples of how to implement 8 microphones and 4 filters. Please let me how to use the 8 microphones with 4 filters for audio, or, please, give the example.Thanks for any answer!
Posted on February 13, 2018 at 18:23ST: Bug report:I've just upgraded from CubeMX V4.23.0 to V4.24.0.Using this re a Nucleo 144 'F767 board, I'm finding that 'Menu => Project => Generate Code' works once, then fails thereafter in one of two ways:If 'Menu => Project => Project Settings => Code Generator => Generated files => Backup previously generated files when re-generating' is checked, then it freezes during code generation. See screenshot. The only way I've found to proceed it to terminate the underlying java process.If 'Menu => Project => Project Settings => Code Generator => Generated files => Backup previously generated files when re-generating' is not checked, then it says 'The Code is successfully generated under <Path> but SW4STM32project generation have a problem'. Again, see screenshot. Presumably it should say 'Code generation has succeeded' or 'Code generation has failed'. Surely there should be no case where it has both succeeded
Hello, I am trying to test PSRAM memory on STM32L4R9-Discovery board (STM32L4R9AI), I still don't understand how to calculate the PSRAM setup time (address setup time), (data setup time), (data hold time) and (bus turn around time) could someone explain to me how to calculate these times in AHB cycles based on the time table in the memory datasheet in ns.I modified the heap side to 0x20,0000 (2MByte the size of the new memory), is that how it should be configured?I have attached the basic setup I did on STM32CubeMX for FMC and heap size. and the PSRAM datasheetThanks!
Trying to understand this warning when configuring pins for a stm32g071RB in CubeIDE. Enabling the RS485 Hardware Flow Control even with no other peripherals enabled causes the warning to flag to display. The explanation message does not explain much. Is this a bug in CubeIDE or something else?
Hi,I use CubeMX to configure STM32 controllers (mostly STM32F746ZG for testing on a Nucleo-144 board, but also tried with other boards and single MCUs).Since I moved to Windows 10 64Bit, the generation of SW4STM32 projects does not work properly anymore (both with newly created and old IOC files). The following problems appear:- The MCU (to be configured in SW4STM32 under Project Properties -> C/C++ Build -> Settings -> MCU Settings) is not configured. This does not allow the selection of FP hardware.- The linker script is not created / linked to the project (probably a consequence of the first point).I use the following program versions (latest updates):- CubeMX v5.5- CubeF7 Package v1.15.0- SW4STM32 v2.9I have also tried a complete new installation and the usage of older versions. The problem remains the same. Also, the generation for MDK-ARMv5 shows a similar effect with the additional error message:Does anyone have an idea what the problem might be / how to fix it?Thanks f
I have a full functional project on STM32L4R5 on custom board running since 2017.The code initially was generated once from CubeMX + Cube/HAL and then evolved through IAR IDE. Recently, someone asked me to migrate to 2020 Cube IDE / Gcc and for the rare ones in the same situation, share my way of going there (and save some hours of eclipse discovery).This my quick step by step. I didn't want to "import" as I wanted to get a refresh of HAL version.Here is what I learnt over 1.5 day of struggling through the IDE eclipse based project creation and merge....Backup your IAR project folders (zip them)Open your reference IAR project source code which has old CubeMX source filesPrefferably, each of the STM32 peripherals have their own generated C file (uart.c, spi.c...)Open a file explorer to the source files directories if possible, all the non cube generated code should be on a specific subfolderIn this subfolder, remove all the *.c and *.h which are not used in IAR IDE, or rename their file
Hi, I am running STM32CubeMX 5.5.0 (newest)And downloaded the NFC5 2.0 expansion package from ST website, but when I try to install it in Cube it give me this error:How do I do to install it?I just got one NFC05A1 board to evaluate but got stuck in this problem
Micro-controller: STM32F407VGTCompiler: Keil V 5.28.0CMSIS Core Library: V 5.2.0DSP Library: V 1.6.0I need some help including the CMSIS DSP library in my project. I have included the CMSIS DSP library via Manage Run Time Environment, this links the arm_cortexM4lf_math.lib under CMSIS (project tree) but when I try to include the #include "arm_math.h" I get approx 30 errors, what am I missing,I have also include the path for the arm_math.h from the C:/user/mn/AppData/Local/Arm/Packs/ARM/CMSIS/5.6.0/CMSIS/DSP.I have not copied any of the files in my project directory as I thought including the path should be good enough, frankly, I would like to avoid copying as I have seen some code generation issues with STM32 Cube MX when I copy the files to CMSIS folder of my project.Any help will be much appreciated, thanks.Some of the errors are listed below:C:\Users\mn\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\DSP\Include\arm_math.h(1063): error: #79: expected a type specifier
What you have to know before migratinghttps://community.st.com/s/question/0D50X0000BztfjUSQQ/migration-issue-from-540-to-550What is new in STM32CubeMX V5.5.0?• Removed TouchGFX, STemWin, Graphics Selector and Simulator supports.The new solution based on Expansion Pack X-CUBE-TOUCHGFX is available.• Added the support of new part numbers in the STM32H7 Series:STM32H7A3x, STM32H7B3x, STM32H750IBTx, STM32H750ZBTx andSTM32H7B0xx.• Added the support of new part numbers in the STM32L4+ Series:STM32L4P5x and STM32L4Q5x.• Added the support of LL code generation for the STM32H7 Series.• Added the support of the STM32L5 Series: – Added the support of STM32L5 Series devices: STM32L55xx, STM32L56xx. – Added the support of boards based on devices in the STM32L5 Series:NUCLEO-L552ZE-Q, STM32L552E-EV and STM32L562E-DK. – Possibility to create projects with no TrustZone® security (user Option Bit TZEN=0with legacy project structure) or with TrustZone® security (user Option Bit TZEN=1with new project st
Posted on June 04, 2018 at 08:04Hello, I am trying to implement a canbus example. I was used can example with no problem in the CubeMX Version 4.24. Now, I have updated the CubeMX to version 4.25.1. Can exampel is not working now. There are some changes between version. Can someone explain me Why ? In the newer version there is no pTxMsg and pRxMsg buffers. How can I send and receive data via newer version of the CubeMx. Is there an example for the newer version of the CubeMx ? NEWtypedef struct __CAN_HandleTypeDef{ CAN_TypeDef *Instance; /*!< Register base address */CAN_InitTypeDef Init; /*!< CAN required parameters */__IO HAL_CAN_StateTypeDef State; /*!< CAN communication state */__IO uint32_t ErrorCode; /*!< CAN Error code. This parameter can be a value of @ref CAN_Error_Code */} CAN_HandleTypeDef;OLDtypedef struct{ CAN_TypeDef *Instance; /*!< Reg
When I generate code with CubeMX the MX_GPIO_Init code contains: /*Configure GPIO pin : PD2 */ GPIO_InitStruct.Pin = GPIO_PIN_2; GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);There is no port D afaik. STM32CubeIDE 1.2.0CubeMx 5.5.0-RC6Seems a bug.
Hello, After I installed X-CUBE-AI 5.0.0, I started the new project with STM32H7 and later with STM32F7 and in both cases when I clicked on Additional software in STM32CubeMX perspective, the window was empty. I'm using STM32CubeIDE 1.2.0 and Linux Ubuntu. I would appreciate any help with this problem.ThanksPetr
Hi,I try to get the CAN BUS communication working on my NUCLEO-F042K6 dev Board. I Used the instrucions attached in the PDF. First I used the Loop-Back Mode to test CAN communication. I have my transmitting messages in the main loop they only execute once and not in a 500ms interval as I intend. The receiving messages are all the time 0.I tried to use the normal mode and attached a CAN-Transceiver (TJA1050 NXP) but I can not receive or send any messages. Maybe I configured the clock wrong?I attached the main.c file and a picture of my clock and CAN configuration.Many thanksMoritz
CubeMx version: 5.4.0I used CubeMX to configure LwIP with FreeRTOS. I am using the Makefile toolchain. When I build the code *the linker complains* the following error -> multiple definition of `sys_msleep'My dev environment is Ubuntu 18.04, CubeMX 5.4.0, LwIP 2.0.3Please help.
I'm generating code using STM32CubeMX F4 1.24 with STM32CubeMX 5.1.0 for the boardNUCLEO-F446RE for IAR EWARM 7 versionThis application is simple LED blinking test for the new F4 cubeMX 1.24After generating code and compiling in IAR EWARM i'm getting errorI've attached the Image for referenceKindly Correct the issueWhile selecting older cube repo no problem, no error occuringfor example selecting F4 1.23 no error happens
HelloIn the PC app, I work with the STM32F722RETx LQFP64 micro-controllerIn WIN7 it always works. At WIN10 does not work.After I turn off and turn on the card, the board data that the system sees (both win7 and win10) is:Status for device COM2 : ----------------------- Baud: 1899758337 Parity: None Data Bits: 242 Stop Bits: 1 Timeout: OFF XON/XOFF: OFF CTS handshaking: OFF DSR handshaking: OFF DSR sensitivity: OFF DTR circuit:
The reference manual (RM0432) for the STM32L4R5 shows that UART4 & UART5 support two 8-byte FIFOs. I can't figure out how to configure the IRQ level thresholds. CubeMX shows levels for LPUART1 and USART1/2/3, but not UART4/5."Table 264. USART/LPUART features" shows that LPUART1, USART1/2/3 and UART4/5 all support Tx/Rx FIFO and that the Tx/Rx FIFO size (in bytes) is 8.
I noticed that cubeMX uses the LWIP 2.0.3 while the latest LWIP release is the 2.1.0.
Hi there,I use a stm32 f767zi nucleo board in corporation with a security chip from microchip technology (atecc508a). To send a wake condition over i2c communication I have to set the sda pin for a certain amount of time "low". Is there any function to achieve this?I've already tried to toggle the SDA Pin with "HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_9)", with no results but as I was told, this isn't working at all, because the pin was already configured.I've configured my board with STM32CubeMX. PB8 and PB9 is for SCL and SDA of i2c connection.I would appreciate any help.Thank you very much.
Recently I'm planning on moving development environment from Win to Linux since trueSTUDIO and cubeMX is all supported under Linux. My project created under Windows created by cubeMX works fine with trueSTUDIO. But After one regeneration of code under Linux, many errors arise at run-time. After a quick look about the registers, I found out that clocks and IO of LTDC, SDRAM and DMA2D is not generated, which should have been generated in HW_Init.c.Attachment is the ioc file of the project and two HW_Init.c generated under Windows and Linux, respectively.
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.