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.

CC2650 crashes with SPI in Callback mode and Gatt notification event



Hi,

i have a problem using the bsp_SPIRead() in Callbackmode and at the same time, notifying new values to send when a device is connected.

When disable the bsp_SPIRead() function and sending dummy values with notify, my system didnt crashed at all.

I think the problem is when i send the bsp_SPIRead() to get adc values in callback mode and the notify event comes at the same time.

Any idea?

  • Hi Michael,

    Are you able to capture the state of the processor when it crashed? Do you know what exception was triggered?
  • Hi Sean,

    how can i check it on CCS?

    I dont receive any exception.

    I can see on Disassembly that the device is pending here:

  • Hi Michael,

    If you pause the processor and look at the callstack do you see anything useful?
  • Hi Sean,

    i get:

    "ICALL_dispatch -> ICALL_primService -> Abort() -> loader_exit()"

    when i go inside the ICALL_primServie Callstack, i see that the Icall_primService() returned "ICALL_ERRNO_INVALID_FUNCTION"

    The problem occurs only if spi and notifications are running together, so i thing is something with priority.
    Maybe is becouse my Interrupt or SPI Callback Function dont have higher priorities as the RF(notification).
    How can i set my callbacks or interrupts to have higher priority?

    Also i was reading that in case i am sending something and the RF is working i have to enable CPU during this envets so it can work on parallel.
    Do i have to do this?
    "Enable CPU during RF events (scan included) by calling"
    HCI_EXT_HaltDuringRfCmd(HCI_EXT_HALT_DURING_RF_DISABLE);

    If so how can i add this function?

    thanks,

    michael

  • Hi Sean,

    i found the function under "Include" folder in hci.h:

    /*******************************************************************************
    * @fn HCI_EXT_HaltDuringRfCmd API
    *
    * @brief This HCI Extension API is used to enable or disable halting the
    * CPU during RF. The system defaults to enabled.
    *
    * Related Events: HCI_VendorSpecifcCommandCompleteEvent
    *
    * input parameters
    *
    * @param mode - HCI_EXT_HALT_DURING_RF_ENABLE,
    * HCI_EXT_HALT_DURING_RF_DISABLE
    *
    * output parameters
    *
    * @param None.
    *
    * @return hciStatus_t
    */
    extern hciStatus_t HCI_EXT_HaltDuringRfCmd( uint8 mode );


    I include the header file but where is the function referenced?

    If i call the function in my project i get refereces error:

    undefined first referenced
    symbol in file
    --------- ----------------
    HCI_EXT_HaltDuringRfCmd <whole-program>