TMS320F28P650SH: Unable to set custom boot configuration

Part Number: TMS320F28P650SH
Other Parts Discussed in Thread: C2000WARE

Hello,

I am trying to configure a custom boot configuration for the TMS320F28P650SH. Our hardware design has connected the SCI bus to the wrong GPIO's. And so I need to configure a custom boot to select different GPIO's for SCI boot.

I want to use GPIO72 to select the boot mode, where 0 = SCI boot and 1 = Flash boot.
For SCI boot I want to use GPIO84 and GPIO85 for TX and RX.

I figured out I needed to write these values to OTP memory to make this happen:

  • Z1-OTP-BOOTPIN-CONFIG (0x00078008) = 0x5AFFFF48
  • Z1-OTP-BOOTDEF-LOW (0x00078000C) = 0xFFFF0321

The 0x5A is the key to make the Z1-OTP-BOOTPIN-CONFIG valid. Then the 0x48 is to set GPIO72 as Boot Mode Select Pin 0 (BMSP0). Both BMSP1 and BMSP2 are not used because they are set to 0xFF.

Then 0x03 (flash boot) is used for BOOT_DEF1 (bits 15:8) for when GPIO72 is high, and 0x21 (SCI boot with GPIO84/85) is used for BOOT_DEF0 (bits 7:0) for when GPIO72 is low.

Problem

I've loaded this into OTP. But the device will not go into SCI boot mode. It always goes into flash boot.

I've checked the voltage on GPIO72 and this is correct.

I also tried to debug the bootrom of the device. But when I load the .out file the code is not in sync with what is running on the target. The F28P65x_CPU1_ROM.map file in C2000Ware V26 also tells me that it is build for the F28006x instead of F28P65x:

******************************************************************************
             TMS320C2000 Linker PC v20.2.7                     
******************************************************************************
>> Linked Thu Feb 23 16:06:33 2023

OUTPUT FILE NAME:   <F28006x_CPU1_ROM.out>
ENTRY POINT SYMBOL: "InitBoot"  address: 003feaa2
....

Can someone please check if I am configuring the OTP correctly? 

And how can I properly debug the bootrom?

Many thanks in advance.

Erik Heuvelman

  • Hi Erik,

    • Your OTP values are correct ie Z1-OTP-BOOTPIN-CONFIG = 0x5AFFFF48 and Z1-OTP-BOOTDEF-LOW = 0xFFFF0321 both are valid

    • OTP addresses: Z1-OTP-BOOTPIN-CONFIG = 0x0007 8008 and Z1-OTP-BOOTDEF-LOW = 0x0007 800C  Your post shows the second address as `0x00078000C`. Please confirm that you programmed 0x0007800C.

    • The TRM says an unsupported boot mode in a BOOTDEF entry causes the device to go to wait boot (debugger connected) or boot to Flash (standalone) . So a BOOTDEF entry that the boot ROM does not decode as 0x21 would also look like "always flash boot"

    • Do note that section 4.4.1 of the TRM for F28P65x mentions that "GPIO 62 to GPIO 223 " cannot be used as a boot mode select pin.



    • I would recommend using any other GPIO pin as the Bootmode select pin once and try doing the custom SCI boot.

    • You can also try in the CCS memory browser and read 0x78008 and 0x7800C (and 0x78208/0x7820C for Z2). They should read exactly 0x5AFFFF48 and 0xFFFF0321. If the key is not 0x5A, the boot ROM ignores the custom values and uses the default BMSPs (GPIO84 = BMSP0, GPIO72 = BMSP1) with the default boot table 

    • Apart these you can also test the same values with emulation boot before relying on the OTP.


      You can also refer to the Getting Started with Bootloading on C2000 Microcontrollers.

      Regards 
      Arpit
  • Hi Arpit,

    I can confirm I wrote the 0x0007800C address. The wrong address was a typo.

    I did not notice that the GPIO72 cannot be used as boot mode select pin. But the line above states that it goes to factory default, and GPIO72 is the default for BMSP1. 

    What I had to do to make it work was these values:
    Z1-OTP-BOOTPIN-CONFIG = 0x5AFF4854
    Z1-OTP-BOOTDEF-LOW = 0x03032103

    0x48 is GPIO72 for BMSP1 and 0x54 is GPIO84 for BMSP0 which are both the default.
    I only want to go to SCI boot mode when GPIO72 is low, and GPIO84 is don't care. All other cases I want to go to flash (0x03)

    This seems to work. I was able to set the emulation boot registers to test this. But I still was not able to step through the bootrom code as the .out file is incorrect in C2000ware.

    Thanks again,

    Erik

  • Hi Holland,

    Thank you for pointing the error in the .map file for C2000ware V26. I have filed a bug for this  and this will be fixed in the next release of C2000ware.


    Regards
    Arpit