Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I set the parameter of TIM5 of my MCU on CubeMX,the frequency of the clock is 72 MHz,PSC is 7199,ARR is 199,the information about my settings is below: TIM5 is used to output 4 channels of PWM to control four SG90 servos,TIM1 toTIM4 is used to control four Ultrasonic ranging module,I use this sentence to initialize four servos: I think these servos should turn to 0 degree,but in fact it turn to 90 degrees and stuck there,I don't know the reason why it happened.I hope someone can heip me solve this problem,it has been made me confused for several days
In version STM32U5 1.5.0 , HAL_PWREx_EnableVddA() does not exist in stm32u5xx_hal_mps.cbut it was on 1.4.0
Hi,In the project that I saved-as (to rename) the DEBUG was set to JTAG (5 pins).After updating to STM32CubeMX version 6.11.0 I observe the JTAG (5 pin) option is unavailable.Below change (i.e. switched DEBUG to JTAG (4 pins)) was made by software automatically while saving the file.Regards,Rajeev
I've found a bug with how STM32CubeMX generates the USART3_4_LPUART1_IRQHandler function when using TRACER_EMB and USART4 on an STM32G071.When just USART4 and its NVIC interrupt is enabled, the function is generated as follows:void USART3_4_LPUART1_IRQHandler(void){/* USER CODE BEGIN USART3_4_LPUART1_IRQn 0 *//* USER CODE END USART3_4_LPUART1_IRQn 0 */HAL_UART_IRQHandler(&huart4); /* USER CODE BEGIN USART3_4_LPUART1_IRQn 1 *//* USER CODE END USART3_4_LPUART1_IRQn 1 */}But when both TRACER_EMB with LPUART1 and UART4, with their NVIC interrupts enabled the following is generated.void USART3_4_LPUART1_IRQHandler(void){/* USER CODE BEGIN USART3_4_LPUART1_IRQn 0 *//* USER CODE END USART3_4_LPUART1_IRQn 0 */TRACER_EMB_IRQHandlerUSART();/* USER CODE BEGIN USART3_4_LPUART1_IRQn 1 *//* USER CODE END USART3_4_LPUART1_IRQn 1 */}When an interrupt for UART4 is raised, it is not being handled which causes USART3_4_LPUART1_IRQHandler to be continually called.To reproduce, my setup isSTM32CubeIDE
Posted on October 31, 2016 at 04:19I use CubeMX 4.17, F4xx firmware 1.13.1, created an automatically generated timer based hal tick funtion. I tested timer 6 and timer 10. BOTH results in tick running at 2000Hz(0.5ms per tick), but I think the correct state should be 1000Hz(1ms per tick)? #timer #cubemx #f407
After updating to versions described in title, STM32H750 ADC3 has only 4 input options. Temperature, VBat and Vref no longer available for selection
我有一个问题。我写了一个私人驱动程序库。如何让它在每次生成项目时自动包含写入的 .c.h 文件?每次生成项目时打开项目目录并粘贴自己的 .c.h 文件太麻烦了。如果有办法,请与我联系,非常感谢!:grinning_face:
Hello,I am currently trying to program a NUCLEO-F446ZE with an X-NUCLEO-GFX02Z1 display expansion board. From the data brief, I have confirmed the compatibility of the display with my specific board, however, when attempting to use CubeMX with X-CUBE-DISPLAY to configure it, I have run into a dead end and cannot seem to configure it at all. Upon looking at the X-CUBE-DISPLAY documentation in the STM32Cube repository, I find that the NUCLEO-F4xx is not on the list of supported boards. Is there simply no way for me to use CubeMX to configure the display with my board? If this is the case, can anyone point me in the right direction on where to start?Any help is appreciated in this matter, attached below is the data brief list showing my board, followed by the documentation list of supported boards.
Hello All,I am using the STM32L011K4 to control the PWM duty cycle through the use of the DMA.I have gone through my register initialization to ensure that the registers are being configured correctly and I have gone through and used the solution from this post: https://community.st.com/t5/stm32cubemx-mcus/ll-dma-burst-to-a-timer-not-working-on-stm32h7/m-p/137972 to initialize my DMA first, despite this the system is not working.I have confirmed through the example code section and reading through the reference manual that the steps I am taking are indeed correct and nothing additional needs to happen. I think my mistake is something not configuring correctly despite me verifying the main settings outline the manual are verified and correct. Further, I have verified that if a PWM is initialized the correct signal is being produced on TIM Channel 3, but I am unable to change it.I am currently using the timer 2 burst registers to set the new duty cycles in CCR3. I have attached
Good morning everyone, I was given a STM32F779I-EVAL board as a gift, I am unable to configure all the peripherals installed on the board via CubeMX. For example, I can't turn on the display or configure the ETH port.Where can I find examples to understand how to make the most of this suburb. thank you all
Reproduction steps:Open STM32CubeIDE. “File” menu → “New” → “STM32 Project”.Switch to the “Board Selector”, and pick the NUCLEO-H503RB. Click “Next”.I've successfully reproduced this issue with the NUCLEO-H503RB and NUCLEO-H563ZI. I suspect it applies equally to every board or MCU part with I3C support.Give the project a unique name – I'm using “broken-mx”. Target the C language, an executable binary, and an STM32Cube project.Pick firmware package V1.1.1. Ensure the code generator is configured to “Copy only the necessary library files”. Click “Finish”.This issue can also be reproduced with firmware package V1.1.0. It's an STM32CubeMX problem, not a problem with the firmware package.When asked whether I wanted to “Initialize all peripherals with their default Mode ?”, I picked “Yes”.This issue can also be reproduced without default peripheral initialization. It just requires a couple more clicks as you'll have to acknowledge that the icache is disabled every time you generate code.The
The Ethernet peripheral is missing from the STM32H5 in STM32CubeMX 6.10!It appears if the Nucleo or Discovery kit boards are selected as the starting point for a project, but if the project is started from a device selection the Ethernet peripheral is completely missing.First noticed on STM32H573VI, then checked it is also missing on STM32H563ZI even though this is exactly the same device as used on the Nucleo board!If I create a project using the Nucleo board then edit the .ioc file to changeboard=NUCLEO-H563ZIboardIOC=truetoboard=customthen when I open the project the Ethernet peripheral is there, but the project is based on the device not the Nucleo board!Without this being fixed, STM32CubeMX is useless for our application :(
Hi everyone, im using stm32f746zgt with lan8742a phy. i manage settings on cubemx. when i set speed and duplex with manually like a 100mbps full duplex my system works well. but when i change it to auto negotiation it returns with timeout. It crashes on below lines that are in stm32f7xx_hal_eth.c/* Wait until the auto-negotiation will be completed */ do { HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg); /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > ETH_TIMEOUT_AUTONEGO_COMPLETED) { /* In case of write timeout */ err = ETH_ERROR; /* Config MAC and DMA */ ETH_MACDMAConfig(heth, err); heth->State= HAL_ETH_STATE_READY; /* Process Unlocked */ __HAL_UNLOCK(heth); return HAL_TIMEOUT; } } while (((phyreg & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE));i increased ETH_TIMEOUT_AUTONEGO_COMPLETED time but nothing changed. my switch and computer eth settings are auto. What should i check ?
当我想打开最后一个项目时,软件STM32CUBEMX消息“getIP_Modes_Document内部异常”。 我该怎么办?
The target MCU on the NUCLEO-F446RE board receives its clock input directly from the on-board STLink-V2.1 probe (see clock signal MCO in figure below):That's because the crystal X3 is not soldered on the board by default. So, when I launch a new project in CubeMX for this particular board, I would expect to see this reflected in the clock settings:However, I see the following: That's weird. The default selection is 'Crystal/Ceramic Resonator' while in fact, no high-speed crystal is soldered on the board.Is this an error in CubeMX? If so, then the following .ioc file must be fixed:C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeMX/db/plugins/boardmanager/boards/A42_Nucleo_NUCLEO-F446RE_STM32F446RE_Board_AllConfig.ioc
STM32F407VG: USART2 DMA for TX is working fine, but CubeIDE MX is reporting "no available dma requests for this peripheral" when I try to add DMA for RX.I have DMA set for SPI TX only, and two ADCs, so why would there be a limitation?Can't easily swap to another UART given the IO setup, any ideas would be welcome.
Enabling analog watchdog 1 for ADC3 on a STM32H723 in CubeMX with low threshold 0x8 and high threshold 0x80 generatesLL_ADC_SetAnalogWDThresholds(ADC3, LL_ADC_AWD1, 0x80, 0x8);but the doc comment for LL_ADC_SetAnalogWDThresholds() says regarding the third parameter * @param AWDThresholdsHighLow This parameter can be one of the following values: * @arg @ref LL_ADC_AWD_THRESHOLD_HIGH * @arg @ref LL_ADC_AWD_THRESHOLD_LOWindicating that the correct code to generate would be LL_ADC_SetAnalogWDThresholds(ADC3, LL_ADC_AWD1, LL_ADC_AWD_THRESHOLD_HIGH, 0x80); LL_ADC_SetAnalogWDThresholds(ADC3, LL_ADC_AWD1, LL_ADC_AWD_THRESHOLD_LOW, 0x8);However neither produces the desired result. The code generated by CubeMX sets the lower threshold to 8, whereas the code I assumed to be correct sets it to 0x88. The high threshold is left at the reset value of 0xFFF in both cases.Looking at LL_ADC_SetAnalogWDThresholds() the line MODIFY_REG(*preg, AWDThresholdsHighLow, AWDThresholdValue << ((AWDThr
using STMCubeMx 6.1.2 on a STM32H723The code generator does not generate this line in hal_msp.c / HAL_SPDIFRX_MspInit()GPIO_InitStruct.Alternate = GPIO_AF9_SPDIF;The consequence is that the pin behaves like an output forced to 0 instead of behaving like an input, which obviously prevents SPDIFRX from working.The problem occurs at least for the 2 first SPDIFRX input lines.
Hi Everyone,I have been trying to get SDIO working (4-bit) using STM32CubeMX and a NUCLEO-F401RE dev board. I am using the Adafruit SDIO breakout board here: Adafruit Micro SD SPI or SDIO Card Breakout Board . Unfortunately, no matter what I change in the code or in the CubeMX software I can't even get a single clock pulse or blip on the data lines. The output on my logic analyser has absolutely no activity.I've tried going back to a very basic project and still no luck. My configuration is:*Note: I have a SDIOCLK clock divide factor of 5 (12MHz) currently on the SDIO config page (I have tried 12 as well to bring the SDIO clock down to 6MHz) This is the code where I'm hoping to get some kind of activity, instead it just hangs within the HAL_SD_InitCard function.static void MX_SDIO_SD_Init(void) { /* USER CODE BEGIN SDIO_Init 0 */ /* USER CODE END SDIO_Init 0 */ /* USER CODE BEGIN SDIO_Init 1 */ /* USER CODE END SDIO_Init 1 */ hsd.Instance = SDIO; hsd.Init.ClockEdge =
HelloAccording to RM0444 reference manual - STM32G0x1 advanced Arm®-based 32-bit MCUs, the STM32G0x1 provide the USB 2.0 communication port. The X-NUCLEO-SNK1M1 board connect the D+ and D- to the PA12 and PA11 pins.But:In the CubeMX under PA11 pin are the following possibilities: ADC1_EXTI11, COMP1_OUT, I2C2_SCL, I2S1_MCK, SPI1_MISO, TIM1_BK2, TIM1_CH4, USART1_CTS, USART1_NSS, GPIO_Input, GPIO_Output, GPIO_Analog, GPIO_EXTI11. No mention about USB. As well as for PA12 where are these possibilities: COMP2_OUT, I2C2_SDA, I2S1_SD, I2S_CKIN, SPI1_MOSI, TIM1_ETR, USART1_CK, USART1_DE, USART1_RTS, GPIO_Input, GPIO_Output, GPIO_Analog, GPIO_EXTI12And on the left side under Connectivity category there is again nothing about USB port.Can you help me please?Thank you
I configured the watchdog of ADC using stm32cubemx and found that only watchdog 1 can display channel configuration options. Watchdogs 2 and 3 do not have this option. When generating code, even though 2 and 3 watchdogs are enabled, the code for these two will not be generated. Do anyone know what the reason is? Thanks so much. (I have read two topics about this problem in the community, but they don't tell me why and how to solve.)
I'm curious why CubeMX doesn't properly support CMSIS RTOS2 with RTX5 for the U5 family? When will this be corrected?
Hi,I am new to STM32 and installed the following tools: STM32CubeIDE Version: 1.14.1 Build: 20064_20240111_1413 (UTC)STM32CubeMX Version: 6.10.0-RC9 Build: 20231120-2037 (UTC) I am trying to make an LWIP application work on Nucleo-F767ZI without RTOS, I have worked on this for more than a week and am still struggling at debugging. I wrote a post days ago and didn't receive expected number of suggestions or comments, probably because it takes too much time to work through:https://community.st.com/t5/stm32cubeide-mcus/lwip-raw-api-connection-to-a-server-aborted-after-19-seconds-on/td-p/648420 Last night I read through the following post wrote by @Adam BERLINGER :https://community.st.com/t5/stm32-mcus/how-to-create-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308 This post was wrote for H7 two years ago with earlier versions of CubeMX, I am not sure whether or not it still applies to the problem I am facing with latest version of CubeMX. At least when I
I have a project created with CubeMX v6.8.0 and HAL L4 v1.17.2. Using Windows 10 x64Today I wanted to update it using CubeMX v6.9.2 and HAL L4 v1.18.0, and when regenerating, CubeMX wiped the linker settings "Library search path". I remember this happenning earlier tooHere's the diff from .cproject file after regeneration.UPD: found out it only happens if there are no libraries in the include listThis config gets regenerated okay (from another project):And this config gets library search path wiped on regeneration I need the library search path to include extra linker scripts located elsewhere
Hello!I am trying to use DTCMRAM on my stm32h743zi micro.When i use an array located from 0x20001760 to 0x200017d4 there are some positions that do not update, it stays in 0 or "inf" value, but when i use other array located in different location, it works perfectly.My question is..., Is there any reserved directions in this memory that are not allowed to use? If yes, how can i know which positions i can not use? Thank you so much to everybody!
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.