Is the receive irq handler reentrant? what can I do there #1469
-
Hi, I'm working with a SX126X and the RPi HAL. What all can I do in the receive interrupt handler? I see the example that just sets a flag. Can I use the radio read data/packet functions there? getRSSI or getSNR? How much time do I have? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
On RPi, interrupts are emulated using the lgpio library GPIO alert, which ultimately calls the user-provided function ( However, as a general rule, I would suggest avoiding this. It might not always be possible, and there's usually no reason to these things anyway, ISRs should be fast. |
Beta Was this translation helpful? Give feedback.
On RPi, interrupts are emulated using the lgpio library GPIO alert, which ultimately calls the user-provided function (
setFlag
in the examples) as a callback. I think that on RPi, it should be possible to perform more complex things from this callback, like sending data over the SPI.However, as a general rule, I would suggest avoiding this. It might not always be possible, and there's usually no reason to these things anyway, ISRs should be fast.