ECN Asia
  Mark as your homepage Bookmark us Print Subscription
               
Sunday, July 5, 2009
Home About Us Current Issue Archive RSS Free Subscription Trade Shows Media Kit Contact Us

Boards & Modules

Computers, Peripherals & Networking Devices

Digital Den

Electromechanical/Mechanical Devices

Embedded Systems & Networking

Integrated Circuits & Semiconductors

Microwave & RF Components

Optoelectronics & Displays

Packaging & Interconnects

Passive & Discrete Components

Power Sources & Conditioning Devices

Sensors & Actuators

Software

Test & Measurement

Electronics Asia

Search:
 
  Advanced Search
Product Info Search:
 
     
 
 
 
Issue > Jan 2008 > Features
 
 
Ads by Google
 

Benefits of Flash EEPROM: Re-programming the end application becomes easy


( 01 Jan 2008 )

by Roger Fan, Freescale Semiconductor Inc.

When compared to one time programmable (OTP) or read only memory (ROM) microcontrollers (MCUs), a flash memory-based MCU is distinguished by its ability to be reprogrammed. Many applications today need memory not only for storing the application program but also for storing data, which may need to be updated from time to time and must be retained in the application system, even after power off. For example, with a remote control, the user does not want to lose the preferred settings every time the battery is changed. External serial EEPROM can serve this purpose well, but adding another component to the system means higher system cost, a larger board footprint and degraded system reliability. An MCU with reprogrammable flash memory is a good choice for such an application, particularly if the application program needs a periodic upgrade to a newer version with enhanced features.



To best utilize flash memory for electrically erasable programmable read only memory (EEPROM) emulation or firmware upgrades, the MCU must be designed with a good flash controller module. This allows the embedded designer to in-system program or erase the flash memory in a comparatively convenient and user-friendly way. A special flash control module can also be used so that developers do not need to manipulate the bits of the flash control registers. Instead, firmware developers just need to issue erase or programming commands from the application program. When programming or erasing the flash memory, an internal charge pump eliminates the need for external high voltage.

In this article, we describe the flash EEPROM features of a flash-based MCU and how end applications can benefit from specially designed dual flash arrays.



EMULATING EEPROM USING A SINGLE FLASH ARRAY

Emulating EEPROM using flash memory requires in-system erasing and programming. For devices with a single flash array, the program algorithm used to conduct the programming or erasing operations cannot be located in the same flash array that is going to be programmed or erased. Instead, the algorithm is typically executed from RAM. The user application needs to copy the program algorithm from flash memory to RAM and then jump to this RAM program to execute the algorithm.



An alternative strategy, to avoid having to copy the program algorithm from RAM, is to hard code the program in the MCU’s ROM during wafer processing, allowing the application program to be executed directly from ROM. Figure 1 shows the execution flow of in-system flash programming.



EMULATING EEPROM USING DUAL FLASH ARRAYS

Freescale’s MC9S08LC family of MCUs will be used as an example. Each member has a dual flash array, each with its own flash control logic. The program and erase operations can be performed on one array while executing code from the other. There is no need to execute the program algorithm in RAM or ROM during the in-system programming process. Dual flash arrays greatly simplify the process of using flash to emulate EEPROM. For example, the programming algorithm and the application code can be stored in Flash A while Flash B is treated as flash EEPROM. The user can simply execute the code in Flash A to erase or program data in Flash B.



BENEFITS TO THE END APPLICATION

True in-system programming. Although it is possible to upgrade the application firmware in a single flash array MCU by uploading the programming and firmware upgrading algorithm to RAM for execution, this involves some risk. If, after the flash array has been erased, there is a power loss during the upgrade process, the random access memory (RAM) content will be lost or corrupted. To bring the end application back to life, the user will need to reprogram the MCU firmware with external tools. This problem can be avoided using an MCU with dual flash arrays. Since the user can execute the algorithm in Flash A to erase and program the application firmware in Flash B and vice versa, a power failure will not disable the upgrade process. In-system programming can simply be restarted from the non-volatile flash memory once power is back on. Using dual flash arrays, true in-system programming can be achieved, giving the product manufacturer complete and reliable remote firmware upgrade capability.



Simplicity of the system design. Dual flash array in-system programming and EEPROM emulation frees up more RAM for the application and eliminates the need for external EEPROM. It simplifies the application program, which is especially helpful to software engineers who face tight memory resources. In addition, the I/O pins that would have been used for external EEPROM can be used for other functions in the end application.



System cost saving. Total system cost can be reduced by using a smaller pin count MCU with less I/O while still eliminating the need for an external EEPROM component. No system features are sacrificed, yet the PCB is smaller and the testing time on the production line is lowered because the overall system is simpler.



Better system reliability. The most frustrating issue when using a single array flash MCU to perform in-system programming occurs when the power suddenly goes off during the process. By using an MCU with dual flash array, the process is much safer because the programming algorithm in either of the flash arrays will not be lost during power off. This greatly contributes to overall system reliability when undergoing in-system programming activity.



