Bob Rudd

MC68302 / HDLC problem

Discussion created by Bob Rudd on Oct 30, 2007
Latest reply on Oct 30, 2007 by Alan Bartky

We are using a Motorola MC68302 communications processor in slave mode in receive HDLC mode.
Unless we use the same system clock for both transmit and receive we get many message errors
in the receive (every 3 to 4 messages gives an rx error; usually Non Octet Aligned Frame
or Rx Abort Sequence errors.
It seems we are missing something in the setup (or maybe the hardware) such that the transmit
and receive are not in sync. We have read the MC68302 user manual from cover to cover but
cannot see where we are going wrong.

Here is our setup.
==================

system clock = 19.6608MHz
Mode HDLC NRZI baud rate  = 19200

We are using 68302 processor running on system clock of 19.6608MHz. The channel 1
(SCC1) is configured as HDLC NRZI receive only and its baud rate is 19200. This is a
two wire RS485 serial link.
We than use another set of same hardware and configure the channel 2 (SCC2) as
HDLC NRZI transmit only which is also is a two wire RS485 serial link. When we connect
 these two hardware together we receive 15-20% Errors which we don't understand why?
When we use one set of hardware and configure 68302 channel1 as HDLC NRZI Rx, channel 2 as
HDLC NRZI Tx and loop back channel1 to channel2, we do not see any errors and
we get 100% successful transmission. bearing in mind that the loop back does include
RS485 driver circuitry for both channels.
When we then shared the system  clock between the two systems this also does not generates
any errors and  produces 100% successful results.
All the above tests seems to indicate that there is synchronisation issue
between two sets of hardware.
What we don't understand is, if both hardwares are running at same baud rate
why should there be a sync problem?
Is 68302 really so intolerant about its baud rate?

Register setup
==============
The SCM register setting we are using to configure 68302 as Rx
NOF3-NOF0  = 0000
C32 = 0
FSE = 0
RTE = 0
FLG = 0 we tried both options for
idling it does seem to make any different.
ENC = 1 NRZI

DIAG1 & 0 = 11 Software Control
ENR,ENT = 01 Rx
MODE = 00 HDLC
 

Outcomes