Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
We have CubeMX installed on Ubuntu 18, have been using it with no issues. We now need to update to 6.1.1 howver when enter SetupSTM32CubeMX-6.1.1.linux it responds with command not found. The file is the correct user with chmod to 777, we have tried sudo. We have looked at the 6.1.1 release ReadMe.We are installing from a normal Linux prompt.
How to configure 4-bit SDIO with DMA using STM32CubeMX, to write to an SD card?FW is running on an STM32F103.I am trying to set up an SDIO interface with DMA for an SD card using STM32CubeMX.The issue I am having is that I am unable to write to the SD card.I can read from it just fine, but trying to write to it always fails.Not quite sure what the issue is but here is some more information:I've found that a Transmit-FIFO-underrun flag is set when attempting to write.Could be related to the clock settings. The MCU is running at 8MHz, and the SDIO line is at 4MHz (divide bypass disabled and divide factor set to 0).Could be due to priority settings for DMA and SDIO. Tried setting the SDIO priority is set to 0, and the DMA channel to high, but that did not help. There is another high-priority DMA channel in the system, used by an ADC. The processor I'm using is the STM32F103, for which CubeMX only gives me one DMA channel as an option, which I've set to be Peripheral to Memory (the other o
Hi,I have an accuracy problem with the HSI16 of my STM32L431. It is really outside specifications, over 10% from 16MHz.I have discovered that during the initialitation of the RCC, the value of RCC_HSICALIBRATION_DEFAULT is 0x40, like in the datasheetdefault value, but in AN4736 it´s seems to be 0x10.The fact is that is I change this value to 0x10, the HSI16 clock is generated correctly, but if I let the MXCube do it by itself, the value is taken from the "stm32l4xx_hal_rcc.h" where:#if defined(RCC_ICSCR_HSITRIM_6)#define RCC_HSICALIBRATION_DEFAULT 0x40U /*!< Default HSI calibration trimming value 64 on devices other than STM32L47x/STM32L48x */#else#define RCC_HSICALIBRATION_DEFAULT 0x10U /*!< Default HSI calibration trimming value 16 on STM32L47x/STM32L48x devices */#endif /* RCC_ICSCR_HSITRIM_6 */so it takes 0x40 default value.Is the datashe
..
Hi all,I have a STM32G474 and data in backup registers (eg. LL_RTC_BKP_DR0) are cleared after reset or power cycle (3.3 V battery is present!).Code is generated by CubeMX with LL drivers. I enabled RTC and disabled all tampers.In the main code, I can write to the registers (and readback or check via debugger/SFR view). However, if I restart the debugger, press the reset button (with or without debugger connected) or switch of VCC (with VBAT present from a CR2032 battery), backup registers are all 0.As I understand it, this could be caused by a RTC domain reset or a tamper event. I have neither, as far as I can tell. What could be wrong? Is there an example for this?Regards, Martin
HelloI use a HRTIM timer (Timer B) to trigger the ADC (ADC2_IN5) internally (STM32G4).I want to increas the high-resolution clock frequency fHRCK with a prescaler ratio: 170MHz*32=5.44GHz to trigger the ADC via a compare value of 54.400.Unfortunately, the ADC doesn't work properly with this prescaler. If I enter a prescaler ratio of 1, then everything works correctly.Does anyone have an idea what the problem could be?(If you need more information to answer the question, let me know.)Any advice would be helpful. Thanks.
Hello,STM32CubeIDE 1.5.1, latest H7 package for STM32Cube.I have STM32H747-DISC1 board, and STM32CubeMX (in IDE) let me pick max. 36 MHz clock.According to the datasheet STM32H747xI/G datasheet, ADC clock frequency get up to 50 MHz. I overriden frequency on ADC, and it works fine, so I guess this is a bug.
Hi,Is there any pin-to-pin compatible controller available with STM32F072RBTx MCU in ST. Compatible controllers can be with Higher FLASH & RAM size.
When I try to install SetupSTM32CubeMX-6.1.0.app I get this error: You do not have permission to open the application “SetupSTM32CubeMX-6.1.0.app�?
I use CUBEIDE 1.3.0 with MCU Package STM32F2 V1.9.0 for Nucleo F207. This package generates a file "stm32f2xx_hal_config.h". In this file, all "USE_HAL_***_REGISTER_CALLBACK" defines are set / not set. What is the proper way to enable these defines? I don't find a switch within the CubeIDE environment. These defines are not in a Begin_user / End-User section. If I enable one, it got overwritten by next time code-generation. Other CPU types like STM32L4 MCU Packages don't generate these defines, I normally set these as global define with the compiler preprocessor settings. With F2xx MCU Package, this does not help. The compiler complains about "redefinition" of these defines. File: stm32f2xx_hal_config.h #define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ #define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ #define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ #define USE_HAL_USART_REGISTER_CALLBACKS
Hello Community, I'm using an ST Nucleo-F767ZI and I create my project, for Atollic True Studio, with Cube32MX.In my project I included FreeRTOS v10.I'm in troubled with the malloc function, because this function return a NULL pointer.I have several tasks, and I'm not able to allocate memory inside a task.If I invoke the malloc function in the main.c, the function returns a pointer.I don't know why this happens.Thanks for the help.Federico
Hello, I have some problem with the latest version of cubeMX (v6.1.1), it won't create a project file for STM32 (well I would like to use simulink with mat/target before using STM32cubeIDE that's why I use cubeMx and the project work with µvision),the configuration of my project are :target board : NUCLEO-F446REtarget IDE : STM32cubeIDE 1.5.1here is my error :You can find the log in attach the log (log_CubeMx.txt) which consist of one generation done the 27/01 at 12:08 and the configuration file .ioc (BilleSTM32.ioc).Thank you for your future help.S. Dehais
I'm trying to get I2S working on an STM32F303CBTx, but am having trouble configuring the pheripheral in STM32CubeMX. In the reference manual I read:9.2.12 I2S clock (only in STM32F303xB/C/D/E, STM32F358xC and STM32F398xE) The I2S clock can be either the System clock or an external clock provided on I2S_CKIN pin. The selection of the I2S clock source is performed using bit 23 (I2SSRC) of RCC_CFGR register.However, with the system clock configured to 72MHz, I still get the following error trying to set the audio frequency to 48kHz:With this I2S Clock (8.0MHz), the divider value (0) is too low to obtain the desired Audio Frequency. The I2S Clock must be higher than (21.504 MHz).Am I doing something wrong here, am I missing something, or is STM32CubeMX wrong on the clock speeds? Thanks!- David
I installed STM32CUBEMX version 6.1.1 for the project of STM32L5. As I edited Project, I couldn't change Toolchain/IDE to SW4STM32.As below image, I could select only EWARM, MDK-ARM, and STM32CubeIDE.When I make the code through other toolchain except for SW4STM32, in Workbench, I can't build the code. I already have installed the latest Firmware Package for STM32L5. What can i do? Thank you for your answer in advance. Thank you.
Hello,I use CubeMX 6.1.0.Some peripherals I must initialize by myself for some reasons.So for example if I use the ADC1, I enable a dummy ADC peripheral in CubeMX AND I supress the code generation in ProjectManager/Advanced settings at the same time.This action is only to asure the ADC-Hal Files are properly in included and linked.I don´t expect any ADC related code to be generated form CubeMX in this situation.However CubeMX DOES generate HAL_ADC_MspInit() !! and does some low level init there.This is very bad because this funtion is defined _weak within the HAL and because CubeMX generates this function now even though code generation for ADC is disabled, I have to cope with some funny low level initialisations when I call the HAL_ADC_Init() function later.How can this MSP-code generation be suppressed?Thanks very much for any helpAndy
Hi,I'm trying to run some code on the STM32H735G Development Kit.When simply generating a new firmware in CubeMx (v6.1.1), printf doesn't seem to want to work out of the box and the system hangs. I disable FDCAN init and OCTOSPI init and it can at least start up.I'm using UART3 and added an `__io_putchar` implementation but that makes no difference.It's only when I add an implementation for `int puts(const char* str)` that printf somewhat works: I can do `printf("text")` but not `printf("num: %d", 5)`.I guess some stdio binary is not being linked in.Thanks.
I was hired to program the STM32MP151 dual core processor. I loaded the STMCoreIDE because that was what was recommended. Not being familiar with the Arm M4 I decided to buy a Nucleo to learn how the ST Peripherals worked in what I hoped would be a simpler environment. But the UM1727 does not list the STM32CubeIDE as one of the supported IDEs. Where do I find instructions and code to test? I am running Linux Mint 20.1.
Hi Guys,Im struggling in getting a good way to work with cubemx and multi channel ADC. I want to be able to only change the cubemx file whenever there is a hardware change. Currently i cannot do so because in my firmware i am using HAL_ADC_ConfigChannel() to change adc configurations (i have 5 channels and need 3 to sample at the same time at the max speed, other two i sample seperatly and later on). However the ADC_ChannelConfTypeDef.Channel needs to know the ADC channel.Does Cubemx have a way to create variables for adc channels (currently i use variable ADC_CHANNEL_x ) ? Or is there a way to grab the channel from a user label?Kind regards,Taxara
In STM32CubeMX (6.1.0) for STM32H7 the I2C parameter settings allow you to enable Custom Timing. However, the Timing parameter still remains disabled and cannot be set. I would expect that for custom timing, the user could change the Timing parameter.I'm also wondering why other MCUs (e.g stm32f0) don't even offer a Custom Timing.
Hi, I just ran into a strange problem that when doing multiple writes to an open file fails if it happens in chunks of 1023, but it is fine in chunks of the more common 1024.Can someone confirm this (maybe give an explanation :), as far as I know there is not suppose to be such limitation of f_write ). I am working on an STM32F7 with fatfs and an SD card configured for 1b (not 4b).Example code:FATFS m_SDFatFS; FRESULT l_fatfsResult; l_fatfsResult = f_mount(&m_SDFatFS, "", 1); // Fatfs write test { FIL l_fil; /* File object */ FRESULT l_fatfsResult; /* FatFs return code */ uint8_t l_aBuf[1023] = {0}; // make sure your stack is big enough UINT l_sizeWritten; l_fatfsResult = f_open( &l_fil, "mytest.jpg", FA_CREATE_ALWAYS | FA_READ | FA_WRITE ); if( l_fatfsResult != FR_OK ) { printf( "Error creating file: %d", l_fatfsResult ); } l_fatfsResult = f_write( &l_fil, l_aBuf, sizeof(l_aBuf), &l_sizeWritten ); if( l_fatfsResult != FR_O
The latest edition of Cube 6.1.1 provides config options for PolarSSL. Can anyone provide some info or working example on how to actually use it? Cannot see anything anywhere documenting the process? Thanks
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.