Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello Community,I need to port my Application written using ThreadX v5.9 to STM32H7 MCU. For that I want to know that Can I find sample project for STM32H7 series with ThreadXv5.9?Or which versions are supported on ThreadX for H7 Series MCU?Also, I am trying to create sample project using cubeMx tool for IAR IDE. When I try to open the project in IAR, It says 'Tx_Thread_creation.ewp' was created by a new version of the product and can not be opened. I am using IAR 7.40 and selecting minimun version in CubeMx tool to 7 Please help to understand the issue.
What is new in STM32CubeMX V6.3.0• Added the support for new part numbers in the STM32U5 Series:STM32U575A(G-I)Ix, STM32U575A(G-I)IxQ, STM32U575C(G-I)Tx,STM32U575C(G-I)TxQ, STM32U575C(G-I)Ux, STM32U575C(G-I)UxQ,STM32U575O(G-I)YxQ, STM32U575Q(G-I)Ix, STM32U575Q(G-I)IxQ,STM32U575R(G-I)Tx, STM32U575R(G-I)TxQ, STM32U575V(G-I)Tx,STM32U575V(G-I)TxQ, STM32U575Z(G-I)Tx, STM32U575Z(G-I)TxQ,STM32U585AIIx, STM32U585AIIxQ, STM32U585CITx, STM32U585CITxQ,STM32U585CIUx, STM32U585CIUxQ, STM32U585OIYxQ, STM32U585QIIx,STM32U585QEIxQ, STM32U585RITx, STM32U585RITxQ, STM32U585VITx,STM32U585VITxQ, STM32U585ZITx and STM32U585ZETxQ• Added the support for 3 new boards related to the STM32U5 Series: B-U585I-IOT02A,NUCLEO-U575ZI-Q and STM32U575I-EV• Added the support for 2 new boards related to the STM32MP1 Series:STM32MP157D-DK1 and STM32MP157D-EV1• Added the support for 1 new board related to the STM32L4 Series:STEVAL-STWINKT1B• Added the support for SMBUS Fast mode plus and SMBUS fast mode for the STM32G0 Ser
Hello STM32-Community,I'm currently working with the Power Consumption Calculator of STM32 and trying to configure the correct settings for my STM32L4R and was wondering what "HSE BYP Art" mean in the options and where I can find that in the ref. manual. That's what I found in the reference manual about HSE bypass. Also I'm a little irritated, because I do not use any external clocks, as far as I know. As it seems, there is no way to disable this setting in the calculator.Kind regards and thank you in advance,crackl1ng
For some reason, CubeMX won't let me disable the DMA IRQ in the ADC configuration panel. The ability to deactivate ISR is important when the ADC is configured in continuous mode.Because my ADC conversion is small, the ISR are generated at a very high frequency; completely choking the CPU.How do you disable ADC DMA interrupts in cubeMX?--- Build infoSTM32CubeIDEVersion: 1.8.0Build: 11526_20211125_0815 (UTC)OS: Windows 10, v.10.0, x86_64 / win32Java version: 11.0.11
Posted on January 20, 2017 at 02:29I don't know what i did... but my Rank1 is gone in ADC 1 & 2 ??I have 4 input i want to sample... If i configure a new project.. i get all 4, but not in this one :-SClues or bug ??/MAnd now where i just got my ADC->DMA running ready for more fun..#adc #stm32cubemx #rank
Hello,I use STM32H735DK. And I'm creating an Ethernet project using STM32CubeMXHowever, the following sample software did not have an .ioc file--STM32Cube_FW_H7_V1.9.1\Projects\STM32H735G-DK\Applications\LwIP\LwIP_UDP_Echo_Server--I created a new project and generated an .ioc file using STMCubeMX.However, Ethernet did not work in the project.LinkerScript.ld is the same as H7_V1.9.1 andI checked for differences with the sample software.There was a differenceAdded the following code, as a result Ethernet worked--__HAL_RCC_D2SRAM1_CLK_ENABLE();--Where can I find this setting in STMCubeMX?Best regards
HelloI'm using STM32cubeIDE with an L431RCCubeMX invited me to migrate my .ioc from 6.2 to 6.4 and FW_L4 from 1.17 to 1.17.1After that I have a warning Implicit declaration of MX_SPI3_Init in main.cThis is only in cubeMX generated codeFor information cubeMX asked me to enable USE_NEWLIB_REENTRANT in freertos What could I have done wrong?How to fix this error of cubeMX, which does not include spi.h in main.c?Thanks in advancePS : I specify that I have for the moment avoided the problem by adding :/* USER CODE BEGIN Includes */#include "spi.h"/* USER CODE END Includes */Here I want to correct the original problem that forces me to do this.
Hi, i want to generate new projetct (in CubeIDE) with older firmware package version (in that case with F4_V1.26.1). In window firmware library package setup, i select V1.26.1 and click finish. Cube show warning about missing V1.26.2 (ok, but i want use 1.26.1) - see on screenshot. I will choose not to download 1.26.2. In next step Cube say that "Code generation could not be done..." (see next screenshot). And yes, code generation fails. But desired version V1.26.1 is in repository, repository folder path is correct (many succefuly generated projects proove that).And my ask is:Is there any friendly way how to generate project with older firmware version using Cube ?
..
(BACKGROUND) I'm working on small (GCC/C-language) tests of STM32F051 with STM32CubeIde 1.8.0 on STM32F051 target. These tests are being done ---> without HAL, Lower Level drivers, but am using #include "cmsis_gcc.h" to access CPU interrupt enable/disable/status <---, so your patience is appreciated (that is, I don't intend in these tests to involve HAL or Lower Level drivers). RM0091 is my documentation resource.(PROBLEM) USART1 is configured to cause interrupt (RXNEIE=1) when RXNE=1 (receive character). Settings verified (RXNE becomes 1 when a receive character is accepted, and RXNEIE is 1.) The expected entry to void USART1_IRQHandler(void) is not happening.(QUESTIONS)1. Section 11.2.5: "EXTI line 25 is connected to the internal USART1 wakeup event". Is this used to allow USART1 interrupt request to reach the CPU? I am not using sleep or wake up conditions (the CPU is always running.) In this case is "event" same as "interrupt"?2. RM0091 section 11.2.4 includes an instruction
When doing generating a project from STM32CubeMX (for F4 family) and converting it to a library in keil, then when keeping main in executable project and linking to library wrong implementation of *MspInit gets selected. The weak ones are selected even though there is a "strong" one in library too.Problem is how compilers work. They don't look extensively in librarys so they don't even bother to find the strong one if first stumbled upon a weak symbol. i.HAL_UART_Init 0x08001260 Section 0 stm32f4xx_hal_uart.o(i.HAL_UART_Init) i.HAL_UART_MspInit 0x080012c2 Section 0 stm32f4xx_hal_uart.o(i.HAL_UART_MspInit)See keil map file above. The weak MspInit were selected despite the "strong" version is in library too.For IAR there is an linker option --whole_archive that forces linker to actually look in all object files and then the strong one is selected.For Keil I haven't fond similar option (neither old or clang based version).
I have a project and I need to change the pin assignment for peripherals. If I open the .ioc file and make the changes will those pin assignment changes propagate into the code when I re-build it?
Hello,I'd like to use the user template settings (CubeMX Project -> Project Manager -> Code Generator -> Template Settings) to add own files to the generated project, but unfortunately, it neither shows available templates from the (default) extra_templates folder, nor from any other folder I select. There are definitely ftl files located in the extra_templates folder (see attached screenshot)Regards,Daniel
Hi, i'm running STM32CubeIDE 1.8.I have a project with some libraries defined in the linker tab.When i regenerate the code using CubeMX all the linker tab is wiped out to default values...There is a way to overcome this?Thanks!!
Hi.I`m generating a project from stm32cudemx version 6.1.2The MCU I use is a stm32f407v with my own designed boardThe f4 series firmware package version I use is 1.25.2My project consists of usb msc device only, with sd card connecting through SDIO, DMA enabled, using fatfs libraryWhat I wanna do is to create files through fatfs into the sdcard, and handle these file in windows, while the board is connected to my PC through usb.I can cut and copy files from\to sdcard, but when I press "delete" in windows, the file icon disappears like it is removed, but when I press refresh, or when I disconnect and connect again the usb, or when I connect the card to pc through a card reader, the deleted file appears again with size of zero.Can any body tell me whats wrong here?????
hey therehere I try to demonstrate a 1minute Timer using TIM14. I'm using STM32F030k6t6 which has 44236.8MHz clock for timers.below is my TIM14 config:htim14.Instance = TIM14; htim14.Init.Prescaler = 60000; htim14.Init.CounterMode = TIM_COUNTERMODE_UP; htim14.Init.Period = 44236; htim14.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim14.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE; if (HAL_TIM_Base_Init(&htim14) != HAL_OK) { Error_Handler(); }and then after MX_TIM14_Init(); I start it with if(HAL_TIM_Base_Start_IT(&htim14)!=HAL_OK) { Error_Handler(); }but the thing is just as I start the program, interrupt happens and I dont know why? just as I start my program, 1minute is not passed, then why this happens?
The Data Sheet for the X-NUCLEO-GFX02Z1 indicates it is compatible with many of the NUCLEO-144 boards, and several of the 64 pin boards. I have the H7A3ZI-Q, the L4R5ZIT6P and the G071RBT6, all listed as compatible. The GFX02Z1 display uses a parallel interface to connect the display. When I try to configure any of the boards to use the GFX02Z1 using STM32ubeMX there are many incompatibilities. I have updated everything I can discover in the software and have come to believe the processor and GFX02Z1 pinouts on the Zio connectors do not match up with variations of, for example, the PSSI. Using alternate pins for for PSSI doesn't correct the issue. So, is this a situation where a header file for the GFX02Z1 has to be coded by hand? Or, will the GFX02Z1 just not work with the several boards refenced above? Thank you for your thoughts!
Hi to all,I'm facing with an hard fault when call f_write() or f_read() from FatFs library (R0.12c).I'm able to mount SD card, create a file in write mode, write to it using f_puts().As suggested, I use the HardFault_Handler:void HardFault_Handler(void) { /* USER CODE BEGIN HardFault_IRQn 0 */ static volatile int _Continue; _Continue = 0; while(_Continue == 0); return; /* USER CODE END HardFault_IRQn 0 */ while (1) { /* USER CODE BEGIN W1_HardFault_IRQn 0 */ /* USER CODE END W1_HardFault_IRQn 0 */ } }Once inside, I change the value of _Countinue to 1, and follow the execution with "Step into".I found that the HardFault is caused by function validate() inside f_write().I can't find the cause.I use a STM32F103RCT, the project id generated in CubeMX. I try different Heap and Stack (0x800, 0x800) but the problem still remain.So I have two questions:1) How can I choose the best Heap/stack size and what is the greater value that I can configure ?2) There is a way to
When I try (as stated in the CubeMX handbook Section 3.3.2)cd "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\" java.exe -jar STM32CubeMX.exe -iorjava -jar "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe" -q cubeMxGeneratewith cubeMXGenerate just containingconfig load myconfig.iocthe GUI comes up all the time.I would expect that the command-line mode would work without a GUI and thus can be run on a CI server for example. Is that a known issue to be fixed?
HISTM32F723 is used in custom electronics. USB CDC device (virtual com port) high speed.All was working reliably for the past year or so.Last CubMx update (6.4.0) broke the USB interface completely – when plugged in, the PC won’t recognize the hardware. Stepping into “MX_USB_DEVICE_Init()�? I found that “USB_CoreReset()�? function is timed out. That is, the internal USB PHY is not able to reset.When programming previous bin file, generated with CubeMx Ver 6.3.0 , everything works great. That’s why I am sure it’s FW issue.Clock settings seems to be ok (see attached)I also generated a clean new project, with only clock and USB interfaces and I am getting the same behavior where the PC doesn’t recognize the hardware. (USB_CoreReset() is failing due to time out) Any help would be appreciated.Configuration: --Arnon
I started learning ARM MCU and STM32CubeIDE last week (beginner).I chose my first MCU as STM32L152RE, and installed STM32CubeIDE.Since I was a beginner of STM32CubeIDE, I ran STM32CubeIDE and downloaded and installed several files without knowing the contents.So my "C:\Users\Tom\STM32Cube\Repository" folder got complicated, and I'd like to get some help to clean it up.I opened "C:\Users\Tom\STM32Cube\Repository", and the following two folders related to STM32L152RE are expected.(1) C:\Users\Tom\STM32Cube\Repository\STM32Cube_FW_L1_V1103\Drivers\STM32L1xx_HAL_Driver\Src(2) C:\Users\Tom\STM32Cube\Repository\STM32Cube_FW_L1_V1.10.0\Drivers\STM32L1xx_HAL_Driver\Src------------------------------------------------------------ -----------------------------------------------[Q1] ------------------------------------------------------------ -----------------------------------------------In order for me to learn using the example of STM32L152RE, do I need both folders above? Or should I keep "STM
Good day!I'm trying to run ADC DMA mode on the NUCLEO-L152RE board using HAL, but it doesn't work properly. For testing, 3 channels are used: ADC_CHANNEL_6 (RANK 1), ADC_CHANNEL_VREFINT (RANK 2), ADC_CHANNEL_TEMPSENSOR (RANK 3). 2 problems were found out: 1) When channels are sequentially polled, all values are written to one (first) element of the array. 2) The values of all channels are 8 bits, although the ADC resolution is 12bit and a 12 bit value is displayed in the ADC data register. The same code works fine on STM32F103RBT6. Maybe someone knows if there are any BUGs or some peculiarities in using STM32L1 HAL for ADC DMA mode? Test code:#include "main.h"volatile uint16_t ADC_RES[3];volatile float U_ADC_RES[3];#define Vref 3.3//#define TS_CAL1_25 1.34// raw ADC 670//#define Avg_Slope 0.0043ADC_HandleTypeDef hadc;DMA_HandleTypeDef hdma_adc;void SystemClock_Config(void);static void MX_GPIO_Init(void);static void MX_ADC_Init(void);static void MX_DMA_Init(void);int main(void)
Chip: STM32H750VBT6 (custom pcb)BOOT0: connected to GND with a 10k resistor.Debugger: ST-LINK v2 USB Dongle (updated to latest firmware by CubeIDE)CubeMX: 6.4.0 (updated today to latest)CubeIDE: 1.8.0 (11526_20211125_0815, updated today to latest)Verified the following (maybe overkill to mention):Active build configuration is "Debug"Interface: swdProbe: ST-LINK (ST-LINK GDB server)CubeMX: Serial Wire DebuggingI've also tried a Mass Erase with CubeProgrammer, but it had no effect.The weird part is that CubeIDE gives me this error, but TrueStudio just works fine.This error occurs immediately after downloading the code into the chip.(The first instruction auto-breakpoint also isn't triggered).What am I missing / doing wrong?
Hi,I am configuring an IO is GPIO_EXTI. I can't figure out how to generate the callback function. I looked into example projects and I saw this function. HAL_GPIO_EXTI_Callback definitely looks like something generated by CubeMX. I would like to understand how to generate such callback functions. Thanks.
When doing a remap IC (Input Capture) for a timer, the code is generated wrongly to use HAL_TIMEx_RemapConfig function to set the remap. To make it work properly, I have to fix it manually by using HAL_TIMEx_TISelection instead.Also, when setting CH1 as IC remap and CH2 as IC indirect mode, the GPIO pin should NOT be set for CH2.
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.