This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6748 FIFO overrun on receive

Hi,

I'm busy writing a non-BIOS secondary bootloader for our custom C6748 board. For updating code, the bootloader should initially look for a ping from a PC based programmer application, and if it finds no ping withing 150ms, it should continue booting as normal.

My UART driver is essentially the driver that came with the C6748 Starterware. I managed to get the uartEcho example up and running, but now I'm having problems with the communication with the PC programmer. The PC programmer would send a 10 character ping burst every 25ms until it receives an ACK from the bootloader (the PC programmer is running before the C6748 starts up). The problem I'm currently having is that the UART would immediately generate a FIFO buffer overrun interrupt right after I have configured it, and it then essentially stops receiving anymore bytes.

My UART configuration was initially exactly the same as that of the Starterware uartEcho example, but after trying various different combinations of configuration, I still get the same FIFO buffer overrun interrupt.

a) How do I prevent such a FIFO buffer overrun?

b) How do I recover from a FIFO buffer overrun?

This is a really stupid problem, I can't believe I'm struggling so much with it!! Please help!

Regards

  Reinier

  • Reinier,

    You should be able to recover from a FIFO buffer overrun by resetting and re-initializing the UART.

    When you are initializing the UART in the first place, are you leaving it in reset (URRST=0) until the final step? If so, I do not understand how the FIFO could be overrun immediately.

    How fast do you mean by "the UART would immediately generate a FIFO buffer overrun interrupt right after I have configured it"? There should be a lot of time before that many serial bits could come in.

    How are you servicing the UART data as it comes in? For a "ping tester" in a secondary bootloader, simple polling is probably as good as anything, with no need to use the FIFO. Would that work for you for this, and then disable the FIFO if you decide there is no ping coming in?

    Regards,
    RandyP

  • Hi Randy,

    As expected it was quite a stupid problem, I guess by the end of last week my developer's goggles prevented me from seeing the problem. The UART peripheral would immediately trigger a buffer overrun line receive error as soon as the UART was released from reset (even if releasing from reset was the final step). However, the solution was quite simple, before enabling the UART interrupts, just read the Line Status Register (LSR) to clear any previous interrupts. The Starterware code does not actually do this, so it might be a good idea to put it in there for future reference.

    In my case the UART was only configured at a later stage of the program, by which time a lot of ping bytes have already been "received" (more than the FIFO size), which apparently caused the overrun error even though the UART was held in reset.

    Regards

      Reinier