beautypg.com

16 command 30h—crc code, 17 command 31h—crc data, 18 command 40h—verify code – Maxim Integrated MAX31782 User Manual

Page 164: 19 command 41h—verify data, 16command30h—crccode, 17command31h—crcdata, 18command40h—verifycode, 19command41h—verifydata

background image

MaximIntegrated 18-13

MAX31782 User’s Guide

Revision 0; 8/11

18.3.16Command30h—CRCCode

This command returns the CRC-16 value (CRCH:CRCL) of the (LengthH:LengthL) bytes of program flash starting at
(AddrH:AddrL) . The formula for the CRC calculation is X

16

+ X

15

+ X

2

+ 1 . This command is password protected .

The CRC calculation takes approximately 45 system clock cycles per byte . During this time polling should be performed
to determine when the loader has finished executing the CRC calculation . If using the I

2

C loader, use the polling method

shown in

Figure 18-2

. When a data string is read that has B7, CRCL, CRCH, 3Eh, the host knows that the calculation

completed successfully . If using the JTAG loader, the JTAG status bits can be used to determine when the CRC cal-
culation is complete .

18.3.17Command31h—CRCData

This command returns the CRC-16 value (CRCH:CRCL) of the (LengthH:LengthL) bytes of data memory starting at
(AddrH:AddrL) . The formula for the CRC calculation is X

16

+ X

15

+ X

2

+ 1 . This command is password protected .

The CRC calculation takes approximately 45 system clock cycles per byte . During this time polling should be performed
to determine when the loader has finished executing the CRC calculation . If using the I

2

C loader, use the polling method

shown in

Figure 18-2

. When a data string is read that has B7, CRCL, CRCH, 3Eh, the host knows that the calculation

completed successfully . If using the JTAG loader, the JTAG status bits can be used to determine when the CRC cal-
culation is complete .

18.3.18Command40h—VerifyCode

This command operates in the same manner as the Load Code command, except that instead of programming the
input data into flash memory, it verifies that the input data matches the data already in code space . If the data does not
match, the status code is set to reflect this failure . This command is password protected .

18.3.19Command41h—VerifyData

This command operates in the same manner as the Load Data command, except that instead of writing the input data
into SRAM, it verifies that the input data matches the data already in data space . If the data does not match, the status
code is set to reflect this failure . This command is password protected .

Byte1

Byte2

Byte3

Byte4

Byte5

Byte6

Byte7

Byte8

Byte9

Byte10

Byte11

Command

Data
In

Data
In

Data
In

DataIn

DataIn

NOP

Data
Out

Data
Out

Return

Dummy
RX

Input

30h

2

AddrL

AddrH

LengthL

LengthH

00h

00h

00h

00h

00h

Output

X

X

X

X

X

X

X

CRCL

CRCH

3Eh

X

Byte1

Byte2

Byte3

Byte4

Byte5

Byte6

Byte7

Byte8

Byte9

Byte10

Byte11

Command

Data
In

Data
In

Data
In

DataIn

DataIn

NOP

Data
Out

Data
Out

Return

Dummy
RX

Input

31h

2

AddrL

AddrH

LengthL

LengthH

00h

00h

00h

00h

00h

Output

X

X

X

X

X

X

X

CRCL

CRCH

3Eh

X

Byte1

Byte2

Byte3

Byte4

(Length)Bytes

Byte
Length+5

Byte
Length+6

Byte
Length+7

Command

DataIn

DataIn

DataIn

DataIn

NOP

Return

DummyRX

Input

40h

Length

AddrL

AddrH

Data to Verify

00h

00h

00h

Output

X

X

X

X

X

X

3Eh

X

Byte1

Byte2

Byte3

Byte4

(Length)Bytes

Byte
Length+5

Byte
Length+6

Byte
Length+7

Command

DataIn

DataIn

DataIn

DataIn

NOP

Return

DummyRX

Input

41h

Length

AddrL

AddrH

Data to Verify

00h

00h

00h

Output

X

X

X

X

X

X

3Eh

X