Skip to main content
Knowledgebase
Home
Renesas Singapore - Knowledgebase

Unprotect register_M16C Family

Last Updated:10/18/2017

Question:

Although the protect bit PRC2 of the protect register on M16C family MCU is set to "1", the protection of register is not canceled.

Answer:

This problem may occur when the step execution is used or the protect bit is set through the memory window or the I/O window in debugger.

The specification of the protect bit PRC2 of the protect register on M16C family MCU is below:
When the protect bit PRC2 is set to "1"(cancellation) and then any writing execute to arbitrary addresses, the protect bit is set to "0"(protect) again.

When the step execution is used to the instruction to set PRC2 bit in E8/E8a emulator debugger, the E8/E8a firmware which include the processing of writing will run. As a result the register is set to protect again.

When debugging, do not use the step execution to the instruction to set PRC2 bit and execute it as follows:

(Example)    

:

  ← Execute GO before the setting of prc2.

:

   

prcr

= 0x04; // Point of the setting of prc2

pd9

0xFE; // Writing to the concerned register (pd9)

:

   

:

  ← Set a break after the writing of pd9.

If the step execution is used to the instruction to set the prc2, the E8/E8a firmware which include the processing of writing will run before the pd9 is set. As a result the register is set to protect again.

For the same reason, when the protect bit PRC2 of the protect register is set through the memory window or the I/O window in debugger, the same problem may occurs.

Suitable Products

E8
E8a
  • Was this article helpful?