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.

AWR1642BOOST: AWR1642 Backup Image solution

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: AWR1642, UNIFLASH

Hi,

I am completing a program with AWR1642 about Bootloader.I have some issue:

1.I learn from the AWR1642 have 4 image, and the image 1 is Updated image ,the image 2,3 and 4 is Backup image. I use uniFlash to update the program:

 

and it's finished.

2.I use bootloader to updata a program,and i erase the flash :

 uFlashAddr = QSPIFlash_getExtFlashAddr(hFlashHandle);

for(int i=0;i<8;i++){

QSPIFlash_writeEnable(hFlashHandle);
QSPIFlash_blockErase(hFlashHandle, uFlashAddr);
Task_sleep(1000);
QSPIFlash_writeDisable(hFlashHandle);
uFlashAddr = uFlashAddr + 0x10000U;

}

i erase 512KB,and then i update my program.

3.If in this process,the program update has some error,it is broken!!!   I  power on again,the EVM is not work!!!

Why the image 2's program is not work? Should not  it work?

Thanks,

  • Hi,
    Bootloader reads only primary image and load it to RAM.
    Other image (backup) options are provided for secondary bootloader (SBL), where it reads image2/3/4 as required and load that image to RAM & execute.

    So to achieve your requirement to get the backup images to run you need to have secondary bootloader (user defined application) on sFlash (primary location).


    Regards,
    Jitendra
  • Hi,
    I don't quite understand what you mean。
    Your awareness is what I need a secondary bootloader?Do you have any Demo or documentation?
    I want to know how do I load igame2/3/4 into RAM.

    Regards,
    Yaowei
  • Hello Yaowei,
    Let me give you detailed info here.
    1. AWR1642 primary bootloader reads sFlash device for valid images.
    2. It checks for starting few KB out of the first 512KB and if it doesn't get any valid image then it will move for the second 512KB of block in search of a valid image, and so on till 4th 512KB block.
    3. This particular feature works only with AWR1642 ES2.0 version, you need to check your Silicon version soldered on EVM.
    4. When you use UniFlash to flash multiple images to AWR1642 then it puts each image at 512KB block boundaries [metaImage-1: 1st 512KB block, metaImge-2: 2nd 512KB block].
    5. So, if you erase 1st 512KB then the bootloader will move to 2nd 512KB block and load that image if available.

    I have tested your scenario on AWR1642 ES2.0 with 2 images flashed using UniFlash and erased 1st one using '\packages\ti\drivers\qspiflash\test\xwr16xx\xwr16xx_qspiflash_mss.xer4f' over CCS. And next bootup I can see second image running.

    I have misunderstood your requirement, but to have a backup images you can flash 2/3/4 images using Uniflash where primary bootloader will execute 1st valid images else it'll jump for consecutive images.


    Regards,
    Jitendra
  • Hello Jitendra,
    Thank you,I think i have got your mean,but i have another question:
    If the 1st image is not work that not because it was erased, will the 2st image be loaded?If so,how to do it?
    If i have a backup image,and i want to load a new image to 1st 512KB block. The power is cut off during the load the new image and the backup program is not reloaded to the 2st 512KB block.


    Regards,
    Yaowei
  • Hi,
    AWR1642 how to detect the image is vaild?
    I have another question about this.
    Thanks,
  • AWR162 primary bootloader reads starting 4 KB of each 512KB block to check for MetaImage header searching for valid image and jump for next 512KB block if not found. And if it doesn't find valid image across all the blocks then it'll raise and nError and be in idle.


    Regards,
    Jitendra
  • Hi,
    If i use AWR1642 ES1.0 ,Can i do something?
    Thanks
  • Hi,
    Here is the condition with ES1.0 to read metaImage at different block of sFlash
    1. If header of 1st image is not valid or present then bootloader will jump for next block (512KB) in search of valid MetaImage header and full content.
    2. If header of 1st MetaImage is valid but later content is deleted or currupted then bootloader will be blocked in this case and won't be able to jump to next block for valid MetaImage.

    So, if you are looking for this feature to work with ES1.0 then nullify header of 1st block of MetaImage (erase starting ~100B) on sFlash to make booloader jump for next block on the sFlash.

    Regards,
    Jitendra