3 – bootloader commands, 1 – command 00h – no operation, 2 – command 01h – exit loader – Maxim Integrated DS4830A Optical Microcontroller User Manual

Page 184: 3 – command 02h – master erase

Advertising
background image

DS4830A User’s Guide

184

22.3 – Bootloader Commands

Commands for the DS4830A loader are grouped into families. All bootloader commands begin with a single
command byte. The upper four bits of this command byte define the command family (from 0 to 15), while the lower
four bits define the specific command within that family. The loader command families are shown in Table 22-5.

Table 22-5: Command Families

COMMAND FAMILY FAMILY DESCRIPTION

0

Required

1

Load

2

Dump

3

CRC

4

Verify

5

Load and Verify

E

Fixed Length Erase


All commands, except those in Family 0, are password protected. The password must first be matched before these
commands can be executed. This is done using the Password Match command, which will clear the PWL bit if a
match is made.

Bootloader commands that fail for any reason set the bootloader status byte to an error code value describing the
reason for the failure. This status byte can be read by means of the Get Status command.


For proper bootloader operation, all bytes of data listed for the command must be written or read from the
bootloader. This includes the Return byte, and for the I

2

C bootloader, the Dummy RX byte. If all bytes are not read,

the bootloader will remain in an unknown state even after a new command is sent to the bootloader.

Following are descriptions of the bootloader commands that are available for use by the DS4830A bootloader.

22.3.1 – Command 00h – No Operation

Byte 1

Command

Input

00h

Output

X


This is a No Operation Command. This command can be sent at any time without the bootloader taking action. This
command is not password protected.

22.3.2 – Command 01h – Exit Loader

Byte 1

Command

Input

01h

Output

X


This command causes the bootloader to exit. When exiting, the bootloader will clear the JTAG_SPE and I2C_SPE
bits and then perform an internal reset of the device. Following the reset, code execution jumps to the beginning of
application code at address 0000h. This command is not password protected.

22.3.3 – Command 02h – Master Erase

Byte 1

Byte 2

Byte 3

Command

NOP

Return

Input

02h

00h

00h

Output

X

X

3Eh


This command erases (sets to FFFFh) all words in the program flash memory and writes all words in the data SRAM
to zero. This command is not password protected. After this command completes, the password lock bit is
automatically cleared, allowing access to all bootloader commands. This command requires approximately 40ms to
complete. Polling for a return value of 3Eh can be performed during this execution time to determine when the
master erase has completed.

Advertising