Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
HiI've configured FatFs for SD 4Bit Bus and using FreeRTOS. I've set USE_LFN = 3 (dynamic working buffer on the HEAP)When I call f_open() it always returns FR_NOT_ENOUGH_CORE.The SD card calls are made in a seperate Task. When USE_LFN = 0 then all works well. Did I forget to set something?RegardsDejan
A blank project with the Makefile toolchain will cause the following issue# C includes C_INCLUDES = \ -ICore/Inc \ -IDrivers/STM32F4xx_HAL_Driver/Inc \ -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy \ -IDrivers/CMSIS/Device/ST/STM32F4xx/Include \ -IDrivers/CMSIS/Include \ -IDrivers/CMSIS/IncludeNotice the double include in the bottom. This is not initially harmful, but if you tell it to generate the project again, it modifies it slightly into this.# C includes C_INCLUDES = \ -ICore/Inc \ -IDrivers/STM32F4xx_HAL_Driver/Inc \ -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy \ -IDrivers/CMSIS/Device/ST/STM32F4xx/Include \ -IDrivers/CMSIS/Include -IDrivers/CMSIS/IncludeNotice the missing backslash on line 7, which now means the makefile is invalid and wont run anymore.Manually fixing the problem is possible, but is not viable for advanced setups with continuous integration.Version: STM32CubeMX 6.0.1Operating System: Windows 10
As far as I read datasheet it says there is a support for that, but in STM32CubeIDE under FMC I cannot select NAND. There is simply no option for that. See attached file.
code generated in cube mx contains several bugs in [stm32h7xx_hal_msp.c] source file:in function HAL_MspInit, vref clock enabling is missing - __HAL_RCC_VREF_CLK_ENABLEfunction HAL_SYSCFG_VREFBUF_HighImpedanceConfig shall be called before HAL_SYSCFG_EnableVREFBUFin [stm32h7xx_hal.h] file, wrongly defined symbols for voltage scale, e.g. SYSCFG_VREFBUF_VOLTAGE_SCALE0 shall have value VREFBUF_CSR_VRS_OUT1 instead of wrong VREFBUF_CSR_VRS_OUT2 macro (description is ok)this is my first post here, so hope, that written in good place
..
Downloaded and installed the latest Java development kit. Tried installing SetupSTM32CubeMX-6.0.1 via: sudo java -jar SetupSTM32CubeMX-6.0.1.exe but get this error message: Error: Unable to access jarfile SetupSTM32CubeMX-6.0.1.exe .Any ideas?
Hello All I am trying to interface External NOR FLASH (S25FL512S) to the Microcontroller STM32F746G.1) I want to understand how to write and read data to external flash ? provide me sample code.2)How to use memory mapped mode ? provide documentation and sample code if available.As per my logic I create code.please refer two attachment :(i) flash-fun : There are available definition of flash.(ii) flash-logic : main logic of flash code.from the flash logic code I able to write but during debug 0x90000000 not written anything.So,kindly correct my mistake and please provide step by step solution.Thank you.Regards,Pratik
I'm using STM32CubeMX V6.0.1. I have a project for which there is not a CubeMX ioc file for. I do know the project was created using CubeMX. Is there a way to re-generate the ioc from the project files??ThanksTom
Hello,I have a project where I use a L010K8 (LQFP32 package).Let say that you want to keep PA13 and PA14 for SWD debugging and use PA15 as USART2 Tx.Now PA15 AF4 is USART2 Rx, but this can be swapped in USARTx->CR2.First point is that Rx/Tx swap is not reflected in the pinout view.Second and more important issue, USART2 is disabled as long as SWD is enabled. In real life it is not a problem to have USART2 on PA15 and SWD on PA13, PA14. I believe this is due to the fact that USART is expected to have both Rx and Tx pins.Please ST, CubeMX should handle peripherals on pin by pin basis.Last thing, with the default MSI clock of 2,1MHz, we can't set a baud rate above 115200 bps. This is because BRR must have a value higher than 16. CubeMX only reports the maximum baud rate we can achieve without explaining why. I believe it would be helpful to explain why we can't achieve higher baud rate.Using STM32CubeMX 6.0.1, L0 pack 1.11.2Best regards.
main.cpp from 5.4 //turned off wait on while (1) { HAL_Delay(1); HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); if (HAL_GPIO_ReadPin(SW_PWR_GPIO_Port, SW_PWR_Pin) == GPIO_PIN_RESET || HAL_GPIO_ReadPin(TRIGER_IN_GPIO_Port, TRIGER_IN_Pin) == GPIO_PIN_RESET) { break; }....}main.c same code from 5.6 dont wake with same exti. MX_GPIO_Init(void) is identical.
Dear all,I am having trouble getting multicast reception working on the STM32H7 MCU's, specifically the STM32H757. I need this to implement PTP.I have used the STM32H7 ethernet page to get a working project using STM32CubeMX and I can successfully send and receive unicast packets.I have made the following modifications to the project to try and get multicast working:Enable IGMP & multicast in CubeMX (LWIP_IGMP=1, LWIP_MULTICAST_TX_OPTIONS=1, MEMP_NUM_IGM_GROUP=8)Call igmp_joingroup() with the multicast IP address.Enabled PassAllMulticast and PromiscuousMode with a call to HAL_ETH_SetMACFilterConfig() per some other posts on this forumOR NETIF_FLAG_IGMP to the netif flags.These modifications were enough to get it working on the STM32F7 series, but not on the STM32H7. The SPI bus on the F7 series is unfortunately too slow for my application, so I need the H7.Can someone advise me on further modifications required to get multicast working?Kind regards,Jos
When using STM32CubeMX v6.0.1 to generate a project for dual-core STM32H745BIT6 MCU the resulting linker files for CM4 and CM7 show the following memory structures:CM7MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K }CM4MEMORY { FLASH (rx) : ORIGIN = 0x08100000, LENGTH = 1024K RAM (xrw) : ORIGIN = 0x10000000, LENGTH = 288K }The Flash sizes seems to be correct, however the RAM size (128K + 288K) is way too low from the 1MByte which STM32H745BI is supposed to have as shown in the table below.As Clive1 noted in another thread (https://community.st.com/s/question/0D50X0000BZHcaiSQD/linker-script-files-generated-by-stm32cubeide-dont-use-entire-ram-for-stm32h745) apart from adding additional lines in the linker memory structure one needs to also change the startup.s files.Still to avoid improper changes to startup.s files it would be very helpful to have a sample startup.s example where
I am working on a project which needs data communication between two stm32 (f103rb and f429zg). I use stm32f103rb-nucleo examples_ll (I2C _OneBoard_Communication_IT) but it works for one byte and after that it stops working. I want it to work repetitively. I don't know how to make it work in a loop and by pressing the button , communication gets done every time I push the master and slave push buttons.Thanks
After upgraded to 1.4.2, when created a new STM32 project then select a MCU in the MCU selector the IDE freeze. Now I I can only create a new STM32 project by STM32CubeMX. Please help here.
I want to use dsp libraries on cubeIDE 1.4.2 with cubeMX 6.0. I used this library on cubeIDE 1.3.1 version with cubeMX 5.6 but after I updated cubeIDE and cubeMX, even though I didn't add any code, code generated didn't compile.My board is stm32f429 discovery board.I selected my boad in cubeMX, I installed CMSIS 5.6 in "Embedded Software package manager", then I checked the boxes as it shown in picture. I generated the project and compiled with cubeIDE 1.4.2. but I got "RTE_Components.h" not found error. I found this library and added to my project but I've got another error.l tried to use dsp library like I did on cubeIDE 1.3.1 version by adding "arm_cortexM4lf_math" but it didn't work.Any solution?
Using the STM32CubeIDE + .ioc file generation we are seeing very tedious merge conflicts with the .ioc file. To give a small taste of the .ioc merge conflict:<<<<<<< HEAD Mcu.IP4=SPI1 Mcu.IP5=SYS ======= Mcu.IP4=SYS Mcu.IP5=UART4 >>>>>>> My CommitSimple enough for a small conflict like this, but becomes exponentially more annoying the larger the conflict is, or the larger the project/.ioc file is. To have to manually handle these types of conflicts during the development process does not allow us to follow a smooth git/development workflow. I can only imagine it will occur with any rebase/merge with a .ioc change in both, and that time adds up quickly.Is there a way to avoid these time consuming conflicts? a better/recommended workflow for using STM32CubeIDE + git? What we came up with is, initializing the .ioc with all of the setup we think we need, and then develop. Which is a work around at best, because any changes or modification will resu
A version mismatch prevents me from inspecting the .ioc file generated by CubeMX in CubeIDE:" This file has been generated with STM32CubeMX version '6.0.1'.Your current STM32CubeMX version is '6.0.0'. "If CubeMX is following semantic versioning, then it looks like this is just a PATCH bump, which should be backwards compatible. If it's not backwards compatible, then what do these numbers even mean?Also, I'd simply update the IDE if that was not blocked by this other issue: https://community.st.com/s/question/0D53W00000Gj2OYSAZ/how-to-update-stm32cubeide-on-linux
We have set the RTC wakeup counter with STM32Cube.We can found the wakeup counter value is 1023 for HAL library.But we didn't found the wakeup value setting for LL library.How do we set the wakeup counter value with LL library? /** Enable the WakeUp */ if (HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 1023, RTC_WAKEUPCLOCK_RTCCLK_DIV4) != HAL_OK) { Error_Handler(); }
i set system clock 216 Mhz but it is not properly workalso i test same thing set as 54Mhz but same issue faced.kindly suggest us how to solve this issue/** * @brief System Clock Configuration * @retval None */void SystemClock_Config(void){ RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; /** Configure LSE Drive Capability */ HAL_PWR_EnableBkUpAccess(); __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW); /** Configure the main internal regulator output voltage */ __HAL_RCC_PWR_CLK_ENABLE(); __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); /** Initializes the CPU, AHB and APB busses clocks */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.LSEState = RCC_LSE_ON; RCC_OscInitStruct.PLL.
Dear all,I am having a problem with SDIO (SDMMC2) interface on STM32F769i Discovery. I use the DMA-based SDIO, CubeMX (v5.6.1) to generate the codes. Also freeRTOS enabled. After I called "BSP_SD_WriteBlocks_DMA(aTxBuffer, BLOCK_START_ADDR, NUM_OF_BLOCKS);", at some point, the HAL_SD_IRQHandler is triggered. and inside this handler, I got an error: HAL_SD_ERROR_DATA_CRC_FAIL. Then HAL_SD_ErrorCallback is triggered, instead of the HAL_SD_TxCpltCallback. Any clue what is the cause of this CRC error? My settings are following: I added SD_initialize(0) in the FATFS_Init function. void MX_FATFS_Init(void) { /*## FatFS: Link the SD driver ###########################*/ retSD = FATFS_LinkDriver(&SD_Driver, SDPath); /* USER CODE BEGIN Init */ /* additional user code for init */ SD_initialize(0); /* USER CODE END Init */ }/** * @brief Initializes a Drive * @param lun : not used * @retval DSTATUS: Operation status */ DSTATUS SD_initialize(BYTE lun) { St
I might have posted this question in the wrong area, it's really CubeMX related.https://community.st.com/s/question/0D53W00000GjFIOSA3/need-guidance-on-using-cubeide-to-reconfigure-hal-for-stm32h745
STM32CubeMX lwip should generate USER section to allow customization of IP Address per devicecurrently I use CubeMX 5.6 and STM32F4 1.25The IP address is specified in the ioc file. But when I have many boards it is not suitable to generate 1 project per board ...For the MAC address there is such proposed solution in the file ethernetif.c implemented.currently in the autogenerated lwip.c file the code lookes like this:void MX_LWIP_Init(void) { /* IP addresses initialization */ IP_ADDRESS[0] = 192; IP_ADDRESS[1] = 168; IP_ADDRESS[2] = 123; IP_ADDRESS[3] = 3; NETMASK_ADDRESS[0] = 255; NETMASK_ADDRESS[1] = 255; NETMASK_ADDRESS[2] = 255; NETMASK_ADDRESS[3] = 0; GATEWAY_ADDRESS[0] = 0; GATEWAY_ADDRESS[1] = 0; GATEWAY_ADDRESS[2] = 0; GATEWAY_ADDRESS[3] = 0; /* Initilialize the LwIP stack without RTOS */ lwip_init(); /* IP addresses initialization without DHCP (IPv4) */ IP4_ADDR(&ipaddr, IP_ADDRESS[0], IP_ADDRESS[1], IP_ADDRESS[2], IP_ADDRESS[3]); IP4_ADDR(&netmask, NETMA
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.