Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi..STM32CubeMX V5.2.0 hang when I open .ioc file that created with previous version of STM32CubeMX ( < V5). It become hang (blanj window) after I press "Migrate" or "Continue".Does anyone have same problem?ThanksUsman
Hi,STM32CubeMX H7 firmware version 1.4 includes LL drives, but how do you select them in CubeMX? Specifically for the LPUART.Only the HAL selection shows up for an existing and newly created project. See screen shots.Thanks.
After a few somewhat fruitless attempts to run Ethernet error-free on the H7 development board, I have decided to switch back to the somewhat more established F7 series (which I am a bit more familiar with). Nonetheless, I am still experiencing some weird Ethernet connectivity behavior from the code generated via STM32CubeMX. The LwIP_HTTP_Server_Netconn_RTOS example from STM32Cube_FW_F7_V1.14.0 works just fine. The operation of LwIP_HTTP_Server_Netconn_RTOS is stable and I can send HTTP GET commands to the development board at a rapid pace. Essentially, I can send them every few milliseconds, and the devboard transmits a proper response without any unnecessary lag. If I try to recreate the same conditions using STM32CubeMX I begin to experience periodic lag. The continuous stream of HTTP GET commands is actually sent as a burst after which the devboard seemingly crashes and I am kept waiting for a timeout. After a small halt, this communication is reestablished once again and I can se
Posted on January 10, 2017 at 21:30 Hi, I didn't find any report posted about this issue so here we are. There is a stupid bug in the implementation of HAL_I2C_Mem_Read()@STM32Cube_FW_F4_V1.0/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c. The 'Size' parameter is supposed to be used only to initialize the transfer size, but it is also misused during the transfer to check the number of bytes left for reading (see the marked line in the code below). In result if in the last loop iteration there are 2 bytes left, code block expecting 3 bytes on the bus could be executed and the function hangs (till the timeout event, not shown here). HAL_StatusTypeDef HAL_I2C_Mem_Read(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout) { /*....*/ /* Prepare transfer parameters */ hi2c->pBuffPtr = pData; hi2c->XferCount = Size; hi2c->XferOptions = I2C_NO_OPTION_FRAME; hi2c->XferSize = hi
Hi there,I am currently using the HAL_SPI_TransmitReceive() function for back-to-back read/write with a GPS modem as the slave. If i want to now implement the SPI coms with DMA, what is the correct DMA channel config in CubeMX?Only one DMA channel is allowed (RX/TX) for the SPI master. Thank you
I have STM32f4-Disc
Working on a basic UDP Echo server with STM32F429ZI. I had CubeMX add lwIP into the project, but its doesn't seem to receive any packets when I send them. DHCP seems to work as I can see an IP getting assigned on the router. void udp_echoserver_receive_callback(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port) { /* Connect to the remote client */ udp_connect(upcb, addr, UDP_CLIENT_PORT); /* Tell the client that we have accepted it */ udp_send(upcb, p); /* free the UDP connection, so we can accept new clients */ udp_disconnect(upcb); /* Free the p buffer */ pbuf_free(p); } /** * @brief Initialize the server application. * @param None * @retval None */ void udp_echoserver_init(void) { struct udp_pcb *upcb; err_t err; /* Create a new UDP control block */ upcb = udp_new(); if (upcb) { /* Bind the upcb to the UDP_PORT port */ /* Using IP_ADDR_ANY allow the upcb to be used by any loca
Dear ST,I have problems when opening files with the .ioc extension from the previous cubemx version (5.1.0) on the latest cubemx release (5.2.0), after confirmation of installing the package needed but the file is not open but only loading forever.Thank you for the support
Can someone please clarify if the IN endpoint FIFOx transmit RAM start address part of OTG_DIEPTXFx register should be "word address" or "byte address aligned to 32-bit boundary".We are currently treating this as "word address", inline with what STM32CubeMx does and also libopencm3 USB stack. But, we are having some issues with FIFO corruption and suspect IN endpoint FIFOx transmit RAM start address is not "word address" as it is not explicitly specified as word address anywhere else in reference manual.I have also attached the snapshot of the register description from STM32L476 reference manual can someone please confirm what is correct?
Hi,I am using cubemx for code generation and i have atollic compiler. This is first time i am using atollic, previous to that i was using keil and now i have started to use ubuntu. so no keil for ubuntu.when i generate the code with cubemx, i don't see any makefile there and not project files.do i need to write makefiles manually?i googled for the same but didn't get much help.
Using STM32CubeMX 5.2.0 in Windows 10.When I hit the "Gererate Code" button, I see a pop-up window:"WARNINGS: - These IPs still have some not configured or wrong parameter values:[FATFS, Verify the Platform Settings Tab , USB_HOST, Verify the Platform Settings Tab ]Do you still want to generate code ?"FATFS and USB_HOST happen to show a green 'V'.I can't seem to find any "Platform Settings Tab", where is it located?Looking through the settings, I do not get where the problem comes from.What can I check?
1) In the linker script file for the project generated by STM32CubeMX for TrueStudio the highest address of the stack (_estack, end of RAM) is set to 0x20020000 (STM32F407VG)In the linker script file for the project generated by built-in CubeMx in the STM32CubeIDE the highest address of the stack (_estack) is set to 0x2001ffff (same MCU, same configuration settings).This results in different initial values of sp register and might result in incorrect operation of sprintf function converting float to string (stack alignment?). Changing _estack value manually to 0x20020000 in the linker script seems to solve the problem.2) LSI clock for LPTIM cannot be selected using built-in STM32CubeIDE CubeMx GUI (STM32L476RG). After generating the code LSI is not enabled in the clock configuration function. Same settings work perfectly with standalone CubeMx and Keil.
Posted on March 10, 2015 at 21:34Hi, I want to read/write data to SD card via SPI. is it possible to initialize the FatFS module to work with SPI interface in cubeMX tool? The SD card option in the FatFS middleware is available only when I am enabling the SDIO peripheral. I am using STM32F4-DISCOVERY board and STM32CubeMX ver. 4.6 Thanks #stm32cubemx #stm32 #spi #fatfs #sd #sdio
Hello,First of all, I am using a STM32F446 with Keil IDE. I used CubeMX to generate the Keil project.I recently encoutered a problem that seems to be some kind of stack overflow: the static variables that were located just before the stack in the RAM address space were modified without being accessed in the code. This seemed to happen randomly, generally after a couple of minutes.Increasing the size of the stack in the startup file seems to have solved the problem. However, diagnosing the issue took me a while, especially because there was no way to trigger it, and the behavior of the code with these random values could have damaged the machine I am controlling. So I am looking for a way to configure the stack that would make sure a hard fault is triggered when the stack is full. Moreover, I am really confused about the direction the stack fills up...I already started a thread and posted the details on the Keil discussion forum : http://www.keil.com/forum/64363/Thank you
After updating the program from the GUI it doesn't start anymore:2019-04-14 16:41:18,352 [WARN] Updater:457 - Unsupported task request: 37 Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.base/java.lang.Integer cannot be cast to java.desktop/javax.swing.JPanel at com.st.microxplorer.maingui.New_gui_UpdateMngrLinePanel.<init>(New_gui_UpdateMngrLinePanel.java:82) at com.st.microxplorer.maingui.New_gui_RightPanel.<init>(New_gui_RightPanel.java:62) at com.st.microxplorer.maingui.NewUIStartupPanel.InitStartupPanel(NewUIStartupPanel.java:127) at com.st.microxplorer.maingui.NewUIStartupPanel.<init>(NewUIStartupPanel.java:69) at com.st.microxplorer.maingui.MainPanel.initialization(MainPanel.java:247) at com.st.microxplorer.maingui.MainFrame.initialization(MainFrame.java:148) at com.st.microxplorer.maingui.MicroXplorer.run(MicroXplorer.java:187) at com.st.microxplorer.maingui.STM32CubeMX.run(STM32CubeMX.java:25) at java.desktop/java.awt.event.
In STM32CubeMX / STM32CubeIDE100, In the Clock Configuration page, the pull-downs disappear when trying to alter the selection, making it impossible to change them.This is not with all boxes, but with PLL2 and PLL3 pull-down boxes.UPDATE:I found a work-around: Click on the box, don't move your mouse to the selections, but press the up and down cursor keys and then Enter.
I am using STM32F103C8T6 MCU and STM32CubeMx.I currently reciving data from UART and printed on PC's serial but it will work only when data terminated by '\n' character.But what if the data from uart not terminated with '\n'??Can anybody help??Please find the code below: if (huart->Instance == USART2) //current UART { if (Rx_indx==0) { //for (i=0;i<100;i++) Rx_Buffer[256] ="\0"; } //clear Rx_Buffer before receiving new data if (Rx_data[0]!='\n') //if received data different from ascii 13 (enter) { Rx_Buffer[Rx_indx++]=Rx_data[0]; //add data to Rx_Buffer } else //if received data = 13 { Rx_Buffer[Rx_indx++] = '\n'; memcpy(Tx_Buffer,Rx_Buffer,Rx_indx); UART2_print(Tx_Buffer); Rx_indx=0; memset(Tx_Buffer, 0, 256); } HAL_UART_Receive_DMA(&huart2, Rx_data, 1); //activate UART receive interrupt every time }
Hi all, I just converted my project to the new release of STM32CubeMX 5.2.0. I did not realize that the JTAG port has been deactivated after migration to the new release, and downloaded the firmware using my Keil ULINK Pro. Now I can not attach to the CPU using Keil ULINK Pro any more! Secondly: The newly generated Code for the USB does not work any more! If this would work, I would be able to use my USB connection to upload a new release through my own bootloader, however as said: USB doen't work any more.Has anyone an idea how I could fix this problem now?Any help is very much appreciated!
Hello community,I'm working with a NUCLEO Board F767ZI and I use cubeMX to generate the project.My project is created with cubeMX 5.2.0 and I use FreeRTOS v10.0.1Now I have a problem with malloc function, inparticular, with this new FreeRTOS version (v10.0.1) if I call malloc function inside a task, the function returns a null pointer. If I call the malloc function in the main.c the function retrun a non null pointer.I tested the same project with FreeRTOS v9 and the malloc function works also inside a task.What can I do to solve this problem?Thanks for the help!Federico
When selecting this option in the Project Manager section of CubeMX, the build process in Keil generates a linker error:.\Objects\Aeolics.axf: Error: L6218E: Undefined symbol MX_GPIO_Init (referred from main.o)..\Objects\Aeolics.axf: Error: L6218E: Undefined symbol MX_I2C2_Init (referred from main.o).The files are generated, but not added to the Keil project
Hi!I'm just starting learning STM32, I got a st-link cutoff from a nucleo-board. I find programming ready boards a bit boring, so I went straight to naked MCU on breakout boards.So I got this STM32L431KBU6 chip on breakout and I can't get it to start. Here is the GPIO config, and the clock config. That is one from many I tried, I only tried with with internal clocks, MSI in different configs and HSI with different combinations of multipliers and dividers When I run a debug in Keil, I just can't get past some cycle. I think it's already some error handler, but I don't get it shown in C code.The thing is I managed already to run a "hello world" on another mcu (stm32l412K8t6), so I don't understand, what is so special with this one that I don't get correctly?Thanks in advice for any help.
In the build-in CubeMX, there are some improvements possible:Unable to alter some pull-down boxes in the Clock Configuration, they disappear when trying to move the mouse to the desired selection (must use cursor and enter keys instead)When selection a GPIO or Peripheral from the menu at the left, high-light the associated pins on the chip packageWhen clicking "Enter User Label" on a pin on the Pinout view, automatically place the cursor in the input field (focus)If LWIP is disabled (it can not be enabled) explain why it is disabled, and/or offer to change the minimum requirements (like DCache enable)I don't know if ST checks these kind of posts.Maybe other users can contribute as well.
Dear,As mentionned in the title, STM32CubeMx 5.0.1 generates an error in the UART initialization function on the STM32F0 when using the LL driver.When you selected "Overrun Enable" in the Advanced function, the "LL_USART_DisableOverrunDetect" function (set OVRDIS bit) is call.When you selected "Overrun Disable" in the Advanced function, the "LL_USART_EnableOverrunDetect" function (clear OVRDIS bit => overrun function disable) is call.
..
please i need some help i used UART to communicate stm32f407vg tx dicovery
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.