This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: AT91 USART usage question



> > [...] PDC [...] buffer [...] serial [...]
> >
> 
> [...] PDC [...] buffer [...] serial [...]
> 

I am conincidentally working on the very same code
for a new board!

uCLinux has a driver for the atmel serial port that
i am taking hints from.

if someone reminds me, i can send you my own completed
eCos driver in a few days. it should have full flip PDC
buffering both ways.

best

-paul

On 2002.01.09 10:49 harri.siirtola@vtt.fi wrote:
> At 15:12 8.1.2002 +0100, Frank Rolsted Jensen (FRJ) wrote:
> >eCos does not disable the USART (I guess you do not have hw/sw flowcontrol
> >activated).
> 
> I haven't.
> 
> >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.
> 
> This doesn't apply if I write the size of my rx buffer to RCR. After that, 
> the PDC transfers received chars up to this count before it requires 
> reloading. I've checked the buffer after transferring a file and the PDC 
> never seems to get further than, say, 10 bytes before my DSR collects the 
> data and restores the RCR and RPR. I've suspected the RCR/RPR reload 
> causing the data loss in another way: if chars arrive during the DSR data 
> collect (looping as many times as RCR indicates when entering the DSR, RPR 
> is the tail pointer at this point), these bytes could be missed as the PDC 
> transfers them after this tail pointer. However, I've put a RCR re-read 
> just after my DSR collect loop to catch this situation, to no avail.
> 
> >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.
> 
> Just what I'm trying to do (see above...) The point is, my rx works fine if 
> I just collect the data and count the bytes. No loss of data unless I 
> enable further processing functions.
> 
> >/Frank.
> 
> Thanks Frank, still more hair to tear off ;)
>          Harri
> 
> 
Paul Sheer Consulting IT Services . . . Tel . . . +27 21 761 7224
Email . . . psheer@icon.co.za . . . . . . Pager . . . 088 0057245
Linux development, cryptography, recruitment,  support,  training
http://www.icon.co.za/~psheer . . . . http://rute.sourceforge.net
L I N U X . . . . . . . . . . . .  The Choice of a GNU Generation


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]