UART overrun error

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

visiot
Posts: 1
Joined: Mon Apr 25, 2016 7:08 am

UART overrun error

Mon Apr 25, 2016 7:25 am

i am using sama5d31 SoC in my project. i need to communicate with FPGA over uart. for which i've connected USART2 and USART3 with FPGA at a baudarate of 460800, 8N2. But many time while communicating i'm getting wrong bytes at UART. At the same time when i check /proc/tty/driver/atmel_serial , it gives oe error.

3: uart:ATMEL_SERIAL mmio:0xF8020000 irq:36 tx:281286 rx:23119 oe:3 RTS|CTS|DTR|DSR|CD|RI
4: uart:ATMEL_SERIAL mmio:0xF8024000 irq:37 tx:315495 rx:81078 oe:21 RTS|CTS|DTR|DSR|CD|RI

When i'm priting the data recieved over uart, bytes are overwritten.

I've tried increasing the HZ value from 100 to 1000, but that just increased the oe error rate. When i was using 100HZ value, oe was around 3 to 5 in a defined time period. But after increment HZ to 1000 it is now approx 55 to 65.
blue_z
Location: USA
Posts: 1504
Joined: Thu Apr 19, 2007 10:15 pm

Re: UART overrun error

Wed Apr 27, 2016 3:48 am

visiot wrote:i am using sama5d31 SoC in my project.
So you post in the SAM9 forum?
visiot wrote:i need to communicate with FPGA over uart. for which i've connected USART2 and USART3 with FPGA at a baudarate of 460800, 8N2.
Why 2 stop bits? Is this indicative of some other issue?
You go to the effort of using a very fast baud rate, and then increase the framing overhead by 50% for an automatic 7% reduction in bandwidth efficiency.
visiot wrote:But many time while communicating i'm getting wrong bytes at UART. At the same time when i check /proc/tty/driver/atmel_serial , it gives oe error.
Obviously these are related, but provide no useful information.
You haven't described the time interval over which these statistics are gathered nor the characteristics of the data transfers.
visiot wrote:I've tried increasing the HZ value from 100 to 1000, but that just increased the oe error rate. When i was using 100HZ value, oe was around 3 to 5 in a defined time period. But after increment HZ to 1000 it is now approx 55 to 65.
Why do you expect an interrupt and/or DMA problem to be solved by changing the scheduling timer? You're just shooting in the dark for a solution.

The overrun errors are only the symptom of the root cause, which is probably a DMA and/or interrupt issue.
You would need to gather the actual states of the DMA channel and serial port ring buffer when the overrun is detected to derive a proper solution.
Or continue to shoot in the dark.

Regards

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: No registered users and 2 guests