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

Maximum time an event handler may block the application

Hi,

We're working with very specific hardware which requires us to watch very closely. We're currently considering a blocking function in an ble event handler which can take up to 166 ms to return a value.

What's the maximum time a function call may take with respect to the rest of the application and especially the SoftDevice. We're using s110 and SDK v10.

Edit: Or more specifically, what connection interval should we use to get 170 ms of available time and how do we know when that time is available?

Thanks!

Parents
  • It's kind of evident that blocking the MCU for 170ms isn't good idea, especially if you are running any BLE activity with lower interval (connection or advertising). There is time-slot API mechanism in later S110 as well as all newer SD flavors, see this explanation for S132 (there is similar section in S110 Soft Device Specification v2.0 document but that is released just as PDF). If you decide to use it and encounter any problem there are plenty Q&A on this forum about time-slot API usage and problems.

Reply
  • It's kind of evident that blocking the MCU for 170ms isn't good idea, especially if you are running any BLE activity with lower interval (connection or advertising). There is time-slot API mechanism in later S110 as well as all newer SD flavors, see this explanation for S132 (there is similar section in S110 Soft Device Specification v2.0 document but that is released just as PDF). If you decide to use it and encounter any problem there are plenty Q&A on this forum about time-slot API usage and problems.

Children
Related