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.

CC2640R2F: multi-role cache as ram not working

Part Number: CC2640R2F

Hi all,

I'm developing a project based on multi_role (+spp and sdi) example using the new sdk (1.40). I have some problem of heap/stack size so I need to use the Cache as Ram. I followed the step described in the guide  http://software-dl.ti.com/lprf/simplelink_cc2640r2_sdk/1.30.00.25/exports/docs/blestack/ble_sw_dev_guide/html/cc2640/platform.html#using-the-cache-as-ram , so I did  Project -> Build Configurations -> Set Active -> FlashROM-CacheAsRAM, and then I added all predefined symbols and include paths needed.

I did it and then debugged. The problem is that the tasks didn't start, all the watched expressions value was "Target fail to read 0x20000xxxx ", and when I paused the debug session the console showed this error message:

"Cortex_M3_0: Trouble Halting Target CPU: (Error -2062 @ 0x0) Unable to halt device. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 7.0.48.0)"

I performed the Forced Mass Erase using SmartRF Flash programmer 2 and then I retried. Nothing worked. If I remove the cache as ram option, it works.

I have two launchpad, I tried on both Nothing worked.

Why is happening this?? Is there something non-compatible? 

Can someone help me??

Thanks 

Moniaga

  • Hello,

    It appears that your application is experiencing a hard falt because of some sort of RAM issue. This is likely due to an incorrect setting.

    Can you confirm the following:

    1. multi_role using CacheAsRam configuration from the SDK works out of box (with no changes)

    2. SPP over BLE for SDK 1.40 is working out of box from github.com/.../
  • Hi Sean,

    Thanks for your attention.
    I followed your suggestions.
    I tried the multi_role example with no changes using cache as ram and it worked.
    Then I tried SPP_BLE_server with no changes (from you link) and it worked.
    Then I tried spp_ble_server example adding Cache as ram (following the guide instructions) and it gave me the same error as my multi_role project.
    Is Spp profile incompatible? Or the sdi driver?
    What can I do?

    Thank you

    Monica
  • Hi Monica,

    Thanks for the followup, based on your summary it appears that adding CACHE_AS_RAM to spp_ble_server is failing.

    There has been a newer guide posted since the one you linked to (note I am assuming you are using CC2640R2 SDK 1.40):
    software-dl.ti.com/.../memory_management.html

    Can you try the steps in the above guide and verify the failure still occurs? Can you also confirm if you are using CCS or IAR?

    Edit: furthermore can you clarify if you are using the blestack or ble5stack component of the SDK?

  • Thanks Sean,

    yes, I followed the same guide that you linked and the fail still occured.

    I'm using CCS v 7.3, CC2640R2 SDK 1.40, blestack (BLE v.4.2).

    I noticed that in the guide, at step 4 it's written: "Go to the linker predefines and add CACHE_AS_RAM=1. This define will bring changes to the executed code in cc26xx_app.cmd/cc26xx_app.icf."

    but the cc26xx_app.cmd file is excluded from build in the spp examples. Can this deal with the fail? Can you check this?

    The spp examples that Texas provides are not working with Cache as Ram. How is that possible? 

    Thanks

    Moniaga

  • I tried also to delete the sdi and sdi task from spp example, but the fail is still present.
  • Moniaga,

    Having the linker file excluded from build is the normal use case and has to do with some link order dependencies.

    In any case, it is critical that the CACHE_AS_RAM=1 flag is defined in the linker options in order for the configuration to work.

    Please confirm that your linker screen looks like this

  • Yes, It looks like this.
  • Updates:
    I excluded some file of the old sdk and now the halting error is no more present.

    Now the multi_role task is initialized but it doesn't start. It fails at the first call of
    "GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MIN, advInt);" :
    it goes into
    "icall_directAPI "
    and then
    "ICall_waitMatch(ICALL_TIMEOUT_PREDEFINE, matchLiteCS, NULL, NULL,
    (void **)&pCmdStatus);"
    Here there is a timeout and it goes into
    " ICall_abort();"


    Has someone the same problem?

    Can anyone help me??

    Thanks

    Moniaga