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.

cc2540 'XdataStack' is outside the stack range

Other Parts Discussed in Thread: CC2540

hi,

     when i debugging cc2540 'Glucosesensor'  code in the IAR workbench IDE i receive an warning,

    "The stack pointer for stack 'XdataStack' (currently XData:0x1010) is outside the stack range (XData:0x0001 to XData :0x0257)" .And the program is stuck in devInfo_ReadAttrCB. This error is only when i debugging the code in my board but it is working fine when i debugging in key fob. I' am really confused because both the schematics of key fob and my board are same. I am using the latest version of IAR workbench.please answer to my question soon. 

  • Hi,

    The supported IAR version for BLE Stack 1.4.0 is 8.20.2. Can you try with this version to see if there is still a problem?

    Best wishes
  • Hi,

    Typically this is a sign that the debugger has lost synchronization with the device. Especially if registers, memory etc give out nonsensical values

    Causes
    - Bad electrical contact
    - HCI_EXT_ClkDivOnHaltCmd(HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT) is called. This changes the frequency of the CPU which confuses the debugger.

    For best debugger experience
    - Ensure the connection
    - Disable HaltOnRf - HCI_EXT_HaltDuringRfCmd(HCI_EXT_HALT_DURING_RF_DISABLE);
    - Disable clock divide on halt - HCI_EXT_ClkDivOnHaltCmd(HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT);

    Best regards,
    Aslak