raphaelpereira wrote on Thursday, July 31, 2008:
Hello,
I’m trying to use this function inside my UART IRQ handler in my ARM7 GNUARM project, but it is producing Data Abort Exception. I raised the IRQ stack to 2048 bytes and verified the pointers using a debugger. All seems to be fine. I really can’t find the problem, as it doesn’t occur when stepping through the debugger.
The code used is below:
extern volatile struct uart_info **uarts_available;
void uart_0_interrupt_handler(void)
{
unsigned char c;
unsigned int status;
portBASE_TYPE task_woken = 0;
status = U0IIR;
/* Check interrupt source */
switch (status & UART_INT_ID)
{
/* Status received */
case UART_INT_RLS:
/* Not enabled */
break;
/* Data available */
case UART_INT_RLA:
status = U0LSR;
while (status & UART_LSR_RDR)
{
c = U0RBR;
if (!(status & UART_LSR_RXFE))
xQueueSendToBackFromISR(uarts_available[0]->rx_queue, &c, &task_woken);
status = U0LSR;
}
break;
case UART_INT_CTI:
/* Not enabled */
break;
case UART_INT_THRE:
/* Not enabled */
break;
}
VICVectAddr = 0;
if (task_woken)
taskYIELD();
}