Skip to content

Commit

Permalink
Dump UART RX in Dispatch IRQ works OK yay! riscv_dispatch_irq: rx=0x31
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Dec 5, 2023
1 parent 7ad5a78 commit edbe0b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/risc-v/src/jh7110/jh7110_irq_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ void *riscv_dispatch_irq(uintptr_t vector, uintptr_t *regs)
// Check Pending Interrupts
uintptr_t ip0 = getreg32(0xe0001000); // PLIC_IP0: Interrupt Pending for interrupts 1 to 31
uintptr_t ip1 = getreg32(0xe0001004); // PLIC_IP1: Interrupt Pending for interrupts 32 to 63
if (ip0 & (1 << 20)) { val = 20; } // UART3 Interrupt was fired
if (ip0 & (1 << 20)) {
val = 20; // UART3 Interrupt was fired
uintptr_t rx = getreg32(0x3000208c);
_info("rx=%p\n", rx);
}
}
//// End Test

Expand Down

0 comments on commit edbe0b7

Please sign in to comment.