Jon Szymaniak

MCF51QE128 SCI1 Framing and Noise Errors (DEMOQE board)

Discussion created by Jon Szymaniak on Mar 3, 2008
Latest reply on May 8, 2008 by Jon Szymaniak
I'm working with a MCF51QE128 on a DEMOQE board, developing C code using the AsynchroSerial bean provided by CodeWarrior for MicroControllers V6.1.  (Only the TX and RX lines seem to be connected to the RS-232 connection)

My goal is to have the AS1_OnRxChar subroutine store received data into an array. Basically, a 3-byte message (row(0 to 47), column(0 to 95), value(0 to 255)) is required to update an entry in the array. The Events.c file containing the relevant subroutine is attached.

Currently, I am using HyperTerminal (57600 Baud, 8-N-1 : the same set up as in the bean) to check if the array is being updated properly. Although sometimes the array may be somewhat updated, most of the time Framing and Noise errors are being flagged.

From similar posts, I saw that these errors often resulted from baudrate mismatches.  The Bean Inspector shows that the internal bus clock is running at 25.165824 MHz, and the actual baud rate for SCI1 is 58254.222 baud.

I thought that this was the issue, so I've tried dropping the baud rate down to 2400 baud, which gives an ~2401 baud on SCI1, according to the Bean Inspector - still getting the Framing and Noise errors. I was worried that my laptop might be Tx'ing at a bad speed, so I tried using minicom on a different machine, with the same errors. I've also attached an capture from my super cheap scope.  (Probing the RX pin on the MCU port of the DEMOQE board, while receiving a " " )

Thinking that my subroutine was simply too slow compared to the rate at which data was being received, I tried commenting everything out in the subroutine except the AS1_RecvChar call and the error check - still getting the errors.

Could anyone give me some advice as to how I could go about cleanly receiving data via the RS232 connection on this board?  Please let me know what additional information I can provide that could help resolve this issue. I apologize that the capture from the scope may not be of much use, I'm a bit limited as it's a $100 DSO-101. If there's something in particular anyone wants to see, let me know and I'll do my best to get a decent capture and annotate the waveform.

Message Edited by jmaniak on 2008-03-02 11:44 PM