Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program Flash

  • Introduction

  • Configure Project

  • Modify OPBT

  • Program Flash

  • Other Operations

  • Conclusion

Introduction

The Renesas RH850 P1H-C series, previously unaware of the significant impact of OPBT on the program, led to accidental operations on its registers, resulting in the board being locked and unable to reprogram. This article records the points to note when using the RFP tool to program the Option Byte, as well as how to program using the RFP tool.

Configure Project

When configuring the project for the first time, a connection is required. Create a new project with the following configuration Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashSelect Tool E2 (if using E1, select E1), other settings can remain default, ensure the hardware is powered on, then click Connect.

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashConfigure the external crystal frequency based on the actual hardware, set here to 16MHz, this must be configured correctly, otherwise connection will fail.

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashConfigure Code Flash Authentication Code, default settings are fine.

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashConfigure Data Flash Authentication Code, default settings are fine. Once connected, it shows the following: Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashAutomatically identified the MCU as 1372A.

Modify OPBT

It is particularly important to note that the Lock-Bit and OTP (Once Time Program) in Flash Options should not be Set, as this will lead to a locked chip.

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashWhen modifying the Option Byte, do not set it arbitrarily; it needs to be configured based on the actual hardware and MCU. A detailed article about the Option Byte will be written later. Here, for the 1372 microcontroller with a 16M crystal, the configuration is as follows:

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program Flash
Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program Flash

If the OPBT is incorrect, it may cause other debuggers to fail to program, incorrect clock may lead to CAN transceiver anomalies, and a series of problems can occur. Before writing the OPBT, you can first read the current OPBT from the hardware. If the new write has issues, you can rewrite the original value. The read operation is as follows: click Read Flash Options, and the popped-up Authentication Code can remain default Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashThe read OPBT can be checked, and selecting the Feedback option will write the read values into the Flash Options Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program Flash

Program Flash

Select the file to be programmed.

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashSelect Erase Program Verify for Command, other settings can remain default Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashAfter configuring, click Start to begin programming, and the popped-up Authentication Code can remain default.

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashPrompt after programming is completed.

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program Flash

Other Operations

Click Read Block Information to view the block status. If locked, Lockbit or OTP will show √ Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program Flash

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program FlashClick Read Memory to read memory information into hex or mot files.

Conclusion

When developing with the Renesas RH850 series chips, extreme caution is necessary, as a development board is not cheap at the start.

Using Renesas Flash Programmer (RFP) to Modify Option Byte and Program Flash

Leave a Comment