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
  • Thanks. I will check the manual again. I am using S310 V3.0.0. The old machine is sending out a command every 240ms, and nRF51422 has to respond in right timing, receiving 8 bits and respond 8 bits, every bit is 0.5ms. When BLE lower stack pushes the old comm timing away, the old machine is not happy. It happens once every a few minute, not very often, but still not acceptable.

Reply
  • Thanks. I will check the manual again. I am using S310 V3.0.0. The old machine is sending out a command every 240ms, and nRF51422 has to respond in right timing, receiving 8 bits and respond 8 bits, every bit is 0.5ms. When BLE lower stack pushes the old comm timing away, the old machine is not happy. It happens once every a few minute, not very often, but still not acceptable.

Children
No Data
Related