-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible Ticker BLE_API conflict causing problems with Nordic devices? #186
Comments
ARM Internal Ref: IOTSFW-2794 |
@seajayshore Tickers are not used anymore by implementation of BLE API on Nordic platforms. |
@pan- Thanks v. much for the update! :-) Ah, OK, I see. There is a Timeout used in nRF5xGap.h in the ble-nrf51822 library I thought was getting called, but I seem to have been wrong. So if I drive all interrupts / periodic updates to my app via the radioNotificationCallback in Gap.h, and remove my application-level Ticker, I should avoid this Ticker issue altogether right? (Unless another Ticker is being used by some other library obviously). |
@seajayshore The radio notification callback is a terrible way to drive anything (it should be removed at some point ...). The best would be to wait for a patch and still use the Ticker. |
OK, thanks for the straight-up advice! I'll follow! :-) Maybe I'll have to look at using the Nordic app_timer of some lower level API using the RTC1 timer. |
any activity done through radio notification callbacks can potentially delay the radio from doing timing sensitive operations. Radio notification callback handler should be very brief. |
OK, thanks for the tip. It's only setting a single flag variable in the callback context so should be ok I guess. |
Apologies if you've seen this before as this, or related issues, have appeared on other parts of the mbed forum/github. I now believe it's potentially a bug with the BLE_API so I'm posting an updated issue here.
When using Tickers in combination with the BLE_API & Softdevice on Nordic targets the application can unexpectedly hang. The Ticker interrupts stop firing and (from debug in Keil) it seems the code never returns to main().
I'm struggling to find out exactly what is causing this but I suspect that multiple things have control over the Nordic RTC1 timer device and at the wrong moment they can both collide or reset things and stop the application Tickers from firing.
There are seemingly related versions of this issue here:
ARMmbed/mbed-os#1533
https://developer.mbed.org/questions/3729/Question-about-the-communication-between/
https://developer.mbed.org/questions/69710/Tickers-crashhang-on-the-nRF51822-especi/
But few concrete answers so far.
Related to this, I recently read this older BLE_API issue: #89
That describes problems with the mbed-classic implementation of the BLE_API. It says (and code confirms) that a Ticker/Timeout object is used within callbacks in the BLE_API (if using mbed-classic).
Can anyone confirm/deny if this older issue is what is causing these current problems? Otherwise any ideas on a fix for this Ticker issue?
The text was updated successfully, but these errors were encountered: