This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Stellaris Cortex-M4 boot from SPI Flash



Simple question, can the Cortex-M4 boot from SPI flash?

-Jaden

  • You may have an answer to this already, but to be honest, there isn't a simple answer.  Mainly because I don't see the relevance of booting from a SPI flash when the Cortex-M4 family of devices have embedded flash in them.  Furthermore, there is not an execute in place from SPI Flash capability.  The ROM bootloader on the LM4F devices does not support the SPI interface today.  Of course this last comment is time based, meaning the devcies that are available on 01.29.13 do not have this capability.  Future devices may be different.

    Having said all of this, I would submit that it could be possible for an individual to develop a small kernel to program into the internal flash that basically bootstraps from an external SPI flash device.  However, this would likely need to copy sections of code and initialized data from the SPI flash into internal RAM to run from.  Another potential application of this type of approach would be to implement a dual-image structure whereby the firmware images are held in the external SPI flash and the internal "bootloader" kernel resident in internal flash of the LM4F would determine which image to grab and program the "rest" of the internal flash with that image.

    Again, this isn't implemented today and would be something that the user of the device would need to put together.

  • Right now I have an application where I'm going to need to figure out how to read from an external flash in a bootloader. This is very common in low power wireless networks for firmware updates; you download the image off to an external flash, reboot, and then copy over the whole image. This procedure is necessary when using potentially spotty RF links; you want to be able to recover.

    OTOH, trying to execute code in real-time from flash is just plain silly. Just copy it over to the internal flash and let er' rip!

    --Derek

  • BrandonAzbell said:
    Another potential application of this type of approach would be to implement a dual-image structure whereby the firmware images are held in the external SPI flash and the internal "bootloader" kernel resident in internal flash of the LM4F would determine which image to grab and program the "rest" of the internal flash with that image.

    We do exactly that for brick-proof firmware updates, on an LM3S.  Works great.