Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,I want to configure my STM32H7 MCU to use SMPS configuration.I try to select RCC -> Supply Source -> PWR_DIRECT_SMPS_SUPPLY, but then get build error Src/main.c:136:26: error: 'PWR_DIRECT_SMPS_SUPPLY' undeclared (first use in this function)This is because "SMPS" is not defined. I try to define this manually typing #define SMPS in stm32h7b3xx.h (it is in stm32h7b3xxq.h example projects), but again got more build errors in various lines that SMPS and many more is not defined.Where am I supposed to define and configure this? Is the STM32CubeMX supposed to work this way or is it a bug?EDIT, additional info:My project does not contain stm32h7b3xxq.h files, only stm32h7b3xx.h. The Q-file includes a lot of power related defines (e.g. PWR_CR3_SMPSEN).Why my project is missing these "Q files"? Why STM32CubeMX does not generate these files for me?Our MCU is STM32H7B3IIK6EDIT2: wait, this number does not seem to contain SMPS (Q-type), yet our schematic is wired using SMPS configuration.
CubeMX shows no option for setting the active channels for analog watchdog 2 and 3 for the STM32G474RBTx.
I created a CubeMX project in an important folder. I found out, that all the project files were not put inside an own folder and were all over the place. So I wanted to delete the Project to make a new one. When deleting i clicked on "delete project content on this cannot be undone" without realizing that the whole folder would be deleted and not just the project. Now the folder is gone, is there any way to reproduce it? ... I can restore the the program itself but unfortunately the text I wrote is still missing:sad_but_relieved_face:
I am trying to implement an MBEDTLS client based on an ST example. The MBEDTLS code fails when it tries to allocate memory using calloc. Apparently, users have been experiencing this for over a year.https://community.st.com/s/question/0D50X0000ArVXNhSQO/cubemx-freertos-lwip-and-mbedtls-mbedtlscalloc-fails-to-allocate-what-to-checkThe MBEDTLS code uses dynamic memory allocation (calloc()) which apparently is incompatible with FreeRTOS. Is there an easy work around? Do I need to write my own memory allocation? Am I going to run into problems with LWIP stack?I am not an experienced embedded programmer. I am willing to try to work around this problem; but, I don't want to keep running into road block after road block. I will soon have to consider moving to another platform.
Hello,I've generated simple SSL Client example from CubeMX using FreeRTOS, MBED TLS and LwIP components. I'd like to connect to SSL server (test server present in CubeF4 package).I have pretty similar default settings for these components from CubeMX. Obviously I don't have memory available, or maybe something is wrong with settings and dynamic allocation is not possible.This part of code fails (it tries to allocate 935 bytes for certificate parsing :if( ( buf = mbedtls_calloc( 1, len ) ) == NULL ) return( MBEDTLS_ERR_PEM_ALLOC_FAILED );Can anyone please help, what settings to check or how to analyze this problem correctly to get to the solution ?Thanks in advance,regards,Bully.
The makefile is not correct with: arm-none-eabi-objcopy.exe -O ihex "IOproc.elf" "IOproc.hex", but the IDE is trying to run arm-none-eabi-objcopy.exe. I just reinstalled the IDE using the Mac installer - no change. How can I get the IDE to generate a makefile that does not have ".exe"?
I am having following error while compilation process. Please let me know if there is anything I am missing or any configuration that will solve the issue
Hello,I am trying to create a project with STM32Cube 5.1.0 for NUCLEO-F413ZH. I see only USART 1, 2, 3 and 6 available, none of the UARTs 4, 5, 7, 8, 9 and 10. These UARTs are available if I open a project for STM32F413ZHT, the device used in NUCLEO-F413ZH board. I understand why UART4 would be disabled - its pins PA0/1 are used for other functions in NUCLEO, a user button and RMII_REF_CLK, but UART7 PH6/7 is not occupied.Thank you.
Hi All,I am trying to set a few GPIO speed to High Speed but I was struct when PC13-15 are only able to set to Low Speed. May I know is this the STM32CubeMx bugs?Or it is the STM32F446RE limitation? Please help.Many Thanks
Hello, I need to configure the CAN FD in STM32H7 as classic can. However, I can not understand the bit timing explained in the reference manual. Can someone please help me to figure out the bit timing for a clock frequency of 42Mhz? Your help is much appreciated. Thank you and best regards, Vouria
On the stasrt-op screen of Cube the is a picture/text about Github.I can't find any link to ST CubeMx on Github. I find a lot of links about Cube but they I dont think they what CubeMX talks about.
I am working on a project with a client, we use git for revision control and we have a private, shared, online repository for the project. When the client pulls the latest project, opens the "ioc" file in CubeMX, and regenerates the project, he sees the "ioc" file has many changes.Examination of his file and the original shows that the actual data looks to be the same in both files, however, the order in which the data appears is very different. On the most recent pull and generate he reported over 300 "changes" in the file.Why is this happening and how can we avoid it? Seeing the project file marked as changing so much may be benign, however, especially for the client it is disturbing.Sid
I am not able to find details what the restrictions are and what is disabled. When simply looking at the allocation Table it should work. Below my desired configuration: SWDIO (PA13)SWCLK (PA14)LPUART (PA2 / PA3)USART1 (PB6 / PB7)USART4 (PA0 / PA1)USART5 (PB3 / PB4)IC21 (PA9 / PA10)
CubeMX TIM6 initialisation code for LL API ("MX_TIM6_Init") calls function LL_TIM_DisableMasterSlaveMode(TIM6) set bit in "reserved" memory location. TIM6 do not contain MasterSlave controller.Tested on CubeMX 5.6.1 with H743ZI (Nucleo).
Hello, I need to build a simple communication network to send a small information bytes between a Master and three different Slaves. In the following way: I have thought that maybe 1-wire communication will be a good choice for this type of transmission and network. Is it possible to perform this communication using USART 1-Wire communication of the stm32?. I have seen that this option is possible using CubeMX. I'm using STM32F746ZET6 as Slaves microcontrollers and STM32F1 as a Master microcontroller. Do you see some kind of problem with this configuration? Any comment, suggest or opinion will be very appreciated. Thank you.Luis
working with STM32CubeIDE i have arm stm32f207zg when i configure pin PF10 as external interrupt with falling edge and i generate the code, the generated code doesnot contain the falling and rising edge functions (interrupt routines), although when i repeat the same procedure with different arm processor STM32F401RE everything is fine and i find the functions for the interrupt
Hi, I have my own bootloader application similar to the IAP example provided by ST that runs and determines which of 2 main applications to run then launches the application. The bootloader is working fine and the main application is working fine but when I combine them the main application always ends up hard faulting. If I launch the main application from STM32CubeMX IDE it starts fine but then if I restart the whole processor, the bootloader runs then launches the main application but it always hard faults at the same point. If I have the main application running from the beginning of flash it works fine and no hard faults.I've tried de-initing all peripherals that are used in the bootloader, that doesn't seem to make a difference. The only thing that is still running is the SysTick timer.Are there any registers that would allude to why the hard fault has occurred? How can I ensure that everything is at a nice clean state when the main application runs?I should mention that the main
When I used the STM32CubeMX for the NUCLEO-H743ZI, there's an option to enable NVIC EXTI line[15:10] interrupts for the push button. But when I used the STM32CubeMX for the NUCLEO-H743ZI2 there's no option to enable the EXTI line[15:10] interrupts for the push button. Is this a bug with the STM32CubeMX?
I have a custom PCB that has the STM32H7 (ball grid array) on it and I have created a program using STM32cube. I have used the STM32H743I-EVAL2 board with there example programs and successfully tested the lwip with that board. But when switching over to my own custom board there are many pins and registers setup to do things that are not compatible with my board. I have copied the same pin out and schematic from the example board above so it should work with the same code.Can someone provide a base Ethernet example for this processor similar to LwIP_UDP_Echo_Server but without the additional GPIO, LCD, ect... enabled?
Greetings.I have been using STMCubeMX for SMTF7 processors for quite a while. The function void SystemInit(void) from the file system_stm32f7xx.c generated by older versions of STMCubeMX used to contain the following code:void SystemInit(void) { /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */ #endif /* Reset the RCC clock configuration to the default reset state ------------*/ /* Set HSION bit */ RCC->CR |= (uint32_t)0x00000001; /* Reset CFGR register */ RCC->CFGR = 0x00000000; /* Reset HSEON, CSSON and PLLON bits */ RCC->CR &= (uint32_t)0xFEF6FFFF; /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; /* Disable all interrupts */ RCC->CIR = 0x00000000; /* Configure
I am experimenting with timers... I have a list of time values that I want to use to replay a digital signal.What I try to do is to wait for the interrupt of the base timer, then set a new period value, then wait for the next interrupt.But it seems I do something wrong.Timer inithtim6.Instance = TIM6; htim6.Init.Prescaler = 49; htim6.Init.CounterMode = TIM_COUNTERMODE_UP; htim6.Init.Period = 65530; htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE; if (HAL_TIM_Base_Init(&htim6) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim6, &sMasterConfig) != HAL_OK) { Error_Handler(); }Timer interupt if(htim->Instance == TIM6){ if(cmd == 1){ HAL_GPIO_TogglePin(IR_SND_GPIO_Port, IR_SND_Pin); // tried without stop/start - did not change HAL_TIM_Base_Stop_IT(&htim6); __HAL_TIM_SET_AUTORELOAD(&
I would sometimes like to switch to a lower frequency to save power. Is it possible to have many different system clock configurations using STM32CubeMX?
STM32CubeMX create a project to test input capture. But it can not into the interrupt.
See the attached file - PC15 should generste a EXTI, so the IDE should generate EXTI4_15_IRQHandler(). Somehow no handler is not generated. TO be more precise, no handler is generated for any Interrupt. IDE is 1.3.0
Hi everyone,I've been working on a custom PCB with an STM32F427 and a TI audio amp (TAS5825M) that need to communicate using I2C. This is my first time using the STM32 line. I set up the project with STM32CubeMX with the appropriate settings for 100 kHz Master mode I2C on the I2C2 peripheral. Here's a picture of the pin configuration.When I make the first call to the HAL_I2C_Master_Transmit, it runs until the address is sent and then fails. I believe that it fails because there is no clock signal and the receiving slave never acknowledges the presence of data, as shown in this capture of the scoped signals:It just sends the address over and over as each message fails. In addition, notice how slow the data line is sending data! It takes about a second just to send an 8-bit address.What am I doing wrong here, with respect to the clock and slow SDA speed?Here's my code:/* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private incl
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.