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

S120 interrupt latency

We have an NRF51822 running S120 at 32MHz.

Our system has two removable batteries. If a battery is removed we need to switch to the other battery as fast as possible. We would like to do this in an interrupt service routine. ie detect battery fail signal and run a very brief ISR which just flips a GPIO to select the other battery. With the current power supply design that would need to happen in 70 usec. Without the soft device, or other interrupt disabling, I am confident we could do this within 20 usec.

From reading the S120 specification it seems there are times when interrupts are disabled, or otherwise locked out, for up to 1400usec.

Is there any way to "cheat" the system? We don't even worry if the BTLE stack falls over and has to be restarted.

For example, one thing I was thinking of was changing the radio priority etc to one level lower and run a pin change interrupt at the highest level. I fully realise this could cause instability, but we could restart the BTLE stack if one of these events occurs.

Related