Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi I'm new to stm32Cube and have been trying for days to read these ultra sonic sensors. Here is the data sheet to the one i am using: https://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf if someone could please attach a picture of the stm32cube setup in order to read the Pulse Width (Pin 2) from the sensor i want the internal timer to start on the rising edge and stop/capture on the falling edge of the signal here is the setup i'm currently trying :Any help would be much appreciated I'm very new to using timers and tried reading the timers cookbook but after 12 setup attempts i get an output that changes but i cant seem to figure out if i'm doing it right this is my flag:void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) { if (htim->Instance == TIM2) { if (i == 0) { cap1 = __HAL_TIM_GET_COMPARE(&htim2, TIM_CHANNEL_1); i = 1; } else if (i == 1) { cap2 = __HAL_TIM_GET_COMPARE(&htim2, TIM_CHANNEL_1); i = 0; } __HAL_TIM_SET_CO
This seems to work fine (timer linkage used in my current firmware) but the Reference manual (Doc ID16188 Rev 5) suggests this internal trigger (ITR0) is not available in low & medium density devices?! Can I rely on all future batches of the STM32F100V8T MCU allowing this timer linkage, or should I look to combine two different timers? (I am already using most other timers, and I hope I do not need to change anything!)The STM32 cubeMx tool seems to show that TIM15 ITR0 is available and can be configured on the STM32F100V8Tx MCU - see attached screen grab. I have some common code that is used to configure timer 2 and timer 15 to create linked microsecond and millisecond ticks. This initialisation code works fine, and links the timers as intended, despite the reference manual suggesting TIM15 ITR0 is not available./*Timer handles*/ static TIM_HandleTypeDef h_timUS; static TIM_HandleTypeDef h_timMS; bool initTimers(void) { bool success = TRUE; TIM_MasterConfigType
..
For example if the original name is:void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);the expected result should be:void MyPrefix_HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init);
During debugging a bus-powered STM32F401RCT6 customed board, a strange problem was encountered. The application code is directly generated by CubeMX with USB CDC, VBUS sense disabled. The USB failed at plug-in, even no USB enumerating. I tried to debug it with a stlink, and found the USB works when the board is firstly powered by the debugger before usb cable plugged in. If the MCU boots when the USB cable already plugged, the code goes to error at USB_CoreReset()The CSRST bit in register FS_GRSTCTL is not cleared. The code returns HAL_TINEOUT.
I am not being able to download STM32Cube_FW_F7_V1.15.0 what so everfrom CubeMx it shows (HTTP access forbidden) errorand when downloading it from browser .. The download always stops at 90% .. trie multiple PCs different times different connections .. all with the same result .. Please somebody share a different link to the package
Hello,I have a problem with STM32CUBEMX v5.1.0. I cannot download a new embedded software package, I receive an error that package is not available. I have that package downloaded and I tried to load this in cubemx using "from local" option and again I received an error like that: "Problem during Unzip the file"I tried with older software packages and I got the same errors.
Choice clock disable, the is No problem.#define FSMC_CFG_ADDR ((unsigned char *)0x60000000) //
I use CubeMX version 5.0.0 to create the SDMMC HAL for STM32L475VTGx. In CubeMX I chose 'SD 4 bits Wide bus'. The SDMMC parameters are all defaults.While running the initialization code inside of HAL_SD_ConfigWideBusOperation() it only allows 4bit data for CardType == CARD_SECURED, not CARD_SDHC_SDXC or CARD_SDSC. I have CARD_SDHC_SDXC (a micro SDHC 4GB card).Also if I search for CARD_SECURED, I can't find where this CardType can be assigned. Could that be due to a bad CubeMX parameter setting? The micro SDHC card spec shows a 4bit data bus if card is in SD bus mode. It also has a 1bit SPI bus mode.I'm not sure what bus mode is assumed upon power up. Perhaps I need to start in 1 bit mode (assuming it boots into SPI bus mode?) and then send a command to switch to SD bus mode? I see that CardType is used frequently in the HAL message protocol, so I want to make sure I have the correct mode to actually use the HAL, if possible.Any help appreciated.Thanks,-Fred
Hi all,I´m trying to use a micro SD-Card with my Nucleo L433RC and have some Problems. The Code is generated by CubeMX 5. I added the following lines to it: FRESULT res; uint32_t byteswritten; uint8_t wtext[] = "Test1"; if(retSD==0) { if(f_mount(&SDFatFS,(TCHAR const*)SDPath, 0)!= FR_OK) { Error_Handler(); } else { if(f_open(&SDFile, "sd_test.txt",FA_CREATE_ALWAYS | FA_WRITE)!= FR_OK) { Error_Handler(); } else { res = f_write(&SDFile, wtext, sizeof(wtext)-1,(void*)&byteswritten); if((byteswritten == 0)||(res!= FR_OK)) { Error_Handler(); } else { f_close(&SDFile); } } } }The Code can´t open the File. Debugging shows that the command:res = find_volume(&path, &
Hi,I have troubles with stdio.h library function printf on STM32F207ZG-Nucleo board. After implementing (for example from ..\STM32Cube_FW_F2_V1.7.0\Projects\STM32F207ZG-Nucleo\Examples\UART\UART_Printf\..) calling printf() doesn't work. When I've tried to debug it, execution fails into HardFault_Handler and there stops.The project is generated from newest CubeMX (5.1.0) and using RTOS. Im affarid it somehow corresponds with upgrade to 5.1.0 I did before this issue. In the previois versions (can't say exactly version number) I have no problem with this (I have noticed slightly different implementation of syscalls.c).Thanks,Jiri
Dear community We are pleased to announce the release of STM32CubeMX v5.1.0What’s new ? Performance enhancements for improved user experience.Font size is now customizable (Click "Window" -> "Font size")User interface updates Graphics updates: TrueSTUDIO® is supported by TouchGFX Designer.Added the support of the first MPU: STM32MP1 Series.New devices: STM32MP151xx, STM32MP153xx, and STM32MP157xx.New boards: STM32MP157A-EV1, STM32MP157C-EV1 and STM32MP157C-DK2Features: Tj versus Ta calculation for PCC, DDR Test Suite, Device Tree generation, etc.Added the support of the STM32WB Series:New devices: STM32WB55xx.Examples in MX format available in the STM32Cube_FW_WB_1.0.0 STM32CubeWB MCU Package.Features: PCC Bluetooth® Low Energy feature.Added the support of USBPD Middleware for G0 SeriesSupported STM32Cube package versions:· STM32F0 V1.9.0 · STM32F1 V1.7.0 · 
I'm using mbed coding on stm32L432kc nucleo board. I'm copying the code from the stm32 cube code examples to put my MCU in shutdown [https://github.com/Rayling35/STM32Cube_FW_L4_V1.12.0/blob/master/Projects/NUCLEO-L432KC/Examples/PWR/PWR_SHUTDOWN/Src/main.c] The code compiles fine. I just added an LED blink inside the while (1) loop after the shutdown command to see if the MCU has wakeup up but it never blinks.Any idea what I'm doing wrong?
Hi, so i am trying to get the firmware package (stm32_fw_L1_v180).First, stmcubemx would not let me generate a code because i do not have the above stated firmware package. So, I tried installing the software through stm32CubeMX but it showed an error that said "HTTP access denied" and "dependencies not loaded". Then, i found the file on st website and downloaded it, i tried to use "from local" to add the file, but it said that there are no dependencies for the file. I dont know what else to do. Is it possible to generate a code without the firmware package.I know this might be a very basic question but i am new to stm32 and this is my first project, so any help is appreciated.Thank you
Hi,I've realize my STM32Cube\Repository folder takes 30Go.I was curious if I have to keep the folders STM32Cube_FW_F4_V1.X.0 from 0 to 23, or if I can only keep STM32Cube_FW_F4_V1.23.0 and delete the others?Thank you
I am using STM32F091CCT6, i want to store a variable data into flash memory. That value does not change after power on reset. Any example code available for this application.
Hi,When I generate a makefile project, the linker script generated is empty. Please advise.@stm32cube-t
on stm32f105, Version 5.1.0, Scan Conversion mode of ADC1 can be selected enabled not disabled. but ADC2, ADC2 has both of them
STM32F413, Cube 5.1.0 plugin to SW4STM32, with Library STMR32Cube_FW_F4_V1.24.0. In previous versions we were able to set the transfer direction for I2S4,I2S5 half duplex channels. In the above version only transmit can be selected and the ability to select receive mode has been incorrectly removed. This is a CRITICAL regression test failure as what code generation that WAS working IS NO LONGER is working. FIX NOW!!!
I updated CubeMX to 5.0.1 today, then created a new project for the Nucleo-64-STM32L053 board. I'm using Atolic TrueStudio for STM32 v9.2.0 as the IDE and toolchain.I set up the project for the board, selecting and configuring peripherals, along with FreeRTOS and USB device (virtual com port), then generated the code; I selected the "Advanced" option under "Application Structure" in the project settings. For this project, the firmware STM32Cube_FW_L0_V1.11.0 is being used.My usual practice is to build the generated project before I start changing things. This revealed a number of problems right off:The generated project included the startup code directories for KEIL, IAR, and GCC under "Drivers\CMSIS\Device\ST\STM32L0xx\Source\Templates", (the "arm", "gcc", and "iar" directories), and under each of those were 20 chip-specific assembly files. In my projects for other devices made with earlier versions of STM32CubeMX (pre 5.0) only have the "gcc" directory (or nothing at all) under "Temp
I try to modify the COMP2_CSR register on addr: 0x4001001C. But it's as if the register is locked to the default value. From the Memory viewer it seems the register is modifiable, but the COMP window still shows default value and I cannot modify the register manually from the COMP window.APB2 SYSCFG clock is enabled. See screenshot.
Dear Member,How can I generate 5Hz pulse on OC using TIM3 ?Here is my setting on STM32CubeMxThanks
A very simple question - why do toolbars take up such a huge area?Why tools that can no longer be used - remain on the monitor screen?Why did you abandon the icons, and use huge colored rectangles in the style of Windows 10?I know that developers and managers of ST can put any monitor in the workplace. The price does not matter. But 90% of users have a standard monitor with a resolution of 1920/1080.Please - test the software on popular models of monitors.
Hello! I use CubeMX ver.5.1.0 and Linux Mint 19. When i push the button "Generate code" CubeMX creates source files and headers, but doesn't creates any project files or makefiles. Than it shows error message(screenshot in attachments). It shows this message with all types of toolchains excepts item "Other Toolchains(GPDSC)".
I am working on a bootloader for the STM32L4 and using the STM32L4R9I-EVAL board. Using STM32CubeMX version 5 I've generated code for a device USB MSD and have included FatFs as the file system. I've used the FatFs routine, f_mkfs() to format the drive as FAT16 which creates the partition sector, the FAT Boot sector, and the first sector of the FAT Table. When I connect USB to MacOS the disk is recognized and is available for copying a file. However, connecting to Window 10 fails. With a USB analyzer I can see that at times only the partition is read, other times the Fat Boot sector is read, and sometimes even first sector of the the FAT Table. But Windows determines that the disk cannot be read. I have thought that there may be a timing issue or a formatting issue but am not sure how to diagnose what is wrong with the connection to Windows. Does anyone have any suggestions?Just to answer why I'm not using the DFU class - we have an existing product (using a different processor) where
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.