Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi,I have an STM32F7 design with SD card connected via SDIO interface.In many posts I read that SD cards have to be initialized with a 1 bit wide bus and a clock of 400 kHz. Switching the bus width from 1 to 4 bit using the command HAL_SD_ConfigWideBusOperation(&hsd1, SDMMC_BUS_WIDE_4B) is simple. However, I have some doubts about the clock frequency. Many examples inizialize the clock at higher frequencies in the first initialization. This seems to contradict the SD card specification.Best regardsJan
I'm using STM32CubeMX to generate initialization code for all my hardware. I initially tried USART1 TX with GPDMA1 Channel 0 - all data was transmitted over TX except neither the GPDMA1_Channel0_IRQHandler() nor the USART1_IRQHandler() didn't trigger. I used the same configuration settings but chose GPDMA Channel 10 - now both the GPDMA1_Channel10_IRQHandler() and the USART1_IRQHandler() get triggered.Is this a known limitation? I haven't found anything relevant in MCU's Errata.Note that the USART1 HAL_UART_Transmit_IT() triggers interrupt. So it's clearly a GPDMA issue.The 2nd problem is that USART1 RX with GPDMA1 won't work with all the Channels I have tried so far (Channel 1 and Channel 11). If anyone else has experienced same issue please let me know which GPDMA1 channels worked with any USARTx.EDIT: USART1 RX with GPDMA1 triggers interrupt for Channels 3, 4, and 7 but doesn't trigger for Channels 0, 1, 10, 11 (the rest I haven't tried yet).
Presently we are using STM32F767ZI for our ongoing projects. Our application demands high speed data transfer rate through ethernet. We are taking the help of UDP for transfer of real time audio data between 2 STM32F767ZI Nucleo Boards. Further we need to increase the speed of Transmission and Reception of this audio data. So, we seek help for the following information among the community members.1.Presently, the HAL Drivers are in polling. Can we convert this HAL Drivers to utilize DMA? Would it make any difference in the speed of Tx and Rx.?2.How to increase the speed of LwIP Ethernet in STM32F767ZI? With/ Without DMA!3.What parameters decide the speed of data transfer in LwIP middleware that is there in the cube IDE?
Hello, for the last couple of days I've been trying to set up my STM32F723ZET6 project as a USB HS CDC device with internal PHY.My code gets stuck in this loop do { count++; if (count > HAL_USB_TIMEOUT) { return HAL_TIMEOUT; } } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST); inside the function .staticHAL_StatusTypeDefUSB_CoreReset(USB_OTG_GlobalTypeDef *USBx) in the file stm32f7xx_ll_usb.c I've been reading and it seems like a common issue. I've tried applying some solution that work for other people, although they were asking for other models of STM, Without success.For what I read it seems to be some kind of timing or clock problem. I have no experience with USB and I don't really know much about how CUBEMX implementation works.What I tried:- Adding a 50ms delay before this loop- Adding __HAL_RCC_SYSCFG_CLK_ENABLE(); to my HAL_MspInit function (Actually CUBEMX already did that)-Adding __HAL_RCC_USB_OTG_HS_CLK_ENABLE(); 
I'm using STMC FOC sdk v4.3 on a STM32F303ZE MCU. The main sensor is an incremental encoder, but I'm experiencing issues with the speed measurements.The issue is pretty consistent in nature, although it appears rather randomly. The figure shows the measured speed in units of 01Hz. We get a negative spike with value `speed = actualSpeed - 624`, followed by a positive spike `speed = actualSpeed + 625` at exactly 16 samples later. Note that the buffer size of `ENCParamsM1` is 16. I'm suspecting that `VirtualSpeedSensor` class is related to the issue as it's parameter struct has a member `hTransitionSteps` with value 625. However, I don't know the details for how this works and the v4.3 sdk is pretty hard to troubleshoot.Note that the MC is in RUN state at all times, and that neither the return value of `ENC_CalcAvrgMecSpeed01Hz()` in `ENC_F30X_SpeednPosFdbkClass` nor the return value of `SPD_CalcAvrgMecSpeed01Hz()` in `SpeednPosFdbkClass` goes FALSE at any
Hello!I’m currently working on a sensorless 6-step BLDC motor control project using an STM32G474RE.I implemented the full control flow based on ADC-DMA sampling, center-aligned PWM (TIM1), TIM2-based timing, and ZCP detection logic.The control flow is as follows:The motor enters an alignment phase with fixed high/low-side conduction.It transitions to open-loop commutation for ~1 second.Once enough steps have passed, I enable ZCP detection.ZCP is detected when BEMF crosses Vbus/2 with correct polarity.After ZCP, commutation is scheduled with a 30° electrical delay using TIM1 Channel 4 compare interrupt.All ADC channels (BEMF_A/B/C, DCBV, DCBI, etc.) are configured correctly, DMA is working, and ZCP detection logic is being called.However, the motor does not spin at all, even during open-loop startup.Could someone review the attached code and let me know if there’s something wrong in how PWM, commutation, or ZCP triggering is being handled?Thank you!
I have STM32F769I DISCO discovery boardI am unable to find a simple code to display text on LCD
Hi,I’m currently working with the STM32G491RE MCU and have encountered an issue related to GPIO pin PB6.In our normal user application, PB6 is configured as a push-pull output. However, we would like to understand its behavior when the device enters boot mode.The AN2606 document outlines the functionality of certain pins during boot mode, but PB6 is not clearly mentioned. We’d like to confirm whether PB6 takes on any alternate function or state during boot mode, or if it remains unaffected.
HiI am working on a project with an STM32H743 and a 32-bit SDRAMThe FMC signals are quite randomly scattered across the package and this makes layout quite convoluted and difficult. I'd like to swap byte-lanes and individual bits within each byte, for example:- connect DQ0 - DQ7 on the SDRAM to DQ24 - DQ31 on the microntroller, then swap the mask signals DQM0 with DQM3.- swap bits within a byte, for example after swapping the bytes as above, connect DQ0 to DQ25 on the micro and DQ1 to DQ24 on the micro.The SDRAM should not care about these type of swaps, but are there any restrictions in the way that the FMC works that would stop this from working?Thanks
Please keep the title short - less than 1 line. Edited.Hello,currently i looking for some suggestions with regards developments or evaluation or nucleo boards for the given controllers:STM32F205RET6STM32F303C8T6 if anyone is currently working or having suggestions with regards to the boards which can be used, please do let me know. and from myside i have searched two nucleo boards, let me know whether these boards can be used?https://www.st.com/en/evaluation-tools/nucleo-f303re.html?ecmp=tt9470_gl_link_feb2019&rt=db&id=DB2196#sample-buyhttps://estore.st.com/en/nucleo-f207zg-cpn.htmlhttps://www.st.com/en/evaluation-tools/nucleo-f207zg.html#sample-buyNOTE: purpose of using these evaluation boards to check the configurations of the timers and also implement the timer based functionalities.Thank you.
Hello,We have configured the PA2 and PA3 as USART2_TX and USART2_RX pins accordingly.also set the below mentioned images for your reference as configurations in the stm32cubeide code for usart2.but we are unable to see any output in the com port , we have tried all different permutations and combinationskindly help and support as soon as possible so that we can get USART2 working in the STM32WL5MOCH6 PCB.
Hi, I am debugging the SCT3288 HDK right now which is programmed with the STM32F405RGT6 microcontroller within it. While I was trying to debug the SCT3288 HDK, UART comport is not being detected because the firmware is got updated with some other file so I need to flash the required bin file to reset the MCU by using STM32 cube programmer application. So can you please help me to flash the bin file by using SWD mode or JTAG mode. As I am not finding the required pins for the JTAG in SCT3288 HDK. Thanks,Kind Regards,K. Manikanta Sai Srinivas.
IS61WV25616MEBLL and IS64WV25616MEBLL are recent Muxed PSRAM from ISSI. I would like to use these with an LQFN100 STM32H750VBTx to avoid complicated routing with SRAM and going to a larger LQFN or BGA package.The FMC of this MCU supports Muxed PSRAM. I am trying to understand if the part is compatible by comparing the datasheet with what I see in CubeIDE. I do not understand:The data sheet has 16 Muxed Address/Data lines but it also has two additional address lines A16, A17 (PSRAM)Byte Enable (CubeIDE)Questions:Do I configure the data as 16-bit or 18-bit? It seems to have 16-bit data and an 18-bit address.In CubeIDE I noticed that when I select the Byte Enable checkbox, I get two pins: FMC_NBL0 and FMC_NBL1. Should I connect these two pins to A16 and A17?Any suggestions on PSRAM parts that are known to work well with STM32H7?
Hi team, I am facing an issue while upgrading the LoRaWAN MAC version from 1.0.3 to 1.0.4. I have tried different methods to resolve it.1. First, I downloaded the LoRaWAN MAC version 1.3 from STM32CubeMX. Then, I created an end device for LoRaWAN version 1.0.3 in the TTN server. I connected my end device to the TTN server using the credentials I created for it, and it is working well. The data is being successfully sent from the end device to the TTN server.2. I enabled LoRa MAC version 1.0.4 in the source code that came with the download of LoRaWAN MAC version 1.0.3. Next, I created an end device for LoRaWAN version 1.0.4 on the TTN server. However, when I tried to connect my end device to the TTN server using the created credentials, it failed to connect. and shows DevNonce is too small error in TTN server.3. I downloaded the latest LoRaWAN MAC version 1.0.4 from STM32CubeMX, which was released in January 2025. I then ported all the changes from LoRaWAN MAC version 1.0.4 to the
I wrote a code for this microcontroller to test the CAN protocol, and it worked successfully in loopback test mode—data was transmitted and received correctly without using any external CAN transceiver. Then, I switched the CAN mode from loopback to normal mode and physically connected the TX and RX pins together using a wire. However, with the same code (only changing the test mode), I noticed that in Live Watch, the TX pin shows activity (data being transmitted), but the RX pin shows nothing—no data being received. I even checked the signals on an oscilloscope, and the waveforms on TX and RX were identical, confirming that the signal is physically present on both lines. Yet, according to the software, no data is received. This led me to wonder: since some microcontrollers support external loopback modes while others do not, could it be that this microcontroller does not support external loopback in normal mode by simply wiring TX and RX together? Is that correct?
..
How do I get a non-HAL project going but with CMSIS for a STM32F051? I've seen a few references describing how to add various folders containing the required files to the projects build settings. The problem for me is the folders described do not exist on my installation for some reason. They are typically under \STM32CubeIDE\plugins\....If I create a HAL project I can see what I expect I need added to the project automatically along the lines: stm32f051x8.h , stm32f051xx.h and system_stm32f0xx.h. So the IDE does have them somewhere. I tried searching my IDE installation to locate the original source location but no hits. Creating a Target Project Type as blank is really blank. Trying to include any of the above generates errors along the line "file not found" . I've considered just copying the .h files from a HAL project but this feels kind of dodgy, Plus I expect there is a proper way and this isn't it.
Hi,I'm using Motor Control Workbench 6.2.0 with a custom power board that supports a maximum of 1200Vdc. The motor to be controlled also supports a maximum of 1200Vdc.When creating the project, I noticed that on the Power Supply tab, the application requires the bus voltage level to be specified within a range compatible with the power board and motor specifications, which in my case is [100 - 1200] Vdc.However, regardless of the value set in the bus voltage level text box, the Voltage Scale field on the Speed Sensing Config. tab appears to be out of range: it indicates a maximum allowed value of 1000V.Moreover, from the HSO startup guide, I read that the voltage scale value can't be lower than the maximum voltage that can be measured based on the hardware design (which makes sense due to internal firmware scaling).So, I wonder if there's a way for my application to work with bus voltages in the range of (1000 - 1200] Vdc?Is this an intentional limitation of Motor Control Workbenc
Hi, I am using motor workbench 6.3 along with stm32cube mx 6.12 and stm32cubeIDE 1.16.0. The hardware is a F303RE nucleo board with IHM08M1 motor board. The motor is a generci A2212 1000kV drone motor with a maximum current of 10A. C3, C5, C7 are removed as per https://www.st.com/resource/en/data_brief/x-nucleo-ihm08m1.pdfJumper JP1 & JP2 are on FOC. J5 & J6 are on 3 shunt measurement.The motor profiler runs up to 28%, does not spin the motor and goes into "Motor profiler is taking too long error" I have configured the DSP libraries in the project properties and also added "pMCIList[M1] = &Mci[M1];" to solve the hardfault handler error. While generating the code I get "Attr not supported : Dmpu" error but I have been advised that it is not a serious error. https://community.st.com/t5/stm32-mcus-motor-control/mc-6-3-with-mx6-12-attr-not-supported-dmpu/m-p/704970#M10610Neither motor profiler nor motor pilot work at the moment. Please a
Hello, I build two different projects with MCSDK version 6.3, one with use the NUCLEO-F302R8 and the other one the NUCLEO-F030R8, the motor and the power board are the same, I use FOC and for both projects I use the same parameter set, in particular in the Regular execution time is set to 3 PWM.When I run the motor the behavior of the two nucleo boards is different.When I use the NUCLEO-F302R8 the behavior is as expected.When I use the NUCLEO-F030R8 the motor speed read from STM Motor Pilot (V.1.2.9) is different from the measured motor speed with an external instrument, when I set a speed of 1000 RPM the speed feedback read from Motor Pilot is 1000 RPM but the motor run at 600 RPM. Moreover the motor is not able to run at maximum speed with the load, around 1150 RPM, but it runs at 1020 RPM maximum.Attached the two MC workbench projects.Any suggestion to solve this issue?
Hello,I am experiencing an issue with the Motor Profiler in MotorControl Workbench 6.3.0. When I enable the Hall Effect in the generated source code, the program triggers the HardFault_Handler during execution.Here are the details of my setup:Tools:MotorControl Workbench 6.3.0STM32CubeIDE 1.15.1STM32CubeMX 6.11.1Hardware:Control Board: NUCLEO-G474REPower Board: X-NUCLEO-IHM17M1The following configurations work fine with this setup:Motor Profiler with Hall Effect OFFFOC with Main Sensor Observer+PLLFOC with Main Sensor Observer+PLL and Auxiliary Sensor Hall SensorHowever, when running the Motor Profiler with Hall Effect ON, the debugger shows that the HardFault_Handler is called within the FOC_Init() function, specifically at the HT_Init(&HT, false) call. The error message is:Can't find a source file at "C:\Motor_Control\MC_Releases\6.3.0\MotorProfilerLibs\Projects\NUCLEO-G431RB-X-NUCLEO-IHM07M1-3Sh\MotorControlDev\MCSDK\MCLib\Any\Src\mp_hall_tuning.c"Locate the file or edit the sou
Here's my setup:Nucleo G431RBIHM08M1 (Setup for 3 phase current sensing)MCSDK v6.3Motor is Annaheim Automation BLWS234D-36V-4000 (BLDC motor - Delta winding- 2 pole pairs)I've tried many different settings to try to get my motor to spin. Currently trying to go to the most basic setup and just input current in open loop mode but it seems the behavior is not what I would expect. I'm setting the speed ramp to ramp up to some speed and I expected that this would result in a cycle of PWM outputs at the given speed and at a duty cycle proportional to my voltage refence. Instead it appears to try pushing some current for a couple seconds then just gives up. I'm not getting any faults and there are no current measurements showing up in the Id or Iq boxes. I would expect those values to come to some steady state. I feel like I'm missing something here.
I'm trying to control a PMSM motor using Nucleo-G474RE and STEVAL-IHM023V3 motor control boards and Motor Control WorkBench (Version 6.2.1). I have noticed that the values of shunt resistors (R55, R68, and R101) are given as 150 mOhm in User Manual UM1823 (pages 13, 14, 15) while 100 mOhm in source code (power_stage_parameter.h, line 46) and Motor Control Workbench software. I have visually inspected the STEVAL-IHM023V3 motor control board and seen that shunt resistors' values are 150 mOhm. The PMSM motor is rotating normally when I create, compile and run the source code via Motor Control WorkBench (for default 100 mOhm shunt resistor value in the Motor Control Workbench). But when i changed the RSHUNT value at the power_stage_parameter.h, line 46 to 150 mOhm, PMSM motor started to rotate abnormally. Can someone explain to me the value differency between the source code and the user manual
Hello everyone,I am encountering an issue with the HAL_Delay() function and ThreadX in my project. Before initializing ThreadX, HAL_Delay() works as expected. Specifically, the callback function:void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { /* USER CODE BEGIN Callback 0 */ /* USER CODE END Callback 0 */ if (htim->Instance == TIM6) { HAL_IncTick(); } /* USER CODE BEGIN Callback 1 */ WR_TIMER_process(); /* USER CODE END Callback 1 */ }is triggered correctly, and the uwTick variable increments as intended.I am using Timer6 for the system ticks on a custom PCB with an STM32H743BIT MCU. However, after calling the MX_ThreadX_Init() function, the uwTick variable stops updating, and the HAL_TIM_PeriodElapsedCallback is no longer triggered. Here is my setup:MCU: STM32H743BITCompiler: arm-none-eabi-gcc (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52)) 14.2.1 20241119CubeMX Version: 6.14.0ThreadX Version: 6.4.0Debugger: J-Link 8.32Ozone Version: 3.38g It seems
Hi Experts,I'm almost a newbie at STM32F7xx even though I've been working with STM32F4 series.I wanted to handle the flash memory as IAP.I tried flash erase as same as what I do on STM32F4 but it failed.So I checked and found that thera are two kind of bank modes in STM32F7.I'm familiar with the address map of single bank mode and I tried to change Dual bank mode to Single bank mode in my code like below. FLASH_OBProgramInitTypeDef OBInit = {0}; // 1. Unlock Flash and Option Bytes HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); // 2. Read current Option Bytes HAL_FLASHEx_OBGetConfig(&OBInit); // 3. Set DBANK to 0 (Single Bank) OBInit.OptionType = OPTIONBYTE_USER; OBInit.USERConfig = OB_NDBANK_SINGLE_BANK; if (HAL_FLASHEx_OBProgram(&OBInit) != HAL_OK) { // Error handling HAL_FLASH_OB_Lock(); HAL_FLASH_Lock(); return; } // 4. Launch Option Bytes loading (MCU will reset) HAL_FLASH_OB_Launch(); // 5. Lock Option Bytes and Flash HAL_FLASH_OB_Lock(); HAL_FLASH_Lo
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.