Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Here is a noodlescratcher for you all.Take a nucleo-334R8 board. Start a new project with CubeMx. Set it up to be HSE bypass, into the PLL with x9. Just to make it a bit more fun, set the bypassed clocksource to be 7 mhz. Add the MCO and divide it down so you can inspect it with whatever tool you have. Make sure that clock security is NOT enabled. Now start and run your code.Strangly, the board will work fine even after SystemClock_Config(). When you inspect the MCO at PA8, you will find ~72 mhz there.Surly it must be the HSI that has "contaminated" the pll... right?Is there any way to circument this? I tried to stop the HSI with LL_RCC_HSI_Disable(); and the MCO still kept throwing out a 72 mhz clock.RegardsMartin
As mentioned above I can't connect as the watchdog is continuously going off. I used the STM32CubeMx to enable the IWDG and it created the s/w load which enables the IWDG but doesn't refresh it. I know how to fix it in the s/w but my debugger under TrueStudio won't connect to load the new image. My board is continuously resetting.Have I bricked my board or is there some s/w tool I can use to erase the board? Remember I am running on linux.Thanks in Advance for any help.Cheers!!
STM32CubeIDE Version: Version: 1.3.0STM32Cube Version: Version: 5.6.0-RC6 Build: 20200218-1639 (UTC)Fimrware Package: STM32Cube FW_G0 V1.3.0When using LL Driver (with VREFINT sampling)It generates code as follows: LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_CHANNEL_VREFINT );Which should be LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_PATH_INTERNAL_VREFINT);
To reproduce: generate a project using ADC3 with the LL driver on STM32CubeMX 6.0.1.Issue: regardless of which ADC is used, this shows up in MX_ADCx_Init(): /* Disable ADC deep power down (enabled by default after reset state) */ LL_ADC_DisableDeepPowerDown(ADC1); /* Enable ADC internal voltage regulator */ LL_ADC_EnableInternalRegulator(ADC1);The issue appears to stem from db/mcu/config/llConfig/ADC-STM32G4xx_LLConfigs.xml: <CallLibMethod Name="" Type="HardCode"> <HardCode Text=" #n#t/* Disable ADC deep power down (enabled by default after reset state) */ #n#tLL_ADC_DisableDeepPowerDown(ADC1); #n#t/* Enable ADC internal voltage regulator */ #n#tLL_ADC_EnableInternalRegulator(ADC1); #n#t/* Delay for ADC internal voltage regulator stabilization. */ #n#t/* Compute number of CPU cycles to wait for, from delay in us. */ #n#t/* Note: Variable divided by 2 to compensate partially */ #n#t/* CPU processing cycles (depends on compilation optimization). */ #n#t/* Note:
HiI have to migrate a project from cubemx 1.3.2 ioc to 1.8.0 ioc ...In the generated systemclock_config there is a lineHAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_1);if so the i2c2 do not work but if modifiedHAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSI, RCC_MCODIV_4);then it do workWhere to set the RCC_MCODIV_X ... here where i put the arrow i can just put it on and offPlease help ...i do not understand ;o)
Hello,I'm following this tutorial to "play" with ADC.https://www.youtube.com/watch?v=pLsAhJ8umJk&list=PLnMKNibPkDnFCosVVv98U5dCulE6T3Iy8&index=10At the end (27:30), it is using a LL function for the ADC driver, while during all the video it is using the HAL driver. There is no problem because both stm32g0xx_hal_adc.h/c and stm32g0xx_ll_adc.h/c files are included in the projet.In my project (i'm using L073RZ mcu) I have to select HAL or LL for the ADC driver in the ProjectManager->Advanced Settings of STM32CubeMX. So I cannot select both, and only HAL or LL files are included in STM32CubeIDE project.As a consequence I cannot use the __LL_ADC_CALC_TEMPERATURE macro.So how to add both HAL and LL files in the project?I'm working with STMCubeIDE 1.4.0.Thank you
I downloaded en.x-cube-aws_v2-0-0.zipopen STM32CumeMXgoto "Manage Embedded Software packagesselect "From Local..."The message says that the ZIP does not contain information it needs to install.
Hi.I am working on microcontroller STM32L072KZ and STM32CubeMX.I am trying to set a value of one pin depending on comparator value. I do not know how to do it in STM32CubeMX.I want to do it using only hardware, not software.Can anyone help me?
The project has not changed anything. If you comment __MPU_PRESENT in the file ", then all OK. Where in CubeMX you can configure options MPU (enable, disable)?
I tried install different Cube version ,include latest version on 2 windows computers . both them are disabled HSE configuation in clock configuation dialog.Since HSE disabled and USB clock also inavliable.Who can tell me why and how solve this issue. ( Manually coding please skip, I mean this tool, STMicoelectronics launched tool)
I have been analyzing the flaws in the implementation of the STM32 CUBEMx HAL implementation of FreeRTOS's tickless implementation. In its currently selectable configurations FreeRTOS tickless simply doesn't work as intended -- period. My test case uses an STM32L476 with CUBEmx 5.1 eclipse plug-in to both the Atollic TrueStudio Ver 9.3 and System Workbench coupled with both STM32Cube FW_L4 V1.13.0 and STM32Cube FW_L4 V1.14.0. Debugging is via an STLink V2 pod. Additionally I use an inexpensive digital logic analyzer to monitoring a number of available gpio ouput pins to be able to monitor wake sleep tick processing in real time in various parts of the code base.I have determined that: When FreeRtos is enabled with the cube default set to SysTick management it increments the normal tick cell used by HAL_IncTick() and HAL_GetTick().When FreeRtos is configured for Tickless mode, it (incorrectly) maintains a second 32 bit tick counter. This it does correctly EXCEPT that now there are two t
I don't know where the "HAL_MDMA_Start (" function is located.In "stm32h7xx_hal_mdma.c" we find references to "HAL_MDMA_Start (", but not the code. On the other hand there is the code of "HAL_MDMA_Start_IT (".I am using STM32CubeMX / IDE to generate the build files (STM32Cube_FW_H7_V1.8.0). The processor is an STM32H745ZITx Best regardsJean-Louis
I am just trying to use the STM32CubeMX tool.The application needs two USARTs. One for communication with external processor. This will be an RS485 interface. The PCB will have hardware for RS485 transceiver, mux/demux for directionality of transmission. Due to this, I am configuring this USART in asynchronous mode (no flow control for RS232 or RS485). This USART1 will also be used as a bootloader. Please confirm if this configuration will work. For the NVIC settings, I enabled the USART1 global interrupt. Will this interrupt trigger both on transmit and receive bytes?I also need the serial wire debug capability. I want to configure a separate USART (USART2)for this. Do I configure this the same way as USART1? Initially I will be using the ST-Link debugging tool, later maybe the JLink SWD. I will disable the interrupt for this. Please confirm if correct.Thanks,Priya
..
STM32H750 STM32CubeMX 6.0.1STM32H FW 1.8use LL driver, but the EXIT is not working.use HAL driver , works oktest on PC8 as EXITmodify nothing, the code is gen by CubeMX
Let me start off with saying I am new to STM. I am a recent convert from NXP. I used the very cool STM32CubeMX 6.0.1 through the Keil IDE to generate what was mostly needed for my STM32L031K6Tx application. I/O and timers seem to be working fine but I hit a road block when I went to send a few bytes using HAL_UART_Transmit_DMA. I attached the cube generated file STCubeGenerated and the only src file I changed main.c.// Here is the problem bit - HAL_UART_Init(&huart2); // added as a test HAL_UART_Transmit_DMA(&huart2, "buffer_tx", 5); // send "READY" while (HAL_UART_GetState(&huart2) != HAL_UART_STATE_READY) { // Return value is HAL_UART_STATE_BUSY_TX = 0x21 forever state = HAL_UART_GetState(&huart2) ; // stuck in this loop forever }
Hello, i cannot change Application Structure to Basic in STM32CubeIDE V 1.4.2
I'm using a 32H743 with CubeMx and Keil. I want to do DMA on a single ADC channel. In Cube I set up the ADC in Continuous Conversion Mode, Regular Conversion launched by software, and set the Conversion Data Management to DMA Circular Mode., and set DMA1 Stream 0 in circular mode. In Keil, I set up the buffer and call HAL_ADC_Start_DMA and also have the HAL_ADC_ConvHalfCpltCallback and HAL_ADC_ConvCpltCallback functions added. However, neither callback is reached. It appears the ADC works at least once as I get a correct value in the ADC data register. However, the DMA1 S0CR register doesn't have the EN bit set for some reason. If I force it on manually it gets reset somewhere in HAL_ADC_Start_DMA.I can do this first time using the STM32F413 so I think my basic procedure is correct, there's some difference between the F413 and H743 that's messing me up. Any ideas?Thanks
Hello,I need to find out the status of the eth line, whether the eth cable is connected or disconnected.I created a simple project using STM32Cube MX v.1.4.2 with LwIP v. 2.1.2.Procesor STM32F407ZET, PHY DP83848 (RMII)#define WITH_RTOS 0#define LWIP_NETIF_STATUS_CALLBACK 1#define LWIP_NETIF_LINK_CALLBACK 1DHCP disableI added to main.c function: void ethernetif_notify_conn_changed(struct netif *netif)I expected this function to be called when the line status changed. But it is not so.What is wrong ?Peter
I have created a basic project using STM32Cube IDE to turn on LED ON and OFF.Successfully compiled.But when I debug the project, the processor jumps to the Hard Fault Handler.So I checked the Fault Analyzer window, it shows that BUS,Memory or Usage Fault forced and PC points to the this function "prvPortStartFirstTask".I am not sure that what kind of problem has occurred.
I am working on a USB MSC device application that exposes the content of an sd card with SPI communication. The application works fine with a Sandisk Class 4 32Go card But does not work with class 10 16Go sd cards. I've tried with two cards I've tried changing the SPI communication speed, the sector sizes ... but nothing works I have another application where these cards work fine with FATFS.I think the problem is with usb enumuration, but I don't know what to change.Any help ?
I do not quite know well about the details of the peripherals that I have assigned pins for them. I need to quickly validate my assignment to ensure the hardware design is suitable without any conflict. I can click the pins in CubeMX and assign pins according to my hardware design. The question is how to check the assigment with it.
There appears to be a bug in STM32CubeMX where some settings are not loaded when reopening the app and project, even though they were previously successfully written to the .ioc file. Default settings are always used instead, and then re-saving the project (without making any changes yourself) will write these undesired settings back to the .ioc file. These settings are:Project Manager > Project > Firmware Location (custom path reset back to default path)Project Manager > Project > Add library files as reference (reset back to copy)Steps to reproduce:Create a symlink to `STM32Cube/Repository` which is relative to the intended project workspace. This enables sharing projects among multiple developers, since CubeMX uses a relative path to the FW repo.ln -s ~/STM32Cube/Repository ~/projects/demo/cube_repoLaunch CubeMX, and create a new project with the following settings:Save and close CubeMX. This produces a .ioc file.Track the .ioc file with version control (this gives us mo
Hi, I recently migrated from CMSIS_V1 to CMSIS_V2 ( in STM32Cube_FW_H7_V1.7.0). That came with a significant increase in the number of defined thread priorities ~ around 56 priorities. However, CubeMX sets the FreeRTOS MAX_PRIORITIES parameter to 32. The setting is also disabled if CMSIS_V2 is enabled so it can't be changed. Even the CubeMX comment says it should be set to 56.The consequence of this defect is that setting any thread priority above 32 they will all be truncated to same setting of (32 -1). To workaround the issue, I undefined configMAX_PRIORITIES and reset it to 56.Can ST please confirm this is a defect and fix it if required. Or does anyone know a better way to fix it?CheersDavid
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.