Download User`s Manual
Transcript
User’s Manual - Preliminary - Philips Semiconductors P89LPC920/921/922 FLASH MEMORY Table 15-3: IAP error status Bit Flag Description 0 OI Operation Interrupted. Indicates that an operation was aborted due to an interrupt occuring during a program or erase cycle. 1 SV Security Violation. Set if program or erase operation fails due to security settings. Cycle is aborted.Memory contents are unchanged. CRC output is invalid. 2 HVE High Voltage Error. Set if error detected in high voltage generation circuits. Cycle is aborted. Memory contents may be corrupted. Verify error. Set during IAP programming of user code if the contents of the programmed address does not agree with the intended programmed value. IAP uses the MOVC instruction to perform this verify. Attempts to program user code that is MOVC protected can be programmed but will generate this error after the programming cycle has been completed. 3 VE 4 - unused; reads as a ’1’ 5 - unused; reads as a ’1’ 6 - unused; reads as a ’1’ 7 - unused; reads as a ’0’ Table 15-4: IAP function calls IAP function IAP call parameters Input parameters: Program User Code Page (requires “key”) ACC = 00h R3 = number of bytes to program R4 = page address (MSB) R5 = page address (LSB) R7 = pointer to data buffer in RAM F1 = 00h Return parameter(s): R7 = status Carry = set on error, clear on no error Input parameters: Read Version Id ACC Return parameter(s): R7 2003 Dec 8 = 01h = IAP code version id 105