Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Heyho,I'm working with a STM32G431 on a Nucleo-32.I've played with it before some years ago, so I already put on a 24 MHz crystal "HSE".I'm using only the in-built ST-Link's USB power as a source.Problem:after connecting USB, the reset button must be toggled to start the controller.Any ideas how this can be prevented?We want to use the Nucleo for some in-house testing, and it would be nice if the controller started instantly at power-up without the reset button (which might be "hidden" in a small case).Google and search here didn't really show this problem.Thanks!
Hello, I’m trying to transmit data at 2.5 Mbps (2500000 baud), but I’m not receiving any output. The same code works correctly at 2 Mbps, so the issue only appears when using 2.5 Mbps.I tested both 64 MHz and 40 MHz clock configurations for the UART. At 64 MHz, CubeMX shows a warning:“Real Baudrate set at BRR register is 2.461538 Mbits/sec. Error: -1.54%.”Because of this error, I switched to a 40 MHz configuration, which gives the exact 2.5 Mbps baud rate—but I still don’t receive any data.Is there any additional configuration required to make the MCU reliably transmit at 2.5 Mbps?
Dear STM32 Support Team, I am working on implementing CAN communication using the standard SAE J1939 protocol on an STM32-based platform and would like your guidance. Could you please suggest: Recommended STM32 example projects or application notes for J1939 over CAN. Any official STM32Cube examples, middleware, or partner stacks for J1939. Best practices for configuring the CAN peripheral (bitrate, filters, extended ID usage) specifically for J1939 on STM32. Recommended approach for reading GPIO inputs (three switches) and mapping them to different J1939 messages or PGNs. I am happy to provide details about my MCU part number, board, and current code if needed. Your support would be very helpful for moving this feature to completion. STM board: STN32F207ZG Thank you in advance for your assistance. Best regards,Suman Uppala
Hello,We are using STM32U375xx/85xx MCUs and want to implement firmware update over UART using another MCU (ESP32-S3) in out application.The ESP32 will send the .bin firmware to the STM32 without using any ST utility (e.g., CubeProgrammer).From the STM32 AN2606 bootloader document, I understand that normally BOOT0/BOOT1 pins must be set to enter System Memory.Question 1 — Entering Bootloader via SoftwareWe want to enter the system bootloader purely by software, without toggling hardware BOOT pins.How can this be done on the STM32U3 series?Question 2 — Flashing Over UART from ESP32Could someone provide the correct sequence for flashing a .bin into STM32U375/85 using the UART bootloader protocol?(ESP32 will send the commands directly — no STM32CubeProgrammer involved.)Steps I am looking for:entering bootloaderUART initializationbootloader command sequence (GET, GETID, ERASE, WRITE, GO)any STM32U3-specific notesThanks in advance for any guidance.
Hello everyone,I am working with the STM32F746G-Discovery board and trying to send ADC sensor data to a cloud server over Ethernet using LwIP (RMII mode). The goal is to send a JSON payload via HTTP POST.What I have implemented so farEnabled Ethernet (RMII) in CubeMXEnabled LwIP (static IP)Enabled ADC1 and UART6 for debuggingGenerated code using AC6/GCCAdded JSON formatting + http_post() callIssues I am facing1) HardFault during LwIP initializationThe system crashes right after:MX_LWIP_Init(); netif_set_up(&gnetif);A HardFault occurs before DHCP/static IP becomes active.2) DMA descriptor memory placement errorsThe compiler/linker shows errors such as:DMARxDscrTab memory out of rangeaggregate value used where integer expectedThe descriptors are currently placed like this:ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection")));I suspect the MPU configur
I have a password obk file:$ xxd PasswordObkFile.obk00000000: 0001 fd0f 6000 0000 0000 0000 5e9b d65f ....`.......^.._00000010: e48e a17e 40ae 126f 76e7 c101 3a73 bf35 ...~@..ov...:s.500000020: c95d 4897 5c5d 1575 a719 8442 184a a46d .]H.\].u...B.J.m00000030: 8134 1172 7da0 dc9e 6418 6bb9 9072 89b5 .4.r}...d.k..r..00000040: aab4 b320 d26f ff5e a45d 8e3d 7750 0000 ... .o.^.].=wP..00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000060: 0000 0000 0000 0000 0000 0000 ............I am running my application with Trustzone disabled (TZEN=C3).I have a C array:static uint32_t obk_data[] = { 0x60000000, 0x00000000, 0x5e9bd65f, 0xe48ea17e, 0x40ae126f, 0x76e7c101, 0x3a73bf35, 0xc95d4897, 0x5c5d1575, 0xa7198442, 0x184aa46d, 0x81341172, 0x7da0dc9e, 0x64186bb9, 0x907289b5, 0xaab4b320, 0xd26fff5e, 0xa45d8e3d, 0x77500000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 };Using a function like this I am writing the contents to the OBK area using functions like this
Hello community,I recently tried to flash the BLE_SerialCom_Central example code onto the STM32WBA55 board. During the debug session, when I clicked the 'Suspend' button, a number of messages appeared in the debug window. I took a screenshot and attached it. I'm still struggling to find a solution to flashing the example code.It would be great if someone who has encountered this issue before could give me some advice.Best regards.
Good evening,I have been trying to get the ethernet port of my NUCLEO-H755ZI-Q to talk to my PC - and have been failing to do so now for a week.I found this manual, but it is for Cube IDE 1.9 - and even after following the described steps I fail to talk via ethernet.I did also find this github repo where I used STM32H7-LwIP-Examples/STM32H745_Nucleo_M7_ETH - and after adapting the IPs somewhat communication via UDP did work.So I am rather sure my hardware does work.But the code generated by CubeMX 2.0 does not.Can anyone provide me with eithera short manual how to configure CubeMX correctly,a ready-made example project using the current CubeMX 2.0,or any other input?The current problem with my CubeMX 2.0 generated project is that during reception I get an ETH_DMACSR_RBU /* Receive Buffer Unavailable */inside theHAL_ETH_ErrorCallback En- or disabling ICache, DCache and MPU did not have any effect. I did move the RX_POOL to 0x30040000 as per the article and adapt
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 and a linker script content. Please read this post: How to insert source code. Hi im using STM32H745 MCU, in this for cache coherency for using DMA with any peripherals and using Clean and Invalidate data cache Functions will solve the full problem. if suppose if both the cache and MPU settings are disabled during this time also cache coherency will occur? MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x00; MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x87; MPU_InitStruct.DisableE
I have NUCLEO-WB05K/NUCLEO-WB07CC/NUCLEO-WB09KE only the NUCLEO-WB09KE can be connected to with Software Reset mode. The NUCLEO-WB05K/NUCLEO-WB07CC boards have the above error on connect. The Hardware Reset mode doesn't work with the NUCLEO-WB09KE (or the other boards). All STLink firmware up to date - not many jumper options to get wrong on these boards. Windows 11.
I'm trying to drive a display controller and have found it trickier than I anticipated, and I hope you can kindly help. My microcontroller is the STM32U545. My display controller is the UltraChip UC1628c_A, as part of a custom 160x160 monochrome LCD. Our display's only data interface is the S8 4-wire interface described on page 32 of that link. It's half-duplex SPI with an additional pin called Control/Data (CD), or sometimes Command/Data. Each byte of the message that we send is either Control or Data. We tell the controller which by driving the CD pin low for Control or high for Data during that byte (the controller reads that pin in the middle of the final bit). Each message starts with one or more Command bytes, and most messages are followed by one or more Data bytes (up to 160 bytes in my product). I expect that the display controller requires these bytes be sent as one continuous SPI message, without stopping the clock or changing the chip-select (slave-select) li
We need to develop an offline programmer to program the STM32H562VIT. The product state need to be changed to Closed with an OBK file programmed. The OBK data only in HDPL1.We can't simply use the RSS to program the OBK like STM32Cubeprogrammer. We could only write and read the flash registers by SWD.When in OPEN state, we could program the OBK files successfully, then we change the state to provisioning and closed. But if we first change the state to Provisioning, then try to program the OBK data , the programming of OBK is always failed.So our questions is how to program the OBK file data when in Provisioning state for a third programmer?
Hi !I am using a stm32f103RCT6 MCU for my bare metal code. I want to use high speed SPI 1 peripheral (PB3- SCK, PB4- MISO, PB5- MOSI). By defualt, PB4 and PB5 are enabled as JTAG pins. I use the AFIO->MAPR register to disable JTAG and enable only SWDIO. The issue I am facing is that I am not able to flash my code on the controller after changing the value in the register. I have to power off my stm32 and flash the code before the register value changes. I added a delay so that I can have some time to connect my stm32 and flash the code. My code works fine and throws no errors. Only flashing the code has now become difficult. Please advice me what to do. Below is my code snippet.void SPIx_init(SPI_TypeDef *SPI){ Delay(1000); // 1. GPIO clock enable RCC->APB2ENR |= (1 << 0); // enable AFIO if(SPI == SPI1){ Delay(1); AFIO->MAPR &= ~(0b111 << 24); //Reset AFIO->MAPR |= (0b010 << 24); // disable JTAG and enable SWDIO Delay(1); // SPI1 remap PB3, PB
Hello,I’m developing a USB composite device on STM32 that combines RNDIS and CDC interfaces.The device works perfectly the first time it’s connected to a Windows 10 PC — both RNDIS and CDC functions operate normally.However, after I reset the MCU or power-cycle the board, Windows shows the following error in Device Manager:“This device cannot start. (Code 10)”{Operation failed} The requested operation was unsuccessful.At this point, the RNDIS interface no longer works.If I uninstall the device from Device Manager or reinstall the driver, it starts working again.On Linux, the same device works without any issue, even after multiple resets.I have confirmed the following:The USB VID/PID remain the same after reset.The device descriptors are correctly reported.The problem occurs only on Windows after a full power cycle or hardware reset.Has anyone experienced similar behavior with RNDIS composite devices on STM32?Is there something specific I should check in the USB descriptors or RNDIS in
Code is given below in the files:/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include <string.h> /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ #define RING_BUF_SIZE 32 #define PACKET_SIZE 8 #define CAN_CMD_ID 0x100 /* USER CODE END PD */ /* Private variables ---------------------------------------------------------*/ CAN_HandleTy
STM32 H573 TrustZone Enabled question. I'm executing the STM32 H573 example for TrustZone Enabled (OEMiROT, Secure, and Non Secure Apps). I know the OEMiROT and Non Secure App prints out and logs info, but I want to be able to do that in the Secure App for logging purposes - errors and debugging. I tried to use Gemini to create code that does that, but there appears to be many security hoops to jump through to do that, and I have been unsuccessful. Do you have an example of what I can do to do this? Gemini creates the following functions and instructs me to place it under the Non Secure App and call it from a Secure App function, but I keep running into the problem of where I'm getting multiple definition of `NS_putc_utility' error. /*** @brief Non-Secure Call-able (NSC) function that returns the pointer* to the Non-Secure World's _write (UART) function.** The __attribute__ flag ensures the compiler generates the securit
I've just brought the stm32h573i-dk dev board and what to become familiar with Threadx and USBx. I have a uni project coming up that I would like to use the board as a msc device but struggling to get the board to enumerate with the PC. I have tried to get majority of the USBx reference designs up and running. They compile fine but nothing happens when I connect the board to a PC on cn17 ( the non stl-link usb). Is there anything I'm doing wrong to get it up and running . Is there something I need to enable to for the USB port to work? I also have a couple of u5 and h5 nucleo boards I would also like to get up and running With various forms of USB Once I have the discovery board working. Any pointers would be greatly welcome. Thanks
Hi I'm trying to use an LP TIM to generate an interrupt after a time interval on an STM32U073CCT6. The interrupt will wake the processor from STOPMODE2.I haven't found any examples, and the STM32CUBE MX doesn't have a software-triggered single-shot option. The LPTM1 clock is LSI. Can you help me with this application? BR Gilberto
We use STM32H743 to develop a system that needs to display a 1920 * 1080(8-bit pixel depths) graphic on LCD(driven by FPGA)Now our design is that STM32 reads a picture from the SD card, then decodes and sends it to the FPGA through FMC.We tried the software decoder, but it takes almost 5 seconds to decode just one PNG picture. The required time is only 50ms(about 3 FPS for each graphic, so 3*16ms = 48ms). I just learned that STM32H743 has an internal JPEG hardware decoder, but it seems this JPEG hardware decoder does not support 1920 * 1080? So the only way is to use an external decode chip, am I right?
Hi all,I would like some ideas/help with designing an interface for a large multi-level menu. I need the user to be able to get to specific information about a vehicle make, model and year. My first thought was to use a scroll list or wheel for the user to select the make. That would take the user to another screen with a scroll list/wheel with the list of models for that make. The user would select the model and that would take them to a screen with a scroll list/wheel for the different years for that model. when they selected the year, the information needed would be displayed.I had some success in doing this, but I am realizing that this method would require hundreds of screens. Is there a more elegant method of doing this? Like would having multiple layers of hidden lists and making the list visible for the models that the user selected in the make screen?To add another layer of complexity to this, the database will need to be updated every year or two. It would be good to be able
Hi All, I am choose the STM32U585VIT6 MPU to design our customized board. Firstly I design a simple basic connection to program it and only blink the LED for confirmation our initially circuit. Also I following the AN5373 document. When I flash the code getting the error below Error in initializing ST-LINK device. Reason : No device found on target. Find the attached schematic. Please guide me what is the issue and how to resolve it.
Hi everyone,I have a STM32H573I-DK and try to port FreeRTOS without TrustZone to this board by CubeMX but suffered from a problem.I installed the X-CUBE-FREERTOS, set TIM17 for HAL Tick and SysTick for FreeRTOS.It will block (or crash?) in vStartFirstTask() after called vTaskStartScheduler().I have no idea what happened...Is there problem of my setting ?Thanks a lot.
I think it doesn't have an impact and you just get extra pins (e.g. extra SPI controllers becoming accessible) if going say 100 to 176. But it's not clear...IOW, will existing code run exactly as before? Isn't the silicon identical and they merely bond out the extra pins on the bigger packages?
Hello,I am working on a Zigbee project for my school and i have never worked with any form of wireless communication. I managed to flash the Zigbee_OnOff_Server_Coord application on my nucleo board and the Zigbee_OnOff_Client_Router on my USB dongle. And when i click on the dongle button the led on the nucleo toggles, that alone works just fine. But for my project i need to connect an Aqara Door and Window Sensor to my P-NUCLEO-WB55. When i click on the "pairing" button on my sensor even tho i am able to connect it with the nucleo i have no idea on what to do after that, because when i toggle the door sensor state (manually open/close the sensor) nothing appears on the terminal.I have done some tests with the door sensor and the aqara HUB and the sensor works fine so we can get that out the way.Thanks in advance,Churin Mateo
I've an STM32U5A9J-DK-FreeRTOS and I was looking to a way to stream audio from the PC to the board and vice-versa using the USB-C on board port.I've seen that there's a CUBE extension X-CUBE-USB-AUDIO but it feels it is specifically for the STM32F7Also, on the CubeMX, opening the .ioc file, the only USB option I'm seeing is USB_OTG_HSSo, my question is, the USB-C port on the STM32U5A9J-DK board supports it?I'm also seeing the X-CUBE-AUDIO-KIT but again it feels compatible only for STM32H series
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.