beautypg.com

6 uart bootloader operation, 1 uart bootloader host, 6 uart bootloader operation -13 – Maxim Integrated MAXQ7667 User Manual

Page 231: 1 uart bootloader host routine -13, Maxq7667 user’s guide

background image

13-13

_________________________________________________________________________________________________________

MAXQ7667 User’s Guide

13.6 UART Bootloader Operation

The host computer can request the application program to jump to the the utility ROM bootloader to access the bootloader function

through the UART serial port. Figure 13-1 shows the steps for the MAXQ7667 to evoke the bootloader through the UART.

.

.

.

Turn off Timer 0

Configure UART to operate in Mode 1 (see Section 8 for details).

move M2[27], 0x04

// ICDF is set to select the UART as the communication Port

move dpc, #1Ch

// all data pointers in word mode

move A[2], #01

// Prepare accumulator 2 for UART bootloader

move AP, #08d

// Active accumulator is 8

move DP[0], #0800Dh

// This is where the address of the table is stored.

move ACC, @DP[0]

// Get the location of the function table.

add #13d

// Add the index of the bootloader function.

move DP[0], ACC

// Point to where the address of bootloader is stored.

move ACC, @DP[0]

// Retrieve the address of the function.

ljump ACC

// Jump to the bootloader

.

.

Autobaud, establishes communication link between the host and the MAXQ7667

Password matching through UART, if desired, will allow full access to all the booloader

commands

.

No return, once code exits it takes it to the application code

.

13.6.1 UART Bootloader Host Routine

The MAXQ7667 UART bootloader requires the UART to operate in Mode 1; 1 start bit, 8 data bits, and stop bit, no parity bits are used.

Refer to Section 8 for details on the UART.

The flow chart in Figure 13-1 shows the minimum program requirements for a host that is uploading a program to the MAXQ7667 through

the UART bootloader. Most programmers will want to add additional features such as timeouts, error routines, program verification, etc.

Uploading is done with the MAXQ7667 UART operating in Mode 1; 1 start bit, 8 data bits, and one stop bit. No parity bits are used.

If the password area 10h–1Fh has a valid password (i.e., anything other than all zeros and all ones), then to access the family of com-

mands that are password protected, it is necessary to execute the password match command after the baud-rate detection.

Note: Loading code other than all zeros or all Fs into addresses 10h (word) through 1Fh (word) sets the password. The information in
these locations is the password.