Overview

Description

Data flash driver software (standard version) for the R8C/2x, R8C/1x, and M16C/Tiny Series

M3S-DATFA (hereafter abbreviated DATFA) is a block type device driver for storing data in the data flash that is incorporated in the R8C/2x, R8C/1x, and M16C/Tiny Series microcontrollers. Data can be updated or read out simply by calling the user API functions of the data flash driver. The data flash driver may be used to easily build a data flash based data management system.

Components

  • Data flash driver software (small version) (Library files for the R8C/2x and R8C/1x, M16C/Tiny series each)
  • Sample program (standard version)
  • Application notes (describing how to use the data flash driver software (standard version))
  • How to Use Data Flash Driver Software (Standard Version)
  • Data flash (standard version) sample program specification
  • Excel file (standard version) for estimating the number of times data can be updated
Image
Modular composition
Modular composition

Features

  • Compact design tailored for embedded systems
    Realizable using the internal memory of the microcontrollers
    ROM: approx. 2.5 KB, RAM: approx. 100 bytes (R8C/2x, R8C/1x Series) *including the stack
  • OS's unnecessary
  • Data that comes in multiple different data sizes can be stored.
    The number of data (types) to be stored and the data size per data (type) can be statically set.
  • Data in a device can be updated many more times than the number of times the device can be updated (erased). Applications can achieve 1,000K times or more of data updates. *1 (A small version (M3S-DATFB) that is specialized for increasing the number of times data can be updated is also available.)
    • *1. This value varies with the number of data (types) and the means by which data is updated. If three types of data of the R8C/2x and R8C/1x Series (2 bytes, 4 bytes and 16 bytes) are updated evenly on the average, the data can be updated 1,740K times.
  • If the system is unexpectedly shut down during data updating, the data in it can be restored to the state before it was updated.
  • Driver functions can suspended (function interrupt) and resumed as necessary. This helps to prevent the CPU from being occupied by the data flash driver over a long time. Applications can realize periodic processing based on timer interrupts.

Release Information

Latest Ver.: V.1.30 Release 01
Released: Jul 15, 2011
Details of upgrade (See Tool News)
Operating Environment
The data flash driver for the R8C/2x, R8C/1x, and M16C/Tiny Series can be selected from the following depending on your functional requirements.

  • M3S-DATFA (standard version): Can store data that comes in multiple different data sizes
  • M3S-DATFB (small version): Specialized for increasing the number of times data can be updated

Target Devices

Additional Details

functions

Function name Description
datfuser_init Data flash driver initialize function
This function initializes the data flash driver. To use the data flash driver, be sure to call this function when starting up the system.
datfuser_format Data flash driver format function
This function creates a data flash driver area in the data flash.
datfuser_data_size Data size acquisition function
This function returns the data size of a data number specified by an argument.
datfuser_writable_size Intra-block writable area size acquisition function
This function returns the size of a writable area existing in the current data updating block.
datfuser_flash_mode_disable Data flash rewrite mode disable function
This function disables the data flash from being rewritten.
datfuser_flash_mode_enable Data flash rewrite mode enable function
This function sets the registers and clock as needed to enable the data flash to be rewritten.
datfuser_function_interrupt Data flash driver function and interrupt request control function
This function issues or clears function interrupt requests with respect to data flash driver functions.
datfuser_read_data Data read function
This function reads the data bearing the data number specified by an argument and stores it in the destination pointer specified by an argument.
datfuser_erase_block Block erase function
This function erases a data block.
datfuser_write_data Data update function
This function updates the data bearing a specified data number.

Operating environment

Target devices R8C/2x and R8C1x Series: R8C/19, R8C/1B, R8C/21, R8C/23, R8C/25, R8C/27, R8C/29, R8C/2B *1, R8C/2D *1, R8C/2F, R8C/2L Group
M16C/Tiny Series: M16C/26, M16C/26A, M16C/28, M16C/29 Group
Applicable compiler M3T-NC30WA V.5.42 Release 00 or later
Occupied ROM size Approx. 3 KB (R8C/2x, R8C/1x Series)
Occupied RAM size 27bytes+3bytes x DATA_IDNUM (R8C/2x, R8C/1x Series)
Stack, maximum 63bytes (R8C/2x, R8C/1x Series)

*. DATA_IDNUM: This is the number of data types set in a data flash driver setup file.

*1.We have announced R8C/2A Group R8C/2B Group R8C/2C Group and R8C/2D Group Notes on Erase-Suspend (PDF | English, 日本語) of R8C/2B and R8C/2D group with ROM size 96 K bytes and 128 K bytes. If you consider using these MCUs, contact the Renesas Electronics sales department.

Target devices

Family Series Group
R8C R8C/2x R8C/21, R8C/23, R8C/25, R8C/27, R8C/29, R8C/2B, R8C/2D, R8C/2F, R8C/2L
R8C/1x R8C/19, R8C/1B
M16C M16C/Tiny M16C/26, M16C/26A, M16C/28, M16C/29