![NXP Semiconductors freescale KV4 Series Reference Manual Download Page 224](http://html1.mh-extra.com/html/nxp-semiconductors/freescale-kv4-series/freescale-kv4-series_reference-manual_1721789224.webp)
14.2.5.3 Framing Packet
The framing packet is used for flow control and error detection, and it (the framing
packet) wraps command and data packets as well.
Table 14-4. Framing Packet Format
Byte #
Value
Parameter
0
0x5A
start byte
1
packetType
2
length_low
Length is a 16-bit field that specifies the entire
command or data packet size in bytes.
3
length_high
4
crc16_low
This is a 16-bit field. The CRC16 value covers entire
framing packet, including the start byte and command
or data packets, but does not include the CRC bytes.
See the CRC16 algorithm after this table.
5
crc16_high
6 . . .n
Command or Data packet
payload
A special framing packet that contains only a start byte and a packet type is used for
synchronization between the host and target.
Table 14-5. Special Framing Packet Format
Byte #
Value
Parameter
0
0x5A
start byte
1
0xA
n
packetType
The Packet Type field specifies the type of the packet from one of the defined types
(below):
Table 14-6. packetType Field
packetType
Name
Description
0xA1
kFramingPacketType_Ack
The previous packet was received successfully; the sending
of more packets is allowed.
0xA2
kFramingPacketType_Nak
The previous packet was corrupted and must be re-sent.
0xA3
kFramingPacketType_AckAbort
Data phase is being aborted.
0xA4
kFramingPacketType_Command
The framing packet contains a command packet payload.
0xA5
kFramingPacketType_Data
The framing packet contains a data packet payload.
0xA6
kFramingPacketType_Ping
Sent to verify the other side is alive. Also used for UART
autobaud.
0xA7
kFramingPacketType_PingResponse
A response to Ping; contains the framing protocol version
number and options.
CRC16 algorithm:
Functional Description
KV4x Reference Manual, Rev. 2, 02/2015
224
Preliminary
Freescale Semiconductor, Inc.
Summary of Contents for freescale KV4 Series
Page 2: ...KV4x Reference Manual Rev 2 02 2015 2 Preliminary Freescale Semiconductor Inc...
Page 60: ...KV4x Reference Manual Rev 2 02 2015 60 Preliminary Freescale Semiconductor Inc...
Page 128: ...Debug Security KV4x Reference Manual Rev 2 02 2015 128 Preliminary Freescale Semiconductor Inc...
Page 138: ...Boot KV4x Reference Manual Rev 2 02 2015 138 Preliminary Freescale Semiconductor Inc...
Page 1358: ...KV4x Reference Manual Rev 2 02 2015 1358 Preliminary Freescale Semiconductor Inc...