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: Configuring OTP BOOTCTRL Register via application

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hi Team,

My application requires to boot from flash but also I would like to update my firmware (program to flash) via CAN.

I found one solution, very similar to my requirements C2000 Software Controlled Firmware Update Process (SPRACN1) but in this document, exactly for TMS320F28004x device is used. So they have two different boot mode configurations on boot mode pins. In my application, the flash boot and get mode is using the same GPIO boot mode configuration. 

I have a query, can I configure OTP BOOTCTRL registers from application i.e. when the update request is received via CAN just for firmware update? Is it possible or if I program OTP registers after reset CPU still will be waiting for boot from CAN?

Thanks,

Mateusz Stasiak

  • Hi,

     I have a query, can I configure OTP BOOTCTRL registers from application i.e. when the update request is received via CAN just for firmware update? 

    Yes, you can update the OTP BOOTCTRL while programming the application. You need to include these setting in your .out files. I'll suggest to look at Security Tool which helps in generating required files which you can include in your project. 

     Is it possible or if I program OTP registers after reset CPU still will be waiting for boot from CAN?

    In this case unless you change the BOOTMODE pin setting to Get Mode, it'll boot as CAN BOOT only (based on BOOTMODE pin setting. You could change the BOOTMODE pin also when update OTP setting and drive those pin values as Get Mode but that means you'll end-up using 4 pins as BOOT.

    Regards,

    Vivek Singh

  • In this case, I have to use one BOOT pins positions. Both Get mode(CAN) and Flash boot requires GPIO71 and GPIO84 set to 1. Only different is on DMODE Value 0x07 for CAN and other for Flash Boot.

    In my case I would like to start application from flash and then from working program start firmware update by CAN. Should I in that moment configure BOOTCTRL registers for CAN boot and in the configuration of the updated application that value to boot from flash? That should guarantee boot from flash after next reset?

    I read about custom bootloaders but I can't find a specific solution for CAN bootloader.

    Best,

    Mateusz Stasiak

  • Hi,

    Please note that OTP is "One Time Programmable" settings so you can update the settings in OTP only once and after that settings can not be changed in that device. In this case you need to have a secondary bootloader as part of your working code in flash and call that based on some specific command.

    You can refer the CAN boot loader code in C2000Ware (<C2000Ware>\libraries\boot_rom\f2837xd\revB\rom_sources\F2837x_bootROM\cpu01-bootROM\source).

    Regards,

    Vivek Singh

  • Hi Vivek,

    Thanks for your reply. That clarifies a lot. I have two more questions.

    1. Do you have any application notes or example how to use those libraries?

    2. Do you recommend any Windows/Linux application which I can use to convert data from hex2000 output file to acceptable format for CAN bootloader and then send using CANbus analyzer? 

    Best,

    Mateusz Stasiak

  • I am looping other experts to answer these queries.

    Regards,

    Vivek Singh

  • Hello

    Regarding your questions.

    1. What libraries are you referring? Vivek linked the boot ROM source code. You'll need to refer to the comments/details within the source code. We can clarify items on the forum if you have questions.

    2. The HEX utility will put the app data into the format supported by the CAN bootloader. You could create a windows app that uses the Peaksystem PCAN library they provide to send the data via PCAN USB analyzer.

    Best regards

    Chris