upd78f0124hgba1-8et-a Renesas Electronics Corporation., upd78f0124hgba1-8et-a Datasheet - Page 406

no-image

upd78f0124hgba1-8et-a

Manufacturer Part Number
upd78f0124hgba1-8et-a
Description
8-bit Single-chip Microcontrollers
Manufacturer
Renesas Electronics Corporation.
Datasheet
(3) Flash status register (PFS)
406
• If PFCMD is written when the store instruction operation recently performed on a peripheral register is not to
• If the first store instruction operation after <1> is on a peripheral register other than FLPMC
• If the first store instruction operation after <2> is on a peripheral register other than FLPMC
• If a value other than the inverted value of the value to be set to FLPMC is written by the first store instruction
• If the first store instruction operation after <3> is on a peripheral register other than FLPMC
• If a value other than the value to be set to FLPMC (value written in <2>) is written by the first store instruction
• If 0 is written to the FPRERR flag
• If RESET is input
If data is not written to the flash programming mode control register (FLPMC), which is protected, in the correct
sequence (writing the flash protect command register (PFCMD)), FLPMC is not written and a protection error
occurs. If this happens, bit 0 of PFS (FPRERR) is set to 1.
This bit is a cumulative flag. After checking FPRERR, clear it by writing 0 to it.
PFS can be set by a 1-bit or 8-bit memory manipulation instruction.
RESET input clears PFS to 00H.
The operating conditions of the FPRERR flag are as follows.
<Setting conditions>
<Reset conditions>
<Example of description in specific sequence>
To write 05H to FLPMC
write a specific value (A5H) to PFCMD
after <2>
after <3>
Remark The numbers in angle brackets above correspond to the those in (2) Flash protect command
MOV
MOV
MOV
MOV
Address: FFC2H
PFCMD, #0A5H
FLPMC, #05H
FLPMC, #0FAH
FLPMC, #05H
register (PFCMD).
Symbol
PFS
0
Figure 24-20. Format of Flash Status Register (PFS)
After reset: 00H
; Writes A5H to PFCMD.
; Writes 05H to FLPMC.
; Writes 0FAH (inverted value of 05H) to FLPMC.
; Writes 05H to FLPMC.
0
User’s Manual U16962EJ3V0UD
CHAPTER 24 FLASH MEMORY
0
R/W
0
0
0
0
FPRERR

Related parts for upd78f0124hgba1-8et-a