Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

This page is for quick tips to help you with RA MCUs, its software, tools, and boards.  If you have any tips, please let us know and we will include them here.  

RA Tips and Tricks

Here are a few tips and tricks for you to help with your development.  We also have the frequently asked RA questions and answers to them.  Each topic is provided in their own page for easy navigation and maintenance.  Below is a list of available items.  

Multiple Pin Configurations

The FSP allows a user to create multiple pin configurations in the same project.  This tip and trick shows you how. 

Multiple Pin Configurations

Debugger Connectivity with ID Code Protection

RA devices have many protection features.  ID code protection prohibits programming and on-chip debugging. The device validates or invalidates the ID code and determines the ID code based on an ID code stored in the special flash memory.  This article describes where this special flash memory is, how to set it with FSP, big or little endian considerations, and may other aspects of ID code protection for non-TrustZone RA devices.   

Debugger Connectivity with ID Code Protection

Debugger connectivity with TrustZone devices

TrustZone RA devices require specific hardware connections for debugging.  Further, these devices must be in correct Device Lifecycle Management (DLM) state to access Secure (S) Non-Secure (NS) and Non-Secure Callable (NSC) memory regions at different stages of development process.  Read more about it at below link.  


For debugging with Trust Zone (TZ) devices you need to first confirm the DLM Device Lifecycle Management (DLM) state of the device. The device needs to be in the SSD state which has DBG2 debug level to have no restriction to access memories and peripherals for both Secure and Non-Secure partitions. Please note that the MCU can debug the non-secure only assets when the MCU is in NSECSD state, which has DGB1 debug level. The three debug levels are:

DBG2: The debugger connection is allowed, and no restriction to access memories and peripherals.

DBG1: The debugger connection is allowed and restricted to access only Non-Secure memory regions and peripherals.

DBG0: The debugger connection is not allowed.

The current DLM state can be read and it be initialized to SSD using the Renesas Flash Programmer (RFP) or using the Renesas Device Partition Manager, a tool integrated in the e2studio IDE and Renesas RA Smart Configurator.

For the HW debug connection, you will also need Renesas E2, or E2 Lite, or SEGGER J-Link emulator to connect host machine to the target board. The target board will need a debug connector with the JTAG or SWD interface pinout as per the below table:

The debug connector will also need to support Serial Programming using SCI to program Implementation Defined Attribution Unit (IDAU) register. This will require Pin 4, SWCLK/TCK and MD pins connection using wired OR circuit on the target board to use both debugging and serial programming. Please note that for RA8 devices, the IDAU registers can be accessed using JTAG or SWD to set up the TrustZone® boundaries. Hence, Serial Programming using SCI Boot Mode is not required.

Easy way to download EP and AP projects

xxyyzz

RA Example Projects (EPs) and Application Projects (APs)  distributed from GitHub at https://github.com/renesas/ra-fsp-examples

EPs are simple projects that show how a given RA peripheral can be setup and used.  EPs are listed based on officially available Renesas HW kits.  Some of these are  Evaluation Kits (EKs), Fast Prototyping Boards (FPBs), and Motor Control Kits (MCKs).   

APs are more involved projects that may utilize several peripheral to provide a solution.  For example, cloud connectivity or low power applications for specific Renesas HW kits.    

You can download EP and AP bundes in zip form from the GitHub site in Releases page.  This will allow you to get all EPs and APs.  However, this is a very large file and you may be interested in a one EP on a given kit.  How do you download only the EP or AP you want or need?

You do with GitZip Web extension.  With GitZip extension:

  1. Select the files or the folders you want
  2. Click on Download
  3. Your selections will be in a zip file

GitZip extension is available for Chrome, MS Edge, and Firefox. And it is free at here: https://gitzip.org/

See an example below.  

Let's assume at you are working on a project with RA8D1.  You are interested in how ADC and AGT peripherals can be configured and used.  Then go to EK-RA8D1 EP folder and select ADC and AGT EPs.  Click on "Downloaded checked items".  Done!


Table of Contents