PEmicro Blog

Renesas: RA Cortex-M85 Families Device Lifecycle Programming Support

Aug 20, 2026

PEmicro's Cyclone FX programmers have extended support for production programming of the Renesas RA family Device Lifecycle Management (DLM) and TrustZone boundary settings. With the release of Cyclone firmware version 11.77 and image creation utility version 10.11, Device Lifecycle Management and TrustZone boundary settings are now supported for Renesas Cortex-M85 devices. The newly supported Renesas security engines include RSIP-E51A (RA8D1, RA8M1, RA8T1) and RSIP-50D (RA8P1, RA8D2, RA8M2, RA8T2). 

These settings are used to secure access to the on-chip Flash and RAM from external debug/bootloader access and from untrusted code running internally to the device on devices with DLM Technology and TrustZone support. Configuration and programming of these settings are made simple with PEmicro's stand-alone programmers. 

This article is a continuation of a previous post which provided an introduction of Device Lifecycle for Renesas Cortex-M33 devices.

Requirements:

In addition to the Renesas Secure Key Management tool, users will need to use the Renesas Key Wrap Service to generate the output keys. Review the relevant documentation from Renesas for registering and using the Renesas Key Wrap Service. Renesas e² studio is also recommended for generating the Renesas Partition Data file (.RPD) that contains the boundary settings.

Generating Keys:

The keys are generated using the Renesas Secure Key Management tool and key wrap service. Open the Security Key Management Tool and select the MCU/MPU and security engine for the target device in the overview tab.  


The first step is to generate the User Factory Programming Key (UFPK) that will be used to prepare the keys for secure injection. Select the “Generate UFPK” tab and choose to specify or generate a random value. Name the output file and output directory and then select “Generate UFPK key file”.

Next, the generated UFPK file needs to be wrapped with the Renesas Key Wrap service. Note: the PGP key exchange must already be established with the service to proceed. Using Kleopatra, select “Sign/Encrypt” and select the UFPK key file. Uncheck the “Encrypt for me” and check the “Encrypt for others” option. Select the icon next to the text box for the “Encrypt for others” option and select the keywrap. Specify the output location/filename and check the “Encrypt / Sign each file separately” option. Select “Sign / Encrypt” and ignore the warning about not encrypting for self. The output .gpg file that is required for the key wrap service will be generated. 

Log into the key wrap service, select the Renesas RA family, and choose the target RA device. Select “Encryption service for products” to get the following menu: 


Select “Browse…”, specify the generated .gpg file for the encrypted UFPK key, and click OK. If the encryption was done correctly, you will receive an email KeyWrap service with an attachment. The attached file is the encrypted wrapped key and should have the extension “.key_enc.key.pgp”. Download the attachment and use Kleopatra to decrypt the wrapped UFPK key file. 

For further details about the key wrap procedure, review section 4.4 of the inject keys manual

With the UFPK and wrapped UFPK keys, the last step is to generate the injectable key. In the security key management tool, go to the “Wrap Key” tab. In the first section, select the key type that will be generated. For the RA M85 devices, this includes the AL keys, the RMA key, the OEM root public key, or any of the various user keys (AES, RSA, ECC, etc.). After specifying the type, switch to “Key Data” to specify the key’s value. The value can be specified through a file, as raw data, or generated randomly to an output file. The value will be important for regressing protection levels in the future. 

In the next section, “Wrapping Key”, the UFPK and wrapped UFPK files are specified. Select the UFPK key that was originally generated for the “UFPK File”. Select the decrypted wrapped UFPK file with extension “.key_enc.key” for the “W-UFPK File”.


Lastly, in the “Output” section, specify the output file/location and select “Generate file”. The generated file with extension “.rkey” will be used with our tools to inject the key to the Renesas RA target. A different .rkey file should be generated for each selected key type that will be injected to the target.

Configuring SAP Image:

With the keys generated, the next step is to configure the Cyclone stand alone programming (SAP) image. Open “CreateImage.exe” and select the target Renesas device being programmed. Configure the image script to program the application object file into the target normally. Below is a typical example of erasing and programming the user application into flash:


