Skip to main content
Visitor II
January 13, 2010
Question

Uart Issues on 115kb

  • January 13, 2010
  • 3 replies
  • 946 views
Posted on January 13, 2010 at 04:42

Uart Issues on 115kb

    This topic has been closed for replies.

    3 replies

    robosoftAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 10:00

    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

    Luc

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 10:00

    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

    }

    }

    robosoftAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 10:00

    Thanks, I will try this.

    Regards