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 peripheral+observer combo role crash

Other Parts Discussed in Thread: CC2540

Hi,

I have been working some time with getting my application working with a peripheral+observer combo role. I have a working solution where the application can both advertise/connect and scan for other advertisements.

However, when I try to BOTH scan and advertise at the same time the chip resets. If I alternate the two it seems to be working. I use BLE stack 1.3.1 which should support scanning and advertising/connecting at the same. I have more or less scaled down the application to not doing anything else so it does not seem to be a OSAL priority issue.

I have traced the crash to happen when link has been established and supposedly should start providing service and characteristics data.

Are there any known issues with this role combination and scanning while in a connection?

ANY support/thoughts in this matter is greatly appreciated, I have been working with this issue a long time and it seems I have reached a dead end.

Thank you in advance!

Best regards

  • Hi, I want to implement the peripheral+observer based on CC2540. But when I substitute the "-DHOST_CONFIG=PERIPHERAL_CFG" with "-DHOST_CONFIG=PERIPHERAL_CFG+OBSERVER_CFG" in the buildConfig.cfg, I always got the below error.

    Do you know how to solve this?
    Thanks very much!
  • I know this is 3 years old but hoping TI or someone can answer.  Did you have any luck on fixing this?

    I have been having almost exactly the same problem: the CPU crashes/resets or connection is just dropped when I enable peripheral+observer when a connection is established and trying to download data.  This is on the 1.4.1 stack though but tried on 1.3.2 too.  Tearing my hair out here.  Trying to strip this down to the bare minimum and its still happening.  Also tested it on a couple different designs I have (one discrete chip and one BLE112 bluegiga module running the CC2540F128).  BTW, this first was noticed on a BLE112 module running Bluegiga scripting code and we have since converted everything to straight C in IAR and the same problem.  So I suspect this in the stack.  Just wondering what TI even used to test peripheral+observer since there are no example projects. 

    It seems highly related to the scanning time, scan interval, and window. 

    Thanks

  • 1. Do you get a link termination reason in gapRole_ProcessGAPMsg()?
    1b. What is your connection interval?
    2. GAP_SetParamValue(TGAP_FILTER_ADV_REPORTS, FALSE); This solved my stack crash/lock-up issue , but it also looks like may have been fixed in 1.4.1. I was never told why this fixed my problem. In my system it didn't noticeably affect current consumption.
    3. If there isn't one, add a ~1 ms delay from the GAP_DEVICE_DISCOVERY_EVENT to the next time that scanning is started.

    And just to rule them out:
    4. HCI_EXT_HaltDuringRfCmd(HCI_EXT_HALT_DURING_RF_DISABLE); // if you use timer 3 or 4 or serial port
    5. HCI_EXT_ClkDivOnHaltCmd(HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT); // if you use a serial port