Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Using Virtual EEPROM and Flash API for.

Slides:



Advertisements
Similar presentations
So, you think you need USB On-The-Go?. Agenda Introduction Embedded Host terminology OTG – Electrical – Protocol When to use OTG 2.
Advertisements

File Management Systems
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L02B Introduction to the RX-Arduino (Lab) Anthony.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Using a Renesas Code Generation Tool for RL78 Devices.
Memory Allocation CS Introduction to Operating Systems.
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. RL78 Ultra Low Power MCU Lab.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Migrating from 8-to-32 bit Processors CC17I Kevin.
ID 413C: Can Touch This: Designing Capacitive-Based Touch Solutions Mark F Rodriguez Senior Engineering 13 October 2010 Version: 1.0 Xaplos Inc.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Instant Connectivity for the “Internet of Things”
Renesas Electronics America Inc. ID 311L: PIC to R8C Converter David Hedley Staff AE, Applications Engineering 14 Oct 2010 Version: 1.1.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Increase the Dynamic Range and Precision of Digital Filters.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. An Introduction to e 2 studio.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Introduction to the.NET Micro Framework Julie Trygstad,
© 2008, Renesas Technology America, Inc. All Rights Reserved The RCAN-ET peripheral and the CAN API SH2 & SH2A MCUs V 1.2 Mar 2010.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Know your Precise Position with RX600 MCU.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Sensorless Vector Control with RL78G14.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: “Living in a Virtual World” – Microcontroller and.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A15C: Application Code Reprogramming Using Different Serial.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 320L: Rapid RX600 System Development Using the RPDL and.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L13B David Hedley, Applications Engineer Advanced.
Renesas Electronics America Inc. “© 2010 Renesas Electronics America Inc. All rights reserved ID 220L: Hands-on Embedded Ethernet Design with an Open Source.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. 431L: Using a Graphics API to Create User Interface Components—Advanced.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 9L02I Software Development with an Open Source.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. LibUSB - Create a Solution Without the Class Struggle.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Migrating from CubeSuite+ to Eclipse.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: RL78 Ultra Low Power MCU Lab Michael Clodfelter.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 2L03I RL78 Bluetooth Connectivity Anthony Harris,
ID A16C: Outfitting Embedded Devices with Low Power Wireless Communications Design considerations for adding wireless communications to low power embedded.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. e 2 Studio – Getting Started.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Know your Precise Position with RX600 MCU Huangsheng.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an overview of the CPU architecture.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Debugging on RX with IAR Embedded Workbench Micael.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Memory.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID630L: Becoming Familiar with Sensorless Vector Control.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This training course provides an overview of the CPU architecture.
Renesas Technology America, Inc. Flash!. CPU Rewrite CPU-rewrite is a term that refers to an Renesas MCU’s ability to erase/program its own internal Flash.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. QuantiPhi for RH850 and RL78 - The Fastest Path from Idea.
Memory Management. Memory  Commemoration or Remembrance.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Increase the Dynamic Range and Precision of Digital.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Implementing Bootloaders on Renesas MCUs.
2L01I Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 2L02I CAN In A Day Carl Stenquist, Staff.
RL78 Code & Dataflash.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: File System Implementation.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Audio Solutions on the RX MCU Family Mitch Ferguson,
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Module Introduction Purpose  This training module provides an overview of the peripherals.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced Debugging on the RX600.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced E 2 Studio Topics.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: CC05B RX Project Configuration Tips John Breitenbach,
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Low Power Design Michael Thomas, Applications Engineer.
ID 222L: Get Connected with USB on RX62N
CE Operating Systems Lecture 17 File systems – interface and implementation.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 230L: Simplify your Networked Application with CAN and.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 416C:SH-2A Graphics for Low- to Mid-level Graphics Applications.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L08I Migrating from CubeSuite+ to Eclipse Neelima.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L05I Advanced Debugging on the RX600 Fatih Peksenar.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 5L08I Using the Renesas Graphics API to Create.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 322L:Advanced Debugging on the RX600 Brandon Hussey Applications.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 421L: R8C Segment-LCD API Lab Bob Proctor Staff Engineer.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A10L:A Flexible Flash Rewrite Application Brandon Hussey.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: QuantiPhi for RH850 and RL78 - The Fastest Path.
Review of Computer System Organization. Computer Startup For a computer to start running when it is first powered up, it needs to execute an initial program.
ID 021L: Model Based Control Design and Auto-Code Generation using the R8C Christopher Myers Director of Software Development 12 October 2010 Version:
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Using Software Building Blocks for Faster.
David Hedley Staff AE, Applications Engineering 12 Oct 2010
Flash EEPROM Emulation Concepts
CS Introduction to Operating Systems
ID 325L: Getting Started with CubeSuite
Presentation transcript:

Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Using Virtual EEPROM and Flash API for Renesas MCUs CL08I Brandon Hussey, Applications Engineer

