The binary packets used in the External Memory consist of a header followed by a payload. The payload size can range from 0 to 65,000 bytes. The payload size is determined by the device.
The packet header is four bytes in length.
ACK/NACK - This bit is a response to a command and the reply bit must be set.
Reply - This bit is set when a response to a command is processed. Every command packet must have a reply
Command - The command of the packet. All reply packets will reply with the same command.
Checksum - The checksum of the entire packet. If the calculated checksum does not match the header's checksum, the packet must be NACKed.
Length - The length of the payload, ranging from 0 - 65,000.
The packet payload is variable length. The length member of the header will indicate the size of the payload in bytes.