2010-01-12 07:42 PM
2011-05-17 01:00 AM
Hi,
My program uses TIM0 interrupt and UART1 interrupt (no FIFO). I have a problem receiving characters on 115200 Baud. The reason is that the time to execute my timer isr is longer than the time to transmit 2 characters. I do not think it is possible to interrupt my timer isr when receiving a character as UART-interrupt has always a lower priority than TIMER-interrupt. (VIC1 and VIC0). When I use the FIFO problem is solved. However my application needs an interrupt on every character that was received (Is this possible using a FIFO ?). Any idea how I can solve this problem ? Kind regards Luc2011-05-17 01:00 AM
You can use the Receive Timeout Interrupt if you need an interrupt even if you just received one character.
In your interrupt subroutine: /******************************************************************************* * Function Name : UART0_IRQHandler * Description : This function handles the UART0 interrupt request * Input : None * Output : None * Return : None *******************************************************************************/ void UART0_IRQHandler(void) { /***************************************************************************/ /* GESTION DE L'IT SUR RECEPTION RX0 */ /***************************************************************************/ if(UART_GetITStatus(UART0, UART_IT_Receive|UART_IT_ReceiveTimeOut) == SET) { /* Read characters from the receive FIFO */ ....your code here } }2011-05-17 01:00 AM
Thanks, I will try this.
Regards