跳转到主内容
Knowledgebase
Home
Renesas Electronics China - Knowledgebase

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

Latest Updated:01/29/2016

Question:

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?

Answer:

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.

http://www.renesas.com/support/faqs/faq_results/Q106801-Q106900/compiler_106874_en_GL.jsp

Suitable Products
M16C/63
M16C/64A
M16C/64C
M16C/65
M16C/65C
M16C/6C
M16C/5L, M16C/56
M16C/5LD, M16C/56D
M16C/5M, M16C/57