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

Minimize CPU time used by BLE

My application is doing kind of old communication with an old machine. Communication line is bit banged by an GPIO. Baud rate is 0.5ms. "Start bit" is still used to synchronized the start of a packet. I use GPIOIE to get the start bit, then Timer2 is used to receive 8 bit data and sending back a 8 bit response byte. So very simple.

Without BLE enabled, the communication is fine. Wth BLE enabled, the communication is almost OK, except missing data every 5 to 10 minutes.

I believe the reason is timer2 or GPIO interrupt get bumped off by BLE interrupts once for a while when they happen at the same time.

I only need to bring data corruption ratio into an acceptable range.

The BLE feature is minimum in this application, as long as smartphone can change 2 parameters. So I want to make the BLE stack lowest priority and minimize the time occupied by BLE stack, and anything I can do to minimize the BLE activity.

Thanks

Paul

Parents
  • You should be able to make this work by using the timeslot API. A Timeslot with high priority has the same priority as a normal connection interval. So if you use a connection interval that is faster than the timeslot interval, the timeslot interval will be scheduled before the connection interval, so if you have a collision the timeslot will take priority as it is already scheduled. But there are a couple of exceptions. e.g. if you have a connection parameter update or the ble connection is about to timeout the ble connection will take priority. What requirements do you have for ANT traffic (Since you are using S310)?

    Yes, SDK 10 is the latest SDK that supports S310. You can see this in our compatibility matrix in infocenter.

Reply
  • You should be able to make this work by using the timeslot API. A Timeslot with high priority has the same priority as a normal connection interval. So if you use a connection interval that is faster than the timeslot interval, the timeslot interval will be scheduled before the connection interval, so if you have a collision the timeslot will take priority as it is already scheduled. But there are a couple of exceptions. e.g. if you have a connection parameter update or the ble connection is about to timeout the ble connection will take priority. What requirements do you have for ANT traffic (Since you are using S310)?

    Yes, SDK 10 is the latest SDK that supports S310. You can see this in our compatibility matrix in infocenter.

Children
No Data
Related