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.

TMS320F28379S: boot from get boot mode

Part Number: TMS320F28379S
Other Parts Discussed in Thread: C2000WARE

Hi, I want to check if my understanding of bootloader is correct.

We have different boot mode, if the application codes reside in RAM and we boot to RAM, it will guide the device to run code in RAM, from main(); and if the application codes reside in flash and we boot to flash, it will guide the device to run code in flash, from main(), too. Correct?

And other boot mode is for loading application program to the device, right?

If we choose get boot mode, from where(SCI, SPI, CAN, USB) the application codes are loaded is decided by BOOTCTRL.BMODE, right? 

But this register resides in OTP, so if I configure BOOTCTRL.BMODE=USB boot, every time the device is powered up, it will boot to USB and wait for the application codes to coming from USB physical interface, right?

It seems inapplicable because in most cases, the customer only want to load the code to flash through USB for one time. After that, we should configure the device to boot to flash and then every time the device is powered up, it will run code from flash. But since the configure register resides in OTP, it cannot return to boot to flash mode once I configured it into boot to USB. It's the same for boot to SPI, I2C, CAN.

Besides, how can we change the register value in OTP memory? for example the BOOTCTRL.BMODE.

Thanks.

  • Howard

    Howard Zou said:

    We have different boot mode, if the application codes reside in RAM and we boot to RAM, it will guide the device to run code in RAM, from main(); and if the application codes reside in flash and we boot to flash, it will guide the device to run code in flash, from main(), too. Correct?

    Yes, correct

    Howard Zou said:

    And other boot mode is for loading application program to the device, right?

    Yes correct

    Howard Zou said:

    If we choose get boot mode, from where(SCI, SPI, CAN, USB) the application codes are loaded is decided by BOOTCTRL.BMODE, right? 

    Yes correct

    Howard Zou said:

    But this register resides in OTP, so if I configure BOOTCTRL.BMODE=USB boot, every time the device is powered up, it will boot to USB and wait for the application codes to coming from USB physical interface, right?

    Yes correct

    Howard Zou said:

    It seems inapplicable because in most cases, the customer only want to load the code to flash through USB for one time. After that, we should configure the device to boot to flash and then every time the device is powered up, it will run code from flash. But since the configure register resides in OTP, it cannot return to boot to flash mode once I configured it into boot to USB. It's the same for boot to SPI, I2C, CAN.

    Besides, how can we change the register value in OTP memory? for example the BOOTCTRL.BMODE.

    Each of the peripheral bootloaders require a key to be transmitted to the device to begin the loading of the application. If the key received is invalid, the device will boot to flash. This allows flash boot to still be retained. See the boot source code in C2000Ware to assist with understanding.

    You write to the location of the BOOTCTRL register in OTP to program it. See more details in TRM.

    Best regards

    Chris