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.

Can C6748 boot with UBL in AIS master mode?

Other Parts Discussed in Thread: CC2541

In non-AIS mode, we can use UBL for 2nd boot with C6748.

The C6748 in my product is boot from SPI nor flash.

For non-E C6748 chips:

Q1: I'm now using C6748 with AIS mode, is it any way to use UBL for 2nd boot in AIS master mode?

Q2. I want to do remote firmware update with C6748. So if there is no way to use UBL for 2nd boot in AIS master mode, the C6748 program has to get the update image and put it from the 0x00 address of the SPI nor flash. But if there happens to take powerdown in the image writing to flash process, the original would be damaged already and the C6748 would not bootup rightly any more.

      So, I think the only way to prevent that is use UBL for 2nd boot, just like the OAD BLE update in CC2541.

      But, in AIS mode, I don't know whether UBL is possible, I have thought out any way to do that.

      Is there any method that can do image update without any powerdown risk for C6748 in AIS boot mode?

For E C6748 chips:

Q3. The same question with Q1.

Q4. The same question with Q2.


Thank you

  • Dear FrankXu,
    What do you mean "2nd boot" ?

  • Hi Stalin,

       1st boot, I mean the Room Boot Loader, RBL.

       2nd boot, I mean the User Boot Loader, UBL.

       

  • A1)
    Yes, you can use UBL code to boot your application and UBL should be AIS signed and application is just binary.

    I have C6748 starterware package and able to boot the GPIO application using bootloader (UBL)
    We should convert this bootloader (UBL) into AIS binary.
    C:\ti\C6748_StarterWare_1_20_04_01\binary\c674x\cgt_ccs\c6748\lcdkC6748\bootloader\Debug\boot.out

    to boot.ais

    C:\ti\C6748_StarterWare_1_20_04_01\binary\c674x\cgt_ccs\c6748\lcdkC6748\gpio\Debug\gpioLed.out

    to gpioLed.bin

    Please refer to this wiki page for how to convert the bootloader .out to .ais and application .out to .bin
    processors.wiki.ti.com/.../C6748_StarterWare_Booting_And_Flashing

    Particularly checkout this section for booting procedure.
    processors.wiki.ti.com/.../C6748_StarterWare_Booting_And_Flashing

    RBL -> UBL AIS binary -> application binary

    Always you should use AIS signed binary after RBL stage.

    In C6748, you can also boot direction application with out UBL (bootloader) but application should be AIS signed as its booting after RBL stage.

    Hope this helps, please let us know if any questions.
  • Hi Stalin,

      Thank you so much for your reply.

      So, I can use UBL with AIS format, but the user application can only be non-AIS binary?

      Since I'm using -E chip in my product, I want to have both the KeyEncryption and Remote Update function.

      First, I have to use AIS mode for KeyEncryption to protect my application code. So I can not use UBL for 2nd boot, I have to boot my application directly in secure AIS boot mode.

      Secondly, for Remote Update, I have to consider the situation that it happens to powerdown when image updating into flash. But I think if the application is boot directly in secure AIS boot mode, there is no way to make a mechanism like the OAD update in BLE(CC2541), which will protect the image even it happens to power down when update.

      Am I right?

      Or, is there any way can acheive both KeyEncryption and Remote Update for C6748?

    Thank you

  • Hi Stalin,

      Thank you so much for your reply.

      So, I can use UBL with AIS format, but the user application can only be non-AIS binary?

      Since I'm using -E chip in my product, I want to have both the KeyEncryption and Remote Update function.

      First, I have to use AIS mode for KeyEncryption to protect my application code. So I can not use UBL for 2nd boot, I have to boot my application directly in secure AIS boot mode.

      Secondly, for Remote Update, I have to consider the situation that it happens to powerdown when image updating into flash. But I think if the application is boot directly in secure AIS boot mode, there is no way to make a mechanism like the OAD update in BLE(CC2541), which will protect the image even it happens to power down when update.

      Am I right? If I'm wrong, is there any way can acheive both KeyEncryption and Remote Update for C6748?

    Thank you

  • For secure chip,
    Let me check with internal secure experts and he will reply ASAP.
    I've requested him to address other secure thread as well.
  • Thank you so much!
  • Hi TI experts,

         We are stuck at this problem on our product, and really need your help.

         Please help!

    Frank

  • Frank,

    Can you specify why you need to use the UBL. You are using a single core device, so the RBL can directly load the application without needing the UBL to initialize the part.  We would recommend that you not use the UBL and boot the application directly. In order to update the image on the flash, you don`t need to replace the entire image on the flash, you can encrypt the application using CEK and update only the encrypted image and not the software header. As shown in the document below:

    Secure_Boot_field_update.pdf

    This document describes how you can do a software update, without needing to go through the binding process again.Please review the slide and let us know if you still have any questions. 

    Regards,

    Rahul

  • Hi Rahul Prabhu,

         Thank you very much for reply.

         Yes, I can boot the application directly without using UBL. And in order to update the image on the flash, I can encrypt the application using CEK and update only the encrypted image and not the software header.

         But what if it happens to power off when the image is updating?

         For example, if the DSP boot from nandflash and runs a program, it get new image from USB and is now writing the new AIS file into the nandflash from the 0x00 address of the nandflash. But there happens to power off because the customer  plugs off the power. Then the old image is partially replaced by the new image, the DSP cannot boot and runs normally any more since the old image has been damaged, not to speak of image update again.

         If use UBL, we can design a mechanism like the OAD in BLE. But use the UBL means the application code cannot be encrypted.

         If not use UBL, is there any way to prevent the image damage in case of power off?

    Thank you.