© 2012 Renesas Electronics America Inc. All rights reserved.2 Brandon Hussey Applications Engineer RX support – Flash API – Virtual EEPROM – Flash Loader Firmware Integration Technology (FIT) PREVIOUS EXPERIENCE: Interned at Renesas for 3 years Joined on full-time after graduation I hold an MSCPE from North Carolina State University

© 2012 Renesas Electronics America Inc. All rights reserved.3 Renesas Technology & Solution Portfolio

© 2012 Renesas Electronics America Inc. All rights reserved.4 Microcontroller and Microprocessor Line-up Wide Format LCDs  Industrial & Automotive, 130nm  350µA/MHz, 1µA standby 44 DMIPS, True Low Power Embedded Security, ASSP 165 DMIPS, FPU, DSC 1200 DMIPS, Performance 1200 DMIPS, Superscalar 500 DMIPS, Low Power 165 DMIPS, FPU, DSC 25 DMIPS, Low Power 10 DMIPS, Capacitive Touch  Industrial & Automotive, 150nm  190µA/MHz, 0.3µA standby  Industrial, 90nm  200µA/MHz, 1.6µA deep standby  Automotive & Industrial, 90nm  600µA/MHz, 1.5µA standby  Automotive & Industrial, 65nm  600µA/MHz, 1.5µA standby  Automotive, 40nm  500µA/MHz, 35µA deep standby  Industrial, 40nm  200µA/MHz, 0.3µA deep standby  Industrial, 90nm  1mA/MHz, 100µA standby  Industrial & Automotive, 130nm  144µA/MHz, 0.2µA standby bit 8/16-bit

© 2012 Renesas Electronics America Inc. All rights reserved.5 Devices in a smart society must efficiently use their available resources. Eliminating the need for external components when they can be incorporated inside the MCU is vital. ‘Enabling The Smart Society’

© 2012 Renesas Electronics America Inc. All rights reserved.6 Agenda Introduction to Virtual EEPROM Features How does it work? Configuration API Lab

© 2012 Renesas Electronics America Inc. All rights reserved.7 Terminology Non-volatile Data Record EEPROM Erase and write sizes (or granularity)

© 2012 Renesas Electronics America Inc. All rights reserved.8 MCU ROM The Problem – Storing Non-Volatile Data Store in internal ROM Advantages: Stored internally to MCU; no extra cost Disadvantages: Must halt MCU or run from RAM Possibility of corrupting application Relatively large minimum write and erase sizes Complex to implement

© 2012 Renesas Electronics America Inc. All rights reserved.9 The Problem – Storing Non-Volatile Data Store in external EEPROM Advantages: Self-contained Easy to use Usually 1 byte writable Disadvantages: $$$ Uses HW No record management

© 2012 Renesas Electronics America Inc. All rights reserved.10 The Problem – Storing Non-Volatile Data Store in internal data flash Advantages: Stored internally to MCU; no extra cost Can continue to execute from ROM Relatively small minimum write and erase sizes No possibility of corrupting ROM Disadvantages: No record management Write granularity might not be 1-byte MCU ROM Data Flash MCU

© 2012 Renesas Electronics America Inc. All rights reserved.11 The Solution – Data Flash & Record Management Use data flash and existing Flash API for low level Add layer to handle record management Flash API???Virtual EEPROM

