[ECOS] MPC555 serial receive drops bytes

Andrew Lunn andrew@lunn.ch
Tue May 6 17:55:00 GMT 2008


> With the exception fixed, I was still getting overruns so I moved the
> code out of the DSR code into the ISR to improve latency. Since its only
> moving a byte out of a register, I thought it doesn't really need a DSR.

You have to be very careful here. You cannot call the 

(chan->callbacks->rcv_char)(chan, (cyg_uint8)scdr);

from ISR context. It has to be in DSR context. It will play around
with threads, unblocking readers etc, which can only be done safely in
DSR context.

    Andrew


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list