Thanks for pushing further with this! I've actually had another report of this happening with something else (can't remember the link right now) so I'd love to get it fixed.
So as far as I know what happens is:
I'll have a think about trying to reproduce it here as well. I think it's probably not possible to do with Espruino itself as with the promises it doesn't like transmitting more than one frame per interval
Thanks for the pointers. I had a look through the code and it occurred to me that one might see exactly the behaviour I describe if the second IRQ signalling notification interrupted the first. I read in the Nordic documentation that softdevice event handlers usually run at priority 2 and I see that the Espruino IO queueing routines disable and enable interrupts to preserve exclusive access to shared queue structures, however, it was not clear to me as to whether the enable routine set a fixed priority or returned it to the priority that the IRQ handler was running at before the queueing operation was called.
Do you think this might be a possibility or I have I got this completely wrong?
© Espruino, powered by microcosm.
Report a problem