Further advantages can be realized through dual flash array in-system programming. Again using the MC9S08LC family as an example, programming and erasing of each flash array can be conducted through the same command interface, simplifying the end application program. For better system reliability, the flash array is designed so that it is not possible to page-erase or program both arrays at the same time. Since the mass-erase command will erase both arrays, its use is not recommended when coding the end application program. Developers are advised to use page erase command to erase the flash array during in-system programming.



CONCLUSION

Initially, flash memory was primarily intended for program storage. However, because it can be reprogrammed, it can also be used to emulate EEPROM. MCUs with dual flash arrays provide simpler and more reliable in-system programming to implement EEPROM emulation. Furthermore, sudden power off will no longer disrupt the process in systems employing dual flash array MCUs. Therefore, in-system programming and field upgrades are both easier and safer.



About the author

Roger Fan is a System and Application Engineer at Freescale Semiconductor Inc. For more information, contact Freescale Semiconductor, 6501 William Cannon Drive West, Austin, TX 78735; 800-521-6274; www.freescale.com

Click here for Illustrations:



Figure 1, Figure 2



 

 
 
 
ADVERTISEMENT
 
 
 
Ads by Google
 
OUR SPONSOR
   
   
 
 
 
   
   
     
 
 
         
     
 
Related Articles
   
USB 2.0 OVP device features integrated current protection and high-speed ESD protection
‘Smallest’ 32.678kHz crystal oscillator
nanoWatt XLP microcontrollers provides as low as 20nA sleep current
H.264 HDTV processor
LED lighting solutions
Power-efficient 512Kb, 1Mb Serial F-RAM
Video interface solutions for broadcast applications
Analog suppliers go green
Offshore globalization driven by economic downturn
Integration of high voltage functionality for advanced CMOS technologies
   
 
Business News
   
Endicott Research Introduces Online Inverter-to-LCD Cross Reference Guide
SeaSolve, Sandbridge Introduce Joint Reference Design for Mobile WiMAX-based products
HP Completes $13.9bn Acquisition of EDS
FCI Develops Flip-Type ZIF Connector
Cable Configuration Design Tool
Magnetic Cylinder Sensor has Two Programmable Switching Points
CA Releases Wily Manager for CA SiteMinder
TDI opens new facility in China
Intersil Promotes Kent Chon to Vice President of Asia Pacific Sales
OTCS celebrates 10th anniversary in Singapore
   
  More News >>
 
     
     
 
         
 
 
     
         
 
spacer
Country Report
spacer
   
bullet

TAIWAN: Inductor technologies are developed independently

bullet

KOREA: Inductor manufacturers are highly competitive, but scarce

bullet

CHINA: World’s high-volume producer of transformer, coil and inductor

bullet

TAIWAN: Moderate but steady growth in LED market

bullet

KOREA: LED has a bright future in our homes

  more on country report >>
   
 
spacer
Our Sponsor
spacer
   
bullet
 
   
 
     
 
     
 
spacer
Features
spacer
   
bullet

Lower power mixed-signal circuit design using EDA

bullet

The benefits of migrating to PICMG 1.3 for embedded computing applications

bullet

Iso-amp: A perfect fit for compact motor drives

bullet

Why all the talk about high-power LED technology?

bullet

A power supply can affect the fate of costly systems

  more on features >>
   
 
Distribution
   

Element 14: Bridging the information divide

RoHS awareness is growing

Uncertainties abound in Indian distribution industry

Distributors stay afloat during this downturn

High service distribution empowers design engineers

  more on distribution >>
   
 
     
         
 
 
     
         
 
Industry Focus
   

Ethernet adoption encourages open protocols

Managing Bluetooth profiles: A billion served

Enabling a true wireless multimedia home network

Bluetooth paves the way for truly wireless car interiors

Eliminating massive clock trees in SoC designs using GALS

  more on industry focus >>
   
 
Web Exclusives
   

A focus on eco-friendly HDDs

Power-management solutions for telecom systems improve performance, cost, and size

Changing the network security playing field

WiMAX “personality pack” provides complete IEEE802.16 functionality

LED: A tiny light source with a bright future

  more on web exclusives >>
   
 
     
     
   
     
 
Semiconductors
   

Simulating the effect of blockers on data converter performance in wideband receivers

Decrease processor power consumption using a CPLD

Taking full advantage of new, low-power MCUs

Power train integration for 2007 and beyond: The true dawn of multi-chip modules

Wireless network options for industrial applications

  more on semiconductors >>
   
 
Field Applications
   

Test Equipment

Power Sources/Circuit Protection

Advanced Signal Processing Dramatically Improves Capability of Artificial Limbs

Voice Interface Technology for Hands-free Function in Automobiles

LXI: A Technology Leap for Test Instrumentation

  more on field applications >>
   
 
     
     
   
     
     
 
INDUSTRY LINKS
   
Photonics Association (Singapore)
bullet Singapore Industrial Automation Association (SIAA)
   
 
 

 

 
         


 
 
 
 
 
© 2009 Reed Business Information, a division of Reed Elsevier Inc.
All rights reserved. Use of this web site is subject to its Terms and Conditions of Use. View our Privacy Policy.