This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do I run a long operation without disrupting a BLE link?

I am developing a BLE peripheral with SDK9 and SD110. The PPCP are 80-400ms, 5 slave latency and 5s supervision timeout.

I am currently running some blocking code in response to an alert level update (from IAS). The blocking code is manually driving a piezo element. I am placing that function on the scheduler queue in the hopes it would be pre-empted by the softdevice as needed. Unfortunately I am getting link loss as a result of updating the alert level.

Is there a way to make this work with my current setup? Or, do I need to use a different method? (At this time it seems like a timer would be an acceptable alternative, but I'm pressed for time and have not worked with 16MHz timers on this device yet)


EDIT

Thanks all -- I ended up using TIMER1 and some clever code. Things now work acceptably. Previously I am fairly certain my code was executing in too high of an interrupt context. Now I don't care what the context is because the code returns nearly immediately.

Parents Reply Children
No Data
Related