Due to backward compatibility requirements I am working with mainly S110 on nRF51 and using parts of the SDK10. I have run into problem with what I suspect is a critical code region. When I have an active BLE connection during which I push data to a FIFO with a short critical region the BLE connection "randomly" dies. What happens is a timeout on the ATT layer which causes the SD to mark the connection as dead. If I skip the critical region this doesn't happen.
From studying the critical region on S110 I can see that it just disables all interrupts globally and reenables them on exit. My suspicion is that this causes S110 to be delayed due to TIMER0 IRQs being blocked and thus missing its BLE deadlines.
However when I compare this to the critical regions on for instance S112 from SDK17 I can see this a bit more involved, where only the non-SD interrupts are blocked, and then the ones that were enabled are reenabled on exit.
From some brief googling it looks like the cortex-m0 has the same ICER registers that are used by the more modern SDK. Is there anything stopping me from using that implementation on the nRF51?