
CHAPTER 16 FLASH MEMORY
User’s Manual U12768EJ4V1UD
420
16.7.8 Contents of RAM parameters
Reserve the following 48-byte area in the internal RAM or external RAM for the RAM parameters, and set the
parameters to be input. Set the base addresses of these parameters to ep (r30).
Table 16-12. Description of RAM Parameter
Address
Size
I/O
Description
ep+0
4 bytes
For internal operations
ep+4:Bit 0
Note 1
1 bit
Input
Internal flag
0: Always set to 0
1: Setting prohibited
ep+4:Bit 5
Note 2
1 bit
Input
Operation flag (Be sure to set this flag to 1 before calling the device internal processing.)
0: Normal operation in progress
1: Self-programming in progress
ep+4:Bit 7
Notes 3, 4
1 bit
Output
NMI flag
0: NMI not detected
1: NMI detected
ep+8
4 bytes
Input
Step erase time (unsigned 4 bytes)
Expressed as 1 count value in units of the internal operation unit time (100
s).
Set value = Erase time (
s)/internal operation unit time (s)
Example: If erase time is 0.2 s
→ 0.2 × 1,000,000/100 = 2,000 (integer operation)
ep+0xC
4 bytes
Input
Write back time (unsigned 4 bytes)
Expressed as 1 count value in units of the internal operation unit time (100
s).
Set value = Write back time (
s)/internal operation unit time (s)
Example: If write back time is 1 ms
→ 1 × 1,000/100 = 10 (integer operation)
ep+0x10
2 bytes
Input
Timer set value for creating internal operation unit time (unsigned 2 bytes)
Write a set value that makes the value of 16-bit timer 0 the internal operation unit time
(100
s).
Set value = Operating frequency (Hz)/1,000,000
× Internal operation unit time (
s)/
Timer division ratio (2) + 1
Note 5
Example: If the operating frequency is 20 MHz
→ 20,000,000/1,000,000 × 100/2 + 1 = 1,001 (integer operation)
ep+0x12
2 bytes
Input
Timer set value for creating write time (unsigned 2 bytes)
Write a set value that makes the value of 16-bit timer 0 the write time.
Set value = Operating frequency (Hz)/Write time (
s)/Timer division ratio (2) + 1Note 5
Example: If the operating frequency is 20 MHz and the write time is 20
s
→ 20,000,000/1,000,000 × 20/2 + 1 = 201 (integer operation)
ep+0x14
12 bytes
For internal operations
Notes 1.
Bit 0 of the address of ep+4 (least significant bit is bit 0.)
2.
5th bit of address of ep+4 (least significant bit is bit 0.)
3.
7th bit of address of ep+4 (least significant bit is bit 0.)
4.
Clear the NMI flag by the user program because it is not cleared by the device internal processing.
5.
The device internal processing sets this value minus 1 to the timer. Because the fraction is rounded up,
add 1 as indicated by the expression of the set value.
Caution
Be sure to reserve the RAM parameter area at a 4-byte boundary.