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.

LAUNCHXL-CC26X2R1: Upgrade vs NV storage

Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: UNIFLASH

Hey

My question is regarding flash functionality vs. image upgrade:

I am storing some parameters on persistent storage using

osal_snv_write(BLE_NVID_CUST_START...

Api.

BLE_NVID_CUST_START defined as follows :

// Customer NV Items - Range 0x80 - 0x8F - This must match the number of Bonding entries
#define BLE_NVID_CUST_START 0x80 //!< Start of the Customer's NV IDs
#define BLE_NVID_CUST_END 0x8F //!< End of the Customer's NV IDs

and my flash NVS flash region is :

#define NVS_REGIONS_BASE 0x32000

#pragma LOCATION(flashBuf, NVS_REGIONS_BASE);
#pragma NOINIT(flashBuf);
static char flashBuf[REGIONSIZE];

(I am using ProjectZero based code )

As far as i underst and  from documentation my flash record is maximum 255 bytes user data + 1 byte for  internal meta data.

So i am writing  to 0x80* 0x100  = 0x8000  address  and customer area is 16 * 256 chunks  .

For upgrades I am using swra466 application (SBL Application ) provided by TI .

My goal is to skip customer flash area completely while upgrading the image
(i don't want to erase it and i don't want to overtire it while upgrading the image to be safe in case of power fail during upgrade)


So i skip from 2 pages:

#define BLE_START_OF_SKIP_WRITE_REGION 0x32000
up to :
#define BLE_END_OF_SKIP_WRITE_REGION 0x36000
while erasing / writing new image.
Which means that i write 2 chunks of image (from 0x0 up to 0x32000 and from - 0x36000 up to 0x58000)

My upgrade software (SBL Application )is crashing on retriving CRC from bootloader and BLE image can not be burned anymore
even with JTAG (my guess is something to do with TAP?)
Since i don't have Bootloader code or logs it is hard to see the problem.
Any help/ suggestion will be highly appreciated
BR
Alik

  • Alik,

    I'm assigning an expert in NV to help you. In the meantime, can you please indicate which version of the SDK are you using?

    Thanks,

    Luis

  • Hey Luis

    Thanks.

    My SDK version is 3.20.00.68.

    BR

    Alik

  • Hi Alik,

    Have you managed to write your image with two operations (one for 0x0 up to 0x32000 and one for 0x36000 up to 0x58000)? In that case you could do some memory dump (using Uniflash for example) to see if everything has been properly written).

    Another element that comes to my mind is to verify if you have protected some sectors (and prevent them to be written).

    Regards,

  • Hey Clement 

    I managed to write   my image with two operations (one for 0x0 up to 0x32000 and one for 0x36000 up to 0x58000) but  afterwards

     i can not connect to board  and therefor i can not read anything   .

    I tried :

    Debuger from CCS ,Uniflsh,with Ti  XDS110 debug probe and with external JTag  (Seager JLINK ).

    All the methods  listed above used to work/connect in normal scenario (while upgrading whole image as one chunk).

    here are some of my errors while attempting t connect:

    Cortex_M4_0: Error: (Error -241 @ 0x0) A router subpath could not be accessed. A security error has probably occurred. Make sure your device is unlocked. (Emulation package 8.1.0.00007) 

    IcePick_C: Error connecting to the target: (Error -241 @ 0x0) A router subpath could not be accessed. A security error has probably occurred. Make sure your device is unlocked. (Emulation package 8.1.0.00007) .

    I think you are right when you say:

    "Another element that comes to my mind is to verify if you have protected some sectors (and prevent them to be written)."

    Is it anything unexpected that BOOT loader performs while writing less then whole image?

    Any additional flash settings perhaps? 

    BR

    Alik

     

  • Hi Alik,

    The sector protection is made by the CCFG flash page (this page is the last page of the flash). You may want to review the content of the file ccfg.c and especially the values set for the symbols SET_CCFG_CCFG_PROT_31_0, SET_CCFG_CCFG_PROT_63_32, SET_CCFG_CCFG_PROT_95_64 and SET_CCFG_CCFG_PROT_127_96

    Note 1: the CCFG page cannot be relocated.

    Note 2: you generally don't want to update the CCFG page

    Regards,

  • Hey Clement

    Thanks you for this info.

    Supposing i somehow massed this CCFG fields ( even though i did not change them explicitly  ) due to bug of some sort ,

    is it any way to unlock the device?

    So far any attempt to  mass erase or even connect to such a board with JTAG and with XDS110 gives me errors..

    BR 

    Alik

  • Hi Alik,

    Have you tried mass erase with Uniflash and Flash Programmer? Maybe this thread can help.

    If not, I will kindly ask you to open a new thread to address this mass erase issue.

    Best regards,

  • Hey Clément

    I have tried  it, it did not help.

    Ok , I will open another thread.

    Thanks