Atmel s Self-Programming Flash Microcontrollers

Similar documents
AVR106: C functions for reading and writing to Flash memory. 8-bit Microcontrollers. Application Note. Features. Introduction

8-bit Microcontroller. Application Note. AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory

Securing Host Operations with a Dedicated Cryptographic IC - CryptoCompanion

8-bit. Application Note. Microcontrollers. AVR282: USB Firmware Upgrade for AT90USB

Trusted Platforms for Homeland Security

Handout 17. by Dr Sheikh Sharif Iqbal. Memory Unit and Read Only Memories

Using RFID Technology to Stop Counterfeiting

AVR106: C Functions for Reading and Writing to Flash Memory. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

Chapter 13. PIC Family Microcontroller

8-bit RISC Microcontroller. Application Note. AVR910: In-System Programming

AT89C5131A Starter Kit... Software User Guide

General Porting Considerations. Memory EEPROM XRAM

The Programming Interface

2.0 Command and Data Handling Subsystem

CRYPTOMEMORY POWERFUL SECURITY AT LOW COST

USER GUIDE EDBG. Description

AN1837. Non-Volatile Memory Technology Overview By Stephen Ledford Non-Volatile Memory Technology Center Austin, Texas.

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

Emulated EEPROM Implementation in Dual Flash Architecture on MC9S08LG32 With Demo Description

AVR115: Data Logging with Atmel File System on ATmega32U4. Microcontrollers. Application Note. 1 Introduction. Atmel

Production Flash Programming Best Practices for Kinetis K- and L-series MCUs

Application Note. 8-bit Microcontrollers. AVR270: USB Mouse Demonstration

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ

NVM memory: A Critical Design Consideration for IoT Applications

Implementing a Digital Answering Machine with a High-Speed 8-Bit Microcontroller

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

How To Prevent Power Supply Corruption On An 8Bit Microcontroller From Overheating

Memory. The memory types currently in common usage are:

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

Atmel AVR4921: ASF - USB Device Stack Differences between ASF V1 and V2. 8-bit Atmel Microcontrollers. Application Note. Features.

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

White Paper Using the Intel Flash Memory-Based EPC4, EPC8 & EPC16 Devices

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

Data remanence in Flash Memory Devices

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

ET-BASE AVR ATmega64/128

Single 2.5V - 3.6V or 2.7V - 3.6V supply Atmel RapidS serial interface: 66MHz maximum clock frequency. SPI compatible modes 0 and 3

Microtronics technologies Mobile:

STK User Guide

A DIY Hardware Packet Sniffer

8-bit Microcontroller. Application Note. AVR230: DES Bootloader

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

AT89LP Flash Data Memory. Application Note. AT89LP Flash Data Memory API. 1. Introduction. 2. Theory of Operation. 2.1 Flash Memory Operation

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

1 Gbit, 2 Gbit, 4 Gbit, 3 V SLC NAND Flash For Embedded

AVR32701: AVR32AP7 USB Performance. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

Algorithms and Methods for Distributed Storage Networks 3. Solid State Disks Christian Schindelhauer

Atmel AVR4027: Tips and Tricks to Optimize Your C Code for 8-bit AVR Microcontrollers. 8-bit Atmel Microcontrollers. Application Note.

Microcontrollers in Practice

AVR134: Real Time Clock (RTC) using the Asynchronous Timer. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Efficient Authorized Access Security System Control Using ATMEL 89C55 & Mobile Bluetooth

APPLICATION NOTE. Atmel AVR911: AVR Open Source Programmer. 8-bit Atmel Microcontrollers. Features. Introduction

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

USB HID bootloader for the MC9S08JM60

Display Message on Notice Board using GSM

Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures. Atmel Microcontrollers. Application Note. Features.

RAM & ROM Based Digital Design. ECE 152A Winter 2012

DESIGNING SECURE USB-BASED DONGLES

AVR1900: Getting started with ATxmega128A1 on STK bit Microcontrollers. Application Note. 1 Introduction

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

Using the Kinetis Security and Flash Protection Features

How To Program A Microcontroller With Memory On A Microchip Microcontroller

Security & Chip Card ICs SLE 44R35S / Mifare

Programming NAND devices

AT88CK490 Evaluation Kit

Application Note. C51 Bootloaders. C51 General Information about Bootloader and In System Programming. Overview. Abreviations

Serial port interface for microcontroller embedded into integrated power meter

VON BRAUN LABS. Issue #1 WE PROVIDE COMPLETE SOLUTIONS ULTRA LOW POWER STATE MACHINE SOLUTIONS VON BRAUN LABS. State Machine Technology

AVR1510: Xplain training - XMEGA USART. 8-bit Microcontrollers. Application Note. Prerequisites. 1 Introduction

AVR1318: Using the XMEGA built-in AES accelerator. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

FLASH TECHNOLOGY DRAM/EPROM. Flash Year Source: Intel/ICE, "Memory 1996"

