AnsweredAssumed Answered

What should I do after UART FIFO overruned?

Question asked by Makoto Katsukura on Mar 20, 2014
Latest reply on Dec 22, 2014 by Makoto Katsukura

Dear Forum members,

 

I am using UART0 with receive FIFO(16 data words) function is enabled.

It works fine normally, but once it overflowed it works weirdly.

 

For example,  I sent strings "ABCDEFGHIJKLMLOPQRSTUVWXYZ" repeatedly to Vybrid from my PC.

After UART0 receive FIFO was overflowed, my program read D register until RXEMPT bit becomes 1.

Also my program checked RCFIFO register for debug.

 

Followings are register reading log.

( Left side of "="  shows register name or flag name, right side of "=" shows read value. )

( Top is oldest, bottom is newest.)

  1. RXOF=1
  2. RCFIFO=15
  3. D='H'
  4. RCFIFO=14
  5. D='I'
  6. RCFIFO=13
  7. D='J'
  8. RCFIFO=13
  9. D='K'
  10. RCFIFO=12
  11. D='L'
  12. RCFIFO=11
  13. D='M'
  14. RCFIFO=10
  15. D='N'
  16. RCFIFO=9
  17. D='O'
  18. RCFIFO=8
  19. D='P'
  20. RCFIFO=7
  21. D='Q'
  22. RCFIFO=7
  23. D='R'
  24. RCFIFO=6
  25. D='S'
  26. RCFIFO=5
  27. D='T'
  28. RCFIFO=4
  29. D='U'
  30. RCFIFO=3
  31. D='V'
  32. RCFIFO=2
  33. D='G'
  34. RCFIFO=2
  35. D='O'
  36. RCFIFO=1
  37. D='P'
  38. RCFIFO=0

(In this case, no error was happened except fifo overrun error.)

 

 

Then Line 33, 35, 37 is weird.

I think those should be 'W', 'X', 'Y'  but  they are 'G', 'O', 'P'.

it seems the data in the receive FIFO was corrupted.

 

Are there any special rules to read from D register after FIFO was overruned?

Please help us.

 

Regards,

Makoto Katsukura

Outcomes