circuitpython/ports/litex/supervisor
Sean Cross f3e54414e5 litex: ensure we don't re-enable interrups during ISR
During an interrupt handler, interrupts are implicitly disabled. They
will be re-enabled when the interrupt handler returns.

Due to some changes that were made, varous calls will re-enable
interrupts after they're finished. Examples of this include calling
`CALLBACK_CRITICAL_END` and getting the number of ticks with
`port_get_raw_ticks()`.

This patch prevents this from happening by doing two things:

1. Use standard calls in `port_get_raw_ticks()` to disable and re-enable
interrupts, preventing nesting issues, and
2. Increase the nesting count inside `isr()`, reflecting the implicit
call that is made by hardware when an interrupt is handled

This helps to address #3841.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-24 14:03:10 +08:00
..
internal_flash_root_pointers.h ports: litex: add port and fomu board 2020-03-31 09:40:38 +08:00
internal_flash.c Add license to some obvious files. 2020-07-06 19:16:25 +01:00
internal_flash.h Add license to some obvious files. 2020-07-06 19:16:25 +01:00
port.c litex: ensure we don't re-enable interrups during ISR 2020-12-24 14:03:10 +08:00
usb.c Update LiteX APIs for new tick 2020-03-31 17:52:23 -07:00