Maxim Integrated MAXQ7666 User Manual
Page 371

MAXQ7665/MAXQ7666 User’s Guide
15-2
SECTION 15: UTILITY ROM (SPECIFIC TO MAXQ7665A–MAXQ7665D
WITH TYPE A FLASH)
The MAXQ7665 utility ROM includes routines that provide the following functions to application software:
• In-application programming routines for Type A flash memory (program, erase, mass erase)
• Single word/byte copy and buffer copy routines for use with lookup tables
• Temperature conversion routine to perform internal/remote diode-connected transistor based temperature measurement
The MAXQ7665 flash type is identified by bit 4 of the read-only OTP register (Module 5, Index 0Dh). For devices with Type A flash, OTP
register bit 4 (OTP.4) = 1. In the MAXQ7665x family, only MAXQ7665A–MAXQ7665D devices support Type A flash.
To provide backward compatibility among different versions of the utility ROM, a function address table is included that contains the
entry points for all user-callable functions. With this table, user code can determine the entry point for a given function as follows:
1) Read the location of the function address table from address 0800Dh in the utility ROM.
2) The entry points for each function listed in Table 15-1 are contained in the function address table, one word per function, in the
order given by their function numbers.
For example, the entry point for the flashEraseAll function can be accessed and called by the following procedure.
get_urom_table_entry:
move dpc, #1Ch
//all data pointers in word mode
move dp[0], #0800Dh
//initialize dp[0]
move bp, @dp[0]
//load function address table location in bp
move offs, #2
//load function number in offs
call @bp[offs]
//call flashEraseAll
It is also possible to call utility ROM functions directly, using the entry points given in Table 15-1. Standard include files are provided
for this purpose with the MAXQ7665 development tool set. This method calls functions more quickly, but the application may need to
be recompiled in order to run properly with a different version of the utility ROM.
Table 15-1. Utility ROM User Functions (for Utility ROM Version 1.01)
FUNCTION NUMBER
FUNCTION NAME
ENTRY POINT
SUMMARY
0 — —
Reserved.
1
flashEraseSector
08836h
Erases (programs to FFFFh) a sector of flash memory.
2
flashEraseAll
0885Dh
Erases (programs to FFFFh) all flash memory.
3
moveDP0
0886Bh
Reads a byte/word at DP[0].
4
moveDP0inc
0886Eh
Reads a byte/word at DP[0], then increments DP[0].
5
moveDP0dec
08871h
Reads a byte/word at DP[0], then decrements DP[0].
6
moveDP1
08874h
Reads a byte/word at DP[1].
7
moveDP1inc
08877h
Reads a byte/word at DP[1], then increments DP[1].
8
moveDP1dec
0887Ah
Reads a byte/word at DP[1], then decrements DP[1].
9
moveFP
0887Dh
Reads a byte/word at BP[OFFS].
10
moveFPinc
08880h
Reads a byte/word at BP[OFFS], then increments OFFS.
11
moveFPdec
08883h
Reads a byte/word at BP[OFFS], then decrements OFFS.
12
copyBuffer
08886h
Copies LC[0] values from DP[0] to BP[OFFS].
13 tempConv
0888Ch
Performs
temperature
conversion.
14
flashWriteA
088DBh
Writes a word to the flash memory.
Maxim Integrated