If the application is reconfiguring the Phase-Locked Loop (PLL) after the device powers on, it might cause issues when attempting to access Option bytes. The issue happens since the FP5 method for Option byte access fails after PLL reconfiguration.
Mass erasing all code/data from the flash memory solves the issue.
The solution is to access the Option bytes immediately after powering on the target device and before the PLL reconfiguration occurs. This can be achieved by following the steps below:
1. Turn off the target.
2. Turn on the BlueBox.
3. Select these options in Hardware | CPU options | Hardware.
4. Open Option Bytes Plugin via View | [<device>] RH850 | Edit Option Bytes or start a script for programming option bytes.
5. Wait until message Vref out of range. Waiting for 30 s to turn ON the device. is shown in the Progress window.
6. Turn on the target. Option Bytes plugin should be opened or script executed.
The Option byte read/write process becomes problematic after the PLL is reconfigured, as FP5 access is dependent on the initial configuration state of the MCU. By programming the Option bytes immediately after power-on, the system avoids potential issues caused by PLL changes.