Atmel AT32UC3A3256 microcontroller 64MBit SDRAM Analog input (to ADC) Temperature sensor RC filter

In-System Programmability

Memory Basics. SRAM/DRAM Basics

Bootloader with AES Encryption

Homework # 2. Solutions. 4.1 What are the differences among sequential access, direct access, and random access?

AVR245: Code Lock with 4x4 Keypad and I2C LCD. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Atmel Norway XMEGA Introduction

Introducing AVR Dragon

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

Atmel AVR231: AES Bootloader. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Chip Card & Security ICs Mifare NRG SLE 66R35

Software Hardware Binding with Quiddikey

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

SLC vs. MLC: An Analysis of Flash Memory

How To Use An Atmel Atmel Avr32848 Demo For Android (32Bit) With A Microcontroller (32B) And An Android Accessory (32D) On A Microcontroller (32Gb) On An Android Phone Or

USER GUIDE. ZigBit USB Stick User Guide. Introduction

Cell Phone Operated Land Rover

AVR Prog User Guide. Section 3

LatticeXP2 Configuration Encryption and Security Usage Guide

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

EE318 Electronic Design Lab Project Report, EE Dept, IITB, April Wireless Microcontroller Programmer

AVR1922: Xplain Board Controller Firmware. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Wireless Sensor Network for Electric Meter Handling

Transcription:

Atmel s Self-Programming Flash Microcontrollers By Odd Jostein Svendsli, Marketing Manager Summary The third-generation Flash microcontrollers from Atmel are now available. These microcontrollers offer self-programming Flash. The microcontroller can write to its own program memory when running code from the boot sector. This creates new possibilities for the designers using selfprogramming memory-based microcontrollers. Atmel s microcontrollers with integrated Flash program memory provide increased system flexibility by enabling field programmability, data storage and remote upgrades. Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 TEL (408) 441-0311 FAX (408) 487-2600 Web Site: http://www.atmel.com

Table of Contents Introduction... 3 Evolution of Flash Microcontrollers... 3 Technology Alternatives for Self-Programming... 4 Impact of Sector Size...4 ROM or Flash Boot Block...4 Security...4 Atmel s Approach... 5 Boot Block Size...5 Read while Write Programming...5 Conclusion... 6 References...6 Editor's Notes... 6 About Atmel Corporation...6 2 2464C AVR 10/03

Introduction Atmel s microcontrollers with integrated Flash program memory provide increased system flexibility by enabling field programmability, data storage and remote upgrades. Flash memory retains its content even after power is turned off, and can be electrically erased. Other common memory types are Mask ROM which is a fixed content memory that cannot be changed once the parts have been fabricated, and OTP EPROM technology that can be user-programmed one time using specialized external equipment. Evolution of Flash Microcontrollers Atmel introduced the first 8-bit Flash microcontroller in 1993. This first-generation Flash microcontroller is based on the industry-standard 8051 core, and uses a separate high voltage supply for programming. The user benefits from Flash microcontrollers are that the devices can be programmed just before system assembly, and if a software bug is found, or if a change is needed, the devices can be removed and reprogrammed. This eliminates the scrap of obsolete material associated with Mask ROM or OTP devices. Atmel s second-generation of Flash microcontrollers were introduced in 1997. These microcontrollers are based on the AVR architecture, and include In-System Programmable and single-voltage Flash memory. As a result, no additional programming voltages are needed. There are several additional benefits offered by this technology. It is now possible to assemble the printed circuit board and program the microcontroller before the software has received final approval. If a software bug is found, it is possible to reprogram the microcontroller without removing it from the printed circuit board. Some applications include a serial number that can be read from firmware. In-System Programmable Flash microcontrollers allow the serial number to be programmed into the Flash memory at the very last step on the production line. In-System Programmable Flash makes it possible to segment the program into verification and application software. The benefit of this approach is that the program space requirement decreases and the system can be assembled and tested before the application software is complete. This approach reduces development time and decreases time to market. The third-generation Flash microcontrollers from Atmel are now available. These microcontrollers offer self-programming Flash. The microcontroller can write to its own program memory when running code from the boot sector. This creates new possibilities for the designers using self-programming memory-based microcontrollers. Here are a few of the benefits of self-programming memory. The scheme used to reprogram the Flash is flexible and can be adapted to the algorithm that best fits the test programming equipment. This feature allows more users to take advantage of the benefits of In-System programming. Remote upgrades are possible without any additional external components. If the communication channel is already a part of the system, updating the Flash program memory from a remote location can now be done without adding any extra components. Many applications need a microcontroller with external EEPROM to store large tables of data that are rarely modified. These applications can now use the self-programming memory to store the data, saving the cost and reducing board space by eliminating the external EEPROM. 3 2464C AVR 10/03

