Skip to main content
Visitor II
May 15, 2024
Question

writing data in flash using DMA

  • May 15, 2024
  • 1 reply
  • 764 views

Hi,

I want to write data in flash using DMA. I TRIED USING 

HAL_DMA_Start() FUNCTION. DATA NOT WRITE IN FLASH. HOW TO WRITE DATA IN FLASH USING DMA IN SMT32G0B1RCT6.

 

    This topic has been closed for replies.

    1 reply

    ST Employee
    May 16, 2024

    Hello,

    FLASH is by default write protected so before the program will try to write to flash memory it is needed to unlock flash memory. Here is an example for STM32G0B1 which it describes:

    STM32CubeG0/Projects/NUCLEO-G0B1RE/Examples/FLASH/FLASH_EraseProgram/Src/main.c at c6c0046d9278a7107261c6bf38327345df4c3efd · STMicroelectronics/STM32CubeG0 · GitHub