From 6278a647ef5bc5082c6af13f4894fc81640e0bfc Mon Sep 17 00:00:00 2001 From: Lee Lup Yuen Date: Sat, 25 Nov 2023 11:51:18 +0800 Subject: [PATCH] Clear Pending Interrupts. Responds to keypress yay! --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index a02ab20..1e20afe 100644 --- a/README.md +++ b/README.md @@ -3296,6 +3296,32 @@ interrupt. TODO: Fix this for Ox64 NuttX +After Clearing the Pending Interrupts, [NuttX responds to Key Presses yay!](https://gist.github.com/lupyuen/4e8ca1f0c0c2bd3b22a8b63f098abdd5) + +```text +NuttShell (NSH) NuttX-12.0.3 +riscv_dispatch_irq: Clear Pending Interrupts, irq=45, claim=0 +PLIC Interrupt Pending (0xe0001000): +0000 00 00 00 00 00 00 00 00 ........ +nsh> riscv_dispatch_irq: Clear Pending Interrupts, irq=45, claim=0 +PLIC Interrupt Pending (0xe0001000): +0000 00 00 00 00 00 00 00 00 ........ +riscv_dispatch_irq: Clear Pending Interrupts, irq=45, claim=0 +PLIC Interrupt Pending (0xe0001000): +0000 00 00 00 00 00 00 00 00 ........ +nx_start: CPU0: Beginning Idle Loop +riscv_dispatch_irq: Clear Pending Interrupts, irq=45, claim=0 +PLIC Interrupt Pending (0xe0001000): +0000 00 00 00 00 00 00 00 00 ........ +ˇriscv_dispatch_irq: Clear Pending Interrupts, irq=45, claim=0 +PLIC Interrupt Pending (0xe0001000): +0000 00 00 00 00 00 00 00 00 ........ +``` + +But Claim is still 0 though. + +TODO: Key press not read correctly + TODO: Why is up_irqinitialize not setting Interrupt Priority properly? Signed arithmetic? Or delay? TODO: Why is Interrupt Priority set for 4 Interrupts, when we only set 1 (for UART)?