Skip to main content
Visitor II
May 16, 2023
Question

Flashing SRAM with USART bootloader

  • May 16, 2023
  • 2 replies
  • 2182 views

I followed the article on placing a program into SRAM - I can't place the link here, on an STM32 (I'm using the STM32L476RG Nucleo board)

I can successfully execute the program from SRAM directly from STM32CubeIDE however when I try and load the program into STM32CubeProgrammer and program into SRAM using the UART bootloader, I can see that the device has successfully been connected to however I get this issue:

 13:54:33 : Error: Write address not acknowledged: 0x20000000

 13:54:33 : Error: failed to download Segment[0]

 13:54:33 : Error: failed to download the File

Is it possible to program the SRAM using the UART bootloader?

    This topic has been closed for replies.

    2 replies

    ST Employee
    May 16, 2023

    Hello @Community member​ ,

    You can refer to this Application note : Programming an external Flash memory using the UART bootloader built-in STM32 microcontrollers

    Also, I recommend you this article : How to use STM32CubeProgrammer to access the USART bootloader on my STM32 board

    Hope I helped you!

    Foued

    Super User
    May 17, 2023

    Of course you cannot "flash" SRAM because RAM is not flash :)

    The debugger, however, knows the difference very well.

    You can make a custom bootloader (similar to the "in-app programming" examples with ymodem) that loads and executes code in RAM.

    Maybe the CubeProgrammer API library allows to make a host app that does the same without a loader on the target. (I haven't studied the API well; the Segger J-Link API certainly allows this).

    HShal.2Author
    Visitor II
    May 17, 2023

    Thanks for the response Pavel! So its not possible to directly program the SRAM using the stock ST bootloader, without writing a custom one?

    Super User
    May 18, 2023

    I'm not saying this is 100% impossible. I just do not know how.