This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: MPC8xx SMC serial problem
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Will Wagner <will_wagner at carallon dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 27 Jan 2006 06:11:09 -0700
- Subject: Re: [ECOS] MPC8xx SMC serial problem
- References: <43DA1970.70408@carallon.com>
On Fri, 2006-01-27 at 13:00 +0000, Will Wagner wrote:
> Hi All,
>
> Been testing serial comms with parity enabled. Always get the data sent
> but occasionally (~25%) I get spurious data as well.
>
> Looking at it in the debugger it appears the buffer descriptor doesn't
> hold valid data but it is being passed to the driver anyway. The control
> flags of the buffer descriptor show that there has been a parity error
> but this is never checked in the function quicc_smc_serial_DSR, it only
> checks that the buffer is ready for processing not that there wasn't an
> error.
>
> I think a change like this would fix the problem:
>
> while (rxbd != rxlast) {
> if ((rxbd->ctrl & (QUICC_BD_CTL_Ready | QUICC_BD_CTL_Frame |
> QUICC_BD_CTL_Parity)) == 0) { // Check if data error
> for (i = 0; i < rxbd->length; i++) {
> (chan->callbacks->rcv_char)(chan, rxbd->buffer[i]);
> }
>
I don't see how this adds any protection/testing, unless Ready/Frame are
*not* set when Parity is. (I've never seen parity errors on this
interface, so I'm not sure)
Do you really want to pass in bogus data if there were errors?
> Also need to add QUICC_BD_CTL_Frame & QUICC_BD_CTL_Parity to the list of
> defines in ppc8xx.h
>
> Does this make sense? Has anyone else seen this problem? Presumably need
> to apply the same change to the SCC DSR?
If you do get this worked out, a proper patch would be in order. Prose
quoting of modified code doesn't help much (and typically won't be moved
into the repository)
Also, just out of curiosity, what platform/target is this on?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss