herunterladen
![](https://oss-datasheet.aipcba.com/html/DEAD518F5156DD4FB55B120CBEFF4239/bg1.png)
Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4012
Keywords: JTAG, bootloader, MAXQ, MAXQ2000
APPLICATION NOTE 4012
Implementing a JTAG Bootloader Master for the
MAXQ2000 Microcontroller
Mar 22, 2007
Abstract: The JTAG bootloader provided by MAXQ® microcontrollers allows an external JTAG master to
easily identify and program any MAXQ microcontroller using a set of standardized commands. The code
included with this application note can be used as a starting point to build a full-featured JTAG
bootloader master application. The master application can identify, initialitize, load, and verify the code
and data memory contents of any MAXQ microcontroller which supports the standardized bootloader
command set.
Overview
MAXQ microcontrollers that include rewriteable onboard program memory typically include a ROM-based
bootloader that enables the program memory to be loaded using the microcontroller's JTAG-compatible
debug port. Although the exact functionality provided by the JTAG bootloader varies from device to
device, it typically includes commands which allow program and data memory to be read, written,
verified, and erased. Some devices provide alternative interfaces to the bootloader (such as a serial port
or SPI™ interface), but the JTAG interface is most commonly used for two reasons. First, the JTAG
interface must already be present to support in-circuit debugging functions. Second, the JTAG interface
is not generally utilized by the end-user application (unlike a serial port). An optional password
mechanism can be used to restrict access to the bootloader or in-circuit debugging features once the
program code has been loaded. Consult the product specific information, including data sheets and
User's Guides, for detailed information on the functionality supported by each MAXQ device.
This application note covers the basic steps needed to implement a JTAG bootloader master for the
MAXQ2000. These steps include interfacing to the JTAG port, communicating with the Test Access Port
(TAP) controller, activating bootloader mode, and sending commands to the ROM-based bootloader.
Since the JTAG port generally operates the same on all MAXQ devices and since MAXQ bootloaders
operate using a shared command set, most of the topics covered in this application note (as well as
most of the example code) will apply when implementing a JTAG bootloader master for any MAXQ
microcontroller.
Other than a serial port, no special features of the MAXQ2000 were used for this implementation. This
means that the example code presented here could easily be retargeted to run on any MAXQ20 device
with sufficient program memory. The code was written in MAXQ assembly and compiled using the MAX-
IDE development environment. The code is available for download.
Page 1 of 28