Using Renesas Flash Programmer Software to Program Chip Firmware

2.7

Using Renesas Flash Programmer Software

to Program Chip Firmware

  • First, manually set the chip to enter Boot mode as described earlier.

  • Then open the Renesas Flash Programmer (RFP) software, create a new project, and set the connection method.

  • Finally, select the program file to be programmed and program the chip’s internal Flash.

Switch to the Operation Settings tab, check the “Erase”, “Program”, and “Verify” options, then switch back to the Operation tab to select the binary file for programming.

Programming Chip Firmware:

Using Renesas Flash Programmer Software to Program Chip Firmware

Chapter 3 Introduction to Registers

3.1

What are Registers

Registers are actually a type of memory within the chip, similar to RAM and FLASH. Generally speaking, RAM is the memory used for program execution, while FLASH is used to store the program itself. The difference between registers and other types of memory like RAM and FLASH is that registers not only store the functional state of the chip but also serve as a bridge for configuring and controlling the chip’s functions. We can configure and operate the chip’s functions through registers.

In general, when programming an MCU chip, there are two programming methods: one is register programming, and the other is firmware library programming (or library function programming). So, what is a firmware library? Simply put, a firmware library is the product of register programming; it is a wrapper around register operations that ultimately provides developers with a set of fixed function APIs for calling.

We can understand the difference between register programming and firmware library programming from the following two perspectives.

From the perspective of program execution efficiency:

Generally, programs generated by register programming have higher execution efficiency, while programs generated by firmware library programming are less efficient than those generated by register programming.

However, from the developer’s perspective:

Firmware library programming allows developers to avoid deep understanding of the hardware-level details of registers; during development, they only need to call library functions to achieve the desired functionality, thus improving development efficiency.

3.2

What is inside the Renesas RA Chip

After knowing that registers exist, it is also necessary to refer to the official chip datasheet from Renesas to understand what is inside it. Once we know the internal structure of the chip, we will know how to program the chip through registers. So let’s first take a look at what is inside the RA series chips.

In simple terms, an MCU chip mainly consists of two parts: one is the CPU core, and the other is the on-chip peripherals. Taking the RA6M5 chip as an example, the CPU core used in the RA6M5 is the Cortex-M33 (abbreviated as CM33). This CPU core is designed by ARM, but ARM does not manufacture chips; instead, it sells its chip technology licenses. Chip manufacturers, such as Renesas, ST, NXP, TI, etc., are responsible for designing various modules outside the CPU core and producing the entire chip. These modules outside the core are referred to as “external devices” or “on-chip peripherals” (Peripheral). For example, the peripheral modules inside the RA6M5 chip include: I/O Ports (GPIO), SCI (serial communication), I2C, SPI, etc., all of which are called on-chip peripherals.

In fact, since there are “external devices“, there must also be “internal devices“, that is, the CPU core (Cortex-M33) also has a certain structure of device modules internally. For example, the CPU has NVIC (Nested Vectored Interrupt Controller), FPU (Floating Point Unit), etc.

The following diagram shows the internal modules and resources of the RA6M5 chip:

Using Renesas Flash Programmer Software to Program Chip Firmware

In the above diagram, we can see a box labeled “Arm Cortex-M33”, which represents the CPU core, and the small boxes within it (DSP, FPU, MPU, NVIC, etc.) belong to the devices of the core.

In addition to the box labeled “Arm Cortex-M33”, there are many large boxes that categorize all the peripheral modules on the chip. The small boxes within the large boxes represent the peripheral modules, as shown below:

Using Renesas Flash Programmer Software to Program Chip FirmwareTable 1: Peripheral Modules and Their Classification

We can see that there are many peripheral modules inside the chip. Some peripheral modules are relatively simple, while others are very complex. Most of the chapters in this tutorial will explain these peripheral modules, and we will gradually understand and use them from simple to complex.

The structure of the CPU core is complex, but we do not need to delve into it. For general embedded development, the modules of the CPU core that need to be understood are actually very few; only NVIC, SysTick, etc., which we will introduce in detail later.

The structure of the Cortex-M33 CPU core in the RA6M5 chip is shown in the figure below:

Using Renesas Flash Programmer Software to Program Chip FirmwareUsing Renesas Flash Programmer Software to Program Chip FirmwareUsing Renesas Flash Programmer Software to Program Chip Firmware

Need Technical Support?

If you have any questions while using Renesas MCU/MPU products, you can scan the QR code below or copy the URL into your browser to access the Renesas Technical Forum to find answers or get online technical support.

Using Renesas Flash Programmer Software to Program Chip Firmware

https://community-ja.renesas.com/zh/forums-groups/mcu-mpu/

To be continued

Recommended Reading

Using Renesas Flash Programmer Software to Program Chip Firmware

Introduction to TrustZone and its Applications and Device Lifecycle Management (DLM) – Renesas RA Series FSP Library Development Practical Guide Serialization (05)

Using Renesas Flash Programmer Software to Program Chip Firmware

Boot Mode of RA Chips and Using Renesas Flash Programmer Software, etc. – Renesas RA Series FSP Library Development Practical Guide (06)

Using Renesas Flash Programmer Software to Program Chip Firmware

Setting Security Boundaries Using Renesas Flash Programmer Software – Renesas RA Series FSP Library Development Practical Guide (07)

Using Renesas Flash Programmer Software to Program Chip FirmwareUsing Renesas Flash Programmer Software to Program Chip Firmware

Leave a Comment