Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Starting with the STM32 Cube FW_H7 1.10.0 version, it becomes impossible to specify the correct location of the ethernet descriptors and buffers officially recommended here (https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working) in paragraph 10.2 for CortexM4.Migrating example (p.11. Attached examples) STM32H745_Nucleo_M4_ETH.ioc from 1.9 to 1.10 gives the result shown in the picture. What is better - downgrade to 1.9 or somehow reassign addresses to 1.10?
When I create a new project in STM32CubeIDE with the use of a configuration (.ioc) file, configure peripherals, and generate code, all handlers (such as I2C_HandleTypeDef, UART_HandleTypeDef, QSPI_HandleTypeDef, DMA_HandleTypeDef, etc.) and their initialization functions are placed in main.c file.Is there a way to automatically split the code into multiple pairs of headers and source files (let's say, a header-source pair for UART, a header-source pair for I2C, etc.)?I would like to define some custom parameters and functions related to my peripherals. Of course, I can create additional headers and source files. I would just prefer to group them all together without producing multiple files.Thank you.
On the board page nucleo-f446re it mentions a specific feature of board is a 48MHz HSE. However in STM32CubeIDE I only have the option to set the HSE up to 26MHz. How do I go about enabling the 48MHz HSE or could you point me in the direction of any additional documentation?I want to use 48MHz HSE for a more accurate clock for time synchronisation.
When configuring / assigning pin functions it will great to know the I/O level of the pins. Now one has to open the datasheet alongside for that information. It will be of great help and save a lot of time. Will love to see this feature in the future.Thanks & RegardsKaushik B. M.
Connecting to target...J-Link found 2 JTAG devices, Total IRLen = 9JTAG ID: 0x4BA00477 (Cortex-M4)Connected to targetWaiting for GDB connection...Connected to 127.0.0.1Reading all registersRead 4 bytes @ address 0x080014B0 (Data = 0xF00369DB)Reading 64 bytes @ address 0x20017F80Received monitor command: WriteDP 0x2 0xF0O.K.Received monitor command: ReadAP 0x2O.K.:0xE00FF003Read 4 bytes @ address 0x20017FDC (Data = 0x41000000)Reading 64 bytes @ address 0x20017FC0Read 4 bytes @ address 0x080005F8 (Data = 0x2B00681B)Reading 32 bytes @ address 0xE00FFFD0Read 1 bytes @ address 0x200003BC (Data = 0x0D)Connected to 127.0.0.1Reading all registersRead 4 bytes @ address 0x080014B0 (Data = 0xF00369DB)Reading 64 bytes @ address 0x20017F80Received monitor command: resetResetting targetDownloading 392 bytes @ address 0x08000000 - Verified OKDownloading 16016 bytes @ address 0x08000190 - Verified OKDownloading 15984 bytes @ address 0x08004020 - Verified OKDownloading 9068 bytes @ address 0x08007E90 -
@Piranha pointed me to a fault in the configuration of the RCC in an example related to LW-IP.I have the impression that this fault is also created when STM32cubeIDE creates the default settings for the STM32H735G -DK Discovery kit.The manual RM0468 is clear:The schematic of the STM32H735G-DK kit: X2 is a crystal, X1 is an oscillator:BOM says the same:But STM32CubeIDE initialized as per the board:And should be: (IMHO)My question: Is my analysis correct or did I overlook something?
Since CubeMX changed to 6.5.0 and Firmware Package to V1.10.0 (included full-reworked ETH driver) Ethernet on existing project became not work after code regeneration.Detailed investigation shows that:Definition of memory location for RX_POOL (memp_memory_RX_POOL_base[]) is missed. Result of this - DMA fault on reception of any packet.In the function ethernet_link_thread() at section under if(linkchanged){} used HAL_ETH_Start(&EthHandle); instead of HAL_ETH_Start_IT(&EthHandle);. That stops ETH after reconnect a cable.Software example that supplied with Firmware Package (LwIP_HTTP_Server_Netconn_RTOS) works fine and free of issues, described above.But ethernetif.c, generated by CubeMX, needs to be corrected manually.Also, it seems have to change Cortex_M7 memory regions settings exactly as in software example.
I am using STM32F411 and SDK v1.27.1I am trying to trigger an DMA xfer with an external signal source using the TIMER1 External Trigger, without the need to execute any interrupts in the CPU to utilize the CPU time, as I have two signals one every 2ms and one every 150us that come from to different on board ICs, and when each signal is executed an SPI/UART xfer must be done to retrieve data in real-time.I have used the code generator from the CubeIDE to generate Initialization code, an started the transfer in the main functionHere is the pinout view of the projectTimer1 Conig. USART1 Config. Code Snippets#define BUFF_SIZE 8 uint32_t dma_TxBuffer[BUFF_SIZE] = {0}; uint32_t dma_RxBuffer[BUFF_SIZE] = {0}; HAL_TIM_Base_Start(&htim1); /* Clear the TC flag in the SR register by writing 0 to it */ __HAL_UART_CLEAR_FLAG(&huart2, UART_FLAG_TC); /* Enable the DMA transfer for transmit request by setting the DMAT bit in the UART CR3 register */ ATOMIC_SET_B
Hello. I want to read multi-channel analog data (four channels) with my Nucleo-F072RB. I previously worked with Nucleo F411RE and I did not have any problems. But with F072RB, I'm so confused. When I open my board on CubeMX, I can select multi ADC1 channels (for example IN1, IN2..) but in ADC configuration I can not see "Number of Conversions" or "Rank" properties. So I can not configure the multichannel ADC. I thought maybe this board had only one configuration and so it had not allowed configuring ADCs...But when I coded two potentiometer ADC reading codes, I saw it was not working. Can you help me with this problem? Thanks in advance.
Hi,on the tab Project Manager for a STM32H757 MCU from CubeMX v6.6.1 enabling the multi-threaded support for Cortex-M7, I have an error when I generate the code.I can also say that it doesn't depend on the Thread-safe Locking Strategy (#1,#2,..).Do you have any suggestions?Thanks.BR.
I am trying to perform ADC whenever external interrupt signal is given. Because I have to perform ADC multiple times (= interrupt signal will come multiple times), I enabled DMA continuous requests option for ADC and enabled Continuous Conversion Mode. However, when I enable this option, the ADC sampling rate seems to depend on the number of ADC samples (buffer size) assigned to each ADC. When I disable DMA continuous request and enable only Continuous Conversion Mode, the sampling rate remains the same.Is this normal? If so, how do we calculate ADC sampling rate under Continuous Conversion Mode enabled? Here, I mean that ADC sampling rate is the number of ADC samples obtained per second.Below figures show the ADC parameters that I use. ADC is done under dual regular simultaneous mode and PCLK2 = 108 MHz.
I am using the STM32F746VET6 and the HAL packaged with v6.5.0 of STM32CubeMX. It is operating as a slave with a Raspberry Pi as a master. When inspecting my SPI communication I was surprised to sometimes see bytes being transmitted on MISO when HAL_SPI_Receive_DMA() was being called. I *usually* don't see anything being transmitted, but sometimes I do and it's the same byte repeated over and over again. It doesn't seem that the MISO behavior when calling HAL_SPI_Receive_DMA() is specified for the HAL, but I'd expect the line to be low when receiving only.
After I search this problem on Google, I find alot of people face the same problem as me, and those solution did not really work for me.Yes, I know the workaround by manual download the Zip then parse into %UserProfile%\STM32Cube\Repository, but the IDE should working out of the box is't it ?So after I trying to find the solution and reinstall the IDE multiple time, I notice something glitchy.By the newly install, if I generate STM32F4*'s code I have to download 3 files (stm32cube_fw_f4_v1240.zip, stm32cube_fw_f4_v1241.zip, stm32cube_fw_f4_v1242.zip) on the first run it stuck at stm32cube_fw_f4_v1240.zip (Problem during downlad) then I generate the code again, and stuck on stm32cube_fw_f4_v1241 with the same error message for couple times and stm32cube_fw_f4_v1242.zip before everything success(I'm pretty sure my internet is working find, and disabled my antivirus Kaspersky)I know this problem occurred on new user only, but that is my first impression for the software and the STM32 Plat
Assume for a moment that I want to use LwIP with an RTOS, I have to set NO_SYS = 0. But you can't do that unless you enable FreeRTOS. But I want to use a different RTOS, not FreeRTOS.Enable FreeRTOS and you get to set NO_SYS = 0, but you also get the FreeRTOS cruft.Is there any way to get around this?I suppose I will just avoid LwIP from within CubeMX and pull it down from the LwIP repo...
Does somebody can provide a cubeMX generated file with working ethernet and freeRtos?? Is it even possible? I know there is a working example application but it is not from CubeMX. Using the new HAL eth driver from the F7 package I am not able to even get a ping reply..Thanks all
Hello,I am using STM32H7B0VBT6 and I wanted to activate the wake up from Standby on PA0 (WAKEUP_PIN1) with rising edge, the code used is the following:PWREx_WakeupPinTypeDef sPinParams = {0};sPinParams.WakeUpPin = PWR_WAKEUP_PIN1;sPinParams.PinPolarity = PWR_WAKEUP_PIN1_HIGH;sPinParams.PinPull = PWR_PIN_NO_PULL;HAL_PWREx_EnableWakeUpPin (& sPinParams);However, I found that "PWR_WAKEUP_PIN1_HIGH" actually activates the falling edge and not the rising edge!Instead, for example on WAKEUP_PIN4, the setting is done correctly.Please fix in future releases of IDE libraries.thank you!
..
Keep getting the error 'Problem during the server connexion'
This can be reproduced by starting a new CubeMX project using reference MCU STM32L4P5ZGTx and firmware package STM32Cube FW_L4 V1.17.0. Start by enabling SDMMC2 (4 bit wide bus mode) and FATFS (SD card mode with SDMMC instance set to SDMMC2, any GPIO pin will do for platform setting). Anyone have an idea for a work around or if this will be fixed on CubeMX? I'm attaching my .ioc for completeness.
I have tried to generate a new project using STM32CubeIDE from scratch (fw V1.27.0, no way to modify it[!!!]) but it does not compile.A lot of descriptors are missing, like there is no resolution for the following:ETH_TxPacketConfig TxConfig; ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */ ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */No ETH_TxPacketConfig and ETH_RX_DESC_CNT and ETH_TX_DESC_CNT defined anywhere.Also, there is no HAL_ETH_RMII_MODE defined (for example) anywhere and if I try to resolve these issues, it reveals:ETH_InitTypeDef does not have TxDesc and RxDesc and RxBuffLen members, so practically ethernet layer is completely messed up.
Hello community,Warning, when gerating code for STM32G0B with FW_1.5.0, DMA init function is called after USART2 init function.So the DMA doesn't works !!The only way to resolve this i have found is to cut/paste function in the good order ^^Report the bug if you know how to do that.Have à good day,Thomas.
I have been using the DMA for UART transmit for months without problem. The MX program is not generating the code for DMA configuration anymore. It used to work. I have other problems with the current version and I am tired of all the "it will be fixed in the next version".
Hello. When I tried to use Motor Control Bench for the first time in a while, I had trouble downloading the firmware package.Looking at the log file at the time of code generation, the code appears to be generated.Do you know if the generated code is correct?I don't know why, but CubeMX detected a pin-out conflict.The environment we are using isEVSPIN32G4 rev1MotorControl Workbench 5.Y.4.21553STM32CubeMX 6.6.1STM32CubeIDE 1.10.1MCSDK MCSDK_v5.Y.4-Full.And I got the firmware zip file from Github, but it is not recognized properly.How do I manually install it?
I've tried to run STM32CubeMX on my Windows 11 parallels virtual machine that run under Monterey on Apple M1 MAX machine.For some reasons the application crash. I've tried various compatibility modes with and without administrative rights but with no success.Can you please elm me know how do I supposed to setup the application in order to work?Thanks,Andrei
Just select File - New - Project - STM32H735VGT6 (with LQFP100 package)Then select Conectivity - Eth - RMII.Since this time Trace and Debug - DEBUG reports conflict with ETH RMII, see attached picture.png, marked in red, and I don't know why.By datasheet pins PA13 and PA14 should be dedicated for debug purpose only, not shared with other functions.For BGA100 pin package it is working correctly. Any idea, please?Thanks for help.
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.