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.

Using built-in bootloader to reprogram FLASH from SPI EEPROM?

Other Parts Discussed in Thread: TMS320F28027

Hi there,

If I want to run out of FLASH and have the option for a firmware upgrade, is it possible to utilize the internal bootloader to reprogram the device from an external SPI EEPROM memory? The SPRUFN6A describes the SPI_Boot function in detail, but it loads data into internal SARAM using the CopyData function. Is it possible to copy the SPI_Boot function into RAM, supply a CopyData function that writes to FLASH and then just jump to SPI_Boot in RAM? Or perhaps its easiest just to steal what I need from the boot rom source package ^^ ?

/Mikael

  • Mikeal,

    Yes, you can use internal bootloader to re-program the device through SPI EEPROM.

    Which device are you working with? I would recommend you to go through this documentation TMS320F2802x Flash APIs.

    This documentation explains how to enable field re-programming for firmware updates or calibration data storage.

    Regards,

    Manoj

  • Manoj,

    As far as I can see the internal ROM boot loader has no function to copy data from SPI EEPROM into FLASH directly - it can only load an application from SPI EEPROM into RAM.

    I assume you are suggesting that I merge the ROM boot loader source with the Flash API and create my own routine to update FLASH from SPI EEPROM?

    The idea is to

    A) Have an application running from Flash (boot location)

    B) The application can receive a firmware upgrade and store it in SPI EEPROM.

    C) The firmware upgrade is copied from SPI EEPROM to internal FLASH.

    It is item C) that is interesting. Since there is a ROM bootloader that can copy data from SPI EEPROM to internal RAM, my idea was that there would be some possibility to use it for FLASH programming. I can see now that it is not that easy, I will have to design it myself using the SPI boot source combined with the FLASH API:s.It also has to be located in a sector that is never erased and also needs to be designed so that it can decide to re-program FLASH with a new application from SPI EEPROM or jump to the existing application in FLASH.

    To conserve FLASH space I guess the startup code could also be pulled from SPI EEPROM to RAM and then decide to jump to existing app in FLASH or pull another image from SPI EEPROM into FLASH (for firmware upgrade). There are so many possibilities...

    And yes, Im working with the TMS320F28027.

    Thanks for the feedback.

    /Mikael

  • Micheal,

    As I said, understanding TMS320F2802x Flash APIs example should help you accomplish your task.

    -Manoj