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

CPU overhead during advertizing

My design may not connect to a client for most of its operational life but will need to be in advertizing mode whenever not connected. I want to specifiy the advertizing interval and want to consider if the CPU operation is interrupted during the advertizing phase or this all occurs in the radio HW. If interrupted, what is the CPU penalty if 20ms interval rate is used? Thanks.

  • Thanks, Ole. I checked out the link and have my questions answered. But, I now have another question. In my application, I will have to do a ~4ms ADC conversion as fast as the ADC can handle it and can't tolerate being interrupted by the radio. This happens very rarely. The plan is to disable the radio and just before the ADC operation and re-enable it afterwards. What is the effect of turning on and off the radio? What is the time delay between enabling the radio and the radio starting to advertize?

  • Things become easier to find when unrelated questions are posted separately, and each question is on only one topic, so I'd recommend you to keep each question separate. I'd therefore also be happy if you could accept my reply as an answer to this question, to clear up this question.

    Also, I'm having some trouble understanding what you actually want. The actual ADC conversion happens independently from the CPU, so when the softdevice blocks the CPU, it's only the ADC IRQ-handler that will be affected, not the actual reading. Also, if you have some flexibility on exactly when you need to do this measurement, you can use the radio notification feature to schedule it in between the softdevice interrupts. See the S110 SoftDevice specification for details on this.

    Finally, if you want to just avoid all softdevice interrupts, it should be sufficient to just stop advertising, which should happen almost instantaneously, and the same goes for restarting it.

    If you have any further questions, I suggest you post them separately.

Related