Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Greetings, I am using a STM32U585 MCU and I made a custom made code that implements the DFU protocol. I could successfully flash a firmare through .bin file and set the Option Bytes, set RDP level 1 and go back to RDP level 0. What I want to do is to be able to flash an encrypted firmware into the board using my method. So obviously, I can't do it through the STM32CubeProgrammer or STM32TrustedPackageCreator since I don't want to depend from any ST HSM smartcard, so I guess I can't do it with SFI way. Is there any other way to encrypt a firmware file, then upload it to the board and the board itself be capable of decrypt the firmware and run it? BTW, I am being using the B-U585I-IOT02A board to make the tests.Thank you!
im trying to implement peak current mode contorl using stm32G474 i have a question about PCMC. in PCMC, if the sensed voltage from Current trasnformer does not reach to target value, does the switch remain continuously on, or does it turn off according to the original switching frequency? if neither is the case, does it turn off for a very short moment that matches the switching frequency and then turn on again to chasing target voltage? (==> duty ratio nearly 0.99) thank you for infomation
Hello,I’m using the STM32H747. When I set the RCC power source to RCC → Power parameters → Supply source = LDO, the core locks up; if I select SMPS, there’s no issue.When I set CM7 to its maximum clock frequency (480 MHz) and CM4 to 240 MHz, the tool forces LDO and I can’t choose SMPS. In fact, for any CPU clock higher than 400 MHz, LDO becomes mandatory.When I run the MCU with LDO, I can’t operate at the maximum clock frequency. If the core locks up, I set BOOT=1 via R192 and perform a Full Chip Erase. After that, if I still keep LDO selected, I can connect once and program the device, but on the second programming attempt—or after unplugging and replugging the board—I get a “No target” error again. I see the same problem even at lower clock frequencies when LDO is selected.Previously, when I programmed the MCU at the maximum clock frequency, I did not encounter this issue. The code that used to run without problems at that time is now producing the same error today.Also, I’m attachin
Not an issue, just a recommendation for ST HAL developers...STM32H7 firmware package, SPI_Receive (polled) does not consider the state of the SUSP flag.During a polled SPI transfer that is larger than the receive fifo size, if the code is pre-empted (maybe a long interrupt or task switch) and the SPI rx fifo fills up, the SUSP flag is set and automatic clocking of SPI data is suspended. The SPI transfer stops. When handing returns to the SPI_Receive function, it reads the rx fifo, then hangs waiting for more data which will never come due the SPI clock being suspended. Eventually the function times out and returns error.I would recommend clearing the SUSP bit after each reading of the fifo to kick off data transfer again.I don't need a workaround, just wanted to bring this to attention as could be quite confusing for some people who expect a blocking transfer to never timeout when in master mode.
Hi,I am running my Zephyr application from an OSPI external flash and would like to write to the same flash. The MCU is an STM32H730, and the flash is an IS25LP128.However, the flash_stm32_ospi_write method in zephyr/drivers/flash/flash_stm32_ospi.c causes my application to hang. The issue seems to be that the relevant semaphores are not initialized in the flash_stm32_ospi_init function.To address this, I added the following two lines to flash_stm32_ospi_init: k_sem_init(&dev_data->sem, 1, 1); k_sem_init(&dev_data->sync, 0, 1); After this modification, I am having problems in aborting the ongoing memory-mapped operation.Could anyone provide guidance on properly handling flash write in XIP mode. Any pointers or suggestions would be greatly appreciated! Thanks.
Hi,I am using USART4 in STM32L562E-DK eval board. with given configuration. In which I am able to transmit the data correctly on TX based on which UART slave device is sending back the 4 bytes ACK and 16 bytes RESPONSE.Using following codevoid HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { if (huart->Instance == UART4) // check correct UART { // Store received byte //UART_Print("bytercv\r\n"); if (rxIndex < RX_BUFFER_SIZE_4) { rxBuffer4[rxIndex++] = rxData; } // Check if done if (rxIndex >= rxTargetLen) { rxComplete = 1; // Mark reception complete } else { // Keep receiving next byte HAL_UART_Receive_IT(&huart4, &rxData, 1); } } } I am able to receive the ACK but after some time when I read the RESPONSE there is not data available.If I am reading only 4bytes of data what happens to remaining data is it loss?Or I have to use FIFO based UART implementation.Regards,Aman Edited to apply source code formatting - please see How t
ST ,I am working on getting the scan request event ob the full stack.After looking at these posts : https://community.st.com/t5/stm32-mcus-wireless/ble-how-can-i-get-a-scan-request-event/td-p/221485https://community.st.com/t5/stm32-mcus-wireless/ble-how-can-i-get-a-scan-request-event/td-p/221485It looks bleak. Option 1: AN5270The enable event : ACI_HAL_SET_EVENT_MASKThe event message: ACI HAL eventsBoth seems not to be enabled ( no "Y" on any of LO, BO , BF etc... ) . What does it mean ? Will they work on full stack ? Option2 : AN6142/AN5270The enable event : HCI_LE_SET_EVENT ( I guess puting : • 0x0000000000040000: LE scan request received event will do the trick?) The event message:: HCI_LE_SCAN_REQUEST_RECEIVED_EVENT is enabled only for LO ? will it work on full stack bin?
I’m designing a minimal breakout board for the STM32H757IIT6 to power it up and access a few GPIOs. The purpose is purely learning both about the STM32 dual-core system and PCB design. Since I’m a beginner, I’d like suggestions on anything essential I should include to reliably power up the MCU and reduce the chance of errors on the PCB.
Split from L072Z LRWAN1: Switch from Class C to AI also encountered the problem of CLASSC conversion failure. Could you please tell me if you have any solutions at present
Hello,The problem is that we have made 50 customized boards using STM32F412RET6TR, 2 of them has the same issue. It does not run the code (forzen) at cold start up, but will work after a manual reset or power unstable.One Device was fixed by replacing the MCU, another was remaining for investigating the issue.Initially, I thought it is the problem of start up reset was released to early, so an RC mod was added to the reset line, but it does not work. Probe on the reset signal and VDD was normal. And later debug shows that the program hit the Reset_Handler and failed in SystemClock_Config section.Here's some log:#77, find the program can hit reset_handler, and go to error handler, Use several way to debug and make sure error happens in Systemclock_config.Adding Delay 50ms/several seconds at start up not help, later found that LSE_STARTUP_TIMEOUT is 5000ms, so the LSE will not recover over timeBy removing the LSE in systemclock_config, it will pass systemclock_config and get into next st
hello, i hope you are doing good. i am facing an issue in configuring i2s in dev board nucleo-h723zissue i am facing is no clock at i2s2-sck pin.i tries all other i2s port also. i checked clock through logic analyzer .here is my clock configuration: i2s configuration: pins: i tried other i2s2_sck pins alsocode : /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes --------------
Hi,I am designing a custom board based on the STM32H753, and as part of the design process I am reviewing the MB1246 and MB1331 evaluation board schematics for reference.While studying the display interface, I noticed the following discrepancy:On the MB1331 board, the display interface pins include 470 Ω @ 100 MHz ferrite beads.On the MB1246 board, these ferrite beads are not present.Since I am planning to use the STM32H753 with the same 7" display used on the MB1331 board, I would like clarification on:What was the rationale behind adding ferrite beads on the MB1331 display interface while they were not used on MB1246?Are the ferrite beads primarily intended for EMI/EMC performance, or are they required for signal integrity or noise filtering specific to the 7" display?For a custom board design, would you recommend including the same ferrite beads as on MB1331, or are they optional depending on system-level EMC requirements?Understanding this difference will help me ensure my design f
I am currently designing a custom board based on the STM32H753 microcontroller, and I am studying ST’s evaluation boards as reference designs for the external SDRAM interface. While comparing the schematics of MB1246 and MB1331, I noticed a discrepancy in the series resistors used on the SDRAM data bus:On the MB1246 board, the PH8 pin (connected to D15 of the SDRAM data bus) and several other data lines include 33 Ω series resistors.On the MB1331 board, the same positions are populated with 0 Ω links instead.Could you please clarify the following:What was the rationale behind using 33 Ω resistors on MB1246 versus 0 Ω on MB1331?Does this reflect differences in PCB layout, stack-up, or signal integrity validation between the two boards?For custom board designs using STM32H7 with external SDRAM, which approach would ST recommend:Always include 33 Ω series resistors,Always use 0 Ω links, orProvide footprints for both and determine values during validation?Your guidance will help me finaliz
Dear all!i'm handle graduation thesis project: " design driver for PMSM using STM32 base external mode with Matlab simulink"i design hardware as PDF file, all block working without ADC, i try to set up by STM32cubeMX 6.14 but it still can't run, so can you help take a look and share the problem.
Apparently I can not easily update my application firmware for stm32F746 toughGFX app with just one Bin file. I have written a bootloader for an SD card. It loads firmware at 0x08040000. I am not sure I understand everything that is going on here, so feel free to correct me.First issue I noticed was the Binfile created by stm32ide was 2G in size compared to the Hexfile that is 13M! I determined this is because it is padding data from internal flash to external QSPI flash starting at 0x90000000So now I need to break file into two bin parts and load separately, One into internal flash and the QSPI into external? I think I could also use a hex file, but may have to customize it, and try to load that through my bootloader to do the same thing?Not sure what I need to do, does anyone have any experience with this?
Hi,I have a struct that looks like the following:typedef struct { uint8_t statusbyte; uint8_t dmaBuffer[32]; } STRUCT_ReceptionBuffer;The RM0091 instructs that source and destination addresses should be aligned on the data size. What I want to transfer to the buffer are 32-bit words (it is an I2S-to-USB-Audio conversion, and USB deals with bytes).This means I need to align the struct. I am using the GCC compiler tools but the F0 HAL library also defines the __ALIGN_BEGIN and __ALIGN_END macros.My question is, how and where should I place these macros in order for them to have the desired effect?Does this look correct?typedef __ALIGN_BEGIN struct { uint8_t statusByte; __ALIGN_BEGIN uint8_t dmaBuffer[32] __ALIGN_END; } STRUCT_ReceptionBuffer __ALIGN_END;Or would this be more correct? typedef struct __ALIGN_BEGIN { uint8_t statusByte; __ALIGN_BEGIN uint8_t __ALIGN_END dmaBuffer[32]; } __ALIGN_END STRUCT_ReceptionBuffer ; The complier does not seem to care much what I do. E
Hi!I need to know if there is library that allow to manage the file system ext4 with STM32U575 microcontroller.I found the FATfs and FileX libraries but in their documentation i noticed that they can handle FAT16, FAT32 and extFAT but there aren't informations on their compatibility with ext4 FS. Can you give me some information about?Thank you in advance.Best Regards,Stefano
Hi,I have a STM32F411CEU6 Blackpill that I'm wanting to interface to an eMMC (Raspikey to be exact via SD/MMC reader) with FATFS. I have confirmed that the connections with the SD/MMC reader are fine with a read/write test to an SD card in a different STM Project. I have a duplicated project but orietated for eMMC where I've changed the FATFS configuration to be User-defined and understand that I need to implement- USER_initialise, USER_status, USER_Read, USER_Write and USER_ioctlCan someone shed light or provide examples of the user_diskio.c functions for MMC/eMMC?Thanks,J
Hello,I am working to incorporate BLE bonding into our project, and have run into a tricky issue where the Flash Manager gets stuck trying to write a key to flash. I've enabled the Flash Manager and SNVMA_NVM modules in the IOC file:I'm currently using RTT Viewer for logging, and this is the output I see:00> FM_WindowAllowed_Callback00> FM_BackgroundProcess - Case FM_BKGND_WINDOWED_FLASHOP00> FM_BackgroundProcess - Case FM_BKGND_WINDOWED_FLASHOP - Time window granted00> FM_BackgroundProcess - Case FM_BKGND_WINDOWED_FLASHOP - Write operation00> HAL_FLASH_Program: Address: 0x081FE000, DataAddress: 0x2002F610 (status: 0x00000000)00> FM_BackgroundProcess - Flash operation not complete yet, request a new time window00> FM_WindowAllowed_Callback00> FM_BackgroundProcess - Case FM_BKGND_WINDOWED_FLASHOP00> FM_BackgroundProcess - Case FM_BKGND_WINDOWED_FLASHOP - Time window granted00> FM_BackgroundProcess - Case FM_BKGND_WINDOWED_FLASHOP - Write operation00> HAL
I have a design that I have used in the past but a latest build I am having trouble with the system clock. I am using 8mhz crystal, IOC file HSE is setup to use the crystal. I cannot get the processor to run above 16 Mhz. I have older projects that use the same processor and no issue with running at max 72Mhz. I have this problem with 1.12 and 1.19 so I don't believe it's CubeIDE. Is there any known issues with these chip?
Hello everyone,i want to dected PVD but when i enable __HAL_RCC_PWR_CLK_ENABLE Iits showing error in stm32h753vit6 why?
I want to program a NUCLEOWB55RG board with another identical NUCLEOWB55RG. The reason is the other NUCLEO board is placed on a PCB and is powered externally, so i cannot connect USB to it. Do I just remove the JP1 jumper and connect the SWD pins (SWD, SWDIO, GND, VDD, NRST) between boards?
In this example, if instead of using HSI I enable HSE, I can’t get memory-mapped mode working on XSPI2.Baord I am using is NUCLEO-N657X0-Q-C01I replaced this functionhttps://github.com/stm32-hotspot/STM32N6_FSBL_Modes/blob/main/LoadAndRun/FSBL/Core/Src/main.c#L119-L198with my SystemClock_Config SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Configure the System Power Supply */ if (HAL_PWREx_ConfigSupply(PWR_EXTERNAL_SOURCE_SUPPLY) != HAL_OK) { Error_Handler(); } /* Enable HSI */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1; RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; RCC_OscInitStruct.PLL1.PLLState = RCC_PLL_NONE; RCC_OscInitStruct.PLL2.PLLState = RCC_PLL_NONE; RCC_OscInitStruct.PLL3.PLLState = RCC_PLL_NONE; RCC_OscInitStruct.PLL4.PLLState = RCC_PLL_NONE; if (HAL_RCC_OscConf
I am using the STM32N6570-DK kit, and I want to use the camera to capture 224*160 size image, but I don't know how to do this, the sample programs are all about 800*480,and I can't understand the configuration of the downsize.The lines below can change the original 2592*1944 size into 800*480, but how? When initializing the IMX335 sensor, it was set to capture the 2592*1944 size image./* Configure the downsize */DonwsizeConf.HRatio = 25656;DonwsizeConf.VRatio = 33161;DonwsizeConf.HSize = 800;DonwsizeConf.VSize = 480;DonwsizeConf.HDivFactor = 316;DonwsizeConf.VDivFactor = 253;
Hi everyone,I am trying to implement Micro-ROS over UDP on an STM32F7 (Nucleo-F767ZI), but I keep running into hard fault errors. I am using LWIP with FreeRTOS in STM32CubeIDE.So far, I have:Successfully built and integrated Micro-ROS into my project using serial transport.Configured LWIP for UDP and able to ping the board.Initialized Micro-ROS with a UDP transport, but the system crashes with a hard fault.Has anyone successfully gotten Micro-ROS over UDP working on an STM32F7? If so, could you share:Any specific LWIP settings that need to be changed?The correct way to handle memory allocation (heap/stack sizes) for Micro-ROS?Debugging tips for tracing the cause of the hard fault error?Any insights or working examples would be greatly appreciated!Thanks in advance!
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.