Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
1 . what does means System Clock in MCU?does it mean electronic device in a MCU that issues a steady high-frequency signal that synchronizes all the internal components?I want the exact meaning of System clock.2 . what is To Power(MHz) SYSCLK in Clock Configuration of STM32CubeMX connected to To Power(MHZ)What is To Power ?please reply to question. Thank you ***Moderation Edit: please do not post your email address on this website***
I try to create a project based on CAN bus but the CAN option is disable in CUBEMX ide.*Controller - stm32f042g6u8 *Cube mx ide version - V 4.24i want to know how to create a CAN BUS project using cubemx & without it,Examples are suggested for better understanding
Hello, I am designing with a STM32L011 (16KB) and setting up with STMCubeIDE. I require I2C, LPTIM,DMA and A/D with a small amount of program space for my actual program. The HAL however uses up all the flash space. Just adding the MX_ADC_Init() function uses about 2KB and overflows my last 10% of flash.
So I tried to implement USB Host via USB_OTG_HS peripheral. I enable all the interrupts under NVIC setting (as I don't understand which one to choose). When I attach my USB stick, it is able to detect the USB, the user callback USBH_UserProcess() is triggered with id HOST_USER_CONNECTION. However, when I release the breakpoint from there, software went to Hard Fault, call stack is below:Thread #1 [main] 1 [core: 0] (Suspended : Breakpoint) HardFault_Handler() at stm32f7xx_it.c:102 0x80032de <signal handler called>() at 0xfffffffd prvPortStartFirstTask() at port.c:261 0x800bdd8 xPortStartScheduler() at port.c:367 0x800c068 I noticed just prior to the hard fault, it tried to access memory 0xfffffffd which I dont recall any of my data or code reside there. The code is so far one generated by the STM32CubeMX tool. Following is the disassembly when that 'suspicious' memory access done:fffffffd: Failed to execute MI command: -data-disassemble -s 4294967293 -e 4294967392
Using an STM32H753VIT I have configured the RMII peripheral for ethernet.Now I also wanted to enable LWIP, but is is grayed out.I am using the "Build-in" STM32CubeMX in STM32CubeIDE (1.0.0), on Windows 10.There is no mention, why it is grayed out.When I use the external STM32CubeMX (5.2.0), it is the same.What can I check to enable LWIP?UPDATE:To make the LWIP selection possible, all I had to do is enabling the CPU caches (especially the DCache), which I had not done so far.STM32CubeMX does not explain this.Hope this helps somebody.
Even when making minimal changes (e.g. set some value from 1 to 2), this results into a big changeset with many changed lines of the .ico file.
I recently upgraded from OpenJDK15 to 16 on my machine and noticed that STM32CubeMX now crashes at launch. The splashscreen shows up, but the main window never appears.Here's a slightly abbreviated output:$ java -jar STM32CubeMX log4j user configuration file not found: /home/[...]/.stm32cubemx/log4j.properties Configure log4j with default settings from jar:file:/opt/STM32CubeMX/STM32CubeMX.exe!/log4j/log4j.stm32cubemx.properties 2021-04-25 22:46:19,141 [INFO] MicroXplorer:76 - [MX] MX Start 2021-04-25 22:46:19,143 [INFO] MicroXplorer:564 - Detected Java Version = 16 [...] 2021-04-25 22:46:20,022 [INFO] PluginManage:178 - Search for loadable plugins [exclusion list=, ] 2021-04-25 22:46:20,024 [INFO] PluginManage:292 - Check plugin analytics Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:990) at com.thoughtworks.xstream.XStream.<init>(XStream.java:593) at com.thoughtworks.xstream.XStr
All sample programs in STM32Cube_FW_H7_V1.9.0 are without CubeMX config file (.ioc).Configuring from scratch my nucleo-H753ZI with CobeMX (latest version) and moving sample software does not work, like CubeMX setting something wrong
Hello everyone and i hope youre having a great embedded morning.CDC_Transmit_FS() bricks itself when i check status of the ongoing transmissionis there any mechanism to know when a CDC_Transmit_FS transaction is finished?When i try to CDC_Transmit_FS before the previous CDC_Transmit_FS is done retval=USBD_BUSY which is to be expected, well after that CDC_Transmit_FS doesnt work anymore always returning USBD_BUSY.This code bricks the usb peripheral and can only be used again after system reset:do { //HAL_Delay(100); retval=CDC_Transmit_FS(&buffer, receivedbytes); } while (retval!=USBD_OK);// retval=CDC_Transmit_FS("finished transmission", sizeof("finished transmission"));//this will return HAL_OK but no transaction will be doneIf i place a dirty delay big enough for the first transaction to be done everything works.retval=CDC_Transmit_FS(&buffer, receivedbytes); HAL_Delay(1000); retval=CDC_Transmit_FS("finished transmission", sizeof("finished transmission"));im using STM3
Hello STM32 Community! My I2S dma transfer worked perfectly on stm32f7x in the past, but due to time critical calculations i just started to continue the development on the advanced stm32h7 system. I use the same code, same initialization procedure and same HAL function calls (as i did on stm32f7) but the H7 stops executing the code after the HAL_I2S_Transmit_DMA function call.I am aware that the peripheral bus can't access ITCM and DTCM, therefore i placed all memory to D1 domain, as it is written here (https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices, e.g., IRAM2 0x24000000 0x80000)Did anyone successfully use the I2S peripheral with DMA on H7 system?Here is the code for the clock setup i use:PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART3|RCC_PERIPHCLK_USART1 |RCC_PERIPHCLK_SPI3; PeriphClkInitStruct.PLL2.PLL2M = 8; PeriphClkInitStruct.PLL2.PLL2N = 192; PeriphClkInitStruct.PLL2.PLL2P = 2; PeriphClkInitStruct.PLL2.PLL2Q = 2; PeriphClkIn
Hi there, Get_SerialNum() in usbd_desc.c of the USB device drivers generated by CubeMX attempt to read the device UID to set the serial number.The M4 core does not have access to that memory region so the processor hard faults.Am I missing something or is this just a massive bug in the code?Thanks, Matt
Recently I swithc project to STM32L4P5CET as main mcu. I can't see any option to use sdmmc in dma mode (In stm32cubeide/mx). Is ST planning to add support later, or it's impossible?
Hi, I'm using a STM32F429Idiscovery board.Is it possible a way to disable the LCD and the DRAM, so that some of the PIN utilized by such devices become free and can be utilized instead for some of the timers functionalities that are mapped on these pins?
I compiled the stemwin example of stm32cubef3 v1.11.0 with IAR v9.10. If the optimizations of the c/c++ compiler is high (size), there is no problem, but if it is None or Low, the following error occurs. stm32f3xx_hal_rcc.c Tool Internal Error: Internal Error: [AsmLine - OgAsm]: Error: Invalid shift amount LSRS R6,R6,#+0 Internal Error: [AsmLine - OgAsm]: Error: Invalid shift amount LSRS R6,R6,#+0 How do I fix the error?
I use STM32MxCube to install example code. I selected STM32H7 to finde the Nx_Iperf example for the STM32H747I-DISCO board. When I select Start Project, the progress bar runs to completion then I get a message "FAILED TO INSTALL EXAMPLE: Nx_Iperf". STM32MxCube works for other examples, such as Nx_SNTP_Client.How can I install this code?
I tried on STM32F103C8Tx. The timer simply swallows the "repetition counter" of the DMA values on the next update.I was asked to make a simple example of playing a short wav file at a bit rate of 88 Kbps to attract the operator's attention.The above design allows this to be done gracefully, but I would like to output the carrier frequency to ultrasound.
The CFAL has CS, Cd, RESET, MOSI and SCLK pinsThere is no MISO lineThe St chip is a STM32L476
Examples from the relevant cube repository are working perfectly fine, i am able to burn, run and debug them. when i generate a project using CubeMX (while selecting the right board) i am not able to do so and get the following messsage:Fatal error: Failed the search for probes, ensure that the USB drivers are installed.please note that i have tried reinstalling CubeMX and downloading the H7 repository.please advise on how to resolve this issue.thanks.
However I've installed V1.26.0 Pack before, but when I try to update it to 1.26.1 version i get the following error message during installing V1.26.1 Patch: Problem during load of selected FileMissing dependency for this package.-STM32Cube FW_F4 V1.26.0
The bug has been reported to CubeF4 github back on Jan 21 2021, but only on 26 Apr 2021 I got the feedback this is out of scope for them and asking to repost here. https://github.com/STMicroelectronics/STM32CubeF4/issues/57Duplicating text below:I am using CubeMX v6.1.1 with CubeF4 v1.25.2 to generate code for STM32F412CGUx with STM32CubeIDE.The app generates usbd_conf.c with following function included:/** * @brief Handle USB VBUS detection upon external interrupt * @param GPIO_Pin * @retval None */ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { if (GPIO_Pin == GPIO_PIN_9) { HAL_PCDEx_BCD_VBUSDetect(&hpcd_USB_OTG_FS); } }This causes linkage errors when there is a user-implemented EXTI Callback.The issue happens regardless of VBUS Sensing setting in CubeMX - even when it is off, the callback still gets generated (not saying it should be generated that way when VBUS Sensing is on, because it is messing up the use of callback by user).This was reproducible with STM32F412RE
Hi,Looking at the STM32G4 Errata:https://www.st.com/resource/en/errata_sheet/dm00500968-stm32g471xx473xx474xx483xx484xx-device-errata-stmicroelectronics.pdfI see two issues regarding internal flash:2.2.2 Data cache might be corrupted during Flash memory read-while-write operation2.2.3 FLASH_ECCR corrupted upon reset or power-down occurring during Flash memory program or erase operationNow I wonder if the workarounds have been somehow implemented into the CubeMX FW HAL and the X-CUBE-EEPROM package as these are directly affected by the bugs listed above. I looked through the code and release notes but could not find any hints.Thanks in advance,Anguel
Hi,I've created a ioc for the NUCLEO-G474RE dev board to generate an interrupt for HRTIM_TIMER_INDEX_TIMER_A/C/D/E.The code is generated correctly except for TIMER_E where STM32CubeMX disables the interrupt by replacing HRTIM_TIM_IT_CMP3 with HRTIM_MASTER_IT_NONE. All 4 channels are configured (at least from what I can see) to be the same. pTimerCfg.InterruptRequests = HRTIM_MASTER_IT_NONE; pTimerCfg.ResetTrigger = HRTIM_TIMRESETTRIGGER_MASTER_CMP4; if (HAL_HRTIM_WaveformTimerConfig(&hhrtim1, HRTIM_TIMERINDEX_TIMER_E, &pTimerCfg) != HAL_OK)This looks like a code generation problem with STM32CubeMx 6.2.1. I've attached the ioc file and main.cIf I manually comment out the first line above my TIMER_E interrupts works, but this is a pain, since I will have to do this every time I generate the code from STM32CubeMX.cheersChris
good afternoon, can you tell me, I have a board with two usb (micro and mini) through the mini connector I program, and through the micro I want to send data. I fiddled with the USB Vurtual COM port implementation, tried to send string data, but the data in the COM port was not displayed. Then I started looking for the problem.As a result, I found that there are 2 bottlenecks:It's not clear if VBUS Sensing needs to be turned on. I tried both with and without it, all the same, the data is not transmitted. But judging by the description, you need to turn off VBUS. 2.The virtual port in the device manager is displayed as STLink Virtual COM port. And here in the information the name will not coincide with what I asked in CubeMX. Those. only the virtual COM port for STLink is visible, and this is the mini usb input, and the micro usb is not displayed. have you encountered this? Example of the project I send below.
When configuring TIM peripheral, result tim.c file has something that looks like a java runtime error dump (see attached file around line 110 and later): "FreeMarker template error (DEBUG mode; use RETHROW in production!):"Steps to reproduce this:Configure whatever peripheral you want( (tested on TIM and ADC).Enable DMA and configure "DMA Request Synchronization Settings" to "Event Enable" with a request number 1 (but I think that the number doesn't matter).Select save and generate project files. STMCubeIDE does the job without any error warnings but when open generated file you can see the problem.Working in linux (Archlinux) without any problem until now.Project configured for STM32H742ZITx.Can somebody give a hint to solve this issue.Thanks.PD: It also happends with v1.6.0.
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.