Maxim Integrated MAXQ7666 User Manual

Page 382

Advertising
background image

MAXQ7665/MAXQ7666 User’s Guide

16-5

Function:

dataFlashErasePage

Summary:

Erases (programs to FFFFh) two pages (1 page = 1 word) of the data flash memory.

Inputs:

A[0]: Word address located in the page to be erased. The specified even page and the next sequential odd page
will be erased.

Outputs:

Carry: Set on error and cleared on success. If set, then A[0] contains one of the following error codes:
1. Failure due to software timeout.
2. Failure reported by hardware (FERR).
3. Failure due to invalid address.
4. Command not supported.

Destroys:

LC[1], DPC, ACC, APC, AP

Notes:

1) If the watchdog reset is enabled, user code should disable it before calling this function. Also, disable interrupts globally (IGE = 0).

2) The location will be aligned to even address before erase.

Function:

dataFlashEraseAll

Summary:

Erases (programs to FFFFh) all locations in data flash memory.

Inputs:

None.

Outputs:

Carry: Set on error and cleared on success. If set, then A[0] contains one of the following error codes:
1. Failure due to software timeout.
2. Failure reported by hardware (FERR).
4. Command not supported.

Destroys:

LC[0], LC[1], A[0]

Notes:

1) If the watchdog reset is enabled, user code should disable it before calling this function. Also, disable interrupts globally (IGE = 0).

Function:

dataFlashReadEven

Summary:

Read a word (2 bytes) from an even address data flash page (1 page = 1 word).

Inputs:

A[0]: Word address in data flash page to read from. Addresses are translated ((A[0] << 1) | C000h) to map even
address only. Only word addresses 0–3Fh are valid.

Outputs:

A[0]: Word value (2 bytes) read from data flash.
Carry: Set on error and cleared on success. If set, then A[0] contains one of the following error codes:
4. Command not supported.

Destroys:

A[0], DP[0], DPC, APC

Notes:

1) If the watchdog reset is enabled, user code should disable it before calling this function. Also, disable interrupts globally (IGE = 0).

2) The even functions make it possible to work around the asymmetric “erase two, write one” page behavior by writing to or reading

from only even addresses. By putting data only into even locations, the intrinsic two-page erase function is made to look like a sin-
gle word erase at the cost of halving the available storage.

Maxim Integrated

Advertising
This manual is related to the following products: