I have a firmware runing fine with UART1 as a normal IRQ.
Recently I realize that I should use UART1 as a FIQ to be sure that the communication works fine.
As an IRQ I had the this defintions: "... VICVectAddr7=(unsigned long) ISR_UART1; VICVectPriority7=0x00000008; VICIntSelect &= 0xFFFFFF7F; VICIntEnable |= 0x00000080; ..." "... void ISR_UART1 (void) __attribute__ ((interrupt("IRQ"))); ...."
void ISR_UART1 { .... .... cTmp=U1IIR; VICVectAddr = 0x00000000; }
As a FIQ I changed to:
As an IRQ I had the this defintions: "... VICIntSelect |= 0x00000080; VICIntEnable |= 0x00000080; ..." "... void FIQ_Handler(void) (void) __attribute__ ((interrupt("FIQ"))); ...."
void FIQ_Handler(void) { DEBUG = 1 DEBUG = 0 DEBUG = 1 ISR_UART1(); //it is the only one FIQ so I call imediatly this funciton DEBUG = 0 }
With the osciloscope I can see the the Debug going '1'->'0'->'1' but it never leaves the function and don't get the final '0'.
Can anyone help me with this???
Yes - as I indicated in my first post, a FIQ handler isn't supposed to run any code that thinks it is an IRQ handler. That will seriously break the intended use of the stacks for FIQ and IRQ processing.