Hi everybody !
i’m writing a simple uart program (based on IAR LPC_Uart.c code) in a RAM (RAM_RUN) debug version.
i wrote this code to handle the different address of the pc address to pint the VICVectAddr register.
#if ROM_RUN
ldr pc, [pc,#-0xFF0] /* .18 IRQ - read the VIC */
#else
ldr pc, _irq_handler /* SM IRQ handler */
#endif
... some code
#if RAM_RUN
_irq_handler: .word _my_irq
_irq_addr: .word 0xFFFFF030
_my_irq:
ldr pc, _irq_addr
b .
#endif
Is it correct ?
if i run RAM version i have always problems both on RX and TX (FIQ(?) handler or PABT handler are called).
If i run ROM=FLASH version RX is OK (but TX doesn’t fire thre interrupt - but maybe it is a different problem …).
Thanks