This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FreeRTOS timers + BLE communication

I want my device to blink a LED periodically when  there's a BLE connection. This BLE connection will usually be idle and every now and then there'll be heavy traffic back and forth. For that I use a simple FreeRTOS timer that triggers periodically and simpy triggers the LED.

While the connection is idle, the LED blinks correctly, but then during BLE traffic that periodicity is absolutely lost. To my knowledge there shouldn't be any FreeRTOS tasks. I tried to trace with Segger SystemView but I get too many overflows and I cannot expand the RTT buffers any more as I'm short on memory. From what I can see on the trace, though, it looks like the system is most of the time iddle and I can't see any other tasks blocking the the Timer Svc task in FreeRTOS. Of course, the trace is not complete because of the overflows.

One other thing I don't see in the trace is the Soft Device. I've seen there's a guide on how to trace it but given that I already have so many overflows I don't know if that will help.  Also, I did a quick mock that generates the data I expect over BLE so that the rest of the system behaves the same way but I can omit the BLE connection and I can see the LED blinking correctly.

How likely is it that the SoftDevice is taking much of the CPU time and so that may affect the software timers. Is there any way to check that other than tracing with System View?

...

Parents Reply Children
No Data
Related