Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi everyone!Just finished a dual boot system but during testing I bumped into a weird issue. With BFB2 bit unset firmware starts smoothly but when it is set, it ends up in some bootloader loop although it should switch to opposite bank (FB_MODE = 1) and run second firmware code. It looks like bootloader is waiting for update as it initialized I2Cs, CAN1 and USB.System option word for this case is 0xFB7FF8AA (nBoot0 = 1, nSWBoot0 = 0, nBoot1 = 0, BFB2 = 1). Actual Boot0 pin is connected to ground (along with quartz generator). Initial stack values of both bank firmware are within SRAM range (it is mandatory to start firmware correctly).What is most interesting, another board based on the same chip but slightly different on connected periphery works perfectly. It seems, the bootloader somehow disregards options and starts to check periphery to update but catches only noise (induced by unconnected pins or by sensor outputs) so it hangs.Is there something I missed?Regards
Hi,Do we have sample code demonstrating continuous conversions for U545 ADC1 with GPDMA using "Standard Request Mode". The sample code should use two or more channels - say IN1, IN2. I am migrating a project from F105/F405 and am a little overwhelmed by the setting options to be configured with U545.The ADC_DMA_Transfer example at STM32Cube\Repository\STM32Cube_FW_U5_V1.8.0\Projects\NUCLEO-U575ZI-Q\Examples\ADC\ADC_DMA_Transfer uses Linked-List Mode and only demonstrates a single ADC channel. Thanks.
I am currently evaluating the X-NUCLEO-IHM16M1 motor control expansion board and would like to ask whether it is suitable for measuring the electrical parameters of the motor described below.The motor specifications (translated from the datasheet image) are as follows:Rated Voltage: DC 24 VRated Torque: 0.063 N·mRated Speed: 4,000 RPM ±10%Rated Current: < 1.7 ARated Output Power: 26 WNo-load Speed: 5,000 RPM ±10%No-load Current: < 0.3 ANumber of Poles / Phases: 8 poles / 3 phasesInsulation Class: Class BOperating Temperature: –10 °C to 40 °CAccording to the X-NUCLEO-IHM16M1 documentation, the maximum output current is specified as 1.5 A RMS. My question is:Is it possible to use the Motor Profiler tool in STM32 Motor Control Workbench to measure Rs, Ld/Lq, and Ke for this motor when using the X-NUCLEO-IHM16M1, considering its 1.5 A RMS current limitation?Any guidance or recommended measurement limitations would be greatly appreciated.Thank you very much for your support.Best
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code. Hi All, MCU is STM32H563. I attempted to jump from the Secure App directly to the System Bootloader so that I could program the OBK file without pulling BOOT0 high.However, using the method below, the jump never succeeds — the MCU keeps resetting continuously. Sometimes it resets immediately, and sometimes it reaches the reset vector of the system bootloader and then resets again. static void JumpToBootloader(void) { funcptr_NS NonSecure_ResetHandler; __disable_irq(); // Disable interrupts SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; HAL_RCC_DeInit(); // Reset clock configuration for (int i = 0; i < sizeof(NVIC->ICER) / sizeof(NVIC->ICER[0]); i++) { NVIC->ICER[i] = 0xFFFFFFFF; NVIC->ICPR[i] = 0xFFFFFFFF; } __DSB(); __ISB(); SCB_NS->VTOR = BOOTLOADE
We are using the STM32U5 MCU and its internal RTC in our project.We are facing an issue where the RTC time sometimes goes beyond 24 hours — for example, we observed a timestamp showing 37 hours. The RTC is configured in 24-hour format, and we have initialized the RTC and its time format correctly as per the reference manual and HAL documentation.Also, After running for 23:59:59 seconds, the time changes to 24:00:00 instead of 00:00:00, and the week day has not been incremented. The main challenge is that this does not happen consistently. We see such out-of-range values only randomly, which makes it difficult to identify the root cause. Has anyone faced a similar issue with the STM32U5 RTC? Could you please suggest possible causes or solutions, or any checks we should perform to debug this behavior?
Hello,I am unable to connect to TouchGFX version 4.26 to download or access the demo and example projects from the software download section.My system is connected to the internet; however, the application itself does not connect to the server.Please let me know how I can resolve this issue.
Hello,I have a question about the flash memory map in the Secure project.I’m using the following application as an example:STM32Cube_FW_H5_V1.5.1\Projects\NUCLEO-H563ZI\Applications\ROT\OEMiROT_Appli_TrustZone\STM32CubeIDEIn the memory map, two flash regions are shown: - FLASH: 0x0c018400 - 0x0c01dfff - FLASH_NSC: 0x0c01c000 - 0x0c01c3ffQuestion:Should the FLASH_NSC region overlap the FLASH area, or should it be placed after the FLASH region?If it should overlap, what is the purpose of doing that? In this example, it overlaps.Thank You.
Hi,In paragraph 1.2 “Launch the provisioning script” I read that:Launch one of the provided scripts depending on your IDE:For EWARM or MDK-ARM: launch the provisioning.bat script.For STM32CubeIDE: launch the provisioning.sh script.I have Windows and STM32CubeIDE. Can I run the provisioning.sh script on Windows?Looking into the env.sh script, I found the following code: echo ${OS} | grep -i -e windows -e mingw >/dev/null if [ $? == 0 ]; then echo "" echo " ==========================================" echo "| For Windows OS, please use .bat scripts. |" echo " ==========================================" echo "" echo " Press any key to continue..." echo read -p "" -n1 -s exit 0 fi It seems that the script cannot be run on Windows.Could you please advise how to run the provisioning script for STM32CubeIDE on Windows?Thank you very much for your support.Best regards,Marco
Split from STM32WBA5MMGH6TR Debug interface PCB layout - which is a separate question.Hi , thank you very much.In my module (STM32WBA5MMGH6TRTR), there is only one pin for boot selection BOOT0. I believe when it is pulled low booting happens from main flash memory. But when it is high , from where the module is booting.
As shown in the figure, when using one QSPI, the other becomes unselectable.
Hi, I am trying to move to STM32H750 from STM32F407. To start with I have tried making simple LED blink project and it seems to work.Then I add SDMMC1 and suddenly it started hanging on exiting `static void MX_GPIO_Init(void)`. Any ideas why? Do I need some kind of other initialization or what could be wrong? /* Identify card operating voltage */ errorstate = SD_PowerON(hsd); if (errorstate != HAL_SD_ERROR_NONE) { hsd->State = HAL_SD_STATE_READY; hsd->ErrorCode |= errorstate; return HAL_ERROR; }it seems to return error here0x10000000U#define SDMMC_ERROR_UNSUPPORTED_FEATURE ((uint32_t)0x10000000U) /*!< Error when feature is not insupported */what does that mean and how to fix it?
Good morning,I would like to measure the supply voltage on an STM32H573RI. To do this, I measure VREFINT and then want to calculate the supply voltage.My approach (simplified):sConfig.Channel = ADC_CHANNEL_VREFINT; sConfig.Rank = ADC_REGULAR_RANK_1; sConfig.SamplingTime = ADC_SAMPLETIME_640CYCLES_5; sConfig.SingleDiff = ADC_SINGLE_ENDED; sConfig.OffsetNumber = ADC_OFFSET_NONE; sConfig.Offset = 0; HAL_ADC_ConfigChannel(&hadc1, &sConfig); while (!__HAL_ADC_GET_FLAG(&hadc1, ADC_FLAG_EOC)); return HAL_ADC_GetValue(&hadc1); Using the ADC value of VREFINT, I calculate the supply voltage as follows:static uint16_t Calc_VREF(uint16_t adc_value) { uint16_t vrefint_cal = (uint16_t) (*(uint16_t *) (0x08FFF810)); uint16_t vrefint_voltage = 3300; return (uint16_t)(vrefint_voltage * vrefint_cal / adc_value); } My ADC delivers a value of 1.562 digits for VREFINT, while the calibration value is 1.503 digits. According to my calculations, the reference voltage is therefor
Hello, I am new to programming the NUCLEO-H563ZI. I am interested in the low-power STOP MODE function. I have watched an STM32 video tutorial for a different core. Everything works fine except for this function __HAL_RCC_PWR_CLK_ENABLE(); ../Core/Src/main.c:98:3: warning: implicit declaration of function ‘__HAL_RCC_PWR_CLK_ENABLE’ [-Wimplicit-function-declaration] 98 | __HAL_RCC_PWR_CLK_ENABLE(); | ^~~~~~~~~~~~~~~~~~~~~~~~ What is causing this error? Thank you for your help.
Motor Proiler 识别无刷空心杯电机的时候,卡在28%,套件用的是 Translation: When the Motor Profiler identifies a brushless coreless motor, it gets stuck at 28%. The kit uses...
Dear ST Support Team,We are using the STM platform in our motor controller for the past one year. Our controller is developed for the automotive EV application.Currently, we are facing challenges at the software and code level related to motor control performance and optimization. We are stuck with code-level improvements and require technical support to analyze and fix the issues completely.We are looking for guidance and support on:Motor control software optimizationCode-level improvements and debuggingA complete and stable software solution suitable for automotive EV requirementsWe request your support from the STM motor control software team to help us resolve these issues.Please let us know the next steps to proceed further.Regards,Govind Dhongadi
Hello,I am new to STM and have been using TI MCUs in the past for motor control. I am considering using STM for a new project. I need to be able to control 5 BLDC motors with position control. They will each have their own closed loop control but will be somewhat be intertwined. I would like to start with an STM dev board and start with the control of one motor and move to more then continue to develop my own PCB. Any guidance on MCU selection/dev board selection would be greatly appreciated. And any suggestions on example projects to start with and easily modify for 5 motors. Also, I would like to know if it is possible to use absolute encoders for the motors rather than incremental for the position feedback. Thanks you!
I am using STM32WBA5MMG in my design. This the development board schematic. Below image is from development board schematic.As per the constrains , SWDIO and SWCLK must be length matched. Also need to provide a shield.My questions are given below.SWDIO and SWCLK are not differential lines, why length matching is required for them.By shield did they mean routing SWDIO and SWCLK on top of a solid GND plane
Hi,I'm working on custom board where i have to use the USB CDC class to demonstrate the USB virtual com port feature along with data transfer and receive.We have generated the project using CubeMX 6.15 and STM32Cube IDE 2.0 but not able to detect the com port.We are using PA11, PA12, PA9 pins for USB.Kindly provide a step-by-step guide.Thank you.Ram
HelloI am working on an academic research project involving a hybrid converter topology, where a controlled shoot-through state is intentionally required as part of the converter’s operating principle.I am currently using:STM32F446REIHM16M1 inverter driver boardMCSDK (Motor Control SDK)From my understanding, the IHM16M1 gate driver enforces hardware-level interlocking and dead-time, which prevents simultaneous conduction of the high-side and low-side devices in each inverter leg. Even when overlapping PWM signals are generated at the MCU level, the driver appears to mask them internally.My question is:Is there any supported or undocumented method to override or bypass the hardware interlocking / cross-conduction protection on the IHM16M1 board?I would like to clarify whether:This limitation is strictly hardware-bound, orAny alternative configuration (timer mode, driver pin usage, or hardware modification) exists that could allow controlled shoot-through for research purposes.Thank you
Hi everyone,I’m trying to get the LwIP examples from the stm32-hotspot GitHub (this one: https://github.com/stm32-hotspot/STM32H7-LwIP-Examples) running on my NUCLEO-H723ZG, but I’m hitting a wall.The README is actually great and super clear, which is why I’m surprised I can’t get it to work. I’ve built the project and flashed it to the board, and I have it connected directly to my laptop via Ethernet.The docs say the IP should be 192.168.1.10, but when I try to ping it, I get nothing. I also took a look at the code and it looked like the IP might be set to 192.168.1.1 instead, so I tried pinging that too, still no luck.Am I missing something basic here? Is it enough to just build and flash the code, or do I need to tweak some jumpers on the Nucleo or change my laptop's manual IP settings to be on the same subnet?I’d really appreciate it if someone who has used this repo could point me in the right direction.Thanks!mpek29
Good morning,I would like to implement Fatfs to communicate with a sd card in the core M4 and with a usb mass storage device in the core M7. In Cube Mx environment I'm able to initialize what I need, obtaining a fatfs M4 initialized to communicate with sd card and a fatfs M7 initialized to communicate with a usb mass storage device. Pratically this solution doesn't work (The devices are not recognized: the sd card is correctly mounted just one time and then it is not recognized while the usb is never recognized) but, when I keep everything together in the same core, fatfs M7 (usb mass storage+sd card) works perfectly. Could you tell me If it's possible to implement fatfs in the following way: fatfs M4 (sd card) and fatfs M7 (usb mass storage)? And considering that I need to create files inside sd card and write data to them in core m4 and sending these files from sd to usb in m7, are there some variables (like sd file path etc) that I need eventually to put in shared memory ?Let m
Dear all I am trying to follow the exmaple https://github.com/STMicroelectronics/STM32CubeH5/tree/e6985112c824fce355638ef4e7113b1bc671f999/Projects/NUCLEO-H503RB/Examples/SPI/SPI_FullDuplex_ComDMA_Slave project with STM32H563 on my own target board, I copied most of the code/DMA setup form the example and got it working, however, my requirement is more complicated than the example, the example only receives and reply 1 message after a button press, but my application needs it to be able to receive/reply messages periodically, i.e. master keep sending fixed length of message and expect slave to reply with same length of message at a fixed period. For now, after I copied example, it runs receives/replies 1 message, which I see the data on bus , but then it ends up with busy state and never recovers even wait for a long time, could anyone help please? Also, the about the DMA setting, does it needs to be in circular mode? I am sort of new to STM32 and DMA. Any suggestion is appre
Hello, I need a clear step by step guide on how to set up Pnucleo lrwan 3 end node and gateway and connect both to the loriot server. currently I have issues communicating with my END node using the AT command via terminal.My other issue is that; the PNUCLEO lrwan 3 antenna is 480MHz, but when I check the paramaters of the device using terminal, I discover that the frequency is EU-868MHz, so now I have to reconfigure the device tp the right frequency, how do I do this. I have consulted the UM2587 material but it does not appear to be so clear to me.
We noticed that the Overcurrent warning appears even when Overcurrent Protection is disabled. Could this be related to the missing feedback capacitors C38 and C42 on the OPAMPs for current sensing? Thank you for your support.Best regardsPelino
Hello,I am trying to communicate with an SDI-12 sensor through my custom STM32L4 pcb. The communication that I am trying to achieve is from a 3.3V microcontroller. Thus, I used the SN74LVC1G240DBVT buffer to convert my UART to SDI-12 data one wire, and also I had a MOSFET which converts my 3.3V of the pin to 5V (I have checked that the hardware wiring and voltages working as expected). For my UART protocol, I have this configurations: static void MX_UART5_Init(void) { /* USER CODE BEGIN UART5_Init 0 */ /* USER CODE END UART5_Init 0 */ /* USER CODE BEGIN UART5_Init 1 */ /* USER CODE END UART5_Init 1 */ huart5.Instance = UART5; huart5.Init.BaudRate = 1200; huart5.Init.WordLength = UART_WORDLENGTH_8B; // Including parity huart5.Init.StopBits = UART_STOPBITS_1; huart5.Init.Parity = UART_PARITY_EVEN; huart5.Init.Mode = UART_MODE_TX_RX; huart5.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart5.Init.OverSampling = UART_OVERSAMPLING_16; huart5.Init.OneBitSampling = UART_ONE_BIT
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.