Frame Structure; Checksum - Texas Instruments MSP430 User Manual

Gang programmer
Hide thumbs Also See for MSP430:
Table of Contents

Advertisement

www.ti.com

3.4.1 Frame Structure

The data frame format of the firmware commands is shown in
The first eight bytes (HDR through LH) are mandatory (– represents dummy data).
Data bytes D1 to Dn are optional.
Two bytes (CKL and CKH) for checksum are mandatory.
Acknowledge done by the MSP-GANG430 is mandatory except with the Transmit Diagnostic
command.

3.4.2 Checksum

The 16-bit (2-byte) checksum is calculated over all received/transmitted bytes, B1 to Bn, in the data frame
except the checksum bytes themselves by XORing words (two successive bytes) and inverting the result,
as shown in the following formulas.
CHECKSUM = INV [ (B1 + 256 × B2) XOR (B3 + 256 × B4) XOR ... XOR ((Bn – 1) + 256 × Bn) ]
or
CKL = INV [ B1 XOR B3 XOR ... XOR Bn–1 ]
CKH = INV [ B2 XOR B4 XOR ... XOR Bn ]
The example of the frame Execute Self Test with checksum:
0x80 0x35 0x06 0x06 0x00 0x00 0x00 0x00 0x00 0x00 0x79 0xCC
SLAU101O – March 2003 – Revised May 2010
Copyright © 2003–2010, Texas Instruments Incorporated
Table
3-1.
Data Frame
25
Firmware

Advertisement

Table of Contents
loading

This manual is also suitable for:

Msp-gang430

Table of Contents