Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Curious if someone could shed some light on the compatibility between versions of CubeMX and "Embedded Firmware Packages".I have been using an old version of CubeMX (4.25) for some time (>2 years). I am now looking at doing some development with a controller that is not supported with this version of the software. I notice that as of this writing, the updater lists version 5.1, while the ST website lists the latest version of CubeMX as 5.6.1. My questions:Why does my "Check for Updates" list ver. 5.1 as the latest upgrade while ST shows 5.6.1. Can I not update my version, or is this going to require a clean install to get to the latest version? I have lots of code developed using certain versions of firmware packages. Can I be sure that upgrading to CubeMX Ver 5.1 (or 5.6.1), I can still use my legacy Firmware packages? For instance, one package I have used extensively is STM32F0 Ver 1.9 while I see that 1.10 is available on ST's website.I am currently using TrueStudio (9.0.1) with
Hi,I would like to know if ST has plans to release a version of the STM32CubeH7 with examples done by the STM32CubeMX? Just like ST did in the STM32CubeG4.
Hello,I am assigning pins on a STM32F446 micro in cubemx.I would like to give a pin name to NRST, but it is stuck in a reset_state, and won't let me change it. It is colored differently than other pins.Is it possible to change NRST, or does it stuck like that to signify that it is the reset pin? Still going to use it as the reset pin, but not sure if that has to be specified somehow. I have the same exact issue with the BOOT0 pin. Is it possible to change the BOOT0 pin?
Hello,I would like to write a simple program for writing CSV files to a micro SD card on a custom board I made with my STM32L4R9. The card works on 3.3V and my STM on 1.8V, so I'm using a level shifter.For now, I selected SDMMC1 4 bits wide bus and FatFS. Next, I tried basing myself on the example code for the evaluation board (STM32L4R9I-Discovery), but I get an error when the function SD_PowerOn() (on file stm32l4xx_hal_sd.c) is called. Specifically, I get a timeout error on this line: /* SEND CMD55 APP_CMD with RCA as 0 */ errorstate = SDMMC_CmdAppCommand(hsd->Instance, 0); if(errorstate != HAL_SD_ERROR_NONE) { return errorstate; }And my main looks like this:int main(void) { /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(
In the very last release (at least on the F4), user labels on GPIOs are not working as expected
The CPU is STM32L071KZ. I can select it in two packages. I pick it, assign pins, select a folder to store, select STM32Cube as IDE. It creates the code (ther eeven is an SRC and INC folder, but no .project. STM32Cube refuses to open it.I try TrueSTUDIO as an IDE. It succeeds, but STM32Cube has to convert it. A new pop up, FInish is grayed out.I continue from MX. Open STM32Cube from three. Behold, I get a project file and no conversion needed. I'd like to make a second copy in another folder. I cannot change the folder name.I spend 3 hours creating a .h file. Rerun MX. Create code, .h file lost. Recreate .h file. Compile. Cannot find main.h (I can, it is in the INC file). It need "stm32l0xx.h" Neither the compiler nor I can find it.It needs stm32l0xx_ll_dma.h (I do not use it, I did nto enable it in MX). Compiler cannot find it. I can, it is in the Driver\Inc folder.I download the latest STM32CubeMX version 2.6.1. Nothing changed.Can anybody tell me what I ma doing wrong?Thanks.-- Frits
I want to download stm32cubemx.So I received the ST company's mail link.However, an error occurs in the link (404 NOT FOUND)What should I do? I need help.
I got to the point where keil opens a project using this manual https://www.keil.com/pack/doc/STM32Cube/General/html/cubemx_proj.htmland imports settings from CubeMx but writes the following errors:STM32G071RBT6 - Nucleo board (noBSP)LL triedHAL triedKeil version 5.29.0.0CubeMX 5.5.0 java 13 64 bitWindows 10 64 bitDo I need to add something else?Can your suggest anything? Thanks.
I am assigning pins on a STM32F446 micro in cubemx, and I would like to connect multiple chips to the micro on one spi bus.I would like each chip to be connected to a separate chip select pin, aka spi_nss.When I try to assign a second spi_nss pin, it deletes the first spi_nss pin.How do I assign multiple spi_nss pins?
Hello,I am assigning pins on a STM32F446 micro in cubemx, and I would like to read 2 encoders.When selecting Encoder Mode under the Combined Channels dropdown of the timer configuration, it automatically selects ch1 & ch2.Ch1 of the timer conflicts with other pins I have assigned (and can't easily move around).Is it possible to do encoder mode on a different pair of channels, say ch3 and ch4, or is there something special about ch1 and ch2?Also, what is encoder mode? I just presume I should use it to connect encoders, but I don't actually know how it works.
..
I have Nucleo-L4A6ZG board and want to use STM32CubeIDE o program it, but there is no Nucleo-L4A6ZG board in the Board Selector list. Is there a package I can install for it or I must select STM32L4A6ZG in MCU Selector and configure the rest myself?
When I use CUBEMX version 5.5 with firmware Cube_H7_V1.6.0 for ETHERNET, I configured the IP address but when GENERRATE CODE for KeilC I did not see my IP address created.Is this an error? Because when I used the version before version 5.4 with firmware v1.5.0 everything still work?
Hi,MXcube generates 3 times the same code for initializing the Fault counter of the HRTIM.pFaultBlkCfg.Threshold = 1; if (HAL_HRTIM_FaultCounterConfig(&hhrtim1, HRTIM_FAULT_5, &pFaultBlkCfg) != HAL_OK) { Error_Handler(); } if (HAL_HRTIM_FaultCounterConfig(&hhrtim1, HRTIM_FAULT_5, &pFaultBlkCfg) != HAL_OK) { Error_Handler(); } if (HAL_HRTIM_FaultCounterConfig(&hhrtim1, HRTIM_FAULT_5, &pFaultBlkCfg) != HAL_OK) { Error_Handler(); }and also the same for the Fault blanking config: if (HAL_HRTIM_FaultBlankingConfigAndEnable(&hhrtim1, HRTIM_FAULT_5, &pFaultBlkCfg) != HAL_OK) { Error_Handler(); } if (HAL_HRTIM_FaultBlankingConfigAndEnable(&hhrtim1, HRTIM_FAULT_5, &pFaultBlkCfg) != HAL_OK) { Error_Handler(); } if (HAL_HRTIM_FaultBlankingConfigAndEnable(&hhrtim1, HRTIM_FAULT_5, &pFaultBlkCfg) != HAL_OK) { Error_Handler(); }Used tools: MXCube 5.4.0. HAL Library for STM32G4xx : V1.1.0
Hi all, I've been trying to use the virtual com port on the "STM32F4DISCOVERY" with no luck. My current IDE is STM32CubeIDE v1.3.1, STM32CubeMx v5.6.1, I'm also using firmware pack FW_F4 V1.25.0.Ive started a brand new project, used the CubeIDE board selector to select the Discovery board (STM32f407). I've Configured USB_OTG_FS to 'Device_Only' mode, SOF off, VBUS on. I have changed the USB_DEVICE "middlewares?" to, FS IP = VCP. I have also installed the VCP com drivers (I'm in windows 10). I left everything else UN-touched (I also disabled the low speed external clock, I don't have one) Once my project was gen-ed, I included "usbd_cdc_if.h". In the main while loop I added a 1sec delay, then CDC_Transmit_FS(buff, size). Everything compiled just fine.The issue is, I'm not receiving anything over the VCP, I have the dev kit plugged in via the otg usb port (as well as the stlink usb port for uploading code). The VCP dose show up in device manager, however putty is unable to connect. After
In community they have asked to disable D cache (https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices). How to disable D cache globally. I made the necessary changes in the linker script. I am using system workbench for stm and stm32cubeMX.DMA stream0 for adc1 6 channels.DMA stream1 for adc3.sample code#include "main.h"#include "usb_device.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 ---------------------------------------------------------*/ADC_HandleTypeDef hadc1;ADC_Handle
Actually it says it counts parity bit in USART word lenght. I'm pretty sure that is not so and perhaps even not what they would actually do, and what is word in this contekst anyway.
I use code generation tool STM32CubeMX in order to generate initiation function. However when I want to implement I2C1 I have a strange problem. STM32Cube generates all necessary initiation steps. In main function in while I try to check is someone on a line by function HAL_I2C_IsDeviceReady(&hi2c1, 0x90, 10, 100) and fuinc I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_SB, RESET, Timeout, tickstart) returned me HAL_ERROR. If i generate I2C2 and do the same I can see fine logic signals on SCL and SDA/
Hello,I have installed STM32Cube FW_L4 v1.15.1 in CubeMx.When generating new project STM32L476RG nucleo with Additional Software "STMicroelectroncs.X-CUBE_BLE1.5.0.0", a file "Core/Inc/stm32l4xx_nucleo_errno.h" is created.In top of the file, there is #ifdef __cplusplus extern "C" {#endifbut the correspondent #ifdef __cplusplus}#endifdoes not exist.Thus the additional software cannot be used in C++ projects...I am sure there is an error in code generation of CubeMX.BRPaul
Hello,Can anyone provide a bit of clarity regarding ST's "Marketing Status" terminology? For example, in the STM32CubeMX MCU/MPU selector, I see the following entries for various 'H7 devices:"NA", "Proposal", "Evaluation", "Preview" & "Active". I presume these are not arbitrary and hope they are defined at the corporate level? It's not entirely clear (at least to me), which order they even go in...Hope this doesn't seem like whining - thanks for any insight you can provide!Regards,Dave
Hi,I've developed a custom PCB for STM32F051K8 connected to an external crystal oscillator (8Mhz - nx3225gd from NDK). I think I have set everything correct on CubeMX and managed to get a working firmware going. I set up a 100Hz timer for ADC through setting system clock source to HSE on CubeMx, and the ADC timing seems to be correct (1000 samples take roughly 10 seconds). My issue is that when I try to clock the RTC with the HSE, the timing seems to be consistently off by a factor of 8 or something close to that - Instead of showing 20secs it shows 2min 40secs.When I change the clock source to LSI on the CubeMX clock configuration tab, the timing seems to be closer when I store the timing results same as above - with the LSI, it shows about 22secs.Supposing that I have set the load capacitors of the external correctly, is there anything else I should do to make it work? especially with the RTC (as it seems that the system clock is working fine with the external crystal as the source)
when trying to call HAL_I2C_Master_Transmit returns HAL_ERROR. If I2C2 starts, then everything works
But main.c contains code for the high level RCC access. Tested with CubeMX 5.6.1 and STM32L452VCTChanging RCC also to the low level driver, includes the RCC HAL driver to the project, but main.c contains the low level access
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.