0

As i know, mcu such as stm32f4 can be configured to boot from external spi flash, or sd card. But when we write or read the flash or sd card in application, initialization or configuration driver code must be executed at first.

I think since the mcu has been booted from spi flash, some driver code should already have been executed.

I was wondering about the following:

  • How can the mcu read spi flash or sd card after reset?

  • What is the difference between read spi flash at power on and read it in application?

  • Why we need those drivers in applicaton when we already have read access to those devices?

VC.One
  • 14,790
  • 4
  • 25
  • 57
  • 1. I believe MCU has a firmware that has a "driver" (in quotes because the functionality of a such usually very limited in order to fit into smaller ROM). Another explanation that there is a special mode by the SPI NOR/NAND controller that can be configured to read all data at once, but I don't think it practically makes sense. – 0andriy May 18 '22 at 19:59
  • 2. Different functionality because very different environment of execution (and hence different requirements / constraints). See also 1 above. – 0andriy May 18 '22 at 20:01
  • 3. The "Boot loader" / "OS level" code often reinitializes the hardware, somebody needs to program it correctly depending on the use case. – 0andriy May 18 '22 at 20:02
  • Thanks a lot. I see what you mean. i will be grateful if someone can add something about this question in detail. – kevin zhu Jun 07 '22 at 13:42

0 Answers0