[ECOS] AT91 USART usage question

Frank Rolsted Jensen (FRJ) FRJ@tt.dk
Tue Jan 8 06:09:00 GMT 2002


eCos does not disable the USART (I guess you do not have hw/sw flowcontrol
activated).
Even though you are using PDC the delay between ISR and DSR is still a
problem  as you have to reload the PDC counter and pointer before a new
character is received. Isn't is so that you are missing characters each time
you are reloading the PDC regs ?
One solution is to load the PDC pointer/counter in ISR.
Do you use the block transfer functions in the serial driver when storing
data from the USART ? I'm made an AT91 USART driver using the PDC and the
block transfer functions. It load data directly from the USART into the ring
buffer controlled by the serial driver. When transmitting it also loads data
directly from the ring buffer into the USART using the PDC.
/Frank. 

-----Original Message-----
From: harri.siirtola@vtt.fi [mailto:harri.siirtola@vtt.fi]
Sent: 8. januar 2002 13:00
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] AT91 USART usage question


Hi,
does eCos disable USARTs on any occasion? I'm encountering dropped bytes on 
57600kbaud. I've set up a byte counter in my DSR and it shows the correct 
count until I start processing the incoming data. I mean, if I just receive 
data and move them into a RAM buffer (having commented out further 
processing), everything works fine.

I'm using the Peripheral Data Controller (similar to DMA) to catch incoming 
data, so even big delays in DSR calls shouldn't be a problem. I have a big 
enough buffer that PDC fills, and my DSR empties it whenever it gets 
called. A ring buffer approach doesn't help either. That's why I suspect 
the USART gets disabled somewhere.

Any clues?
	Harri



More information about the Ecos-discuss mailing list