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.

Communicating with boot loader over SPI

Other Parts Discussed in Thread: TM4C123AH6PM

Hi,

Im currently working on a project where I would like to upgrade the firmware on 3x Tiva TM4C123AH6PM's over SPI or I2C using a raspberry pi as the master. My thoughts are to communicate with the boot loader located in ROM to load the firmware from flash memory on the raspberry pi.

I've spent time reading through the boot loader documentation however I'm still unsure if this is strictly possible. Has anyone had any success with anything like this?

Thanks

  • If there is firmware already on the devices then that software already on the device has to call back into the ROM bootloader.  The ROM Bootloader provides function calls for this.  However again, the software already on the device must somehow be triggered to call this function.  If there is no software on the devices then the ROM bootloader will run at startup automatically.

    See also the BOOTCFG register which if programmed will force the bootloader to run at startup if certain conditions are met such as a GPIO being held high or low.

    Dexter

  • Thanks for the explanation, 

    Ive wrote a program similar to the one given in the tivaware sflash.c, sending the two byte sync pattern [0x55,0x55] using the raspberry pi over the SPI bus. Ive connected the custom board however the only response I receive is a byte of value 0x33 that relates to a non acknowledgement of a packet. Any ideas why this might be? 

    Ive erased the flash memory of the MPU's so they should execute the boot loader from RAM on startup.

    Alex

  • Send the sync pattern followed by a ping command.  What happens?

  • Ive got the correct acknowledgement now, I didn't realise you needed to send the size & checksum for the ping command. Thanks for your help