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.

CCS/TMS320F28377S: setting boot mode using get boot

Part Number: TMS320F28377S
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Tool/software: Code Composer Studio

Hi,

I am trying to get the boot-loader example from controlSUITE\device_support\~Utilities\serial_flash_programmer\f2837xD_fw_upgrade_example working.

I have read all the application notes and TMR's.

Something is still not clear to me,

To my understanding, I need to write the flowing values:

DcsmZ1Regs.Z1_BOOTCTRL.bit.KEY = 0x5A;
DcsmZ1Regs.Z1_BOOTCTRL.bit.BMODE = 0x01;

This is done so the next time the device reset, using the "Get boot" mode the boot loader will go to SCI.

however, on the TMR, Z1_BOOTCTRL and Z2_BOOTCTRL are read only.

Indeed when trying to run this code on with the debugger attached, I cant write to these registers.

Also, can you please explain in more detailed the difference between Z1 and Z2?

why are there 2 zones? when should Z2 be used?

Thanks!

  • Hi Nir,

    The CPU subsystem's CSM has dual-zone security, zone1 and zone2.
    The code security mechanism offers protection for two zones, Zone 1 (Z1) and Zone 2 (Z2). The security
    mechanism for both the zones is identical. Each zone has its own dedicated secure resource and
    allocated secure resource.

    Check section 2.13.1 Functional Description of TRM for more details.

    For each of the two security zones a dedicated OTP block exists that holds the configuration related to zone’s security.
    One of these is the BOOTCTRL which has the equivalent OTP location Z1OTP_BOOTCTRL .

    After reset none of the memory resources except BOOT_ROM and OTP is accessible to the user.
    After reset (any type of reset) to initialize the security on each CPU subsystem, there is a dummy Read to address location of Zx_BOOTCTRL in Zx OTP.
    This will cause the content in OTP to be populated into the DCSM equivalent register Z1_BOOTCTRL.

    Check section 2.13.1.5 Link Pointer and Zone Select of TRM for more details.

    Regards.
  • Please also refer blinky_with_DCSM example in C2000Ware to know how to setup the code and linker cmd file for the same. Please note that OTP can be programmed only once hence you need to be careful while updating the value in OTP. If it get programmed incorrect then you have to replace the device.

    Regards,

    Vivek Singh

  • Thanks for the fast replay.

     I want to make sure I understand correctly:

    1. Z1 belongs to CPU 1 and Z2 belongs to CPU2?
    2. Z1_BOOTCTRL is located within the OTP ROM. Manning only one time programming?
    3. How can a program update itself when the GPIO is set to Get Flash?
      Once BOOTCTRL is set to SCI, It will always stay on this setting because the ROM can’t be erased…
      Once this is done, the device will always go to boatload via SCI and never recover…

      What am I messing here?

     To my understanding:

    1. The devices comes from TI with the SCI bootloader already in ROM.
    2. I can access this bootloader by setting the BOOTCTRL to SCI (GPIO is set to get flash).
    3. Reset the device and the bootloader is running.
    4. Use the splayed “serial_flash_programmer” to upload “F2837xD_sci_flash_kernels_cpu01” and my new software.
    5. Reset the device and “bob's your uncle”

    What am I missing?

     

    Thanks again!

  • Hi,

    Z1 belongs to CPU 1 and Z2 belongs to CPU2?

    Both CPU have dual zone security which means Z1/Z2 exist for CPU1 as well as CPU2.  BOOTCTRL registers of CPU1 defines CPU1  boot process and one for CPU2 defines CPU2 boot process.

    Z1_BOOTCTRL is located within the OTP ROM. Manning only one time programming?

    Correct.

    How can a program update itself when the GPIO is set to Get Flash?
    Once BOOTCTRL is set to SCI, It will always stay on this setting because the ROM can’t be erased…
    Once this is done, the device will always go to boatload via SCI and never recover…

    That is correct. In such case you need to have a secondary boot loader which will understand from Ist few commend if image is to boot or to program. Or change the BOOT PIN setting to choose other bootmode for program update.

    Regards,

    Vivek Singh

  • Thanks!

    I must say the documentation does not make it clear enough what is the popes of the two zones and what are the differences.

    Why are there two and why should I use one over the other..

    Thanks again!

  • Nir,

    Dual zone feature is used for third party development or sourcing/providing SW IP from/to other company without giving access to content. If that is not the usecase then you don't have to worry about it and use just one zone (Zone1).

    Vivek Singh