Skip to main content
Renesas Electronics America - Knowledgebase

Is it possible to use ROM2 area as program just like the program ROM1?

Latest Updated:01/29/2016


I would like to use data flash or the program ROM2 area as a program or data area, like the program ROM1 area. Is it possible?


Yes, it is possible. However, please note the following:

  1. When 2.7 V ≤ VCC1 ≤ 3.0 V and f(BCLK) ≥ 16 MHz, or when 3.0 V < VCC1 ≤ 5.5 V and f(BCLK) ≥ 20 MHz, 1 wait must be inserted to execute a program or read data in data flash. Use the PM17 bit or the FMR 17 bit in the PM1 register to set 1 wait.
  2. To use data flash as a program or data area, set the PM10 bit to 1 to enable the data flash.
  3. To use program ROM2 as a program or data area, set the PRG2C0 bit to 0 to enable program ROM2.

As data flash is located in the "near" area, it can be accessed at high speed using the MOV instruction.

About the method of changing the program location address, please refer to the following FAQ.

Suitable Products
M16C/5L, M16C/56
M16C/5LD, M16C/56D
M16C/5M, M16C/57