Skip to main content
HShal.2
Associate
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

Foued_KH
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

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Pavel A.
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.2
HShal.2Author
Associate
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?

Pavel A.
May 18, 2023

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