Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
On an STM32H563, I am trying to write the OBkey1 data.I have successfully set the product state to provisioning (0x17) with: FLASH_OBProgramInitTypeDef optionBytes; HAL_FLASHEx_OBGetConfig(&optionBytes); HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); optionBytes.OptionType = OPTIONBYTE_PROD_STATE; optionBytes.ProductState = OB_PROD_STATE_PROVISIONING; HAL_FLASHEx_OBProgram(&optionBytes); HAL_FLASH_OB_Launch(); HAL_FLASH_OB_Lock();Now, when I try to write too OBKey1 with: uint32_t dataAddr = 0x20050000; memcpy ((void*)dataAddr, source, 0x60); RSSLIB_DataProvisioningConf_t * pConfig = (RSSLIB_DataProvisioningConf_t *)0x20050100; pConfig->pSource = (uint32_t*)dataAddr; pConfig->pDestination = (uint32_t*)0xffd0100; pConfig->Size = 0x60; pConfig->DoEncryption = 0xCACA0AA0U; pConfig->Crc = 0; HAL_FLASHEx_OBK_Unlock(); provisioningResult = RSSLIB_PFUNC->NSC.DataProvisioning(pConfig); HAL_FLASHEx_OBK_Lock();The call to DataProvisioning() causes
Hello,I am writing to seek advice on connecting an APMemory APS12808 OSPI memory to the STM32H723ZGT6 microcontroller.Initially, I attempted to adapt the code from this thread ( https://community.st.com/t5/stm32-mcus-products/stm32h7-octospi-mode-hyperbus-hyperram-access-and-delay-block/td-p/143237/page/2 ) from @Alex - APMemory to the STM32H723ZGT6. You can find the result in the attached file `main_1.c`. With this configuration, read and write operations do work, but I am encountering issues with data mismatches/corruption.Subsequently, I tried to enable the Memory Mapped mode based on Application Note AN5050. This is where significant problems began I cannot get this mode to activate. The relevant code is in the attached file `main_2.c`.My specific questions are:1. Is there a known working example for enabling the Memory Mapped mode for this type of memory?2. Why does AN5050 not cover the MR (Mode Register) configuration and memory initialization sequence?
I’m using the X-NUCLEO-LPM01A (PowerShield) and previously had firmware version 1.0.1, where I could connect via a serial terminal over USB and interact with the board using commands. But error occured short after, with LED 2 on the board indicating USB enumeration failure. Updating the STM32-LPM01-XN firmware version to the latest one (1.0.8) solved that issue but now no sign of connection via a COM port terminal. Everything works fine using via a graphical user interface using the STM32CubeMonitor-Power software tool. But would prefer controlling via COM terminal ... Thanks for the support
Hi, I am using an STM32F767ZI to communicate with a Dacai HMI display over UART7 at 9600 baud. Sending data from the STM32 to the HMI works perfectly, but receiving data from the HMI is unreliable. The same HMI works fine when communicating with other MCUs—both TX and RX work reliably.When I touch: screen ID = 0 control ID = 12 HMI tool shows this frame: EE B1 11 00 00 00 0C 11 31 32 00 FF FC FF FF ( Data : 12 ( 31 32 ) ) Data reception does not match actual touch event HMI → STM32 reception is very unreliable Callback (HAL_UART_RxCpltCallback) is triggered rarely Breakpoint inside callback is almost never hit void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { if (huart->Instance == UART7) { HAL_GPIO_TogglePin(GPIOB, LD1_Pin); // debug uint8_t b = rx_byte; if (frameIndex == 0 && b != 0xEE) { HAL_UART_Receive_IT(&huart7, &rx_byte, 1); return; } if (frameIndex == 1 && b != 0xB1) { clearFrameBuffer();
Hi there, i'm moving my first steps into ST boards programming and I have a trouble I can't solve. Following this youtube tutorial: https://www.youtube.com/watch?v=NFljjd_vQGAI tried to create the app in TouchGFX and it worked. I can flash my STM32F746G-DISCO board correctly: (image 1) The youtube tutorial ends with importing the project into STM32CubeIDE, to do so, you go inside STM32CubeIDE folder inside main folder named MyFirstTouchGFXProject and double-click on .project file: which I did after editing the files .project and .cproject. Because I have multiple projects based on the same board and ALL OF THEM get imported with the same name, without possibility to change that name, that is in my case: STM3232F746G_DISCO, and rename the project from within the STM32CubeIDE breaks it. Therefore I changed this lines..project: .cproject: At this point i double-clicked on .project and imported into STM
Hi, I don't know where to post this message. There's an error in the RM0090 Rev21 reference manual, page 121: "bit 15 of the PWR_CR register" should be "bit 14 of the PWR_CR register". And most importantly, the debugger doesn't have bit 14 (VOS) of the PWR_CR register. I'm using an STM32F407ZET. I downloaded the archive https://www.st.com/resource/en/svd/stm32f4-svd.zip, and this bit is indeed missing from the STM32F407.svd file! Please email whoever needs this information, and have them fix it.
Hi,Having successfully installed SW4STM32 I recently tried to build the example project detailed on the RIP Tutorial web page entitled "First time setup with blink LED example using SW4STM32 and HAL library". This "threw up" four errors. The first was classed as a fatal error whilst the other three errors involved "make" which I believe are due to the first error.Within the IDE, on the "Problems" tab, the first error is listed as follows.Description: fatal error: usbh_conf.h: No such file or directoryResource: usbh_conf.hPath: /STM32F4_Discovery_Blinky/Middlewares/ST/STM32_USB_Host_Library/Core/Inc line 28 C/C++ ProblemWithin the ".../Inc/" directory is a further subdirectory called "usbh_core.h" within which is the "offending" (non-existent?!) usbh_conf.h This header file is clearly listed on both the Project Explorer and Outline tabs within the IDE. Opening this file shows the following. (How could this be done if the file did not exist ?!) /** **********************************
The integrated ST-Link debugger/programmer on STMicroelectronics NUCLEO boards is widely appreciated for its ability to output messages to a serial port, enabling easy debugging and communication with host PCs. However, setting up the board to not only send but also receive commands from PC-based applications such as Tera Term requires additional programming effort. This guide will walk you through the steps to implement bidirectional serial communications, allowing your NUCLEO board to interact dynamically with your computer.
Hi, im doing a line follower and using the mcu stm32 f411, its a small development board arduino nano style, and i conected it to the motor driver tb6612fng, and it seems to have backfeed motor suply voltage on the logic pins and it burned my mcu.My question is how to prevent this?
Hi all,I recently designed and built a custom PCB for data acquisition and transmission through bluetooth using an STM32U575 as the main MCU and a BlueNRG-M2SA module for bluetooth data transmission configured as a Network Coprocessor. They are connected via SPI following the pinout on the BlueNRG-M2 datasheet and also looking at the X-NUCLEO-BNRG2A1 schematics. The BlueNRG-M2SA is connected to an external connector via SWD for flashing using an STLink-V3Minie. Resistor R13 is not usually soldered and is just used to enable the bootloader during image flashing. Schematic for the BlueNRG-M2 on the custom PCB provided below:The problem is that I have not been able to achieve communication between the STM32U575 and the BlueNRG-2 module as whenever the main MCU waits for the IRQ signal from the BlueNRG-M2, it doesn't receive any and therefore returns BLE_STATUS_TIMEOUT and gets stuck after aci_hal_set_tx_power_level() during Device_init(). I have tried uploading different DTM ima
Hello, I hope to reach the appropriate contact regarding Country of Origin (CoO) information at ST.We have identified a conflict between the CoO listed on the website and other documents (such as PCN and the attached FMD chemical document). These documents indicate that the CoO for part STM32H523RCT7 is China, while the website lists the CoO as France.Could you please clarify this discrepancy and specify what the France CoO refers to? Based on our documents, the CoO China corresponds to the country of assembly.Your clarification on this matter would be greatly appreciated. Website CoO FRANCE : https://www.st.com/en/microcontrollers-microprocessors/stm32h523rc.html#sample-buy
Hello Community,I tried with different boards (073, 093, 533, 401) to work with the SPI1 or SPI2.I used the examples, but there is no clock on an SPIx clock pin.e.g. HAL_SPI_Transmit(&hspi1, SpiData, 2, 100); Has anybody a working STM32Cube porject to load in the STM32CubeIdefor an SPI only master (no slave no DMA) in the send modus via MOSI pin.Thank youMichael
Hello everyone!I am currently working on a speaker project that gets audio data from a microsd card over spi and sends it over i2s with DMA.I noticed that the main issue is the latency from the sd card so i got the adivce to use a triple pointer ring buffer.I searched for implementations on triple buffering with i2s but couldn't find a single one.I tried implementing it but it didn't work.(i added the code file to the post)Does anybody have good resources to learn this?
A new STM32 sub-family (as part of the 'H5 family) came out. They have everything but the kitchen sink. As far as I can tell, 'H5E4 and 'H5E5 differ only in that the higher one has USB-HS with PHY (the 'H5Fx are crypto-enabled variants, as usually) What's new is also the PLAY peripheral, which is a small programmable logic element, fully documented and configurable through registers. It's based around 16 simple logic elements (4-input LUT and an optional register), complete with an extensive input multiplexer matrix+filter, interconnected to a variety of peripherals (timers, DMA, ADC...) and also GPIO. I wonder, if there's a Disco around... JW
After encountering an issue with a Hyperbus flash chip we moved our flash to what we thought would be a simpler OctoSpi Nor Flash. I am working with an STM32H7S7 chip with a NOR Flash S28HS512T. I cannot get the chip to communicate in the desired mode. Here are my steps so far:Configuration code from CubeMX:/* XSPI1 parameter configuration*/ hxspi1.Instance = XSPI1; hxspi1.Init.FifoThresholdByte = 4; hxspi1.Init.MemoryMode = HAL_XSPI_SINGLE_MEM; hxspi1.Init.MemoryType = HAL_XSPI_MEMTYPE_MICRON; hxspi1.Init.MemorySize = HAL_XSPI_SIZE_512MB; hxspi1.Init.ChipSelectHighTimeCycle = 3; hxspi1.Init.FreeRunningClock = HAL_XSPI_FREERUNCLK_DISABLE; hxspi1.Init.ClockMode = HAL_XSPI_CLOCK_MODE_0; hxspi1.Init.WrapSize = HAL_XSPI_WRAP_NOT_SUPPORTED; hxspi1.Init.ClockPrescaler = 3; hxspi1.Init.SampleShifting = HAL_XSPI_SAMPLE_SHIFT_NONE; hxspi1.Init.DelayHoldQuarterCycle = HAL_XSPI_DHQC_ENABLE; hxspi1.Init.ChipSelectBoundary = HAL_XSPI_BONDARYOF_NONE; hxspi1.Init.MaxTran = 0; hxspi1.In
Hello,I want to use the TW9992 NTSC/PAL Video Decoder for STM32N6 to transfer an NTSC camera (720x480 resolution) to the MCU via MIPI-CSI and display it on the screen. I have attached the code below.static void MX_DCMIPP_Init(void) { /* USER CODE BEGIN DCMIPP_Init 0 */ /* USER CODE END DCMIPP_Init 0 */ DCMIPP_CSI_PIPE_ConfTypeDef pCSI_PipeConfig = {0}; DCMIPP_CSI_ConfTypeDef pCSI_Config = {0}; DCMIPP_PipeConfTypeDef pPipeConfig = {0}; /* USER CODE BEGIN DCMIPP_Init 1 */ /* USER CODE END DCMIPP_Init 1 */ hdcmipp.Instance = DCMIPP; if (HAL_DCMIPP_Init(&hdcmipp) != HAL_OK) { Error_Handler(); } /** Pipe 0 Config */ pCSI_PipeConfig.DataTypeMode = DCMIPP_DTMODE_DTIDA; pCSI_PipeConfig.DataTypeIDA = DCMIPP_DT_RGB565; pCSI_PipeConfig.DataTypeIDB = DCMIPP_DT_RGB565; if (HAL_DCMIPP_CSI_PIPE_SetConfig(&hdcmipp, DCMIPP_PIPE0, &pCSI_PipeConfig) != HAL_OK) { Error_Handler(); } pCSI_Config.PHYBitrate = DCMIPP_CSI_PHY_BT_1600; pCSI_Config.DataLaneMapping =
I am currently working on the LoRaWAN_END_NODE example project for a stm32WL . And I want to receive external data via uart and use the LoRaWan process continually, however I am getting problems. The UART is giving invalid data after the sequencer is being initialized.Edit: I have tried the suggestions below, I have put the gps into a task for the sequencer to run. I have also disabled low power mode. I still get invalid data from the UART that I don't receive when the sequencer is not on.Is this a clock issue? Any ideas?
Hi,I created a blank project for STM32U5G9J-DK2 and in process of programming the board, GfxDesigner generates 400MB file intflash.elf. With GfxDesigner 4.24.1 it is 4MB.Why 4.26.1 generates intflash.elf so large ? A bug ?Thanks
I have a simple question. Is it possible to use TouchGFX+ThreadX with enabled Ethernet and NETXDuo SNTP client at a same time in STM32N6570-DK board? In other words: take the TouchGFX ClockExample then in CUBEMX enable the Ethernet port with NETXDuo-SNTP server. Will it cause pin conflict? I mean the Ethernet uses the same pins as LTDC. I enabled the Ethernet in ClockExample project and I got blank screen and the app was frozen. After removing Ethernet from the project, the analog and digital clocks appeared again on the display. Thanks, Louis
Good day,I am writing firmware for a custom board using the STM32G0B1KET6 and am experiencing issues related to writing a serial number to the internal flash.As far as I can tell, this MCU has 512 KB of flash split into 2 banks of 128 pages (each page is 2 KB). I am attempting to write to the last page of the first bank (Page 127 @ 0x803F800).I have modified the linker file to reduce the flash area used by my application code like so:MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 144K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K }Here is my flash writing function. uint8_t Flash_Write(uint32_t startAddress, uint64_t data) { __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_BSY1); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_BSY2); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_PGSERR); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_PGAERR); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_CFGBSY); if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_CFGBSY) == 1) { return 0; } HAL_StatusTypeDef status;
Hi All,I am beginner to drones. We assembled one drone using STEVAL FCU. 002. board , recommended set. of motors and. propellers along with battery. We Chose different. frame. than. one recommended . It is smaller in size. While flying , vertical take. off. could. not be achieved.Can someone guide please ?Motor connections , Clock wise. , anti clock wise in reference. to alignment. of. the boards are checked. already.It is ST board. so. come equipped with all driver , frimware etc.Thanks in advance.Early and accurate response is. appreciated.Regards,
Hello,I recently came across an ST article describing a Condition-Based Monitoring architecture using a dual-MCU approach, with an STM32L476RG handling signal processing (and potentially edge AI), and an STM32WL dedicated to network connectivity.I find this architecture very interesting and relevant for a project I’m currently exploring, but I would like to better understand what level of support and resources are available from ST for implementing such a solution in practice.In particular, I have a few questions:Does ST provide official support or reference designs for this kind of dual-MCU architecture (STM32L4 + STM32WL)?Are there any example projects, application notes, or firmware packages that demonstrate communication between the two MCUs in this context?Regarding FUOTA (Firmware Update Over The Air), are there existing solutions or middleware provided by ST that support this setup, especially with STM32WL acting as the communication node?Are there recommended tools, libraries,
Newest AN4879 does not list STM32C5 as applicable products.
Hi everyone, I am trying to setup DCMIPP Pipe0 to read data from 256x192 pixel sensor by 16 data lines. Seems everything configured and working fine except of transfer data to destination buffer. DCMIPP frame counter is increasing. Pipe0 dump counter is 0x18000 (256x192x2). HAL_DCMIPP_PIPE_Start return HAL_OK. Pipe0 packer memory address register is qual to Pipe0 memory status address register and correspond to address of buffer in RAM. I checked that DCMIPP don't write zero values by initing frame buffer with 0xFF and it wasn't changed to zeros. I am sure that sensor is working because of frame counter, dump counter, checking lines with oscilloscope and it is working with other pcb with STM32H7 and DCMI interface. Also I validated that debugger read frame buffer correctly by sending it thought uart. Source code is simple, generated by cube init than I2C configuration of sensor(validated) and than reading in loop with delay: while (1) { H
Hi Team, I am designing a custom PCB using STM32H753 and planning to use the QUADSPI peripheral for external memory. My use case is data read/write (indirect mode) — not XIP or memory-mapped execution. While working in STM32CubeMX, I came across some configurations that are confusing, and I’d like to clarify the actual hardware behavior. 1. Dual Bank vs Chip Select behavior In CubeMX, I can configure: QuadSPI Mode: Dual Bank with Quad Lines Chip Select options: Enable Chip Select 1 for both banks Enable Chip Select 2 for both banks Enable Chip Select for each bank My understanding: NCS → Bank1 NCS2 → Bank2 Questions: If I select “Enable Chip Select 1 for both banks”, does this mean: Only one physical flash is used and banks are logical partitions? Or is there any way two physical memories are still utilized? What is the exact meaning of “bank” in this context (hardware vs logical)? 2. BK1_IOx and BK2_IOx pins confusion CubeMX exposes: QUADSPI_BK1_IO0
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.