#1915 closed defect (fixed)

Error in polling read USART on arm/at91

Reported by: nopscmn Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: arch/arm Version: 4.10
Severity: normal Keywords:
Cc: sebastian.huber@… Blocked By:
Blocking:

Description

In function usart_read_polled from libcpu/arm/at91rm9200 used incorrect registers and flags. From datasheet:

RXBUFF: Reception Buffer Full
0 = The signal Buffer Full from the Receive PDC channel is inactive.
1 = The signal Buffer Full from the Receive PDC channel is active.

must be:

RXRDY: Receiver Ready
0 = No complete character has been received since the last read of US_RHR or the receiver is disabled. If characters were
being received when the receiver was disabled, RXRDY changes to 1 when the receiver is enabled.
1 = At least one complete character has been received and US_RHR has not yet been read.

and

US_THR - USART Transmit Holding Register
must be:
US_RHR - USART Receive Holding Register

Attachments (1)

usart.patch (362 bytes) - added by nopscmn on Sep 19, 2011 at 4:21:38 AM.
Example patch

Download all attachments as: .zip

Change History (3)

Changed on Sep 19, 2011 at 4:21:38 AM by nopscmn

Attachment: usart.patch added

Example patch

comment:1 Changed on Sep 19, 2011 at 6:02:15 AM by Sebastian Huber

Resolution: fixed
Status: newclosed, sebastian.huber@embedded-brains.de

Committed to CVS head. Please check the change log entry.

comment:2 Changed on Oct 10, 2017 at 6:32:23 AM by Sebastian Huber

Component: libcpuarch/arm
Note: See TracTickets for help on using tickets.