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.

28069 spi bootloader rom



Hi everyone,

I would like to use spi bootloader which is pre-programmed in ROM to boot from an external SPI FLASH memory. I have configured pins to boot from GET-MODE (GPIO34=1, GPIO37=1, TRST=0); I have programmed OTP_KEY=0x005A and OTP_BMODE=0x0004 to select SPI mode.

I use HEX2000 utility to generate a ".a00" file with following options:

Example_2806xGpioToggle.out   /*input file*/
-boot                        /* Convert all sections into bootable form */
-spi8                       /*Specify the source of the bootloader table as the SPI-A port, 8-bit mode*/
-lospcp  0x0002             /*Specify the initial value for the LOSPCP register*/
-spibrr  0x007f             /*Specify the initial value for the SPIBRR register*/
-a                                  /* Specify output file format as ASCII hex */

I can load my code right (I read first bytes and they are correct) in the external SPI EEPROM, but when I reset CPU in order to execute bootloader it waits (I mean some seconds, more than usual way) and it starts old program which it was in internal FLASH.

If I write a differente header to 0x08AA (SPI 8 bits bootloader command), CPU execute old program from FLASH inmediately. I understand that´s ok because as bootloader can´t read a 0x08AA command, CPU has to start program from internal FLASH.

I have also tested without changing LOSPCP and SPIBRR configuration.

Has anyone any suggestions?