Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi, This is my setup:MCU: STM32U575OGYSTM32CubeIDE: 1.9.0STM32CubeMX: 6.5.0-RC4 When setting up the ADC1 channels as Differential using the STM32CubeMX, it selects the GPIO pins that doesn't match with the GPIO mapping of the ADC1 in the datasheet. I manually set the channels and test the pins and datasheet is correct about the pins. So this seems like a bug in CubeMX. I am not sure if it has been fixed in updates or not.Example: Setting up "ADC1- IN16 Differential" in CubeMX shows it is connected to "ADC1_IN15" and "ADC1_IN16". However; based on datasheet it is connected to ADC1_IN16 and ADC1_IN17. screenshots below. The problem with this issue is that CubeMX will lock up the wrong GPIO and won't let use it as another feature. In example below I cannot use the PB0 as anything else while it is not used.
Hi,I am using STM32F103C8(blue_pill) MCU to write & read data to AT24mC02 eeprom.I selected default I2C pin PB6 & PB7 for communication using stmcubeMX & true studio,but it is not working.To cross verify whether my hardware circuit is working fine i tested with arduino IDE with same pin PB6 & PB7 selected for communication,it is working well.so the code generated from stmcubemx is not working, i checked SCLK pin in oscilloscope there is no clock generated.But when i changed pins to PB8 & PB9 it is working well with stmcubemx.what is the problem with PB6 & PB7 pin with respect to code generated from cubeMX ?Thanks
Updated CubeMx to latest version (of today) April 12th 2024Can't enable I2C'sAvailable only if Flash IP is activatedHow to enable (flash IP) ?
Hi,I'm using CubeMX 6.11.0 (STM32L4 package version 1.18.0) to generate code for the STM32L412 with LL drivers.My configuration enables the VREFINT and TEMP channels for ADC1.The generated function MX_ADC1_Init() contains the line LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_CHANNEL_VREFINT|LL_ADC_CHANNEL_TEMPSENSOR); which should actually be LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_PATH_INTERNAL_VREFINT | LL_ADC_PATH_INTERNAL_TEMPSENSOR); This prevents correct temperature channel measurements.
Hi I'm trying to create a project for my H735G DK manually because I'm trying to learn about how its done, but each time i finish configuring the .ioc file i get this error I will pass my .ioc file if anyone wants to check it but its been copied from the .ioc file that touchGFX creates for this MCU, because my goal is to learn about how the link between touchGFX and a cubeMX project work.The real problem is that, even though the project that touchGFX creates builds, just for testing I copied the .ioc file to create a new project (not manually, but with cubeMX feature shown below) But I am still getting the overflowed error, and this should be exactly the same project as the original .ioc creates right? So why does just one build. Can anyone tell me what is happening, tbh I'm freaking out a little bit. Ty in advance
Dear ST Partners: I try to install a new version of 6.11.0, but fail for a "path not found" problem. The attach is the error picture.It seems that "STM32CubeMX\Uninstaller\windowscache_clear10.bat" can't find the following cmd's path. echo at Install and Uninstall for Windows Vista/7/8echo Refreshing windows icon cacheie4uinit.exe -Showecho Refresh done_________________________________
As the title say. The Board is simply consist of STM32H7A3 and USB3343. It mainly perform USB communication with USB Host. I used CubeMx to generate the Custom HID code and done some necessary change such as I changed the end point type to bulk, etc. But it always work in Full speed mode despite of trying a lot of configurations and parameters.Could any one know the issue? please give me some advice. thanks a lot!
I chose STM32H753IIT6 MCU for my project. I had set the clock prescaler of ADC to "Asynchronous clock mode divided by 1", and the ADC clock source is PLL2P, 36MHz.The code was generated successfully. However, I found that the sampling rate is half of the theoretical value.I migrate the same code to one STM32H743 developing board, all settings are the same with the STM32H753 project. Everything works properly.Then I set the frequency of PLL2P to 72MHz, CubeMX set the prscaler to "Asynchronous clock mode divided by 2" automatically. I changed it back to "ADC_CLOCK_ASYNC_DIV1" manually in my code. ADC still works fine and the sampling rate is correct then.Is this a bug?My CubeMX version: 6.4HAL version: 1.9.1
Hi, We have a product that is using STM32F429BIT6 processor. We've been using "CubeMX 6.2.0" and "STM32Cube_FW_F4_V1.26.1". And everything has been working fine so far. Recently, we've attempted to upgrade to CubeMX 6.11.0 and the latest FW 1.28.0 and ran into some problems.Attached host_cca_app_6_2.ioc that was generated from CubeMX 6.2.0. And host_cca_app_6_11.ioc was generated from CubeMX 6.11.0 via the "Migrate" option.There are a few issues that we noticed after the "Migrate":1. PA15 disappears after "Migrate". "Mcu.Pin111" was assigned with PA15 in 6.2.0 but now is assigned with PC10. And all the pins after get pushed off by one pin if you compare line 219 to line 262. One question is, why would upgrading change the physical pin assignments. 2. "Mcu.PinsNb=150" in the upgraded version. "Mcu.PinsNb=151" in the old version.3. All the NVIC.xxx have one extra boolean variable settings at the end, what is that?4. JTAG_4_pins is disabled (grey'ed out) in the upgraded ver
I want my accelerometer to read data within the range of 4g . i don't know where i'm getting wrong .
Hello,My problem is now resolved but I think it can be useful to keep a trace of it for other people !I configured a project with STM32CubeMX, which uses : TouchGFX + LTDC + DMA2D with a custom 800x480 TFT Display.I was able to get an image on the display, but the text looked ugly, as if the resolution was reduced, the images also have a poor quality : they were not sharp, and some pixels had an incorrect value (sometimes there were white instead of white or black instead of deep blue...). Generally, the sames pixels were affected, but some of the altered pixels changed after a reboot of the system. On a steady screen, the wrong pixels were quite constants, but some flickering could be observed when looking attentively.After wondering if the problem was due to alpha layer settings, LTDC or DMA2D configuration, I took an oscilloscope to observe the waveforms of the signals, and I saw that the DCLK signal amplitude was very little, less than 1 V. I checked the GPIO speed setting in
I am unable to download cube mx when clicked on get software I am logged in my account as well
I'm using CubeMX v6.11.0 to generate code for STM32G474.When I change TIM20's "Request Number" from the default 1 to 4 and press "CTRL + S" to save or click "GENERATE CODE", the number always changes back to 1 automatically.
Hello everyone, I am using SPI to communicate two Nucleo Boards (a NUCLEO-L432KC and a NUCLEO-F411RE one), and i found out a weird behavior. The idea was to perform a transaction Master -> Slave in order to select a "register" to read. Once the Slave has received the "register", the Master request the information and the Slave shall send the information to the master. In order to perform this, interruptios were used in the slave side. The "register" logic is still not present, but the concept is the aforementioned one.The Master code is as follows (only SPI-Related lines): HAL_SPI_Transmit(&hspi2, txbuff, 2, 1000); HAL_Delay(1); /* DELAY BETWEEN TRANSACTIONS */ HAL_SPI_Receive(&hspi2, rxbuff, 12, 1000); And for the slave, following code is used: /* USER CODE BEGIN 2 */ HAL_SPI_Receive_IT(&hspi1, buffreg, BUFFREG); /* USER CODE END 2 */ SPI Interruption handlers are as follows: void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi) {
Hello,has someone created a complete definition of the "Arduino Portenta H7" board including the clocks in STM32CubeMX?I would like to use this board to develop and test some parts of projects.The creation of the IOC file is a lot of work that I want to save myself as much as possible.Thanks in advance,Michael
I updated STM32CubeMX 6.9 to 6.11.0 and migrated my previously configured project (for stm32h735) to new version and now I have a problem that everytime I re-generate the code the compiler complains about missing syscalls.c, sysmem.c files. This files doesn't exist anywhere in the project neither CubeMX folder. The code generator always places this files in generated Makefile at the end of C_SOURCES list and I have to manually delete this 2 lines. Is there some option to not include this non-existing files in Makefile? Or how could I generate them again?the Makefile:# C sourcesC_SOURCES = \Core/Src/main.c \...user c files...Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.c \Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc_ex.c \..HAL files...Core/Src/sysmem.c \Core/Src/syscalls.c# ASM sourcesASM_SOURCES = \startup_stm32h735xx.s...
Hi,I am using STM32CubeMX version 6.11.0 .I want to test the "IAP_main" example for the STM32U575I-EV.I start the project as follows : Then when I try to Generate Code for the STM32CubeIDE in CubeMX the following error occurs: The code gets generated and I can open it in STM32CubeIDE but it doesn't build properly: The build errors says that the MX functions called in the main file are not linked and there is no reference to them.I have attached the build log where the errors are displayed.The project is as it is generated by CubeMX with no modification made. What may be happening here ? Some CubeMX libraries that for the STM32U5 do not work well ?If I launch the same example for the STM32H573I-DK it doesn't have any problem and it builds as expected.
Hello,I'm encountering an issue with STM32CubeMX while configuring the STM32U585QII6Q microcontroller. Specifically, when attempting to configure PD11 to ADC4_IN15, I find that the ADC4 channels are grayed out or inactive.While using STM32CubeMX, I can assign PD11 as ADC4_IN15 in the pinout view, but it remains orange (not configured). However, in the "ADC4 Mode and Configuration" pane, I am unable to configure it.For the STM32U585QII6 variant, I can configure ADC4_IN15 without any issues. However, in the case of STM32U585QII6Q, I encounter this problem.I have reviewed the datasheet, but I couldn't find any reference to different ADC settings between these variants.Could it be that the Q variant does not support ADC4 channel 15, or is this possibly an issue with STM32CubeMX?Thank you.Ari
Hi I'm trying to run SPI_FullDuplex_ComIT_Master and Slave examples that use SPI1 on NUCLEO-H563ZI boards.The pin connections in the read me seems to be inaccurate i.e1. There is no PA5 on 10th pin of CN6 on the Nucleo but it is there on CN7.2. There is no PA7 on pin 15 of CN5 but it is there on CN12.Layout Reference: hereSo, I referred to NUCLEO-H743ZI and used the SPI1 pins and tried to use these connections on my NUCLEO-H563ZI and the example started working.So, is the example not updated or is the layout inaccurate?Can anyone provide a pin diagram like NUCLEO-H743ZI for NUCLEO-H563ZI too?
Hi,I use several LD files in the project, depending on the selected build. After updating CubeMX (6.11.0) and CubeIDE (1.15.0), the default LD file appears in the project every time I generate code from CubeMX. Worst of all, all links to my LD files are removed. Each time I have to laboriously edit the project settings. Nightmare. Do you have that too?Regards.
Hi,I am following a course (for a different STM board) to use the LCD touchscreen of the STM32H750B-DK board. In the course, they have added a BSP folder to their project which includes files such as are seen here: STMicroelectronics/stm32h750b-dk-bsp: Provides the STM32H750B-DK board driver, part of the STM32Cube BSP Component for STM32H7 series. (github.com).When I tried to add these files and the required components folders to my BSP folder I realized that the conf.h files in the components folders have been replaced with conf_template.h files (probably so that we would set up our own settings for those components). I am thereby wondering if there is a way for me to set up and generate all of these BSP files and folders through the GUI in the .ioc file of my project.Thank you in advance.
I'm using the STM32H573I-DK and it works great. We are running the Fx_uSD_File_Edit example. We are creating a product that leverages a lot of the dev kit design, but we want to use eMMC instead of SD card. I took the Fx_uSD_File_Edit example ioc and altered SDMMC1 to be "MMC 4 bit wide bus". But now FileX does not let me choose "MMC interface". I tried quitting out of STM32CubeMX and restarting it. No help. I disabled SDMM1 and re-enabled "MMC 4 bit wide bus". FileX MMC interface is still greyed out. What can I do to change to MMC for FileX? I've attached my .ioc BTW, I have another unrelated STM32U5 project and I can choose FileX MMC interface there. Why not in STM32H5?
Encountered an annoying project generation bug recently. By default CubeMX adds to keil project a hwhole bunch of files:Even if you don't need any of the LL. So, when you tick "Enable Full Assert" checkbox, it causes an error, because no "stm32_assert.h" file was created. Probably because cube unnecesarily adds LL lib, but never generates it's templates. I'd suggest to look into it's pack xml or whenever list of necessary files is stored
Hello, When i configure a project with CubeMX and TouchGFX Generator stuff and save this,after a new start of CubeMX and opening the .ioc file again i get this error message:And my TouchGFX Generator Configuration is lost. The other configuration is still there.Now, under "Software Packs Component Selector" the Generator Application is "Not selected" although i selected the Generator Application in the previous session:After selecting the Generator and Clicking OK button, the TouchGFX Generator is back, but not what i have configured there in the previous session.Does someone know why this happens? I use:Debian Linux 11.9CubeMX 6.10.0X-CUBE-TOUCHGFX 4.23.0 Thank you.
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.