Flashing of Initial Data Image into RH850

How can I flash an initial data image into RH850?
During production it can be necessary to flash an initial data image directly into the data flash of the RH850 controller. This means the blocks are not written over the memory stack, but instead a fixed flash image is flashed via tooling (e.g Renesas Flash Tooling).

The used flash image must match with the memory layout that the SmallSectorFee is expecting. The SmallSectorFee works on a static addressing scheme. Therefore, every configured block has its own fix address range inside the flash (a block is mapped to flash sectors). The payload of a block is stored together with static patterns. 

A recommended procedure to get a suitable data image would be:
  1. Use the SmallSectorFee to initially write all blocks into the data flash with the wanted memory configuration. Ensure that all write requests have been successful.
  2. Now an initial data image can be read-out from the flash into a dump file.
  3. Open the dump file and the related Fee configuration with the Memalyzer* from Vector.
    • in tab Small Sector Fee Hex View the static pattern (Erase pattern, Write pattern, Management Byte) can be seen that the SmallSectorFee uses to save the data
    • also, the address range of the data flash can be seen where the blocks are written to
  4. If necessary, the payload of the blocks can now be adapted within the dump file. This can be done inside the tab Main View by clicking on the relevant block. 
  5. An initial data image is now prepared which can be directly flashed.

The first erase pattern of a block should be blank (inside Memalyzer represented by random values) and NOT programmed with the EraseValue xFF. Also, if only some blocks are initially written, watch out that the rest of the flash will not be overwritten with xFF values. They should stay blank.

The erase pattern is always as big as the configured Write Alignment of the SmallSectorFee, which is normally 4 bytes. Within RH850 F1L and R1L device families there is a restriction, that direct flashing can only be done aligned to data size of 16 byte. This means that for these devices the erase pattern of 4 bytes cannot be left blank. Currently the SmallSectorFee is not supporting to only increase the erase pattern to 16 bytes without changing the whole write alignment.

* ask Vector for your free version of Memalyzer. The Memalyzer is a small program used internally for analyzing flash data.  

Article ID: 1346
Last updated: 2019-07-03
Revision: 5
MICROSAR and DaVinci -> Troubleshooting -> MICROSAR MEM -> Flashing of Initial Data Image into RH850