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.

CC1352R: Change factory image on external flash

Part Number: CC1352R
Other Parts Discussed in Thread: UNIFLASH

Hi,

I want to change the factory image that is on external flash of the CC1352R. I am using Concentrator OAD project.

How can the factory image be replaced?

I creating a merged image of BIM and application, then created production image from the merged hex, then used UniFlash, still the factory image was the original factory image.

How is it possible to replace it?

Regards,

  • Hi Boris,

    Which software component are you using? E.g. TI 15.4-Stack?

    In most cases you will find a description for how to do this in the example readme. Linking the Off-chip TI 15.4-Stack sensor example readme below. Scroll down to "Reverting to Factory Image":

    https://dev.ti.com/tirex/explore/node?node=APLA7sow.9uat.yYR9THcQ__pTTHBmu__LATEST 

  • Hi,

    My question is not how to revert to factory image, but how to create one and burn onto the flash, so that when reverting to factory image, I will have my image and not default one.

  • Hi Boris,

    I'm sorry, I was a bit quick with that one. 

    However did you notice: 

    "In order for this functionality to be useful however, one first needs to have a Factory Image saved into External Flash. Luckily, when the BIM boots up and there is no current Factory Image and the current internal image is valid, a copy of the current internal image will be made effectively creating a backup of the current image. This is useful, but will not provide any special functionality other than redundancy. Instead you can first flash the LP with a BLE Simple Peripheral OAD application and BIM so that it creates a backup of that image. Then using BLE OAD send the Sensor 15.4 Image to the LP. Now, whenever you want, you can switch to the Factory Image and upgrade to any image you want."

    Thus, programming a new factory image should be as simple as erasing the external flash, then programming the device with BIM + a valid image and then boot the device.

     

  • Ok, I will try that.

    The external flash can be erased via UniFlash or Flash Programmer 2, yes?

    Regards,

  • Yes, either one.

    Let me know how it goes!

  • Hi, something does not work for me.

    I first erase the flash via UniFlash:

    Then I write a BIM image with application image via UniFlash:

    Here is the header of the image I am writing to flash:

    You can see the length is 0x137ec and the soft ver is 0x2.

    Then I reset the board and I start debugging the BIM project after I changed his code to get to Bim_revertFactoryImage(). In the debugger I see:

    And in metadataHdr I have image with different length and soft ver 0x1.

    What am I doing wrong? Am I not erasing the external flash correctly? How come it has there an old image after erase of external flash?

    Regards,

  • Hi Ben,

    Can you try erasing the external flash with this file:

    <SDK_DIR>/examples/rtos/CC1352R1_LAUNCHXL/easylink/hexfiles/offChipOad/ccs/erase_storage_offchip_cc13x2lp.hex

  • Hi, 

    Thank you, that have erased the flash, I can now see that metadataHdr is all 0xff.

    Still the BIM does not write the image to external flash. When I debug unmodified BIM I have seen in debugger that I reach checkImagesIntFlash() function and never return from it:


    Then I restarted debugger with modified BIM that goes to Bim_revertFactoryImage(), and I am still seeing all 0xff in factory image metadata header that is read from external flash.

    Should I define something or change something in BIM project so that it copies the image from internal flash to external flash factory image space if the external flash is empty?

    Regards,

    Ben

  • Hi Ben,

    When BIM runs it should check the fields of your application image and change them accordingly (e.g. image valid field). This should happen before the image is written to external flash. Can you double check this?

    Cheers,

    Marie H.