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


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


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