beautypg.com

19 - command 50h – load and verify code, 20 - command 51h – load and verify data, 19 - command 50h – Maxim Integrated DS4830 Optical Microcontroller User Manual

Page 178: Load and verify code, 20 - command 51h, Load and verify data, 21 - command e0h, Ds4830 user’s guide

background image

DS4830 User’s Guide

178

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.

22.3.19 - Command 50h

– Load and Verify Code

Byte 1

Byte 2

Byte 3

Byte 4

(Length) Bytes

Byte
Length+5

Byte
Length+6

Command

Data In

Data In

Data In

Data In

NOP

Return

Input

50h

Length

AddrL

AddrH

Data to load and verify

00h

00h

Output

X

X

X

X

X

X

3Eh


This command provides the combined functionality of the Load Code and Verify Data commands. After each word of data
is written to data memory, the loader will read this memory location and verify that the data matches the input data. If the
verification fails, the status code will be set to reflect this failure. All of the guidelines that are listed for the Load Code
command must be followed for the Load and Verify Code command. This command is password protected.

22.3.20 - Command 51h

– Load and Verify Data

Byte 1

Byte 2

Byte 3

Byte 4

(Length) Bytes

Byte
Length+5

Byte
Length+6

Command

Data In

Data In

Data In

Data In

NOP

Return

Input

51h

Length

AddrL

AddrH

Data to load and verify

00h

00h

Output

X

X

X

X

X

X

3Eh


This command provides the combined functionality of the Load Data and Verify Data commands. After each word of data
is written to SRAM memory, the loader will read this memory location and verify that the data matches the input data. If
the verification fails, the status code will be set to reflect this failure. The guidelines that are listed for the Load Data
command must be followed for the Load and Verify Data command. This command is password protected.


22.3.21 - Command E0h

– Code Page Erase

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Command

Data In

Data In

Data In

NOP

Return

Input

E0h

0

PageNum

0

00h

00h

Output

X

X

X

X

X

3Eh


This command erases (programs to FFFFh) all words in a 256 word (512 byte) page of the program flash memory. The
DS4830 has 128 pages of flash. The input PageNum indicates which page to erase. For example, PageNum=0 would
erase byte addresses 000h through 1FFh and PageNum=1 would erase byte addresses 200h through 3FFh. This
command requires approximately 40 ms to complete. Polling can be performed during this execution time to determine
when the page erase has completed. This command is password protected.