English
Language : 

Z8F042ASJ020EG2156 Datasheet, PDF (192/280 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F082A Series
Product Specification
177
Byte Write
To write a byte to the NVDS array, the user code must first push the address, then the data
byte onto the stack. The user code issues a CALL instruction to the address of the byte-
write routine (0x10B3). At the return from the sub-routine, the write status byte resides in
working register R0. The bit fields of this status byte are defined in Table 106. The con-
tents of the status byte are undefined for write operations to illegal addresses. Also, user
code must pop the address and data bytes off the stack.
The write routine uses 13 bytes of stack space in addition to the two bytes of address and
data pushed by the user. Sufficient memory must be available for this stack usage.
Because of the Flash memory architecture, NVDS writes exhibit a nonuniform execution
time. In general, a write takes 251 µs (assuming a 20 MHz system clock). Every 400 to 500
writes, however, a maintenance operation is necessary. In this rare occurrence, the write
takes up to 61 ms to complete. Slower system clock speeds result in proportionally higher
execution times.
NVDS byte writes to invalid addresses (those exceeding the NVDS array size) have no
effect. Illegal write operations have a 2 µs execution time.
Table 106. Write Status Byte
Bit
7
Field
Default
Value
0
6
5
Reserved
0
0
4
3
2
1
0
RCPY
PF
AWE
DWE
0
0
0
0
0
Bit
[7:4]
[3]
RCPY
[2]
PF
[1]
AWE
[0]
DWE
Description
Reserved
These bits are reserved and must be programmed to 0000.
Recopy Subroutine Executed
A recopy subroutine was executed. These operations take significantly longer than a normal
write operation.
Power Failure Indicator
A power failure or system reset occurred during the most recent attempted write to the NVDS
array.
Address Write Error
An address byte failure occurred during the most recent attempted write to the NVDS array.
Data Write Error
A data byte failure occurred during the most recent attempted write to the NVDS array.
PS022828-0413
PRELIMINARY
NVDS Code Interface