AVR350
3
1472D-AVR-01/08
5 Receiver Considerations
This protocol NACKs the following conditions:
1. Framing error on any byte
2. OverRun error on any byte
3. CRC error
4. Receiver timed out (didn't receive packet within one second)
On any NACK, the sender will re-transmit the last packet. Items one and two should
be considered serious hardware failures. Verify that sender and receiver are using the
samebaud rate, start bits and stop bits. Item three is found in noisy environments, and
the last issue should be self-correcting after the receiver NACKs the sender.
6 Data Flow Diagram
The data flow diagram below simulates a 5-packet file being sent.
Table 6-1.
Data Flow Diagram
Sender
Receiver
<---
“C”
Times Out after Three Seconds
<---
“C”
SOH 0x01 0xFE Data CRC --->
Packet
OK
<---
ACK
SOH
0x02
0xFD
Data
CRC
--->
(Line Hit during Data Transmission)
<---
NACK
SOH
0x02
0xFD
Data
CRC
--->
Packet OK
<---
ACK
SOH
0x03
0xFC
Data
CRC
--->
Packet OK
(ACK Gets Garbled)
<---
ACK
SOH
0x03
0xFC
Data
CRC
--->
Duplicate Packet
<---
ACK
SOH
0x04
0xFB
Data
CRC
--->
(UART Framing Error on Any Byte)
<---
NACK
SOH
0x04
0xFB
Data
CRC
--->
Packet OK
<---
ACK
SOH
0x05
0xFA
Data
CRC
--->
(UART Overrun Error on Any Byte)
<---
NACK
SOH
0x05
0xFA
Data
CRC
--->
Packet OK
<---
ACK
EOT --->
Packet
OK
(ACK Gets Garbled)
<---
ACK
EOT --->
Packet
OK
Finished <---
ACK