Data transfer functions, Maxq family user’s guide: maxq2000 supplement – Maxim Integrated MAXQ Family Users Guide: MAXQ2000 Supplement User Manual
Page 88

MAXQ Family User’s Guide:
MAXQ2000 Supplement
Function:
flashErasePage
Summary:
Erases (programs to 0FFFFh) a 256-word page of flash memory.
Inputs:
A[0]: Word address located in the page to be erased. (The page number is the high byte of A[0].)
Outputs:
Carry: Set on error and cleared on success.
Destroys:
PSF, LC[1], GR, AP, APC, A[0]
Notes:
1) If the watchdog reset function is active, it should be disabled before calling this function.
2) When calling this function from flash, care should be taken that the return address is not in the page that is being erased.
Function:
flashEraseAll
Summary:
Erases (programs to 0FFFFh) all locations in flash memory.
Inputs:
None
Outputs:
Carry: Set on error and cleared on success.
Destroys:
PSF, LC[0], LC[1], GR, A[0], AP, APC
Notes:
1) If the watchdog reset function is active, it should be disabled before calling this function.
2) This function can only be called by code running from the RAM. Attempting to call this function while running from the flash results
in an error.
Data Transfer Functions
Function:
moveDP0
Summary:
Reads the byte/word value pointed to by DP[0].
Inputs:
DP[0]: Address to read from
Outputs:
GR: Data byte/word read
Destroys:
None
Notes:
1) Before calling this function, DPC should be set appropriately to configure DP[0] for byte or word mode.
2) The address passed to this function should be based on the data memory mapping for the utility ROM, as shown in Figure 3. When a
byte mode address is used, CDA0 must be set appropriately to access either the upper or lower half of program flash/ROM memory.
3) This function automatically refreshes the data pointer before reading the byte/word value.
Function:
moveDP0inc
Summary:
Reads the byte/word value pointed to by DP[0], then increments DP[0].
Inputs:
DP[0] Address to read from
Outputs:
GR: Data byte/word read
DP[0] is incremented
Destroys:
None
Notes:
1) Before calling this function, DPC should be set appropriately to configure DP[0] for byte or word mode.
2) The address passed to this function should be based on the data memory mapping for the utility ROM, as shown in Figure 3. When a
byte mode address is used, CDA0 must be set appropriately to access either the upper or lower half of program flash/ROM memory.
3) This function automatically refreshes the data pointer before reading the byte/word value.
Maxim Integrated
88