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.

CC2652R7: With UNIFLASH CLI, getting error while image verification

Part Number: CC2652R7
Other Parts Discussed in Thread: UNIFLASH

Hello,

I am working on CC2652R7. I want to program device with the configuration setting as "Lock Debug Interface" enabled. I am following quick start guide. From "Standalone Command Line" I have created a zip file. After running  "dslite.bat" , programming is successful but, when in verification stage I am getting following error on CLI

Verifying Program: user_files/images/buttonled_LP_CC2652R7_tirtos_ccs.out
Preparing ...
.text: 0 of 22648 at 0x0
.data: 0 of 88 at 0xaffa8: 99%
error: Cortex_M4_0: File Loader: Verification failed: Values at address 0x000AFFE6 do not match Please verify target memory and memory map.
Finished: 99%
Failed: File: user_files/images/buttonled_LP_CC2652R7_tirtos_ccs.out: a data verification error occurred, file load failed.

Q1. I just wanted to know that is it expected behavior because "Lock Debug Interface" or it should allow the verification and then lock the device?

Please see the screenshot of the process.

Q2. I also wanted to add command to first erase the chip and then perform further action. How to do that?

Thanks,

Sanket C

  • Hi,
    I have assigned an expert to comment.

    Best regards,

  • Hi Sanket,

    Q1:
    Yes, a verification error is too be expected when you use the "Lock Debug Interface" (or other options that will overwrite the CCFG). This is because the verification is performed against the source image (in your case user_files/images/buttonled_LP_CC2652R7_tirtos_ccs.out). The source image does not contain the overwritten CCFG field that locks the debug interface.
    If you enable the "Use CRC Verification during Program Load." option, then the flash will be verified during program load (with the modified CCFG field), and the verification step should not be necessary. 
    If you do want to keep the verification step and not have a verification error, then you need the source image to contain a CCFG that locks the debug interface (and you do not need to enable the "Lock Debug Interface" option.)

    Q2:
    If you select the "All Unprotected Sectors" erase option, then the chip will get erased before program load. Unfortunately this does not work if the debug interface is locked. If you need to erase a chip with a locked debug interface, you can use the following command (if you use an XDS110 debug probe):

    Fullscreen
    1
    dslite --mode cc13xx-cc26xx-mass-erase -d XDS110
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,
    Nikolaj

  • Thank you Nikolaj for your reply. 

    For above statement I have a query that

    If you enable the "Use CRC Verification during Program Load." option, then the flash will be verified during program load (with the modified CCFG field), and the verification step should not be necessary. 

    Q3: how to remove or skip the verification step? IN dslite.bat I can see command which says "NO Verification" but still it go into verification stage and give me the error.

    Following is the command in dslite.bat

    set GENERATED_COMMAND=-c user_files/configs/cc2652r7.ccxml -l user_files/settings/generated.ufsettings -s VerifyAfterProgramLoad="No verification" -e -f -v "user_files/images/buttonled_LP_CC2652R7_tirtos_ccs.out" 

    If you enable the "Use CRC Verification during Program Load." option, then the flash will be verified during program load (with the modified CCFG field), and the verification step should not be necessary.

    Q4: Is it possible to enable the output logs when flash will be verified using "Use CRC Verification during Program Load" to get confirmation. In current setup this option is enabled and I am not getting any logs.

    Regards,

    Sanket C 

  • Hi Sanket,

    Q3:
    I you remove the -v option (verify option) then I would expect that the verification step will be skipped. I do not know what the VerifyAfterProgramLoad setting does, where did you read about that? I would assume  -s VerifyAfterProgramLoad="No verification" is 
    unnecessary and that it can be removed. 
    So I would assume this will work:

    Fullscreen
    1
    set GENERATED_COMMAND=-c user_files/configs/cc2652r7.ccxml -l user_files/settings/generated.ufsettings -e -f "user_files/images/buttonled_LP_CC2652R7_tirtos_ccs.out"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Q4:
    There are no explicit logs saying that the CRC check was successful, but there will be an error message if CRC check was unsuccessful.
    You can enable verbose output by enabling the verbose setting in UniFlash GUI before generating the standalone command line. See below.

    You can also edit the generated settings file (user_files/settings/generated.ufsettings) to set FlashVerboseMode to true, or you can do it in the command itself by adding  -s FlashVerboseMode="true".

    If CRC verification is enabled and if FlashVerboseMode is true, you will get log lines similar to this:

    Fullscreen
    1
    info: Cortex_M4_0: Chunk 1: addr=0x00000000, length=8192, crc=0x07EE44A8 (using block 1)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     

    The CRC field in the line will only be included if CRC verification is enabled.

    Regards,
    Nikolaj