Skip to main content
Knowledgebase
Home
Renesas Electronics Europe - Knowledgebase

Calculate checksum in "Writing the on-chip flash memory" mode in HEW?

Latest Updated:04/11/2012

Question:

How do you calculate the checksum in the "Writing the on-chip flash memory" mode when using the E1/E20 emulator in the High-performance Embedded Workshop (HEW)?

Answer:

The checksum that is displayed when you download a program to the flash memory in the "Writing the on-chip flash memory" mode of the E1/E20 emulator debugger is calculated as follows.

The data in the entire flash memory area (excluding reserved areas not in the internal RAM or flash memory) are added in byte units and displayed in 4 bytes.

The value written to areas in the calculated areas that do not contain a user program or other data will vary depending on the presence of the area's flash memory overwrite setting (*).

*Set the flash memory overwrite in the [Internal flash memory overwrite] tab in the [Configuration properties] dialog of the E1/E20 emulator debugger.

  • Areas set for flash memory overwrite
    Overwrites the data without initializing the flash memory when downloading the user program.
    In areas that contain no user program or other data, the value previous to the download will be retained.

  • Areas not set for flash memory overwrite
    Writes data after the initialization of the flash memory when downloading the user program.
    In areas that contain no user program or other data, the value will be the initial value of the on-chip flash memory.

    Note:
    The initial value of the on-chip flash memory differs according to the MCU.
    In RX Family MCUs, the initial value of the code storage flash memory is 0xff and the initial value of the data storage flash memory is undetermined.
    In R8C Family MCUs, the initial values of the program area and the data area are both 0xff.

The following are examples of checksum calculation methods according to MCU.

■RX610 Group:
RX610 Group MCU flash memory areas consist of 3 areas: user mat, user boot mat for code storage flash memory, and data storage flash memory. In the "Writing the on-chip flash memory" mode of the E1/E20 emulator debugger, the data of each area is added separately in byte units and displayed as 4-byte checksum values for each area. Note that because the initial value of the data storage flash memory is undetermined, if any part of the data storage flash memory is in the initial (default) state, the checksum result will show up as an error.

■R8C/3x Series:
R8C Family R8C/3x Series MCU flash memory areas consist of 2 areas: the data area and the program area. In the "Writing the on-chip flash memory" mode of the E1/E20 emulator debugger, the data in both areas are added in byte units and displayed as a 4-byte checksum value.

Suitable Products
E1 [R0E000010KCE00]
E20 [R0E000200KCT00]