Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I am working with [STM32F439ZI] and I am trying to initialize SDIO in 4-bit mode.I'm following "STM32 – Creating a File System on a SD card" this video for reference.However, SDIO initialization is failing during the power-on phase.The error occurs during HAL_SD_Init()The failure happens inside the power-on initialization sequenceThe function always returns an error statusThe board is currently tested using the DATA3 line only (this is the only difference from a standard setup)Even when I modify the function / test return values, the error still occurs at power-on initializationI changed the function for card detect so that the return status is always "card present".The error occurs inerrorstate = SDMMC_CmdAppCommand(hsd->Instance, 0);if(errorstate != HAL_SD_ERROR_NONE){return HAL_SD_ERROR_UNSUPPORTED_FEATURE;}}This function returns a CRC error.I have attached the hardware changes I did along with the clock config settings and sdio settings. Please help me resolve it.
I am trying to create a signal that changes its frequency in dynamic way using timers but i am having some issues to do it can anyone give me some tips for easy implementation to do this task
Using DMA to read 3 ADC channels. IN0, VSENSE & VREFINT all enabled in CUBEMX. First 2 channels read as expected but for VREFINT it seems to always read zero. Am I missing a setting in the CUBEMX?
I'm trying to use LCD16DebugPrinter to display debug text on a 480x480 RGB565 display running on STM32U5A9J-DK (circular display). I've set it up in TouchGFXHAL::initialize():static touchgfx::LCD16DebugPrinter debugPrinter; debugPrinter.setPosition(0, HAL::DISPLAY_HEIGHT - 20, HAL::DISPLAY_WIDTH, 20); debugPrinter.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0)); debugPrinter.setScale(1); touchgfx::Application::setDebugPrinter(&debugPrinter);And in my view's handleTickEvent():static char debugStr[128]; snprintf(debugStr, sizeof(debugStr), "TICK TEST"); touchgfx::Application::setDebugString(debugStr);Nothing appears on screen. Things I've already ruled out:String buffer lifetime - using static char[] So the pointer remains validColor contrast - white background, black textWidget conflict - disabled all custom widgets, issue persistsHow it is supposed to work?
Hello,I am using the EVALSTDRIVE601 evaluation board (featuring the STDRIVE601) to try to generate a controllable three-phase signal. I wired the evaluation board exactly as described in the datasheet:HV and PGND (J1 connectors): Connected to the DC voltage source.SGND and VCC (J3 connectors): Connected to the ground and output of a buck converter that steps down 24V to 12V.VDD: Connected to the 3.3V of the MCU.Pin 1 (Fault): Connected to the MCU to read this value and detect fault conditions.Pins 3, 5, 7, 9, 11, and 13: Connected to the SPWM signals. I am generating these using a Compute Module 4 with a switching frequency of 10kHz and a modulating frequency of 50Hz.Pin 23 (Enable): Connected to the MCU, providing 3.3V to activate the driver.Pin 2: Connected to the GND of the MCU.Pin 28: Connected to the 3.3V of the MCU.Test 1: 24V DC with LC Filters I initially tested the board using an external 24V DC power supply. At the output (J2 connectors), I wired an LC filter (L = 680mH, C =
Dear Sirs, we had a project with the F2 using HAL_I2C_Master_Sequential_Transmit_IT() with Option I2C_FIRST_FRAME and a second HAL_I2C_Master_Sequential_Transmit_IT() with Option I2C_LAST_FRAME.All worked perfect.Using this Software with a F7 did not work. After the first HAL_I2C_Master_Sequential_Transmit_IT() with Option I2C_FIRST_FRAME a STOP-Condition occured and transfer stopped. After hours of debugging through the HAL it turned out that I2C_FIRST_FRAME does notz set the RELOAD bit but I2C_FIRST_AND_NEXT_FRAME does and all workes fine.So my question is: What is the usage of I2C_FIRST_FRAME in a F7 context, becuase it sets AUTOEND and nothing else. So how can be I2C_FIRST_FRAME the correct option for a sequence of frames?best regardsAndy
Couldn't see a definitive answer in the datasheet - What is the source \ sink capability of a USART TX \ RTS pin? The nearest answer I could find was page 128 of DS13313 Rev 5 - "GPIOs (general purpose input/outputs) can sink or source up to ±8 mA, and sink or source up to ±20 mA" but there isn't anything specifically that mentions alternate function pin capability. Can TX and RTS pins directly source or sink an LED via a 220 Ohm resistor (that would be ~15mA each) ? I'm thinking I may have to add external drives like high side MOSFETs otherwise. Thanks.
Hello, I would like to enable overdrive mode on my N657X0. This chip supports 800MHz operation but is usually limited to 600MHz. The manuals specifies to enable overdrive mode before configuring the CPU clock to reach the maximum frequency. I was wondering if there are any - for beginners like me not obvious - ways for the chip or its peripherals to get damaged when enabling overdrive mode. Kind regards, Len
Hi, I am working with a custom board using the STM32H757BIT and a Riverdi RVT70HSMNWC00 connected through MIPI DSI.I followed the “lv_port_riverdi_70-stm32h7” example for the CubeMX setup and for the DSI display initialization.The system runs from a 25 MHz external HSE, and I have tested the DSI clock using both the HSE and PLL2Q.HAL version: V1.12.1.The UI framework is LVGL. My issue is that the display stays completely black. When LVGL triggers the flush callback, nothing appears on the screen. The backlight PWM is working correctly: it runs at 48 kHz and currently uses a duty cycle above 90%, so the panel should be fully illuminated. The screen content I want to show is extremely simple, just for testing: /*Change the active screen's background color*/ lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x003a57), LV_PART_MAIN); /*Create a white label, set its text and align it to the center*/ lv_obj_t * label = lv_label_create(lv_screen_active()); lv_label_set_t
Hello, Is it possible to configure STEVAL-CTM015V1 to drive a 3-phase SRM (switched reluctance motor) in sensorless mode? The motor has no Hall sensors, and I cannot use the quadrature encoder signals because they are connected to a LabVIEW measurement system for speed/torque. Thanks!
Hello,I have found an inconsistency in the documentation for the STM32U031K8 MCU on ST.com:The Reference Manual (RM0503), Revision 4 is listed on the documentation page, and Table 22 in RM0503 Rev 4 indicates that LPUART2 does not have wake-up capability.The Data Sheet (DS14581), Revision 2 is also listed, and Table 3 in DS14581 Rev 2 states that LPUART2 does have wake-up capability.This leads to a contradiction between the reference manual and the data sheet regarding the wake-up capability of LPUART2. Based on this, it appears that the data sheet documentation might not have been updated properly for this MCU.Could you please review and update the documentation links so that they are consistent and correct for the STM32U031K8?Thank you.
Hello,I am working on SRM motor development for some application and plan to use the STEVAL-CTM015V1 (1 kW, 400 VDC, 3-phase SRM) evaluation board for in-house testing.I have reviewed UM3174 and DB4559, but I could not find any SRM control firmware or example project for this board.Could someone please clarify:Where can I obtain the SRM firmware / example source code for STM32F303CBT6 used on STEVAL-CTM015V1?Is there a ready-made SRM control algorithm (current chopping, turn-on/off angles, speed loop) provided by ST?How is this board intended to be programmed? (recommended IDE / reference project)Any guidance or pointers to official ST resources would be appreciated.
Hi Team,We are currently working with a custom board that uses the STM32H745BIT6 MCU, and we are attempting to connect it to the STLINK-V3SET debugger. However, we are experiencing intermittent debugging issues described below:The debugger successfully enters debug mode only 2–3 times when done the first time.In most cases, the debugger connects and enters debug mode, but after approximately 6–8 seconds, it displays a “Target lost” error (please refer to the attached photo).Often, it shows “Target not responding.” When this happens, we need to power cycle the board. After turning the power supply off and on again, it behaves as described in point 2.This issue has become a major roadblock in our development process.Could you please advise if we might be missing something or configuring anything incorrectly? If you require any additional information from our side (errors, logs, etc.), please let us know and we will provide it.Best regards,Prathiksha
There is a bug in the above mentioned function in stm32f1xx_hal_flash_ex.c file. The function has a uint32_t type parameter WriteProtectPage which determines the flash page chunks to disable the write protection of. On my F103 MCU it means every bit corresponds to 4 pages (each page is 1 Kbyte, total of 128 Kbyte flash memory). This line then combines the currently write protected pages with WriteProtectPage (0 means protected, 1 means unprotected):WriteProtectPage = (FLASH_OB_GetWRP() | WriteProtectPage); The function then slices WriteProtectPage up into 4 pieces (4 WRP option bytes):WRP0_Data = (uint16_t)(WriteProtectPage & OB_WRP_PAGES0TO31MASK); WRP1_Data = (uint16_t)((WriteProtectPage & OB_WRP_PAGES32TO63MASK) >> 8U); WRP2_Data = (uint16_t)((WriteProtectPage & OB_WRP_PAGES64TO95MASK) >> 16U); WRP3_Data = (uint16_t)((WriteProtectPage & OB_WRP_PAGES96TO127MASK) >> 24U); It then erases the option byte area (r
I am currently using the NUCLEO-H563ZI board to test SPI functionality. I configured SPI1 as a master and was able to successfully transmit and receive data using HAL_SPI_TransmitReceive(). However, when I switched to SPI2, I found that the clock signal does not toggle at all, no matter what I try. Is there anything specific that needs to be configured additionally for SPI2? Below is my code; the rest was automatically generated by MX. uint8_t spi_TransmitReceive(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, const uint8_t *pTxData, uint8_t *pRxData, uint16_t Size, uint32_t Timeout) { HAL_StatusTypeDef status; HAL_GPIO_WritePin(GPIOx, GPIO_Pin, GPIO_PIN_RESET); status = HAL_SPI_TransmitReceive(&hspi2, pTxData, pRxData, Size, Timeout); HAL_GPIO_WritePin(GPIOx, GPIO_Pin, GPIO_PIN_SET); return status; } void example_spi_transmitreceive() { printf("\r\nExample SPI Transmit and Receive.\r\n"); uint8_t txbuf[1024]; uint8_t rxbuf[1024] = {0}; for(int i = 0; i < 1024; i++
Hello, when STM32CubeIDE generate code for STM32H523VCT6, VTOR_TABLE_NS_START_ADDR constant contain wrong value:#define VTOR_TABLE_NS_START_ADDR 0x04020000UCorrect value should be #define VTOR_TABLE_NS_START_ADDR 0x08020000U How to reproduce:STM32CubeIDE Version: 1.18.1STM32Cube FW_H5: 1.5.0Start new project -> for commercial part number select STM32H523VCT6 -> enable trust zone -> generate code.Check file main.c under secure directory. Regards,Slavomir Tomascik
The conclusion is that setting filters and interrupts on FIFO0 leads to exception handlingFDCAN1_IT1_IRQHandler.The reason for this behavior is an error in the file. startup_stm32g431cbtx.s ERROR ...word ADC1_2_IRQHandler.word USB_HP_IRQHandler.word USB_LP_IRQHandler.wordh FDCAN1_IT0_IRQHandler.word FDCAN1_IT1_IRQHandler.word EXTI9_5_IRQHandler.word TIM1_BRK_TIM15_IRQHandler .. This is how it should be ... .word ADC1_2_IRQHandler.word USB_HP_IRQHandler.word USB_LP_IRQHandler.word FDCAN1_IT1_IRQHandler.word FDCAN1_IT0_IRQHandler.word EXTI9_5_IRQHandler.word TIM1_BRK_TIM15_IRQHandler ... As an example, the code that I use is for testing so that there are no questions). void CAN_Config(void) { FDCAN_GlobalTypeDef *CAN = FDCAN1; uint32_t *filterRAM = (uint32_t *)RAMBaseFDCAN1; // Включение тактирования для CAN RCC->APB1ENR1 |= RCC_APB1ENR1_FDCANEN; RCC->CCIPR &= ~RCC_CCIPR_FDCANSEL; // PLL "Q" for FDCAN RCC->CCIPR |= (0x1 <<
Hello!I just bought the stlink-v3minie for myself but I am unable to flash my board using it. I can program my board with a borrowed stlink-v3pwr but not with the minie.I have upgraded the firmware on it and it still doesnt work. It fails with this output:ST-LINK SN : 003300313235510537333439 ST-LINK FW : V3J17M10 Board : STLINK-V3MINIE Voltage : 3.28V SWD freq : 8000 KHz Connect mode: Under Reset Reset mode : Hardware reset Device ID : 0x451 Revision ID : Rev Z Device name : STM32F76x/STM32F77x Flash size : 2 MBytes Device type : MCU Device CPU : Cortex-M7 BL Version : 0x93 Opening and parsing file: ST-LINK_GDB_server_a28496.srec Memory Programming ... File : ST-LINK_GDB_server_a28496.srec Size : 668.68 KB Address : 0x08000000 Erasing memory corresponding to sector 0: Erasing internal memory sectors [0 6] Error: failed to erase memory Error: failed to erase memory Encountered Error when opening C:\ST\STM32CubeIDE_1.18.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.e
Our Engineering team is currently having difficulties getting our onboard STM32F303RB MCU to enumerate as a USB DFU device when entering Bootloader mode. We require this functionality in order to be able to upgrade our firmware out in the field. We are able to have our application firmware enumerate a USB device but no luck with the bootloader. The STM32 communicates to an Embedded Linux Host via a USB Hub: Embedded Linux Host <-> USB Hub <-> STM32 We have a few questions regarding getting the bootloader to enumerate. On the internet there appears to be mixed messages as to whether the STM32F303RB MCU uses an internal pullup when in the Bootloader. Are you able to confirm whether it does enable an internal pullup for the bootloader? I have set BOOT0 HIGH but there is also mixed messages about BOOT1 being pulled to GND. To enter USB DFU mode does BOOT1 have to be pulled to GND or is it a don't care and can be left floating? Is there some kind of output/pin I am able to prob
STM32H7R7L8H6H XSPI2 is mounted with MX25UM25645GXDI00, and the frequency setting exceeds 133Mhz. The Boot program fails to run and gets stuck in the "XSPI_WaitFlagStateUntilTimeout" function.Please help me!XSPI2 ConfigurationClock Tree ConfigurationEXTMEM_MANAGER Config 1EXTMEM_MANAGER Config 2Stuck here
USB Issues with STM32F767-ZIT – Project StatusI’m an amateur working on building an electronic device. Currently, I’m in the planning and prototyping phase and creating my own PCB design. My current project is based on the STM32F767-ZIT, and I’m having trouble getting the USB (USB-B) connection to work.Hardware SetupPower: VBUS is powered through a ferrite from 5 V on the female USB-B jack.Data lines: D+ and D- are connected to PA11/PA12, each with 22 Ω resistors.GND: connected to the board.HSE: 8 MHzWires: relatively short, nothing unusual.Current BehaviorWhen connecting to a PC:Windows plays the device connect sound, and a device appears in Device Manager.The device shows as “Unknown USB Device (Device Descriptor Request Failed)”.Properties:Device type: USB ControllerManufacturer: Standard USB Host ControllerStatus: “This device has been stopped because it reported problems (Code 43)”USBView shows: FailedEnumeration: Unknown USB Device (Device Descriptor Request Failed)Oscilloscope O
I'm working on a custom STM32U5 board and I'm trying to harden the system.I followed the AN5347 (https://www.st.com/resource/en/application_note/an5347-arm-trustzone-features-for-stm32l5-and-stm32u5-series-stmicroelectronics.pdf) in particular I followed the chapter 10 with success as I was able to raise up to RDP=2 with OEM password and back to RDP=0.Then I tried for the second time using the STM32CubeProgrammer instead of the command line as described in the application note, but I got some issues at step 5: Set RDP level 2. The STM32CubeProgrammer did not end the process and got stuck writing RDP=0xCC in the option byte and after ten minutes I forced the termination of the GUI.After that I was not able to recover to RDP=0.Every time I try to send a command to the board I get some error.If I try to follow chapter 10.6 Unlock RDP level 2 with OEM2Key with the command line:STM32_Programmer_CLI.exe -c port=swd mode=UR -unlockrdp2 0xMYKEYLOW 0xMYKEYHIthe result i
Hi! I'm trying to muddle my way through a project in which I'd like to use an stm32u5 MCU. I would like to extend the RAM/FLASH of the MCU by using PSRAM and eMMC; it seems that higher densities of PSRAM require being run at 1.8V, so I am imagining powering at least the digital side of the MCU with a 1.8V rail. My application also involves motor control; I'll be using the STSPIN233, which can also be powered by a 1.8V rail. I would like to perform current sensing, and here's where my question comes in. I'd like to use a current sense amplifier, e.g. TI's INA181 (or similar). These devices need a 3.3V rail for power. I am curious whether it is better to:Power the analog domain of the stm32u5 at 3.3V. The current sense amplifiers + shunt resistors are scaled such that I produce a total rail-to-rail voltage near 3.3V, biased at 1.65V.Power the analog domain of the stm32u5 at 1.8V. The current sense amplifiers + shunt resistors are scaled such that I produce a total rail-to-rail
Hello Team, One more query is there. We are not using USB. In STM32H7S7L8H6 pin D9-VDD50USB is there. So, can we connect it with 3.3V supply? Thanks & Regards, Jignesh Karena
When creating a new project (for STM32H573) using CubeMX, it generates defaults keys under ROT_Provisioning\SM\Keys:06/19/2025 03:20 PM 232 ITS_key1.pem02/17/2026 09:34 PM 16 SFI_Encryption_Key.bin02/17/2026 09:34 PM 12 SFI_Encryption_Nonce.bin02/18/2026 12:06 PM 136 SFI_Global_License.bin06/19/2025 03:20 PM 246 SM_Authentication.pem06/19/2025 03:20 PM 182 SM_Authentication_pub.pem06/19/2025 03:20 PM 246 SM_Encryption.pem06/19/2025 03:20 PM 182 SM_Encryption_pub.pemUsing TPC, those keys (including the SFI_global_license) can be regenerated, but when provisioning, got the following error:2026-02-18 12:19:23,911 - DEBUG - Processing license...2026-02-18 12:19:24,072 - DEBUG - Error: Execution of RSS CMD failed, returned value = 0xF6F6F6F62026-02-18 12:19:24,072 - DEBUG - Error: Failed to Process License!2026-02-18 12:19:24,073 - DEBUG - Error: .....ROT_Provisioning\SM\Binary\SecureManagerPackage.sfi SFI file Install Operation Failure! Please, try again.2026-02-18 12:19:24,073 - DEBU
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.