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.

CC2340R5: debug failed

Part Number: CC2340R5
Other Parts Discussed in Thread: UNIFLASH

Hi team,

SDK:simplelink_lowpower_f3_sdk_7_40_00_64

Chip version : PG 2.0

When the customer use the .out file to flash, the Console will display the following:

Cortex_M0P: File Loader: Memory write failed: Error occurred when erasing the chip - Command is not allowed due to restrictions
Cortex_M0P: GEL: File: C:\ti\uart2callback_LP_EM_CC2340R5_freertos_ticlang\Debug\uart2callback_LP_EM_CC2340R5_freertos_ticlang.out: Load failed.
Cortex_M0P: Debugging is not allowed. If this is not expected, check your CCFG.
Cortex_M0P: If you are experiencing issues with loading your application, do the following (this will erase the chip):
Cortex_M0P: - Code Composer Studio:
Cortex_M0P: - End the current debug session (if any is active).
Cortex_M0P: - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration.
Cortex_M0P: - Right click on the 'Debug Probe/Cortex_M0P' and select 'Show all cores'.
Cortex_M0P: - Select the 'Debug Probe/CS_DAP0' item after expanding the 'Non Debuggable Devices' item.
Cortex_M0P: - Scripts -> CC23xx -> ChipErase to start Chip erase.
Cortex_M0P: - You should now be able to load your application to the target.
Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG.
Cortex_M0P: Flash loading is currently not supported if debugging is not allowed.
Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
Cortex_M0P: Running the application, without halting at the entry of the application.

He also tried to follow the instructions of the Console, but  still couldn't burn it.

And he try to use uniFlash for Chip Erase he will show:

How to flash it?

Best regards,

Yolande

  • Hello Yolande,

    When you use Uniflash, can you enter the Setting & Utilites tab, and do "Perform Blank Check" this should erase the device, and allow us to program it. 

    From the error log it looks like there may have been a program flashed on the device which disabled the debug, as that is a setting you can set in syscfg. 

    Thanks,
    Alex F

  • Hello Alex,

    I try to do "Perform Blank Check" , but it show me that



    cant execute Chip Erase

    Best regards,

    Ryan

  • Hello Ryan,

    Lets try the manual chip erase to see if that works. If not you may need to configure the Debug Password (which if you do not know we can't really access the device since its "debug locked")

    Reference this other E2E post for some more information https://e2e.ti.com/f/1/t/1309689/.

    Thanks,
    Alex F

  • Hello,Alex

    I has try to maunal chip erase , but it show me this message 

    Do you mean I set Debug Password with "debug locked" , then CC2340 can be erase ?

    Thanks,

    Ryan

  • Hello , Alex 

    I try to set Debug Password with " debug locked" , then I click to Chip Erase 

    But it show the same 

  • Hello Ryan,

    I think the following post gives some good information on what is going on here, https://e2e.ti.com/f/1/t/1309689/

    -It seems like the device might have been set to either debug locked, or debug authorization with password. 

    -In the first case we unfortunately cannot access the device or erase it.

    -In the second case we need the authorization password to be entered into Uniflash, however we would need to know the password beforehand; else the device will stay locked. 

    Do you still have the project that this device was programmed previously with? We should be able to check the password in the CCS project. 

    Thanks,
    Alex F

  • My SDK version is 7_10_00_35

    and I use "uart2callback_LP_EM_CC2340R5_freertos_ticlang"

  • Hello Ryan,

    Navigate to your syscfg -> Device Configuration -> Debug Configuration, and you should be able to change the debug to "Require debug authentication" or check if this is the setting already; then try the password listed in Uniflash. The debug authorization password works with the project the device is currently programed with, so if the uart2callback is rather the new project to be flashed (rather than the project currently on the device) it will not work. 

    Thanks,
    Alex F

  • I try to set Debug Configuration ->  "Require debug authentication" , then I build this Project that display error.

    I find "hw_ccfg.h" to be define CCFG_DBGAUTH_REQPWD , but "ti_devices_config.c" is set CCFG_DBGAUTH_REQPASSWD, so I do not build

  • Hello Ryan,

    Can you check the following settings in your ti_devices_config.c file?

    (yours will be different, as this project's syscfg is allowing debug) 

    The CCFG_DBGAUTH_REQPWD (ccfg debug authorization require password) and CCFG_DBGAUTH_REQPASSWD (ccfg debug authorization require password) seem very similar, if not the same (I may need to reach out to an internal team to confirm this). 

    Thanks,
    Alex F

  • My ti_devices_config is setting :


  • Hello Ryan,

    So the .permissions... are controlled by the "Device Permission Setting" field, which it looks like you have set to default (where everything is enabled).

    When you say, "then I build this Project that display error." do you mean after you change the device configuration to require debug authorization and you re-build your project you see an error when building appear and cannot download the project? Or are you specifically referencing the error that you cannot chip erase/download anything on the CC2340R5 you discussed above. 

    -If it is a build error check if you made any changes to the uart2callback example, you could try to open another uart2callback example (but only change the debug configuration to require authentication) and see if it errors still; if it does not error that could point to some issue in your custom modified project of uart2callback. 

    -If your error is in regard to the chip erase/download, are you sure that the Password ID and Password Hash has been unchanged since you first loaded the project? Try both the password ID and password hash in the UniFlash debug authentication field then re-try the Chip Erase. 

    What happens when you try Read Device info, and Perform Blank Check (in UniFlash, you should see some info appear in the Console). 

    Thanks,
    Alex F 

  • I try to load other Project , but the same. So I think this is not Password Error.

    I use Perform Blank Check that show me 

    Before this happened to me, it seemed that I accidentally interrupted the burning process, causing a window to pop up, but the command prompt window did not display anything. To be precise, it only had the border of the window.

  • Hello Ryan Li,

    After discussing with my internal HW team, you are unlikely able to recover the device if you cannot perform a mass erase, and given the things we have tried so far did not work. The device may have incurred some issue when interrupting the device during flash. 

    Thanks,
    Alex F