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.

TMS320F28379D: reset to bootloader flow inquiry

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE

Hi, here is my understanding of the flow after a device is reset.

1. All the things a device do after reset is determined by the reset type, bootmode select pin and related registers, right? And it's all written in boot ROM and cannot be modified, right? For example, after reset, the device will always fetch the instruction resides in 0x3FFFC0, not anywhere else and the instruction resides in 0x3FFFC0 can't be modified, right?

2. The code in the BOOTROM will detect the reset source. If it's POR, it will "adjust clock divider to /1"-"device configuration"-" RAM initialization" - "continue default boot flow". So the code in BOOTROM is just like a "switch case" or "if else", right?

3. "Default boot flow" starts from detecting if the emulator is connected, right? If it's stand-alone boot and the boot mode is boot to flash, then the device will go to the main() code reside in flash, right? If it's sci boot mode then it will configure the sci peripheral, load code to flash, and then go to the main() code just loaded in flash, right?

4. For the whole process from reset to main() code start, We can only choose, but not modify, right?

5. Is the code in Boot ROM visible?

  • Hi Zou,

    1. All the things a device do after reset is determined by the reset type, bootmode select pin and related registers, right? And it's all written in boot ROM and cannot be modified, right? For example, after reset, the device will always fetch the instruction resides in 0x3FFFC0, not anywhere else and the instruction resides in 0x3FFFC0 can't be modified, right?

    Correct.

    2. The code in the BOOTROM will detect the reset source. If it's POR, it will "adjust clock divider to /1"-"device configuration"-" RAM initialization" - "continue default boot flow". So the code in BOOTROM is just like a "switch case" or "if else", right?

    Correct.

    3. "Default boot flow" starts from detecting if the emulator is connected, right? If it's stand-alone boot and the boot mode is boot to flash, then the device will go to the main() code reside in flash, right?

    Correct.

    If it's sci boot mode then it will configure the sci peripheral, load code to flash, and then go to the main() code just loaded in flash, right?

    BootROM loads the code into RAM not in flash. To load into Flash you need to use the secondary BOOT loader (e.g. tool like UniFlash)

    4. For the whole process from reset to main() code start, We can only choose, but not modify, right?

    Correct. Instead of main() you can say application entry point or user code entry point.

    5. Is the code in Boot ROM visible?

    Yes, BOOT ROM code is visible but you'll be able to see the assembly code but you can load the symbol file (you can find it inside controlSUITE) C:\ti\controlSUITE\libs\utilities\boot_rom\F2837x_revb).

    Regards,

    Vivek Singh

  • Zou,

    Just adding to Vivek's reply.  At 0x3FFFC0 is a vector (meaning an implied branch) which redirects the flow to the address of the InitBoot code in the boot ROM.  On power-up and after reset the program counter (PC) is set to 0x3FFFC0, but the actual vector address can change based on device revisions.  The only important part is that the vector will always redirect to the InitBoot code.  The boot code then determines an entry point based on the various factors mentioned.  It is the user's responsibility to redirect the code from there.  For example, at the entry point the user can have a branch to _c_init00 (see our CodeStartBranch.asm file), which will execute the runtime support library and then call main(), which becomes an address at link time.  There may be other cases where the user might want to call another "start" label if perhaps the code is written in assembly.  I suggest reviewing the other reset and boot slides in the workshop.

    I hope this helps.

    - Ken