Fixing UART Interrupt

This commit is contained in:
Lee Lup Yuen 2023-07-28 18:49:51 +08:00
parent 068e3109e1
commit 9a0e348eaf

View file

@ -3392,19 +3392,20 @@ elf_symname: Symbol has no name
elf_symvalue: SHN_UNDEF: Failed to get symbol name: -3
elf_relocateadd: Section 2 reloc 2: Undefined symbol[0] has no name: -3
up_exit: TCB=0x802088d0 exiting
uart_write (0xc0200428):
######################uart_write (0xc0200428):
0000 2a 2a 2a 6d 61 69 6e 0a ***main.
FAAAAAAAADEF*F*F*FmFaFiFnF
uart_write (0xc000a610):
###########uart_write (0xc000a610):
0000 0a 4e 75 74 74 53 68 65 6c 6c 20 28 4e 53 48 29 .NuttShell (NSH)
0010 20 4e 75 74 74 58 2d 31 32 2e 30 2e 33 0a NuttX-12.0.3.
FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADEF
FNFuFtFtFSFhFeFlFlF F(FNFSFHF)F FNFuFtFtFXF-F1F2F.F0F.F3F
uart_write (0xc0015340):
#uart_write (0xc0015340):
0000 6e 73 68 3e 20 nsh>
AAAAADEFnFsFhF>F uart_write (0xc0015318):
AAAAADEFnFsFhF>F #uart_write (0xc0015318):
0000 1b 5b 4b .[K
AAADEF[FKnx_start: CPU0: Beginning Idle Loop
AAADEF[FK#nx_start: CPU0: Beginning Idle Loop
##ADEFa###ADEFa###ADEFa###ADEFa###ADEFa#
```
[`uart_write`](https://github.com/lupyuen2/wip-pinephone-nuttx/blob/star64d/drivers/serial/serial.c#L1172-L1341) calls...
@ -3424,6 +3425,8 @@ RISCV_IRQ_EXT = RISCV_IRQ_SEXT = 16 + 9
From Star64: [`uart_txready`](https://github.com/lupyuen2/wip-pinephone-nuttx/blob/star64d/drivers/serial/serial_io.c#L63-L68) is NOT Ready, that's why it doesn't call [`u16550_send`](https://github.com/lupyuen2/wip-pinephone-nuttx/blob/star64d/drivers/serial/uart_16550.c#L1542-L1556)
```text
clk u5_dw_i2c_clk_core already disabled
clk u5_dw_i2c_clk_apb already disabled
123067BCnx_start: Entry
up_irq_enable:
up_enable_irq: irq=17
@ -3440,15 +3443,16 @@ elf_symvalue: SHN_UNDEF: Failed to get symbol name: -3
elf_relocateadd: Section 2 reloc 2: Undefined symbol[0] has no name: -3
nx_start_application: ret=3
up_exit: TCB=0x404088d0 exiting
uart_write (0xc0200428):
###############uart_write (0xc0200428):
0000 2a 2a 2a 6d 61 69 6e 0a ***main.
AAAAAAAAADuart_write (0xc000a610):
AAAAAAAAAD#####uart_write (0xc000a610):
0000 0a 4e 75 74 74 53 68 65 6c 6c 20 28 4e 53 48 29 .NuttShell (NSH)
0010 20 4e 75 74 74 58 2d 31 32 2e 30 2e 33 0a NuttX-12.0.3.
AAAAAAAAAAAAAAAuart_write (0xc0015338):
0000 6e 73 68 3e 20 nsh>
AAAAADuart_write (0xc0015310):
AAAAAD#uart_write (0xc0015310):
0000 1b 5b 4b .[K
AAAD#nx_start: CPU0: Beginning Idle Loop
```
- Is our [__Interrupt Controller__](https://github.com/lupyuen2/wip-pinephone-nuttx/blob/star64c/arch/risc-v/src/qemu-rv/hardware/qemu_rv_memorymap.h#L27-L33) OK?
@ -3533,7 +3537,10 @@ CONFIG_16550_UART0_IRQ=52
Also no response...
```text
clk u5_dw_i2c_clk_core already disabled
clk u5_dw_i2c_clk_apb already disabled
123067BCnx_start: Entry
up_irq_enable:
up_enable_irq: irq=17
up_enable_irq: RISCV_IRQ_SOFT=17
uart_register: Registering /dev/console
@ -3548,16 +3555,16 @@ elf_symvalue: SHN_UNDEF: Failed to get symbol name: -3
elf_relocateadd: Section 2 reloc 2: Undefined symbol[0] has no name: -3
nx_start_application: ret=3
up_exit: TCB=0x404088d0 exiting
uart_write (0xc0200428):
###############uart_write (0xc0200428):
0000 2a 2a 2a 6d 61 69 6e 0a ***main.
AAAAAAAAADuart_write (0xc000a610):
AAAAAAAAAD#####uart_write (0xc000a610):
0000 0a 4e 75 74 74 53 68 65 6c 6c 20 28 4e 53 48 29 .NuttShell (NSH)
0010 20 4e 75 74 74 58 2d 31 32 2e 30 2e 33 0a NuttX-12.0.3.
AAAAAAAAAAAAAAAuart_write (0xc0015338):
0000 6e 73 68 3e 20 nsh>
AAAAADuart_write (0xc0015310):
AAAAAD#uart_write (0xc0015310):
0000 1b 5b 4b .[K
AAADnx_start: CPU0: Beginning Idle Loop
AAAD#nx_start: CPU0: Beginning Idle Loop
```
TODO: Check PolarFire Icicle