Technology Alternatives for Self-Programming There are several alternative approaches, which can be used to implement Flash-based microcontrollers with self-programming memory. The differences include the size of application and boot block, size of the sector that can be erased and reprogrammed, the design and configuration of the boot sector and the implementation of security to protect the code against and accidental reprogramming. Impact of Sector Size Determining the optimum sector size is a trade-off between programming time and flexibility. The benefit of a large sector size can be short programming time, for bulk erase and reprogramming since a large part of the memory is erased and reprogrammed in parallel. Small sector sizes are more efficient if a small part of the memory needs to be reprogrammed, or if a data array stored in Flash needs to be updated. A disadvantage of having a large sector size is that a larger RAM block is needed to store the data that will be programmed into the Flash sector. Larger RAM blocks yield larger die size adding cost to the microcontroller itself. ROM or Flash Boot Block There are several approaches for implementing a secure boot block. Flash and Masked ROM are the two most common. Implementation of a boot block using Read-Only Memory (ROM) requires the memory to be programmed during wafer fabrication. The ROM boot block can be addressed by toggling external pins, or by entering the boot block from the application program. The advantage of ROM is that the block is defined in silicon and cannot accidentally be erased. This is true when the device uses multiple memory technology such as ROM for the boot block and OTP or Flash for program memory. The disadvantage of ROM is that the boot functions that are implemented during the manufacturing process cannot be changed or modified. A more flexible approach is to use Flash for the boot block. Configuration bits can be set so the user can select program execution to start in the boot block, or at the reset vector. The program can be written to jump to the boot block at any time. The advantage of using a Flash boot block is to increase user s flexibility. Several different communication channel options can be used for receiving data to write into the program memory. It is possible to use the boot-block to store application code if a part of the boot block is not used. If the vendor during the component test process programs the boot block, the device will have all the benefits of the ROM solution, but with more flexibility since it can be changed. Security Protecting against accidental reprogramming or unauthorized access to the program memory is accomplished by setting lock bits, which protect the application sector, boot block or both. Additionally, it is possible to implement encryption or decryption schemes in memory to provide a higher degree of protection. To protect against memory corruption due to an unstable power supply, Brown-out protection can be implemented using either the on-chip Brown-out reset protection circuit or by using discrete external devices. 4 2464C AVR 10/03

Atmel s Approach The recently announced megaavr series of microcontrollers incorporate the most advanced technology for self-programming memory. FLASH Application Section Page Buffer Boot Section U(S)ART, SPI, TWI... Boot Block Size The size of the boot block of the Atmel megaavr series of microcontrollers is programmable between 256 bytes and 4 Kbytes. The smaller sizes are utilized when a simple self-programming scheme is used. The larger boot block sizes give the users the possibility for adding encryption/decryption algorithms. The DES algorithm will fit into a 2- Kbyte boot block in an AVR microcontroller. Read while Write Programming Atmel s megaavr series of microcontrollers allows users to execute instructions from the boot block memory while doing a sector erase or writing in the application program memory. As a result, the microcontroller can continue responding to critical interrupts even during a programming event. To make this easier to use, the devices support the possibility to move the interrupt-vectors from the application section to the boot block section under software control. In some self-programming microcontrollers, the timing of the programming session has to be maintained under software control. Because of this, 5 2464C AVR 10/03

interrupts cannot be enabled during a programming session since an interrupt will change the timing causing the memory cell to be altered. In the megaavr series of microcontrollers, the self-programming sessions are self-timed, eliminating this risk. Conclusion Editor's Notes Self-programming memory simplifies and cost reduces designs that require software upgrade after the system has been installed. In the past, this function required the use of a second microcontroller, which was used to control reprogramming and to maintain critical functions during programming. Flash microcontrollers with self-programming memory eliminate the need for a second microcontroller. Reprogramming can now be accomplished using a single-chip solution. Self-programming memory can benefit applications that are difficult to access, such as air conditioning controls, deep-sea applications or even space applications such as satellites. Additionally applications with many microcontrollers work together in a large distributed system where it is not feasible to update each subsystem one-by-one such as fire-detectors in a large building will derive a major benefit from selfprogramming Flash-based microcontrollers. References 1. ATmega128 Datasheet, Web: http://www.atmel.com/dyn/resources/prod_documents/doc2467.pdf About Atmel Corporation Founded in 1984, Atmel Corporation is headquartered in San Jose, California with manufacturing facilities in North America and Europe. Atmel designs, manufactures and markets worldwide, advanced logic, mixed-signal, nonvolatile memory and RF semiconductors. Atmel is also a leading provider of system-level integration semiconductor solutions using CMOS, BiCMOS, SiGe, and high-voltage BCDMOS process technologies. Further information can be obtained from Atmel s Web site at www.atmel.com. Contact: Odd Jostein Svendsli, Marketing Manager, Trondheim, Norway, Tel: (+47) 72 88 43 88, e-mail: oj@atmel.com. Atmel Corporation 2003. All rights reserved. Atmel and combinations thereof, AVR, and AVR Studio are the registered trademarks of Atmel Corporation or its subsidiaries. Other terms and product names in this document may be the trademarks of others. 6 2464C AVR 10/03