icyphy / lf-buckler

Programming an nRF embedded board with a Berkeley Buckler daughter card using Lingua Franca.
BSD 2-Clause "Simplified" License
7 stars 0 forks source link

Physical actions not supported #10

Closed edwardalee closed 2 years ago

edwardalee commented 2 years ago

A call to lf_schedule() in an ISR results in an error like the following:

FATAL ERROR: _lf_advance_logical_time(): Attempted to move time to 7000000000, which is past the head of the event queue, 6480087000.

The reason is that in lf_nrf52_support.c, there is a variable INT_RAISED that needs to get set when an interrupt occurs. For now, maybe we can set this in the user code, but then it needs to be reset and mutex will be needed.

lhstrh commented 2 years ago

Does is suffice to enable interrupts only during _lf_nanosleep as is done currently in #11, or should we have them enabled by default and disable them only when accessing the event queue or the _lf_interrupted variable?