Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I want to deploy my model in STM32 F446RE for validation on target, I will connect my STM32 via a mini USB cable to the laptop.Now guide me in details for each step (such as pinout & configuration, connectivity and others)Please help me
Hello,I am creating a new project using STM32CubeIDE to use lwIP with internal MAC for a Nucleo F756 Board. When I enable the Eth peripheral, I can configure the Rx and Tx descriptors. They are placed at the start of SRAM2 (0x2004C000).Since the CubeIDE uses the gcc compiler which cannot place objects at requested address using only C code. The generated code uses sections created using linker scripts to place objects at those locations. But the problem here is that CubeIDE is not modifying the linker script file (STM32F756ZGTX_FLASH.ld) to create these sections! So these objects are NOT kept at SRAM2 as expected.I have manually done the following in the file STM32F756ZGTX_FLASH.ld
Posted on February 23, 2017 at 10:49I am using STM32F103 in my new application. I have used STM32Cube to generate my code including Internal RTC. Myproblem is that the time is ok saved when reseted but date is always reset. when i inspected the code i found that the HAL_RTC_SetDate() function is not setting the RTC_CNTH and RTC_CNTL registers appropriately. Is it a bug or is there any other way of doing this. when we add day shouldn't the RTC_CNTH and RTC_CNTL added with (24hrs x 60 Mins x 60 Secs) this is not happening.#cube-mx #hal-library
..
Hello everyone,I have a project with an STM32U575VGT6. This was created with STM32CubeMX version 6.8.1. Now the project should be made compatible with the latest IDE version (V1.17.0) as part of a larger conversion action and for this purpose a migrate of the ioc was carried out (STM32CubeMX version 6.13.0).In the original project, VREFBUF was set to ‘Internal voltage reference’ mode with ‘SCALE0’.After the upgrade, this selection is no longer available and VREFBUF is set to ‘Disabled’ by default.I have also noticed that since the upgrade there is the option ‘isolation Vdda’ under ‘PWR’, which cannot be deactivated.Ultimately, this means that 0V is applied to the Vref pin and the ADC and DAC do not function correctly.What has been changed here and what do I have to set so that my application works again?Many thanks for your helpRobertold Version:new Version:
When attempting to configure USB_OTG_HS and corresponding USB_DEVICE_M4/M7 middleware on STM32H747XI (on either M7 or M4 cores), the "STM32_USB_Device_Library" directory gets included on both cores, causing the core that isn't using the USB peripheral to fail build. Here are the errors that occur:/.../H7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:20:10: fatal error: usbd_core.h: No such file or directory20 | #include "usbd_core.h"| ^~~~~~~~~~~~~compilation terminated./.../H7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c:20:10: fatal error: usbd_ctlreq.h: No such file or directory20 | #include "usbd_ctlreq.h"| ^~~~~~~~~~~~~~~compilation terminated./.../H7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c:20:10: fatal error: usbd_ioreq.h: No such file or directory20 | #include "usbd_ioreq.h"| ^~~~~~~~~~~~~~compilation terminated./.../H7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c:59:10: fatal error: usbd_cdc.h: No such f
Hello STM,This is now my second post about this issue because the first one didn't get any answers. I'm trying to start a Project with STM32CubeMX, and whenever I generate the code, I can't open the IOC file again. I've attached my IOC file for your information. Here is the error message that I get when I try to open the file:It's not often that one sees something as useless as this message. Why do you guys even bother to show it?
Split from this as a new question.Hi together, I'm unfortunately facing a similar problem with cubemx 6.13.0I've an ioc file that was working for all versions up to 6.12.1. I also migrated successfully to 6.12.1.When I try to open in 6.13.0, I just get an "Not a valid ioc" error.I may not post the ioc file here as there may be some customer ip in it.But I get the following Exception in Stm32CubeMX.log:2025-02-05 10:39:48,259 [FATAL] ProjectFactory:568 - Exception caughtjava.lang.NumberFormatException: For input string: "" under radix 16at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]at java.lang.Long.parseLong(Long.java:719) ~[?:?]at com.st.microxplorer.mcu.memorymap.MemInfoExtractor$ETHInfoExtractor.onETHEnable(MemInfoExtractor.java:4555) ~[STM32CubeMX:?]at com.st.microxplorer.mcu.memorymap.MemInfoExtractor.completInit(MemInfoExtractor.java:252) ~[STM32CubeMX:?]at com.st.microxplorer.mcu.memorymap.MemoryMapService.MMTActivated(MemoryMapService.ja
I had taken TIM1 asn Master to Trigger TIM8 here below i had attached the timer configuration Clock Frequency 480mhz ,timer clock 240mhzHere Iam Triggering The TIM8 after 2.5us started from TIM1 both are 100khz frequency in TIM->CCR3 register iam loading the 2.5us equavalent value (600) loading in the register where in the output also it came correctly but WHERE iam Incrementing or decrementing automatically in code in the CCR register value loaded correctly but in the output it is not updating why i dont known please anyone help to solve this problem
Well I got the new board back it seems to work, but it's quite different: I have 3 groups of 3 sensors and one group used for the shield. Previously Cube MX defined this as 3 Banks, now it has defined 6 Banks. Should I worry about this? In the first version each sensors charge wave form was very similar, now they are very different, some taking around 6mS to complete and some taking Around 16mS. Should I worry? When I drop the clock to 2MHz, the response is too slow. At frequencies 4MHz and above there is no real delay between the touch and the LED flashing to let you know it worked, at 2MHz I have reduced de-bounce to 1 to get a reasonable response time to the touch. Is that normal? Any advice gratefully received, Lance.
When generating code using STM32Cube.AI GUI, I get all the necessary project files.However, when using the CLI, I only get the model's .c and .h files. Is there a command to generate all the additional files via CLI? Or can anyone explain the difference between the GUI and CLI outputs?"
I've created a STM32CubeMX project for stm32f411re uC and try to add CMSIS DSP suppor. I go to "Aditional Software" -> ARM.CMSIS and check CORE 5.3.0 and DSP 1.7.0. Into DSP I chose Source. CubeMX download the CMSIS package into STM32Cube/Repository/Packs/ARM/CMSIS.Then I generate the project and imported into SystemWorkbech IDE. I've try to add #include "arm_match.h" and I get file not found error. In the project tree is not references to CMSIS DSP libraries...
These excellent articles make the USBX worth a go for more complicated tasks (I wish composite devices were supported in CUBE IDE),How to implement the USB device composite class in STM32 using the Azure packageHow to implement the USB Device CDC (VCOM) in STM32 using the Azure USBX package When creating a composite device, I see that USB_OTG_HS was used rather than the USB_OTG_FS. I know that the HS can use the internal FS PHY STM32 (so it is FS under-the-hood). However, it also changes the pins! My particular application is highly constrained, and I cannot change the pins, so I need to use USB_OTG_FS. Can I use USB_OTG_FS along with Azure USBX to create a composite device, or does it require USB_OTG_HS? Regards,Daniel
Hi STM community, I'm a fairly new user of the STMcubeMX software. I followed this tutorial (https://youtu.be/grgNXdkmzzQ?si=gDybMlGQxgTNwpPC) and every time I try to analyse my model under the 'MCU/MPU Filters' tab it just stays greyed out and does not analyse/generate anything or give me any notification. I'm working with an STM32F746G-Disco to learn model integration and eventually implement my own onto the board.Any help would be greatly appreciated. Thank you!
Hi everyone,I am working on a project using the STM32F7508-DK board, and I want to establish an Ethernet connection so that I can ping the board from my computer.I have a few questions regarding the setup:How should I physically connect the Ethernet cable? Should it go directly from the board to my laptop, or should it be connected through a router?What steps are required in STM32CubeIDE to configure the Ethernet interface properly?Are there any example projects or reference materials that could help me set up Ethernet communication on this board?Any guidance or advice would be greatly appreciated!Thank you in advance.
Dear Members,Is there any guidelines to select the values or size of three parameters in STM32cubeMX, middleware (USB device, CDC) to achieve the highest speed on CDC? I am using STM32L4P5VGT. My application streams the sensor data to the Laptop using USB CDC class, once powered on.To understand the question more in detail, I attached my current settings, are acceptable or can be optimised by reduction or increase, same time, need to avoid wastage of RAM also, so it can be used for other purposes if I am using too much.Regards
Hello,I am using STM32CubeIDE 1.17.0 to generate code for STM32F746 device. I am using DAC peripherals in non-interrupt mode + the TIM6 in the interrupt mode. When the source code is generated, the TIM6_DAC_IRQHandler contains a call to HAL_DAC_IRQHandler.As I do not use/care about DAC interrupts, is there a way how to configure the project in STM32CubeIDE to not generate a call to HAL_DAC_IRQHandler? I would like to avoid implementation of own TIM6_DAC_IRQHandler, changing to TIM7, just to use some click here/click there solution if possible :-). I could find anything feasible under NVIC/Code generation or Project Manager/Advanced SettingsThank you for any hint.Martin
Hello folks!I have a STM32F746 MCU on my custom board and I'm trying to get the LwIP + FreeRTOS stack to work, especially the netconn tcp_echo_server example. It's not a hardware related problem, because the same HW has been used on another board (STM32F2 and STM32F3) and everything works fine. It must be a software problem but I can't figure out what it is. I simply generated the code with the STM32CubeIDE, copied the example from the repository and started the application. This worked on the other board (STM33F2 and STM33F3) but not in this one (STM32F746).Looking at the example of the repository, there are some differences compared to the generated code, especially regarding the addressing of the DMA buffers as follow....._RAM.ld /* GENERATED CODE */ MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K } /* EXAMPLE CODE */ MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 307K FLASH (rx) : ORIG
Hello,I'm pretty new to this, but bear with me... Generating configuration code for NUCLEO-H732FX which includes MEMS. In app_mems.c the generated code appears to attempt initializing the virtual COM out with an incorrectly formed call: /* Initialize Virtual COM Port */ BSP_COM_Init(COM1);returning:Description Resource Path Location Typetoo few arguments to function 'BSP_COM_Init' app_mems.c /first_test/MEMS/App line 168 C/C++ Problemthe declaration in stm32h7xx_nucleo.c seems to confirm the incorrect call:#if (USE_BSP_COM_FEATURE > 0) /** * @brief Configures COM port. * @PAram COM COM port to be configured. * This parameter can be COM1 * @PAram COM_Init Pointer to a UART_HandleTypeDef structure that contains the * configuration information for the specified USART peripheral. * @retval BSP error code */ int32_t BSP_COM_Init(COM_TypeDef COM, COM_InitTypeDef *COM_Init) I suppose I could try editing the generated code, but any other workarounds that don't requir
Scenario: I am using STM32CubeMX (v6.13.0) to generate the necessary project files for a default STM32U5A9J-DK project with ThreadX enabled. The project files are copied into a docker container and built with cmake. Building and debugging in the container works until I attempt to add the ThreadX middleware. Outside of the container building and debugging with STM32CubeIde is not an issue.Problem: The STM32CubeMX generated project files are not sufficient to compile a ThreadX program. Undefined reference problems flood the output.Debug:1) I have tried combinations of the settings in STM32CubeMX including: "Generate Under Root," "Enable multi-threaded support," and "copy all used libraries into the project folder" to no avail. My cmake program recursively adds all .h, .c, and .s/.S files as sources or include paths as appropriate in the project folder, so all generated files are always used.2) I attempted to resolve the undefined issues by manually adding th
I can't measure tempsensor with vbat and vref because cubemx generates low layer code in the following order:LL_ADC_REG_SetSequencerRanks(ADC1, LL_ADC_REG_RANK_6, LL_ADC_CHANNEL_TEMPSENSOR); LL_ADC_SetChannelSamplingTime(ADC1, LL_ADC_CHANNEL_TEMPSENSOR, LL_ADC_SAMPLINGTIME_640CYCLES_5); LL_ADC_SetChannelSingleDiff(ADC1, LL_ADC_CHANNEL_TEMPSENSOR, LL_ADC_SINGLE_ENDED); LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_PATH_INTERNAL_TEMPSENSOR); /** Configure Regular Channel */ LL_ADC_REG_SetSequencerRanks(ADC1, LL_ADC_REG_RANK_7, LL_ADC_CHANNEL_VREFINT); LL_ADC_SetChannelSamplingTime(ADC1, LL_ADC_CHANNEL_VREFINT, LL_ADC_SAMPLINGTIME_640CYCLES_5); LL_ADC_SetChannelSingleDiff(ADC1, LL_ADC_CHANNEL_VREFINT, LL_ADC_SINGLE_ENDED); LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_PATH_INTERNAL_VREFINT); // Previously enabled tempsensor bit get overwritten here and only internal vrefint channel is enabled.. I took a few hours until I figured ou
Hello, I'm using STM32H503RBT and trying to configure a DMA transfer from memory to the HASH engine, but even though I have that peripheral configured as show on the picture below, I can't assign it as the request source for the DMA is grayed out and when I hover my mouse over it a pop-up appear's saying "IP has to be configured". I tried creating a second project with the same MCU and had the same problem, although interestingly that's not a problem on the CBT variant (48 instead of 64 pin package). Is this a bug or am I doing something wrong? I'm using version 1.17.0 on Windows.
Hi everyone,I was just wondering how to configure two PWM Channels of TIM1 to generate two phase shifted PWM signals in asymmetric PWM mode as shown in the attachment. I'm using a STM32F303 on a custom board with CubeMX and SW4STM32. According to Reference Manual RM0316 OC1REF1 is triggered by CCR1 and CCR2 as compare values during up- and down-counting and respectively OC1REF2 by CCR3 and CCR4. Theory all good but how on earth do I configure that in CubeMX? When configuring a TIM channel to asymmetric mode I can only set one CCR value. Do channels 2 and 4 have to be set to 'PWM Generation No Output' and Mode:'Asymmetric PWM' to set CCR3 and CCR4 in the CCR register or how does the timer know all the CCR values to work in asymmetric mode? (See attachment).Has anyone succeeded to configure with this nice feature on STM32MCUs so far?cheers
When using Clock Configuration (clock tree) feature it would be niceProposal 1: When selecting dividers or input clock frequency or clicking endpoint of clock output, tool would higlight (e.g. in RED) the whole path (LINES) which the change will affect. Sometimes it is hard to see the path of some change.Proposal 2: In Clock Configuration (clock tree) it would be nice to have search functionality (CRTL + F). It is sometime hard to find some text in clock tree.
Dear ST support team,In STM32CubeMX under the "Project Manager - Advanced Settings" path in the "Generated Function Calls" window user can select to make the generated functions' scope static or external. However, the SystemClock_Config() is always static within the main.c where this function is also generated. This is a bit annoying for all of us who do not use the main() function in the main.c and want to call all the required HAL initializations externally. This issue seems MCU family independent.Another one is the fact that for some MCUs there are issues with linker file generation. The CubeMX-generated linker file is leaving out some linker code. While I'm not seeing this issue on the STM32U535, this remains an issue for the STM32F756. The explanation of the problem and the solution is shown below (answer provided by @grzegorz in the thread https://community.st.com/t5/stm32cubemx-mcus/flash-ld-syntax-error-when-upgrading-to-cubemx-v6-12-1/td-p/722343/page/2) Cu
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.