Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
When using USART2 of STM32 Nucleo-L053R8, if I try to use PA0 and PA1 that are not used for flow control as GPIO, a warning appears as shown in the attached picture. How to resolve this conflict?
Hello communityI am working with the stm32f407 on a Project with Lwip without FreeRtos. The code worked on version 1.7.0. but when i changed to 1.9.0 I got hardfault, I solved the problem by putting the LWIP_RAM_HEAP_POINTER on address 0x2001C000(SRAM2). but I still can't ping the board. The LWIP_RAM_HEAP_POINTER on 1.7.0 could not be set at all in the MX configuration.Does anyone have any idea.many greetingsMosaab
Hi,After updating the IDE to v1.9.0 I experienced an error during memory allocation for LwIP. Now, settings make explicit the declaration of LWIP_RAM_HEAP_POINTER. By default it is 0x30044000 which is out of memory limits. I'm not totally sure about this, but if the pointer is changed to 0x20017f58 (the direction used by my project in the previous version of the IDE) it works.It would be nice to have an option to use the automatic definition of the pointer. Code for this is still available in mem.c#ifndef LWIP_RAM_HEAP_POINTER /** the heap. we need one struct mem at the end and some room for alignment */ LWIP_DECLARE_MEMORY_ALIGNED(ram_heap, MEM_SIZE_ALIGNED + (2U * SIZEOF_STRUCT_MEM)); #define LWIP_RAM_HEAP_POINTER ram_heap #endif /* LWIP_RAM_HEAP_POINTER */ Using STM32479I-EVAL, FreeRTOS v2 + LwIP.Edit: the solution I'm using is commenting #define LWIP_RAM_HEAP_POINTER 0x30044000in lwipopts.h.
Hi I moved a code that was working on STM32CubeIDE v1.8. But after update STM32CubeIDE v1.9 I am facing a new issue that I have never see before in STM32CubeIDE v1.8.0!I compared what was before and what we have now, see screen...Maybe to me need only turn on "Auto Negotiation" in main.c and ping will start working but, I don't know how to do it?Could someone tell me why code do not initialize MX_LWIP_INIT (); ? Bellow my simple code main.c/* USER CODE BEGIN PV */extern struct netif gnetif; /* USER CODE END PV */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ ethernetif_input(&gnetif); sys_check_timeouts(); } /* USER CODE END 3 */}
..
I upgraded my IDE to STM32IDE 1.9.0, and CubeMX to version 6.5.0 in order to develop on U5 familiy.I know the ST does not include freertos lib on CubeMX 6.5.0 any more.. but, since I allready working with it in other projects I would to keep it instead of integrating ThreadX OS..so, I downloaded from GIT the portable source files (https://github.com/STMicroelectronics/stm32_mw_freertos/tree/master/Source/portable) and I tried to compile it.I have compilation errors releated to _REENT alltought I set configUSE_NEWLIB_REENTRANT to 0 as you described in this case.I am not sure at all that the root cause is using FreeRTOS in my project.what do you think may cause this errors and how can I fix it?I cant downgrade my CubeMX since i asked to upgrade when starting to develop with the U5 familiy.thanks, Avi
I'm using a board Nucleo Stm32F401RE on Stm32Cube 1.8.A simple question : I have cofigured, in MX, I/O pin PC5 as GPIO_EXT_INT5with interrupt in falling edge , pull_up enabled and NVIC[9:5] enabledRemember: in Nucleo board PA5 pin control in OUTPUT a green led on boardGenereting the configuration code I have:/*Configure GPIO pin : PtPin */ GPIO_InitStruct.Pin = LD2_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct); /*Configure GPIO pin : PC5 */ GPIO_InitStruct.Pin = GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; GPIO_InitStruct.Pull = GPIO_PULLUP; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);OK.In stm32f4xxit.c I have:void EXTI9_5_IRQHandler(void){ HAL_GPIO_EXTI_IRQHandler(LD2_Pin);}WHY LD2_PIN ??? I asked interrupt for GPIO_PIN5 in GPIOC in Falling edge!many thanks ...
Hello!I use MCU STM32F429ZIT6. My task is to receive data on UART for several hours and copy them to ethernet. My function to send data (I generated the code in the CubeMX program with no RTOS): void sendstring (char* buf_str) { tcp_sent (ss->pcb, tcp_server_sent) tcp_write (ss->pcb, (void*)buf_str, strlen(buf_str), 1); tcp_recved (ss->pcb, strlen(buf_str)); }In about half an hour (or 10 minutes, or 60 minutes) I can see, that my transmission is aborted. Вebugger crashes into hardfault. I noticed that tcp_write () function returns ERR_MEM infinitily and the condition"tsp_sndbuf(ss->pcb) < strlen(buf_str)"is true.Do you help me? Maybe I should change some parameters lake MEM_SIZE or PBUF_POOL_SIZE or something else.
I have enabled PA3 as ADC1 channel 15, and for some reason the Clock Configuration view in the Cube IOC Generator is always grayed out.Attached is my IOC file and a screenshot of the issue:
I've planed use UART1 in "only receive" mode and i used all possible UART1_TX pins for another purposes. In that case UART1 config is bocked and user can't config single wire modes, like "only receive" or "single-wire half duplex " (possible thanks RX/TX Swap). There are few workarounds:1) give up UART1 config by cubeMX and write your own code (possible best way)2) prevent that situation by configuring UART first, before blocking UART1_TX pins by other peripherals
Hello everyone,I am trying to expand the STM32Cube USB library which comes with the generated Code from STM32CubeMX. There are still some bugs in the Code but it is really hard to find them without appropriate debugging tools. The normal debugger can not be used while the host disconnects the device if there is no answer. I also figured out that printf-Debugging with UART is also complicated because it is too slow.Could you recommend a suitable method to debug an USB connection?Thank you for helping!
This is really a CubeMX problem but didn't see a better forum to post to. I am trying to create a bare metal project with CubeMX for the STM32H7. I click File->New Project..., then select STM32H745/755 under the Line drop down on the MCU/MPU Selector tab. I select the STM32H745XI line in the right hand pane. Then click Start Project. The resultant ioc is attached. Under the Middleware drop down in CubeMx, there are a bunch of items selected with gray boxes and CubeMx tells me I can not disable them because they are being 'Forced' for the peripheral. The main item that is a problem is the FreeRtos line item- I would like a bare metal project.Can someone explain this to me?Thanks for you help.
Hi everyone. After some updates of CubeIde I have returned to an old project and can not compile it. IDE shows me the error of multiple definitions of errno variable. I tried to start a clean project. When I enable FreeRtos and LWIP it shows me the same error. Please someone check it. Thank you.
Hallo,after Upgrading to CubeMX 6.5.0 there are problems using ADC1 with STM32G070RBT6. When the 'Number of Conversion' > 1 it is not possible to set 'Discontinuous Conversion Mode' to Disabled (only Enabled), with CubeMX 6.4.0 it works. Is this a bug?
I can navigate to that from right click and go to declaration. On converting to C++ it starts to give other issues.
helloI am developing an external flash loader with stm32g070.There is something I don't understand about this.1. Should I use only the internal clock for external flash loader, not the external crystal?2. Can't I use the interrupt?Please reply to the above two questions.Thank you.
Hello everyone,I have recently upgraded my STM32CubeIDE to:Version: 1.9.0Build: 12015_20220302_0855 (UTC)With this version, my ADC settings have changed automatically to have the discontinuous conversion mode always enabled. There is no possibility to disable it:I would like to have a continuous conversion mode, which is now greyed out because the discontinuous conversion mode is enabled:I can work around this issue by just altering the init section of the ADC. It would be nice though to also change it in the .ioc file in order to have it clean.What do I miss here? How do I disable the discontinous conversion mode?I am using a STM32G030K6T6 BTW.Thanks in advance for your response.Felix
I am using CUBEIDE 1.9.0.Stm32f103ret6 is used.The ADC generated a code to use DMA.However, it did not work properly.The cause should have been __HAL_RCC_DMA1_CLK_ENABLE() before this ADC was initialized.I tried to modify the DMA initialization faster than ADC when generating the code, but it was not modified.What should I do?
Hi, I've got an project in cubeide that starts in one project and then jump's to another at 0x0800C000. It's been working in the past and I've somehow broken it trying to do updates. Here is the main code in the bootloader. It's very simple. BOOTLOADER v/* Includes ------------------------------------------------------------------*/ #include "main.h" #include "fatfs.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include <stdbool.h> /* USER CODE END Includes */ /* Private variables ---------------------------------------------------------*/ CRC_HandleTypeDef hcrc; I2C_HandleTypeDef hi2c1; SPI_HandleTypeDef hspi2; /* USER CODE BEGIN PV */ /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_SPI2_Init(void); static void MX_CRC
Hi,Using an STM32G4, I want to start an ADC conversion periodically using an event from a timer.To do so I choose the TIMER6 (basic timer) and ADC2 peripherals.Sadly, it didn't work.The reference manual, seems to imply that you can't use a basic timer to start an ADC conversion. That said, CubeMX clearly allows us to configure TIMER 6 as a trigger source.Is this a CubeMX bug or I'm missing something?Thanks
I am using STM32CubeIDE_v1.9.0 and STM32CubeMX version 6.5.0I would like to use the X-CUBE-EEPROM productHere is the message I get when I try to manually install the downloaded expansion pack (from this link) using the Embedded Software Packages Manager and the From Local... Button: What can I do?
I am trying to configure the UART5 on PD2 and PC12 for my STM32L152RE as open drain but the Mx GUI only offers pull ups. I searched manual and Errata but nothing indicates a special pin here. is this a bug in the Mx config or a real thing does anybody know? It just makes me nervous for my pin mapping.. Thanks.
I am working with a dual core H7 for the first time and and very confused about how to share data between the two cores. I would like to use the M4 as a slave/background processor for the M7 where the M7 can alert the M4 when there is new data to process and then the M4 signals back when finished.I can see how to use a semaphore to signal back and forth to synchronize the reading and writing - that part is fairly clear, but what is the best way to declare & use two common buffers? I tried adding the resource manager to both cores in MX-Cube, but it is incomplete and tries to include header files to doesn't exist anywhere in the repository and I couldn't find any useful documentation about the resource manager on the web.I tried doing something simple and created shared.c & shared.h in the Common directory that contain just the variable declaration for the buffers and then added #include "shared.h" to both main.c, similar to how global variables can be shared between .c files in
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.