Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Folks,I've been asked to take an existing IOC file as a basis for a new project and remove things like FAT, some peripherals etc. Is there no way to deselect some of these things? You'd expect to be able to click on things, deselect them and recreate the code, but it won't let me do that. Is there some arcane way of doing it, or do you just have to start a new project if you want fewer things selected?Thanks.
Hi!I just want to tell you ST-developers that I have found something that don't looks correct.Wrong indexing in SDADC. Have a look. STM32CubeIDE 1.6.1
STM32G474CE: Is it possible to use I2C2 in SMBus 2-wire mode with DMA? Asking because CubeMX (with STM32CubeFW_G4 1.4.0) does not show the "DMA Settings" tab if I2C2 is set to "SMBus-two-wire-interface." Bug in CubeG4 or hardware limitation?
In STM32CubeMX, when I enable an I2C interface in SMBus mode (and no other I2C interfaces are enabled), the resulting code emitted in file stm32f4xx_hal_conf.h has this line commented out:/* #define HAL_I2C_MODULE_ENABLED */As a consequence, stm32f4xx_hal_i2c.h is not included. This leads to compile errors in stm32f4xx_hal_smbus.h, which needs typedef I2C_TypeDef.
This does not happen with STM32CubeIDE 1.4, but I need to use 1.5 for various reasons. The computer doesn't have and can't have an internet connection.I've downloaded the file en.stm32cubef4_v1-25-0.zip, AND en.patch_cubef4.zip (this is V1.25.2 according to ST, and the one that doesn't work).I've also downloaded the file STM32CubeF4-master.zip from the ST repo on Github, but STM32CubeIDE doesn't recognize it as a firmware package.I've googled this problem for days, but can't seem to find an answer. I've also searched the forums, and can only find similar problems with CubeProgrammerMX, but none are marked as solved.
Hi,we have configured OCTOSPI1/2 follows : But signal ChipSelect is not changing when we measure it. When we moved Chipselect to OCTOSPI2 ChipSelect is working ... How do we have to change configuration to work with ChipSelect on OCTOSPI1 ?ThanksPetr
I just realized STM32CubeMX Version 6.0.1 no longer sorts and groups the settings in .ioc file in a predictable way. This makes it very difficult to follow the changes with tools like `git diff`. #MicroXplorer Configuration settings - do not modify PA11.GPIO_Speed=GPIO_SPEED_FREQ_HIGH Bdma.ADC3.0.PeriphInc=DMA_PINC_DISABLE VP_TIM5_VS_ClockSourceINT.Mode=Internal Dma.SPI1_TX.0.PeriphInc=DMA_PINC_DISABLE Bdma.Request0=ADC3 SPI1.VirtualType=VM_MASTER ...As a workaround one has to sort the lines manually: `sort < File.ioc > FileSorted.ioc`.Please, please revert to the old behavior
Hi, we use Git for source control and have notice that each time STM32CubeMX 6.1.1 saves the IOC file, the ordering of all the entries is changed. This makes it impossible to deal with in pull requests as you cannot tell if genuine changes have been made.I've seen this reported before, and it was claimed that the IOC file should be saved in alphabetical order. It is not. The first few lines (after sorting the file before loading it) show as this after saving (and making NO changes):#MicroXplorer Configuration settings - do not modify PF7.GPIOParameters=GPIO_Label PB13.GPIOParameters=GPIO_Label PD12.GPIO_Label=PON_B9
Hello ST community,I am use NUCLEO-G474RE, wanted to set up SYNCOUT for HRTIM. You can see the synchro configuration below:Timer A is running, PWM is generated, but nothing happens to SYNCOUT. I start looking at hrtim initialization and notice that there is no configuration for the SYNCOUT pin (PB1).To fixed the bug add the following code: GPIO_InitTypeDef GPIO_InitStruct = {0}; GPIO_InitStruct.Pin = GPIO_PIN_1; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF13_HRTIM1; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);I am attaching a project with a fixed bug.
I try to capture power off timestamp by using PVD_IRQHandler(), but it doesn't work. The PVD is configured at power up at below:void Config_PWR_PDV(void){ PWR_PVDTypeDef PVDSetting; HAL_PWR_DisablePVD(); PVDSetting.Mode = PWR_PVD_MODE_IT_FALLING; //Falling edge. PVDSetting.PVDLevel = PWR_PVDLEVEL_7; //E0; 2.9Volt HAL_PWR_ConfigPVD(&PVDSetting); HAL_PWR_EnablePVD();}The PVD_IRQ is enabled in the STMCube, it seems not trigger the interrupt when I power off the board.From the user manual, it mention "EXTI line 16", maybe this cause the problem, but I can't setup for "EXTI 16" in STMCube.
Hello,I am using the STM32L412, when I activate the HSI clock in the .ioc, HSI Calibration Value is set to 16 (0x10).Looking at stm32l4xx_hal_rcc.h:#if defined(RCC_ICSCR_HSITRIM_6) #define RCC_HSICALIBRATION_DEFAULT 0x40U /*!< Default HSI calibration trimming value 64 on devices other than STM32L43x/STM32L44x/STM32L47x/STM32L48x */ #else #define RCC_HSICALIBRATION_DEFAULT 0x10U /*!< Default HSI calibration trimming value 16 on STM32L43x/STM32L44x/STM32L47x/STM32L48x devices */ #endif /* RCC_ICSCR_HSITRIM_6 */So, with STM32L412, the default value set by the device configuration tool should be 60 (0x40).With default value USART was failing, once changed everything was working good for me.
I hope this is a good place for this. I had difficulty getting an SD card read to work with FATFs code generated by CUBE. The file at first appeared to get corrupted after about 20K bytes and I spent considerable time trying to figure out what I was doing wrong.It turned out to be an issue with the function sd_read_block in file sd.c. Specifically there is a call to sd_delay with an argument of 5. This would cause 5 nulls to be sent to the SD card to pump its internal state machine. In my case I needed to change the delay to 10.Using Windows 10, CUBE version 5.6.1 and Keil 5.34.0.0.My SD card is embedded in the HW and I am unable to get to it so I can't report the brand but it is a 4GB card.I hope this helps someone else.
I am trying to STM32G4 with STM32-MAT.After setting the setting I want to use to STM32CubeMX, when I set HRTimer Config on Simulink and created the code, it stopped with the error "Undefined identifier hrtim_adc_trigger3_value_init".I don't know which block's settings are missing, but does anyone know?The tools used are as follows.Matlab R2-018b-2021aSTM32 Cube MX 6.2.0
I am using STM32F769 Discovery board to convert the USB_OTG_HS to Host only mode.Initially I just used default STM32CubeMX setup that is HCLK 200 MHz when AHB Presclarer is 1. But with this, I can mount f_mount() but not write/read operation (f_open(), f_write() and f_read().Then by hunch I change the HCLK speed to 100MHz by setting AHB Prescaler to 2. Interestinly mount fail, but read/write operation success. How to explain this? So it seems to me, the clock speed impact USB Host operation, any guidelines to follow to setup the clock?
EXTI12 implies that the ARM external interrupt that is triggered is EXTI15_10_IRQn, when actually this pin triggers the EXTI2 interrupt. I think the issue is with the STM32Cube IDE code generator for this particular family of boards. (I tried to use EXTI2 as a software interrupt but when I touched the board in certain places it would cause my code to hang --- well, I thought this vector was available since I didn't see it being used in the configuration tool :) ). I've since solved this minor issue for myself but thought I should share it with ST. /*Configure GPIO pin : PMOD_IRQ_EXTI12_Pin */ GPIO_InitStruct.Pin = PMOD_IRQ_EXTI12_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_PULLDOWN; HAL_GPIO_Init(PMOD_IRQ_EXTI12_GPIO_Port, &GPIO_InitStruct); I think should be: /*Configure GPIO pin : PMOD_IRQ_EXTI2_Pin */ GPIO_InitStruct.Pin = PMOD_IRQ_EXTI2_Pin; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; GPIO_InitStruct.Pull = GPIO_PULLDOWN;
STM32CubeMX project for STM32F407ZGFirmware pack FW_F4 V1.26.1generated project : Option for Target -> Linker -> R/O Base, R/W Base is not configurated which cause Image Entry point wrongly set to 0x00008001
I'm currently using NUCLEO board H743ZI-Q and using software STM32CubeIDE.The first time I build a new project everything is going fine. But when I build the second project, after I choose the project name and press finish, I cannot initialize all peripherals with default mode. There is not an option for me to choose. As shown in the pics.How can I correctly initialize all the peripherals?Plz help.
..
I would like to know how we can configure STM32H7's SAI(s) for 8-PDM microphone inputs (LR * 4 pairs). (16kHz sampling rate).It seems MX allows us 6 mic with SAI1 and 2 mics with SAI4 but I'm not sure how we can set SAI1/4 exactliy for 8 mics (synchronized data acquisition I want)
Request cumunity member to guide on this topic. I am unable to download any single code which is generated from the CubeMx for Cubeide. Each generated code is going in hard fault.Please tell me the issue and suggest correct way if I am doing any mistake or may someone has already faced this kind of issue.Regards,Dnyanesh
Hello,I am developing a board based on STM32F407G (Disc1) Where I am connecting an SD-Card over the SPI to store some data in the file on SD card. I am configuring internal RTC for the time tracking, On internal clock, a 16x2 LCD connected via 4-bit mode and some push buttons.The problem I am facing is, When the Code do file operation on SD card(i.e writing data in file) the RTC time becomes 0. If board powered-up without the SD-card on it, It just works fine. For debugging I tried to do SD-Card activity after some time of booting(i.e. 30 Sec), So during the first 30 sec the RTC date-time showing fine, as the SD-Card operation started after 30 sec, RTC time-date became 0.CubeMx configuration of the project is as below;USART2(PD5, PD6)- asynchronous mode UARTSPI1(PB3-Clk, PB4-Miso, PB5-Mosi, PA15-GPIO_Out for CS)PC0 to PC7-GPIO Output for LCDPE0 to PE5-GPIO Input for Push-buttonsFATFS-User definedRTC-Internal clockTIM1-Micro second delayFor SD-Card configuration I followed: https://cont
Hi, I've generated a project using STM32CubeMX for the STM32G030C8Tx and I've included FREERTOS. The heap_x file is not listed in the GPDSC file. I think this is a bug, note someone else appears to have had the same issue here: Topic: Error undefined reference to `pvPortMalloc and `vPortFree' | SysprogsAttached is my .ioc file and GPDSC file (I had to change it to a txt file to upload).
Hi,I have an IOC project attached which produce total garbage.This project was oroginal made to use HSE 8MHz quartz and LSE 32.768KHz quartz. The I changed to use HSI and LSI an there was clock errors which I couldnt se what it is. I made the mistake to use clock resolver (most useless function in Cube) then I had total garbage (the attachment).1.) When I select HSI or CSI as clock source, I get error that I have to use HSE as clock even when HSE is disabled??????2.) When I select whatever, divide by x to get 4MHz, Multilpy with 100 then devide by 2, I get a sysclk of 201.5. The calculator calculates wrong. Where comes the 1.5MHz extra????3.) The I tried to select HSI as source and wanted to adjust dividers and multipliers to get 400MHz sysclk but its not possible to do thst because it changes all the time the values what I never asked for it.4.) When I produce the project. The result will not work at all because in the TIM7 ISR there is empty and there is no call to clockl ISR functio
I have created sample code for STM32L010R8 using cubemx v5.0.1. When I try to compile the code, I am getting this error. What couldbe the reason. Please help.
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.