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.

Validating I2C Boot Loader with Emulator F28035



Hey all,

So I am trying to validate a customer boot loader I have created.  For some background I have an external EEPROM with the required device address 0x50 that has the boot loader stored in the EEPROM.  I generated the code stored in the EEPROM using the hex2000 utility with the .out file generated by my project which can successfully run from RAM.  I used the following post build options to generate my binary file that is stored in the EEPROM.

"${CG_TOOL_HEX}" "${BuildArtifactFileName}" -boot -i2c8 -i2cpsc 0x01 -i2cclkh 0x036 -i2cclkl 0x036 -b -memwidth 8 --order LS -o "Boot_ROM.bin"

I know that the memwidth and order commands are redundant but that isn't an issue here.  I also checked the formatting of the binary file and it looks correct. I see the 0x08AA for the first word, and I'm also seeing the correct I2C configuration words, as well as the correct address for code start (the address of c_int00() in the project).  Based on that I feel pretty confident that my boot ROM is valid and I also verify that the correct data gets stored in the EEPROM after it is written. 

I have been trying to test the boot ROM with my XDS510USB emulator and my licensed version CCS v6.1.3.  I have the microcontroller configured so it will boot in WAIT mode.  At that point I connect to the microcontroller via JTAG.  I also modified the .gel file I am using so I have the following script available for use:

hotmenu EMU_BOOT_I2C()
{
    *0xD00 =  0x55AA;  /* EMU_KEY = 0x 55AA */
    *0xD01 =  0x0005;  /* Boot to I2C     */
}

After running the script once the JTAG emulator is connected I initiate a reset of the micro.  This is the example 3 method mentioned in the Piccolo Boot ROM app note.  I do not see any attempt whatsoever by the micro to try and look for an external I2C device.  This seems to indicate that the EMU_KEY and EMU_BMODE registers are getting ignored or written over.  It looks like the micro just ends up booting from Flash after the reset is complete.  Is there something I'm missing, or am I incorrectly trying to set the EMU_KEY and EMU_BMODE registers in RAM?  I'm trying to figure out what is going on and I'm running out of ideas.  Any help would be appreciated.


Best regards,

Lance Hummel

 

  • I managed to resolve the issue.  Thought I would share to help anyone who may run into a similar issue. 

    When setting up the external EEPROM, I hooked it up to GPIO 32/GPIO 33 for the SDAA and SCLA pins.  If you look at the footnote for Table 6 on page 20 of the Piccolo Boot ROM Reference (SPRUGO0B) it mentions that those pins are used by the I2C bootloader.  In the same document in section 2.19 on page 42 it mentions the boot loader only uses GPIO 28/GPIO29.  After modifying the hardware I was able to change the configuration and I got the micro controller to boot from I2C.