© 2012 Renesas Electronics America Inc. All rights reserved.12 Data Flash Block #0 Data Flash Block #1 EMPTY Why is Virtual EEPROM Needed? Many data flashes do not have 1-byte writes Maintaining multiple records Statically allocating addresses can wear out DF faster Using advanced features of MCU Data #1Data #2 EMPTY

© 2012 Renesas Electronics America Inc. All rights reserved.13 MCU ROM Data Flash What is the Virtual EEPROM Project? The Virtual EEPROM Project allows you to use the Data Flash on your MCU as you would an EEPROM while adding other record management features MCU ROM Data Flash/VEE I2C

© 2012 Renesas Electronics America Inc. All rights reserved.14 Simple API User Application R_VEE_Write(my_record)... R_VEE_Read(my_record)... MCU ROM Data Flash

© 2012 Renesas Electronics America Inc. All rights reserved.15 Data Flash vs ROM Typically Data Flash has: Smaller write and erase sizes Shorter write times Larger number of rewrite/erase cycles MCU – Memory Area Write Size Erase Size Write Time Erase Time Erase/ Write Cycles RX62N - DF8B2KB0.4ms70ms30,000 RX62N - ROM256B4KB2.0ms25ms1,000 RX63N – DF2B32B0.25ms2ms100,000 RX63N – ROM128B4KB1.0ms25ms1,000 MCU – Memory Area Write Size Erase Size Write Time Erase Time Erase/ Write Cycles RX62N - DF8B2KB0.4ms70ms30,000 RX62N - ROM256B4KB2.0ms25ms1,000

© 2012 Renesas Electronics America Inc. All rights reserved.16 Virtual EEPROM Features

© 2012 Renesas Electronics America Inc. All rights reserved.17 Background Operations (BGO) With BGO, MCU can continue during DF erase or write Memory area being worked on cannot be accessed Access Violation!

© 2012 Renesas Electronics America Inc. All rights reserved.18 Wear Leveling Increases longevity of the Data Flash Records do not overwrite Old records are ignored VEE Memory Area Address 0x Address 0x1007FF VEE Record 1 VEE Record 1 VEE Record 2 VEE Record 1 VEE Record 2

© 2012 Renesas Electronics America Inc. All rights reserved.19 Ignore Duplicate Writes Increases longevity of the Data Flash Identical writes are ignored Time trade-off VEE Memory Area Address 0x Address 0x1007FF VEE Record 1 VEE Record 1 VEE Record 2 VEE Record 1 CHECKING… VEE Record 2

© 2012 Renesas Electronics America Inc. All rights reserved.20 Record Caching No seeking for records 1 cache entry per available record number VEE Memory Area Address 0x Address 0x1007FF VEE Record Cache Record 1 Address Record 2 Address VEE Record 1 VEE Record 1 VEE Record 2 VEE Record 1 VEE Record 2 Many More Records

© 2012 Renesas Electronics America Inc. All rights reserved.21 VEE Memory Area VEE Record 2 Error Detection Each record has its own error detection field Virtual EEPROM recovers automatically from errors Recovery measures are only taken on writes VEE Record 1 ID Size Data Check

© 2012 Renesas Electronics America Inc. All rights reserved.22 Overhead 4 extra structure members per record Overhead depends on write granularity RX62N = 32 bytes per record RX63N = 8 bytes per record

© 2012 Renesas Electronics America Inc. All rights reserved.23 How does it work?

© 2012 Renesas Electronics America Inc. All rights reserved.24 Virtual EEPROM Terminology VEE Sector 0 VEE Block 0VEE Block 1 VEE Record 0VEE Record 1 VEE Record 0 VEE Record 2

© 2012 Renesas Electronics America Inc. All rights reserved.25 Virtual EEPROM Operational Overview VEE Sector 0 VEE Block 0VEE Block 1 VEE Record 0VEE Record 1 VEE Record 0VEE Record 2

© 2012 Renesas Electronics America Inc. All rights reserved.26 Virtual EEPROM Operational Overview VEE Sector 0 VEE Block 0VEE Block 1 VEE Record 0VEE Record 1 VEE Record 0VEE Record 2 VEE Record 1 NOT ENOUGH ROOM

© 2012 Renesas Electronics America Inc. All rights reserved.27 Virtual EEPROM Operational Overview VEE Sector 0 VEE Block 0VEE Block 1 VEE Record 0VEE Record 1 VEE Record 0VEE Record 2 DEFRAG OCCURS VEE Record 1

