Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.243

Program RH850/U2x Security Property Area

In this topic:

Requirements

Programming SSA

Area Switching

 

 

This topic describes how to program Security Setting Area (SSA) on RH850/U2x devices via Python scripts. Please read Program U2x Hardware Property Area first.

 

 

Requirements

winIDEA 9.21.35 or newer

BlueBox iC5700, iC5000

RH850 Debug Adapter

 

 

Programming SSA

To program new security settings into Hardware Property Area follow the steps below:

1. Enable Hardware Property Area programming in Hardware / Options / Programming

2. Prepare the Program File

3. Area Switching

 

 

Enabling Hardware Property Area programming

To limit the chance of accidental area changes, the Hardware Property Area programming is not enabled in the Hardware menu by default. Open the Hardware / Options and check the Renesas RH850/U2x Hardware Property option to enable programming.

 

Hardware menu

Hardware menu / Options

u2a-hardware-menu
u2a-hardware-menu2

 

 

Preparing the Program File

Warning_orange

The sample workspace is based on the Renesas Getting Started package. You should familiarize yourself first with this package. Carefully check and double-check with your team that the settings match your requirements.

 

number1

Save the sample winIDEA workspace to a local drive, then open it and edit the OPBT settings if required.

 

number2

Make sure that One-Time Programmable settings - OTPs are not activated. That they are all 0xFFFFFFFF.

 

Warning_orange

If OTPs need to be activated, then they should be prepared in a completely separate HEX file and should be programmed in a separate step after programming the Option Bytes. OTP settings are applied immediately. Therefore, make sure that you program them last! Otherwise, you won’t be able to program the OPBTs.

 

Do not define both OPBT and OTP HEX files in the same Program Files dialog of the workspace. We recommend having a separate workspace for the OTPs for added safety. It does not suffice to have OTPs at the end of the area Program File, or as a separate download file in a block of files, because winIDEA forms a complete download image from all selected files upfront, before programming.

 

A note from the "UM Chapter 47.5.2 OTP (One Time Programmable) Function": OTP can be individually set for each block of the user area and the user boot area of code flash memory. When the OTP setting is made for an area, programming by serial programming and by self programming is prohibited. Once set, the OTP setting cannot be released.

number3

Hit Compile and then check the HEX Program File.

 

Number4

If it's OK, perform a regular Download.

 

Number5

The programmed OPBTs should be visible in the Back area together with validation flags.

All flags must be set for the next step - Area Switching - to succeed.

 

 

Area Switching

Once familiar with the CSA switching, proceed with switching the SSA.

 

Warning_orange

Take extra care so that nothing unexpected happens. Follow the mentioned OTP guidelines. And, be careful when setting the numerous passwords in the Security Setting Area.

 

number1

For the SSA switch edit HWPropertyAreaSwitch.py script to only enable SSA switch.

Make sure the script is saved in the same folder as winIDEA workspace.

 

inParams['CheckCSA'] = 'false'

inParams['CheckSSA'] = 'true'

inParams['CheckBPA0'] = 'false'

inParams['CheckBPA1'] = 'false'

 

number2

Select the switch Python script in the Tools / External Scripts.

 

number3

Refresh Watches, check FSWASTAT_0 for the changes.

If all is as expected reset the device to apply the changes. A second script may be created, intended just for the SSA switch. If ICUM is enabled, check ICUM_FACI0\FSWASTAT_0 register.

 

Number4

To return back to the default S_OPBTs, simply call the script again.

This way it is easy to toggle between the two sets of S_OPBTs.

 

Of course, it is also possible to program both CSA and SSA in a single Download operation. And, perform the area switch with a single execution of the script. To do this, set both relevant parameters to true.

inParams['CheckCSA'] = 'true'

inParams['CheckSSA'] = 'true'

inParams['CheckBPA0'] = 'false'

inParams['CheckBPA1'] = 'false'

 

 

Python script and winIDEA workspace examples

 

Warning_orange

Contact technical support for Python script examples.

 

Copyright © 2024 TASKING Germany GmbH