I am using SYS/BIOS version 6.32.05.54 with AM1806 and seem to be having a problem with Hwi_disableInterrupt() and Hwi_restoreInterrupt() functions.
If I run the following sequence of code:
SetUpUart1Interrupts(); hwiState = Hwi_disableInterrupt(UART1); Now Send Characters to UART from an external device Hwi_restoreInterrupt(UART1,hwiState);
I would expect that after executing the Hwi_restoreInterrupt() call I would imediately get a interrupt to the ISR since the UART received some characters while the interrupt was disabled. But the interrupt never happens and the following lines of code are performed. In fact the UART Interrupt is ignored from then on.
When this happens I can see that the PEND interrupt bit is clear in UART1's IIR register (indicating a pending Interrupt for the UART) also the UART's LSR has the DR bit set. In checking ESR2 I can see that UART1 interrupt is enabled. Checking HIPIR2 it indicates that the UART1 interrupt is the highest pending interrupt. GLobal Interrupts are enabled and from all AINTC registers it looks like the UART1 interrupt should be active but the ISR is not called. For this test the UART1 interrupt is the only interrupt assigned to the channel 16 (Channels 2-15 are not used) so it should be the highest interrupt priority.
If I do not usew the Hwi_disableInterrupt() and Hwi_restoreInterrupt() functions the ISR works like it should. The ISR routine I'm using has been used on many other 16550 style UARTS without problems.
Is there an issue with SYS/BIOS and UART interrupts on the AM1806.