© 2012 Renesas Electronics America Inc. All rights reserved.28 Virtual EEPROM Operational Overview VEE Sector 0 VEE Block 0VEE Block 1 VEE Record 0VEE Record 1 VEE Record 0VEE Record 2 VEE Record 1VEE Record 0VEE Record 2 DEFRAG CONTINUES

© 2012 Renesas Electronics America Inc. All rights reserved.29 Virtual EEPROM Operational Overview VEE Sector 0 VEE Block 0VEE Block 1 VEE Record 0VEE Record 1 VEE Record 0VEE Record 2 VEE Record 1VEE Record 0VEE Record 2 DELETE OLD BLOCK

© 2012 Renesas Electronics America Inc. All rights reserved.30 Virtual EEPROM Operational Overview VEE Sector 0 VEE Block 0VEE Block 1 VEE Record 1VEE Record 0VEE Record 2

© 2012 Renesas Electronics America Inc. All rights reserved.31 Virtual EEPROM Configuration

© 2012 Renesas Electronics America Inc. All rights reserved.32 Why would I need more than 1 VEE Sector? Optimize (lower) the number of defrags VEE Sector #0 – Block #0 VEE Record 1 VEE Record 2 VEE Sector #0 – Block #1 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 1 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 2 Defrag Again! 1 Sector

© 2012 Renesas Electronics America Inc. All rights reserved.33 Why would I need more than 1 VEE Sector? Optimize (lower) the number of defrags VEE Sector #0 – Block #0 VEE Record 1 VEE Sector #1 – Block #0 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 2 VEE Record 2 Defrag Finally! 2 Sectors

© 2012 Renesas Electronics America Inc. All rights reserved.34 Virtual EEPROM API

© 2012 Renesas Electronics America Inc. All rights reserved.35 API Functions R_VEE_Read() R_VEE_Write() R_VEE_Defrag() R_VEE_Erase() R_VEE_GetState() R_VEE_ReleaseState()

© 2012 Renesas Electronics America Inc. All rights reserved.36 VEE Operation Completion Can use polling or interrupt driven Polling: Use R_VEE_GetState() Will return current state of VEE Interrupt Driven: User defined callback in r_vee_config.h Warning: Callback is called from interrupt #define VEE_CALLBACK_FUNCTION VEE_OperationDone_Callback

© 2012 Renesas Electronics America Inc. All rights reserved.37 Data FlashUser Application Why do we need R_VEE_ReleaseState()? Used to prevent data flash access violations R_VEE_Read(ID=0) to read VEE Record 0 R_VEE_Write(ID=1) to write VEE Record 1 User reads data from pointer in step 1 while write is still on-going Multiple reads are allowed Pointer to Record 0VEE Record 0VEE Record 1

© 2012 Renesas Electronics America Inc. All rights reserved.38 Why not have R_FlashRead() instead? User would call this function to read data Advantages: This would eliminate need for releasing state Disadvantages: RX can directly read data flash Large overhead Data would have to be copied every time No way to prevent user from directly accessing

© 2012 Renesas Electronics America Inc. All rights reserved.39 Virtual EEPROM for RL78

© 2012 Renesas Electronics America Inc. All rights reserved.40 RL78 – EEPROM Emulation Library Has similar features Uses ‘pools’

© 2012 Renesas Electronics America Inc. All rights reserved.41 RL78 – EEL Modes Has 3 execution modes

© 2012 Renesas Electronics America Inc. All rights reserved.42 Summary Why do you need it? Features How it works How to use it Available on RX and RL78 MCUs

© 2012 Renesas Electronics America Inc. All rights reserved.43 Questions?

© 2012 Renesas Electronics America Inc. All rights reserved.44 Devices in a smart society must efficiently use their available resources. Eliminating the need for external components when they can be incorporated inside the MCU is vital. ‘Enabling The Smart Society’

© 2012 Renesas Electronics America Inc. All rights reserved.45 Please utilize the ‘Guidebook’ application to leave feedback or Ask me for the paper feedback form for you to use… Please Provide Your Feedback…

Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved.