1

I was reading the specification of the microcontroller. In Booting, they mentioned three option. 1.Main Flash memory 2.System Memory 3.Embedded SRAM Memory. First two memory is non-volatile memory, so you put your code and start booting. but SRAM is a volatile memory, when the power goes off code will be erased. so what is use of SRAM for booting? In many blogs, All advise to use SRAM for booting.

 what is the use of using non-volatile memory in booting?   
  • as for blogs saying sram for booting, that doesnt make sense. for a bootloader yes so that you are not executing from the flash you want to possibly reprogram, but obviously you cant boot from sram in a power on situation without external/additional help. – old_timer Feb 12 '20 at 15:29
  • what part is this specifically? – old_timer Feb 12 '20 at 15:29

1 Answers1

2

Disclaimer: Since you didn't tell us which microcontroller you are using, this answer has to be quite general.

Not every system start follows a power-down. The SRAM can be filled with some decent program before the reset. This can be done by hardware, or by software. In the latter case another (or the same) program ran in non-volatile memory (that is non-RAM) and filled the volatile memory (that is RAM).

SRAM keeps its contents during reset.

Many microcontrollers allow to change the selection where to boot from during run-time.

the busybee
  • 10,755
  • 3
  • 13
  • 30