After configuring the programming sequence, switch to the “Renesas Flash Options” tab to configure the security engine features. This tab includes several options for the security engine extending to the injection of keys, setting boundaries, and configuring the protection level/device lifecycle management state. See below for the screenshot of the Renesas Flash Options tab and correlating numbers for each option and description.


  1. Initialize Device (Mass Erase): This option is selected to reset a device to a factory state by ensuring the target is in the OEM DLM state and that the Protection Level state is PL2. By running the initialization, a mass erase is performed that clears the user area, data area, Config area, EEP config area, boundary settings, and keys. The initialization can be performed when the device is in the OEM DLM state for any protection level (PL2/PL1/PL0). The initialization can also be disabled with the “Disable Initialization Command” checkbox to prevent any mass erase in the future. It is recommended to select this option, but it can be unchecked if the initialization is disabled or if the flash memory and keys need to be retained.
  2. Start running device after programming: This option will release the target from debug and reset the part to allow the application to run after all steps are completed.
  3. Set DLM Target State: Enabling this checkbox allows the user to transition the DLM state after injecting the keys and boundary settings. A dropdown next to the checkbox is used to specify the target state. All the DLM and Protection level states are supported with the options: OEM_PL2, OEM_PL1, OEM_PL0, RMA_RET, and LOCK_BOOT. Note that transitioning to a lower protection state is only possible if Initialization Device (Mass Erase) is checked. 
  4. DLM Encrypted Keys: The encrypted key options are where the .rkey files generated with the Renesas Security Key Management tool are specified for injecting. The supported options include the AL2, AL1, RMA, and OEM_PUB keys which correlate to the AL2_KEY, AL1_KEY, RMA_KEY, and OEM Root public key respectively. To inject a key, enable the checkbox for the corresponding key type and specify the .rkey file. The button next to the textbox will open a file explorer to browse for the .rkey file. 
  5. User Keys: Generated user key types, such as AES, RSA, ECC, HMAC, and/or ChaCha20-Poly1305 are specified here for injection. Unlike DLM keys, multiple user keys can be specified and they require an address since they are stored in user flash. To add user keys, enable the checkbox and specify the user key file. Beneath the checkbox, enter the target address where the key will be stored and click “Add Key”. The table below will then update with the specified address and user key file. To remove a user key, simply select the entries from the table and click “Remove Selected Keys”. Note that setting the boundary affects the address where the user keys can be stored.
  6. Boundary Settings: The boundary settings establish the TrustZone partition boundaries based on the application project. In RA projects on e2 studio or RASC generated projects for EWARM / KEIL, there will be a file with extension .RPD. The file will be named after the project and can be found in the project root folder. The location of the rdp for each IDE is given in table 13. To set the boundary settings, enable the checkbox and click the “Import Boundaries from RPD File” button. After selecting the rpd file from the application project, the values for the range sizes will update accordingly. 


After configuring the Renesas Flash Options, the SAP image can be generated and added to a target Cyclone FX.

Validating Security Engine Operations:

With the SAP image created and stored on a Cyclone FX, the next step is to run the image and test the programming operation. The operation will start with initialization (if enabled) and then proceed to run the programming sequence for the flash. If any error occurs during the programming sequence, the operation will stop without configuring any security options. After the programming sequence, the status bar will show “Setting DLM/Boundaries …” until the operation finishes. If any error occurs while setting the DLM/Boundary settings, the error code will be a value from $3301 to $33E5 depending on the failure. Tap the details next to the error for more information on the failure message/code.

Once the SAP image succeeds with setting the security options, it reads back the information to validate the settings. The information from the security settings is then stored in the “Last DLM State Log” that can be accessed on the Cyclone FX. To access the log through the Cyclone touchscreen, select “MENU” -> “Status” -> “Show Logs” -> “Show Last DLM State Log”. The information includes the current DLM state, the boundary setting configuration, if initialization is active, and if the DLM Keys and user keys are valid. The DLM State Log for the Renesas RA M85 devices should appear like the following:



If the message “No available log”, then the SAP image likely needs to be run again. The DLM State log will also fail to update if an error occurred. 

Additional Features/Support

Please submit an SR ticket to request any additional features or support for the Renesas security engine. 

Tags related to this Blog Post

ARM     Device Support     Renesas     Production Programming