Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,Can anyone point me in the direction of some more information about the custom timing under the I2C parameter settings?Are we modifying a specific register? or something else? Do each of the 8 bits do something different?
我想在h7芯片上运行c++程序,可以用cubemx生成吗?如何配置
Hi, I'm using the latest build of CUBEMX 6.11.1 using firmware package STM32Cube FW_H5 V1.2.0 along with Keil MDK uVision V5.39.0.0. My target micro is the STM32H563ZIT6 (Nucleo H563). I've encountered a repeatable problem with this build of CUBEMX where it does not properly include a carriage return at the end of the include for the "stm32h5xx_nucleo.h" header file. Of course, if I don't first fix this error before I try to compile, numerous errors are generated and the compile fails.Here's the problem in my main.h with the automatically generated include statements:/* Includes ------------------------------------------------------------------*/#include "stm32h5xx_hal.h"#include "stm32h5xx_nucleo.h"#include "stm32h5xx_ll_dma.h"#include "stm32h5xx_ll_crs.h"#include "stm32h5xx_ll_rcc.h"#include "stm32h5xx_ll_bus.h"#include "stm32h5xx_ll_system.h"#include "stm32h5xx_ll_exti.h"#include "stm32h5xx_ll_cortex.h"#include "stm32h5xx_ll_utils.h"#include "stm32h5xx_ll_pwr.
After spending some time debugging my project, I was able to narrow my problem down to this and reproduce it as follows:File, New, STM32 ProjectSelect NUCLEO-L412KBIn Pinout & Configuration, SYS, choose Timebase Source TIM16In Project Manager, Code Generator, select Enable Full AssertDebug... assert_failed() at main.c:197 0x80002a0 HAL_NVIC_SetPriority() at stm32l4xx_hal_cortex.c:192 0x80006fe HAL_InitTick() at stm32l4xx_hal_timebase_tim.c:49 0x800030e HAL_RCC_OscConfig() at stm32l4xx_hal_rcc.c:482 0x8000a7a SystemClock_Config() at main.c:124 0x800022c main() at main.c:79 0x80001d8
I'm using STM32h743zit6u microcontroller on NUCLEO_H743ZI2 board and CORTEX M7 processor . So i have choose a Ethernet peripheral for the UDP socket programming , and DCMI for the camera interface ,and clock is 400Mhz , in the cubeMX version 5.4.0 . And I have successfully generated the code through in Keil version5 , And I did the setup all the hardware which i required and i connect camera with my pc (with some software to see the video steam), And im getting continuous packets which i need to see the video streaming on the pc .so the ISSUE is i runs the camera continuous for three days im getting continuous packets without missing any one of packet. After three days my ethernet ping is stopping and im not getting any more packets. so please provide me solution for why ethernet is stopping after 3 days . and if i need to change in the HAL functions ,kindly request to provide the functions also.thank you.......
Dear experts,i used stm32F407 ve make a project.Through GPIOE connected parallel 16 bit ADC,ADC_busy pin connected F407 Tim4_ch3, enable Input Capture functions, and enable DMA (P to M mode).get a mounts of data one times.i Referenced st demo,its demo is OK.this demo is through DMA take tim4 register(CCR3) to internal RAM.details:HAL_StatusTypeDef HAL_TIM_IC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length)in this function internal,///////////////////////////////////case TIM_CHANNEL_3:{/* Set the DMA capture callbacks */htim->hdma[TIM_DMA_ID_CC3]->XferCpltCallback = TIM_DMACaptureCplt;htim->hdma[TIM_DMA_ID_CC3]->XferHalfCpltCallback = TIM_DMACaptureHalfCplt;/* Set the DMA error callback */htim->hdma[TIM_DMA_ID_CC3]->XferErrorCallback = TIM_DMAError ;/* Enable the DMA stream */if (HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC3], (uint32_t)&htim->Instance->CCR3, (uint32_t)pData,Length) != HAL_OK){/* Return e
Hi, Master:Hello, I want to use the opamp amplifier function of the g431kb board to connect an external gain circuit and use standlone mode. Can I use it after downloading my MXsoftware generate code?I set the OPAMP1_P (PA7) input to 2.5V (DC power supply),OPAMP1_M (PA3) input to 1Vpp sine wave,plus 15K ohm R1, 33K ohm R2,OPAMP1_P (PA7) output should be 5.8V~10.2V , is this correct? Because the output waveform cannot be changed according to the DC power supply, the gain is always 5.Have I not enabled the OPA function? Thank you very much!
i need a ioc file for properly pinging ethernet code with udp protocol on stm32h743 and cubemx 6.10.0 and firmware version 1.10 . thanks .....
Hello, when using CubeMX + STM32WB + BLE, I noticed that if the BLE feature is enabled in CubeMX, a file called freertos_port.c is created in the project. This file includes the functions void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime) and void vPortSetupTimerInterrupt(void). Unfortunately, these functions are not marked as WEAK, which is a pity because after each new code generation in CubeMX, we have to manually add WEAK. There is also no option to add anything via USER CODE START. Would it be possible to fix this? Thank you.
Posted on April 22, 2016 at 18:51Hello, i am new to HAL Libraries. i am learning to work with CAN BUS using HAL Libraries. Can any one please post an example of STM32F CAN BUS using HAL Libraries.as it will help to have an idea how should we program STM32 boards. Thanks in advance. #stm32 #stm32 #hal #hal #can #can #cubemx #cubemx #!stm32f4
Hi, how long do you recommend that we keep our development project's in-sync with the IOC file used to generate them? Setup:MyNewDemo.ioc is used to create a demo monitoring the UART that responds to to toggle requests for its GPIO Scenario #1:Peripheral Updates - a month down later the uart baud rate needs updated to a new valueScenario #2:Peripheral Additions - next year a watchdog is added for safetyScenario #3:Software Additions - eventually, after the demo is established our team decides to add CanOpen to this demoScenario #3:Project Updates - e.g. Trace and Debug, where the project's Debug interface is changed Challenge:I typically use the IOC for project creation and then retire itThere have been requests in my team to 'keep the IOC live'; through the development stages and work Question:What is ST's lifetime for IOC file's in new project development?
Hi Everyone,I cannot choose the speed of the Eth. Pls see the pisture below. The version of the STM32CUBEMX that I downloaded is the latest.Best regards,Jason Pls see the picture.Best regards,Jason
Hello,When generating a CMake project with STM32CubeMX, it generate a library stm32cubemx defined as an interface.I created a libPWM. To have all the compile/CPU/drivers hal informations, my libPWM must be linked to the stm32cubemx.To avoid error, in my lib I add compile option such as -Wconversion and -Werror. So in my libPWM CMakeLists.txt I have:target_link_libraries( libPWMPRIVATEstm32cubemx)target_compile_option( libPWM PRIVATE-Wconversion-Werror)The problem is that, as the stm32cubemx is defined as an interface, when compiling the libPWM, it try to generate the stm32cubemx with the libPWM compile options. And as it is not perfect with conversion and other warning, it generate errors.So how can I add my own library with its own compile option, linked to the stm32cubemx, without error.Thank you for your help
Posted on June 14, 2018 at 17:59Hi!I have a project based on STM32. The project can be configured to run on several STM32 boards.Each board configuration is represented by the `.ioc` file created by CubeMX.I want to have a CI (Continuous Integration) setup that will compile the project for all supported boards.In order to do this I created a Docker image with Java, STM32CubeMX and all the necessary toolchain.Then I wrote a Cube command line script that generates the code given a `.ioc` file as an input.I invoke this script as part of a Makefile using a line similar to this:java -jar STM32CubeMX -q my_scriptSince I passed the `-q` flag, I expected that no GUI will be presented.The docker container crashes executing this line, since it does not have a display capabilities requested by CubeMX, even if it is not going to display anything.I tried doing this on an actual machine without docker, but then sometimes I would get a popup window during the generation process that r
When I enabled SNTP I got an error message that basically said there were not enough timers. When I disabled it, the error went away. I had to add LWIP_SNTP to the define for LWIP_NUM_SYS_TIMEOUT_INTERNAL in opt.h. However, every time I Generate Code, that disappears. It appears to be a bug in CubeMX. Am I right? Can it get fixed?
I tried two aproaches to start a new project:Using STM32CubeIDE only, using "Device Configuration Tool"Using STM32CubeMX and open it in STM32CubeIDEThere are a lot of things that can not be choosen in STM32CubeIDE Device Configuration Tool, so options and checkboxes remain grayed out.Under Project Manager "Gnerate Under Root" acn't be deselected.As a result, I can't deselect "Generate Under Root".In "Code Generator" I selected Pair of .c/.h files for peripherals, but they are are not generated, instead everyting is put in the main.c file.When stating with STM32CubeMX, and importing from an STM32CubeMX generated code, things are fine, just the way I want it.Is "Device Configuration Tool" a limited version of STM32CubeMX?Or am I doing something wrong?EDIT, Solved, right-clicking the ioc file in the project tree, and selecting "Generate code" solved it.It told me so in the project tree right after the ioc file: "[Code Generation is required]"Sorry for bothering.One project generated by ST
As can be seen from screenshots, cubemx displays the space as "ft" and the whole interface is hard to read. Version v6.11.1 and v6.9.0 have this issue and v6.5.0 does not. This issue is only on Linux(fedora 40). All those three versions work very well on Windows. Thanks
im trying to interface STM32H743ZI with FT2232 USB MINI MODULE .1--> anybody did this type of task ,please share me the link of your project .(especially i need to know names of the pins to be connected each between ) .2--> i found some similar pins in my board and mini module .. but i didnt find 3 pins in FT2232 which are available in my board. that pins are 1 . DIR , 2. STP , 3. NXT. so if anybody knows about it please let me know the pin names to be connect with the FT2232 (above 3 pins with FT2232) .
Hello everyone,I have a question about the STM32H5 modules. I can't find the integrated FATFS in the list of middleware provided by ST. Is it complicated to integrate FATFS by myself, or should I use the middleware provided by ST?I am using STM32CubeMX for my project, and I've noticed that the FATFS middleware option is available for other STM32 families but not for the STM32H5. If I need to integrate FATFS manually, what steps should I follow? Are there any specific configurations or additional libraries required to ensure compatibility with the STM32H5?Additionally, any advice on best practices for setting up the file system, optimizing performance, or troubleshooting common issues would be greatly appreciated.
Hi, all I am using NUCLEO-U575ZI-Q.I have the same problem with this post.https://community.st.com/t5/stm32cubemx-mcus/how-to-configure-filex-using-cubemx/m-p/590201#M25964Now, I upgraded my CubeMx from 6.10.0 to 6.11.1, CubeIDE's version is 1.14.0.I still have problem to open the media. Do you have a sample code of FileX and threadX to test?ps: I am sure it is not hardware issue, as it can run Fx_File_Edit_Standalone (only FileX, no threadX) to create file sucessfully.Thanks in advance.Victor
I have an existing STM32L5 project. I updated to the latest IDE 1.15 which includes CubeMX 6.11. Opening the project I clicked the migrate option to migrate the workspace and MX to match up with the tools.I added as pair of precision external crystals (16.0 Mhz and 32.768 kHz) to my design. I edited the .IOC to enable those 2 external clocks and modified my clock configuration accordingly.When I click Generate Code, a dialog box pops up for a second and disappears. No code is generated.What's wrong? How can I debug this?The change seemed too simple to fail... but again, the tech proves me wrong!
Hello Team,I have created .ioc project for STM32H735, where I am doing below things,1. Generating timer delay for 1mS via TIM3, in interrupt of 1ms I am toggling the GPIO, below are configurations, 2. NVIC setting for TIM3 interrupt are as fallows, 3. Cortex M7 configurations are as fallows, With this configuration I am not getting output i.e. GPIO is not toggling after 1mS. Request you please look into this where I am missing confutations. If possible, please provide same project with .ioc. Thanks & regards,Sachin N
I'm currently configuring a USB Host for HID in CubeMX. Everything seems clear, but I don't know how to configure the Drive_VBUS_FS option.On my board, I decided to provide 5V to VBUS directly (with ESD and overcurrent protection), but without involving the STM32. This makes me wonder if VBUS sensing is possible at all?And for the Drive_VBUS_FS, I don't want to drive VBUS, but there is no such option available except for keeping the selection at Undefined, which seems to be an invalid state.So how do I configure this properly with my board layout, or is the layout not correct?
The support of CPP architectures in Cube32 is limited. While it would be nice if Cube32MX actually had CPP libraries, that's a long step.It's very possible, however, to integrate a C++ layer on top of the existing code, where C++ routines call C routines.However the process is limited by one feature in Cube32MX, and that is the dependence on main.c. How about a very small rewrite so that once there *is* a main.cpp, Cube32MX can make changes to it. Shouldn't be hard to do. Change main.c if it exists in the project, if it doesn't, then look for main.cpp and change it.This will stop errors caused by forgetting to rename main.cpp back to main.c so that adjustments can be made, and then back from c to cpp.
Hello,This question has been asked several times but I have to raise it again since no solid answer so far and I am stuck!My configurations:stm32h745ZI-Q Nucleo-144 board. CubeMx ver5.6.1CubeIDE ver1.4.1lwip 2.1.2 with mqtt clientfreeRTOS 10.2.1Why in cubeMX, even I selected using FREERTOS for both core, the "WITH_RTOS (Use FREERTOS ** CubeMX specific **)" in lwip -> tab "General Settings -> RTOS dependency" is greyed out and the default is Disabled?Also I cannot change "NO_SYS (OS Awarness)" from "OS not used" to something like "OS used" in tab "Key Optioins -> Infrastructure - OS awareness option"?Basically I want to use FREERTOS with lwip and mqtt but the cubeMX won't allow me to do that?Is this a bug or cubeMX hasn't implemented generating the code with NO_SYS = 0 yet?I can possibly tweak the lwip_conf.ftl file to just make it work but I am not sure that's adequate? Can experts or STM developers point out a solution please?Thanks,Jim
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.