This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
MPC8xx SMC serial problem
- From: Will Wagner <will_wagner at carallon dot com>
- To: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 27 Jan 2006 13:00:32 +0000
- Subject: [ECOS] MPC8xx SMC serial problem
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]);
}
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?
Will.
--
------------------------------------------------------------------------
Will Wagner will_wagner@carallon.com
Senior Project Engineer Office Tel: 0207 371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss