Maxim Integrated cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim Integrated product. No circuit patent
licenses are implied. Maxim Integrated reserves the right to change the circuitry and specifications without notice at any time.
Maxim Integrated 160 Rio Robles, San Jose, CA 95134 USA 1-408-601-1000
The MAXQ20 microcontroller core used in many of Maxim’s products employs a firmware bootloader accessible
through the programming interface. The command set used by the bootloader is common across all MAXQ20core devices, with additional commands supporting unique features of specific devices. By taking advantage of
this commonality, the developer of a host-side programming interface can reuse existing software when adding
programming support for new devices. This document describes the command set used by the MAXQ20-core
microcontrollers.
Overview
All Maxim microcontrollers with a MAXQ20 core share a common bootloader protocol to maximize software reuse
and minimize the development cycle required to add programming support for new Maxim MAXQ20-core
microcontrollers.
This document lists the commands supported by the MAXQ20-core bootloaders. Not all commands are supported
in all devices; details about the bootloader commands specific to each device will be described in the applicable
user’s guide. The Get Support Commands command can also be used to determine which families of commands
are supported Commands in families 0-E are function the same across all products, but not all commands are
supported in all devices.
All devices with more than 64KB of flash memory must utilize the word mode version of commands which offer a
byte/word mode choice. Use the Get Code Size command or consult the applicable user’s guide to determine the
amount of code memory a device.
No Error. The last command completed successfully .
Family Not Supported. An attempt was made to use a command f rom a family which the bootloader does not support.
Invalid Command. An attempt was made to use a nonexistent command within a supported command family.
No Password Match. This status code is returned when an attempt is made to use a command other than a Family 0 command when the sec uri ty lock is set (SL=1).
Bad Parameter. The parameter (address or otherwise) passed to the command was out of
range or otherwise invalid.
05
Verify Failed. The verification step failed on a Load/Verify or Verif y command.
06
Unknown Register. An attempt was made to read from or write to a nonexistent register.
08
Master Erase Failed. The bootloader was unable t o perform master erase.
09
Page Erase Failed. An attempt to erase a flash page failed.
10
Not Implemented. The command or feature was not implemented.
11
Timeout. A hardware timeout occurred during the operation.
12
Invalid Mode.
13
Hardware Failure.
14
Loader Lock Failed. Writing the loader lockout pattern t o flash failed.
Loader Protocol Layer
Bootloader commands are segregated by command family, designated. 0 to F. Commands within a family have a
common functionality. Family F comman ds are target-specific that have special features in common.
All bootloader commands begin with a single command byte. The high four bits of this command byte define the
command family (from 0 to 15), while the low fou r bits define the specific command within that family.
After each command has completed, the loader will output a ‘prompt’ byte to indicate that it has finished the
operation. The prompt byte is the single character ‘>’ (byte value 03Eh).
After each bootloader command the error code should be read by means of the Get Status command (04h). If the
status byte is a value other than 00h then an error has occurred and the host should take the appropriate action.
All commands in Family 0 may be executed whether or not the security lock is set or password protection
enabled. All other commands may only be executed if the security lock is cleared (SL=0).
When providing addresses for code or data read or write to bootloader commands, all addresses run from 0000h
to (memory size – 1).
Table 1. Bootloader Status Codes
01
02
03
04
07
MEANING
Word Mode Not Supported. An attempt was made to set word mode access, but the
This command causes the bootloader command loop to exit. Upon exit, the SPE bit is cleared and the device
performs and internal reset. Following the reset, execution jumps to the beginning of application code at address
0000h.
Command 02h—Master Erase
This command erases (programs to FFFFh) all words in the program flash memory and writes all words in the
data SRAM and the AES cryptographic memory to zero. After this command completes, if SL=1 the security lock
bit is automatically cleared and the device res ets, but the device will still remain in loader mode.
Devices which support the Set Context command require the desired context to be set before executing this
command. The selected context will designate which area(s) (system, user loader, or user application) will be
erased.
Command 03h—Password Match
This command is used to gain access to memory on devices protected by the 32-byte password match f eature.
Devices which support the Set Context command require the desired context to be set before executing this
command. The selected context will designate which area (system, user loader, or user application) the password
will be compared against.
Command 04h—Get Status
The status code returned by this command is defined in Table 1. The flags byte contains the bit status flags
shown in Table 2.
4
FLAG BIT
MEANING
Password Lock.
001Fh) required to allow access to the bootloader and in-circuit debugging functions.
0 – Password protection of bootloader and debugging functions is disabled.
1 – 32-byte password match against a stored pass word (in program space words 0010h–
Word/Byte Mode.
1
0 – The bootloader is currently in byte mode for memory reads/writes.
1 – The bootloader is currently in word mode for memory reads/writes.
Word/Byte Mode Supported.
2
0 – The bootloader supports byte mode only .
1 – The bootloader supports word mode as well a s byte mode.
Command 05h—Get Supported Commands
The SupportL (LSB) and SupportH (MSB) bytes form a 16-bit value indicates which command families this
bootloader supports. If bit 0 is set to 1, it indicates that Family 0 is supported. If bit 1 is set to 1, it indicates that
Family 1 is supported, and so on.
The CodeLen and DataLen bytes return the fixed block lengths used by the Load/Dump/Verify Fixed Length
commands for code and data space, respectively. Devices which do not support fixed block loading will return 00h
for bytes five and six.
Command 06h—Get Code Size
This command returns SizeH:SizeL, which represents the size of available code memory in words minus 1. If this
command is unsupported, the return value will be 0000h meaning “unknown amount of memory ”.
Command 07h—Get Data Size
This command returns SizeH:SizeL, which represents the size of available data memory in words minus 1. If this
command is unsupported, the return value will be 0000h meaning “unknown amount of memory”.
This is a factory verification command and is in cluded here only for completeness.
Command 09h—Get Utility ROM Version
This is a factory verification command and is in cluded here only for completeness.
Command 0Ah—Set Word/Byte Mode Access
The Mode byte should be 0 to set byte access mode or 1 to set word access mode. The current access mode is
returned in the status flag byte by command 04h, as well as a flag to indicate whether word access mode is
supported by this particular bootloader.
Command 0Dh—Get ID Information
The output of this command is a zero-terminated ASCII string. Devices which support this command will have a
detailed description in the applicable user’s gui de.
6
Loading...
+ 12 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.