Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I have a couple of changes I would like to make to the Makefile generated by STM32CubeMx. My Toolchain/IDE is set to Makefile in the Project Manager tab. The default Makefile template has no places for custom user code, so every time the project is regenerated, any changes to the Makefile are overwritten.I tried to find a Freemaker template (ftl file) for the Makefile, but there isn't one that I can find in the STM32CubeMx installation template folders. Is it possible to create my own Freemaker Makefile template? Otherwise, is there any other way I can extend the Makefile to make my own changes?Best regards,Cory
Hello I'm using a STM32F1107VCT6 on an EasyMx Pro V7 dev board and I've a problem of clock. I create a project from STM32 Cube MX and I'm using STM32 Cube IDE for developing. I want to toggle a LED every 1 second. For this I'm using the library HAL and the function "HAL_Delay(1000)" but the LED doesn't blink at 1 second. The module of my MCU have two quartz X1(HSE) at 25MHz and X2(LSE) and I want to use the HSE to toggle my LED at 1 second. I've configured the clock configuration on STM32 Cube MX like this :I don't understand from where the problem come from if anyone have some idea of this problem and could help me.
Hello.I'm trying to use FMC Sram, but does not work.Here is what I tested.1) First, I downloaded FMC_SRAM example for Nucleo-H743ZI via STM32CubeMX. I want to see just NWE and NOE pin signal work when I call HAL_SRAM_R/W functions. And It worked as i expected.2) I make another STM32CubeMX project for STM32F745VET. and I add options for FMC like below. And I generated code for STM32CubeIDE. 3) I compiled project, and flashed on my custom PCB which has STM32F745VET. and while debugging, always It hangs at FMC_NORSRAM_Init() in the HAL_SRAM_Init. It alway falls into MemManage_Hander().4) But when I select options like below, FMC works and I can see NOE, NWE pin signal moves. I don't know why SRAM options does not work on STM32F745VET.
These questions are wrt to synchronization section 2 AN4776 and CubeMX settings:When a timers input is selected as ITR0 and trigger/reset/gated mode is selected such that the timer is a slave....Is the clock of this timer it's own internal clock or does the clock drive for the slave clock come from the master? (AppNote 4013 under section 3.3 seems to suggest that only External Clock 1 uses an external source for clocking the slave timer and that all other selections are derived from the slaves own clock)ST seems careless in throwing the word External around wrt to Timers.....Does this mean External to the chip or External to the slave timer module??In CubeMX if I set up a timer to run in slave mode using ITR0 and something OTHER than External Clock Mode 1 what happens if I do NOT check the box for internal clock???
Why CubeMX I2C Custom Timing MCU connectivity config option is unavailable in SMBus mode? Custom Timing is an advanced option for those which really know what they are doing and I do not think it makes sense to take it away in SMBus mode.On the opposite side, it would make a lot sense to set initial Rise Time and Fall Time to more proper values (e.g. max allowed 1000 and 300ns) to simplify setup for novice users. Current default zero values are always incorrect.In addition, Cube MX is unable to set up timings for standard mode 10kHz. Such mode is supported - see RM0440, 41.4.10 I2C_TIMINGR register configuration examples, p.1888-1889Tested with the latest CubeMX 6.7 and STM32G431KBTx.
Hi,are there plans on offering a generator for plain CMake projects?Currently the only way that works is to use CLion to convert the project to CMake but it would be nice if CubeMX supported CMake directly.
It seems, as if CubeMX6.7.0 for STM32U575Z_Q for ADC1 external trigger you cannot choose ADC1_EXT_IT11 or ADC1_EXT_IT15 Is my observation correct? Is this missing?
I have a project that was originally developed under Windows using the motor control workbench. Under Windows, I can successfully open, edit and re-compile the project IOC file (using the built-in Eclipse device configuration tool). I've transferred the project to Ubuntu 20.4 and after the initial transfer the project builds fine. However, if I open the project IOC file (using the Linux Eclipse device configuration tool), when I close and re-compile the IOC file, the project structure is damaged and specifically the content of the Drivers folder is deleted. Now the project no longer builds. So the question is, has anyone else had the same issue and have they found a solution?
I have conflicts on ADC1 but everything is disabled.
As an example, I have added Segger System View to the FreeRTOS and decided to add (say) SPI HAL driver or modify the system clock from CubeMX from LL driver, how to make Cube MX aware I do not want to overwrite/update the FreeRTOS or similar code blocks?, any suggestion?. The FreeRTOS does not have all the protected domains, especially from the segger patch file.
I was wondering where STM stands with RUST language. I see no website within st.com about RUST support.Is there a plan to add RUST into STM32 CubeMX and STM32-IDE as native support, if so, what kind of timescale that it appears?Will FreeRTOS and Azure RTOS be supported under the RUST language?
Hello every one ,i'm a chinese student.Recently,i installed CubeMX again (i have ever installed it oneyear ago).And i fond this problem again.The Software Packs is unvisible in CubeMX.Also,i searched this problem in chinese BBS,and i cant see a same problem like this.:beaming_face_with_smiling_eyes: Share you some picturesThank you for solve this problem:beaming_face_with_smiling_eyes:
Hello,I am designing a custom board using the STM32H7B3LIH6Q, based on the STM32H7B3I-EVAL evaluation board. The crystal used on the evaluation board is 24 MHz, as seen from the schematic offered. Now, I am building my own board and noticed that the part number used for the oscillator is not available. However, there the datasheet says this one can be a range (4 - 50 MHz). See datasheet snippet below. My question is two fold:When they say "guaranteed by design" in the second note, does that mean that, if I use a crystal between 4-50 MHz, I can achieve the full 280 MHz clock frequency used by this MCU?Does choosing a crystal with a different frequency cause changes in the the CubeMX clock configuration?
Hello,I noticed that when I create new project in STM32CubeMX 6.7.0 (STM32F030F4Px) and set "Minimum Heap Size" to 0x0 and "Minimum Stack Size" to 0x0, the linker script is not generated (project with default settings, I only change "Toolchain / IDE" to STM32CubeIDE and enable "Generate peripheral initialization as a pair of '.c/.h' files per peripheral") and I can't compile the project, STM32CubeIDE generates error:Error: Cannot find the specified linker script. Check the linker settings in the build configuration. make: *** [makefile:87: fail-specified-linker-script-missing] Error 2 "make -j12 all" terminated with exit code 2. Build might be incomplete.In the same project when I set the Heap/Stack size to their default values (for STM32F030F4Px Heap has 0x200 size and Stack is 0x400) linker script also is not generated.Am I doing something wrong or is it STM32CubeMX bug?
Hello...I am struggling (for a week now) trying to figure out how this output compare stuff works....Documentation is very poor on this and naming conventions are all over the place....I would like to gate timer15 with a pulse from timer1. I am experimenting with timer1 output compare to do this bcz it seems PWM will not work. I am trying to port out a signal to PA8 on output compare channel 1 to test and then the hope is via one of the TRGO selections I can then move it to there. So the questions : what am I doing wrong in the picture (you cannot see it but I have checked One Pulse Mode)....my expectation based on settings is to get a high pulse at 998 counts for 1 pulse and this should repeat based on Retriggerable OPM1?? scope indicates pin goes high one time and that is itAssuming I can get a pulse out of this thing to see using OC Mode will it be possible to send this to TRGO to gate another timer??Is there a way to have PWM port out to TRGO to gate a second timer?Please don't ref
I have a nucleo-U575ZI-Q and can run the examples for the ADCs just fine. However when I try and make my own project using STM32CubeMX the code hangs at the ADC calibration. I've gone over the settings a dozen times and compared them against the example and cannot find anything different. Any insight would be helpful. Thanks
I am trying to use LWIP on the STM32H723 Nucleo board to send and receive UDP packets. I have generated code using CubeMX version 6.70 and configured it to use LWIP with FreeRTOS. I have referred to the H7 series LWIP related problems and H723 address setting problems in this community. But when I run the project, it triggers the MemMange_Handler(void) and no longer proceeds. I believe the issue may be with the MPU configuration. If I don't set up MPU, the project runs, but I can't send or receive UDP packets. When I check packets using WireShark, I can only see ARP protocol when sending UDP packets. I would appreciate it if you could tell me the solution.
I'm trying to use USB-OTG on NUCLEO-H755ZI-Q. I first created a new project within STM32CubeIDE and set all pins to their default setting. Then, I set USB-OTG to CDC and downloaded it to my board.However, with CubeMX 6.7.0, I can not see the USB device showing up in my windows device manager. After I created another project using the same setting with CubeMX 6.6.1, the CDC device correctly showed up with the name "USB serial device (COM13)". I also checked the USB interrupt triggered in the project created in CubeMX 6.7.0. OTG_FS_IRQHandler is triggered whenever I plug in the USB to my computer. Therefore, I would suspect it to be a problem in the firmware in version STM32Cude FW_H7 V1.11.0.Below are my USB_OTG_FS and USB_DEVICE_M7 setting, and USB clock is set to RC48 in clock tree.
..
SetupSTM32CubeIde 1.10.1STM32CubeMX 6.6.1.202207061420RegardingSTM32F4/F7/H7 projects (maybe also exends to others) with Ethernet, LwIP and RTOS features activated.Especially when the WITH_RTOS flag is set in LwIP>General settings.SymptomsEthernet link reconnection fails, initial connection fails if disconnected at startup.The ethernetif.c files that are created with the configuration as explained above are falsely generated with HAL_ETH_Start(&heth) non-interupt function call in ethernet_link_thread:// Part of void ethernet_link_thread(void* argument) in ethernetif.c around line 797 if(linkchanged) { /* Get MAC Config MAC */ HAL_ETH_GetMACConfig(&heth, &MACConf); MACConf.DuplexMode = duplex; MACConf.Speed = speed; HAL_ETH_SetMACConfig(&heth, &MACConf); HAL_ETH_Start(&heth); netif_set_up(netif); netif_set_link_up(netif); }Call must instead be HAL_ETH_Start_IT(&heth) for WITH_RTOS configuration.Bug detailsThe ethernetif.c file templa
I am trying following:1) USB CDC on M4 core Clock configuration attachedWith the help of forum I understand that Descriptor cannot be read from memory location through CM4 as per below thread:I made following change in usbd_desc.c to avoid hard faultstatic void Get_SerialNum(void){ uint32_t deviceserial0, deviceserial1, deviceserial2; deviceserial0 = 0xaa;//*(uint32_t *) DEVICE_ID1; deviceserial1 = 0xaa;//*(uint32_t *) DEVICE_ID2; deviceserial2 = 0xaa;//*(uint32_t *) DEVICE_ID3; deviceserial0 += deviceserial2; if (deviceserial0 != 0) { IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8); IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4); }}Results are attached.
I try to interface Stm32f429 usb host with printer .I try to make printer class from msc . How I write usb host handle structure and attached device structure for printer
I see no practical reasons for this behaviour. When set to interrupt mode, the pin can still be read as input pin.
I have to configure it as a Client. Can please someone help me with the starting guide for the client configuration like how to establish connection with server and how to write attribute to server, everywhere I found only starting guide for server only.Thank You,Arief
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.