APPLICATION NOTE. Safety Management for Space Environment Application. ATmegaS128. Introduction

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

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

APPLICATION NOTE. Secure Personalization with Transport Key Authentication. ATSHA204A, ATECC108A, and ATECC508A. Introduction.

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

AT88CK490 Evaluation Kit

General Porting Considerations. Memory EEPROM XRAM

APPLICATION NOTE. AT16268: JD Smart Cloud Based Smart Plug Getting. Started Guide ATSAMW25. Introduction. Features

USER GUIDE EDBG. Description

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

APPLICATION NOTE. Authentication Counting. Atmel CryptoAuthentication. Features. Introduction

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

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

CryptoAuth Xplained Pro

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

AVR353: Voltage Reference Calibration and Voltage ADC Usage. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

SAMA5D2. Scope. Reference Documents. Atmel SMART ARM-based MPU ERRATA

AT11805: Capacitive Touch Long Slider Design with PTC. Introduction. Features. Touch Solutions APPLICATION NOTE

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

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

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

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

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

USER GUIDE. ZigBit USB Stick User Guide. Introduction

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

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

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

APPLICATION NOTE. AT12405: Low Power Sensor Design with PTC. Atmel MCU Integrated Touch. Introduction

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

USER GUIDE. ATWINC1500B Hardware Design Guidelines - IEEE b/g/n IoT Module. Atmel SmartConnect. Introduction

Using CryptoMemory in Full I 2 C Compliant Mode. Using CryptoMemory in Full I 2 C Compliant Mode AT88SC0104CA AT88SC0204CA AT88SC0404CA AT88SC0808CA

AVR1321: Using the Atmel AVR XMEGA 32-bit Real Time Counter and Battery Backup System. 8-bit Microcontrollers. Application Note.

AN3155 Application note

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

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

APPLICATION NOTE. Atmel AT04389: Connecting SAMD20E to the AT86RF233 Transceiver. Atmel SAMD20. Description. Features

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

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

Atmel AVR4903: ASF - USB Device HID Mouse Application. Atmel Microcontrollers. Application Note. Features. 1 Introduction

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

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

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

AN11008 Flash based non-volatile storage

AVR127: Understanding ADC Parameters. Introduction. Features. Atmel 8-bit and 32-bit Microcontrollers APPLICATION NOTE

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

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

Application Note. Atmel CryptoAuthentication Product Uses. Atmel ATSHA204. Abstract. Overview

Application Note. Atmel ATSHA204 Authentication Modes. Prerequisites. Overview. Introduction

AVR055: Using a 32kHz XTAL for run-time calibration of the internal RC. 8-bit Microcontrollers. Application Note. Features.

AN3265 Application note

AN Boot mode jumper settings for LPC1800 and LPC4300. Document information

AT91 ARM Thumb Microcontrollers. AT91SAM CAN Bootloader. AT91SAM CAN Bootloader User Notes. 1. Description. 2. Key Features

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

AVR315: Using the TWI Module as I2C Master. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

APPLICATION NOTE. RF System Architecture Considerations ATAN0014. Description

Atmel Power Line Communications. Solutions for the Smart Grid

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

How To Fix An Lmx9838 Bluetooth Serial Port Module With Bluetooth (Bluetooth 2) From A Bluetooth Bluetooth 4.2 Device With A Bluembee 2.2 Module

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

Application Note. 8-bit Microcontrollers. AVR272: USB CDC Demonstration UART to USB Bridge

More Secure, Less Costly IoT Edge Node Security Provisioning

AT91SAM ARM-based Flash MCU. Application Note

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

8051 Flash Microcontroller. Application Note. A Digital Thermometer Using the Atmel AT89LP2052 Microcontroller

Dell One Identity Cloud Access Manager How to Configure vworkspace Integration

AVR1301: Using the XMEGA DAC. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR32138: How to optimize the ADC usage on AT32UC3A0/1, AT32UC3A3 and AT32UC3B0/1 series. 32-bit Microcontrollers. Application Note.

Atmel SMART ARM Core-based Embedded Microprocessors

AVR1600: Using the XMEGA Quadrature Decoder. 8-bit Microcontrollers. Application Note. Features. 1 Introduction. Sensors

AN10866 LPC1700 secondary USB bootloader

QT1 Xplained Pro. Preface. Atmel QTouch USER GUIDE

AVR32788: AVR 32 How to use the SSC in I2S mode. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR311: Using the TWI Module as I2C Slave. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

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

AN2557 Application note

AN2680 Application note

Designing Feature-Rich User Interfaces for Home and Industrial Controllers

Atmel Norway XMEGA Introduction

Dell Statistica. Statistica Document Management System (SDMS) Requirements

AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR. 8-bit Microcontrollers. Application Note. Features.

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

End to End Data Path Protection

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

APPLICATION NOTE. Atmel AT01095: Joystick Game Controller Reference Design. 8-/16-bit Atmel Microcontrollers. Features.

Using the RS232 serial evaluation boards on a USB port

AVR126: ADC of megaavr in Single Ended Mode. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

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

COM Port Stress Test

AVR125: ADC of tinyavr in Single Ended Mode. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

MODFLEX MINI GATEWAY ETHERNET USER S GUIDE

AT09333: USB Host Interface (UHI) for Communication Class Device (CDC) Introduction. Atmel Microcontrollers APPLICATION NOTE

AN4128 Application note

AN3998 Application note

AN3354 Application note

2.0 Command and Data Handling Subsystem

udrive-usd-g1 Embedded DOS micro-drive Module Data Sheet

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

Dell Statistica Statistica Enterprise Installation Instructions

APPLICATION NOTE. Atmel AT02985: User s Guide for USB-CAN Demo on SAM4E-EK. Atmel AVR 32-bit Microcontroller. Features. Description.

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

Dell Spotlight on Active Directory Server Health Wizard Configuration Guide

Transcription:

APPLICATION NOTE Safety Management for Space Environment Application ATmegaS128 Introduction The aim of this document is to highlight the key parameters of the ATmegaS128 that should be handled with care by any hardware and/or software developer in order to develop space safe applications. This document focuses on features that could be sensitive to radiation environment and that must be considered at application level. In addition, some tips to improve the safety of the global application are proposed.

1 FLASH/EEPROM Memory Management 1.1 Avoiding Flash Memory Content Loss The AtmegaS128 has lock bits to lock the content of the flash memory. We recommend to use the lock bits to prevent any loss of content of the flash memory. If no re-programming functionality is needed, we recommend locking the part using BLB0x and BLB1x lock bit (without using LBx bits). If the bootloader functionality is used we recommend locking the bootloader using BLB1x fuse bits (without using LBx bits). See the bootloader chapter of this document for complete understanding of risks related to programing in-flight. 1.2 Avoiding EEPROM Memory Content Loss The AtmegaS128 has lock bits to lock the content of the eeprom memory. We recommend to use the lock bits to prevent any loss of content of the eeprom memory. 1.3 In-Flight Reprogramming Considerations The global application of an ATmegaS128 relies on a bootloader that shall fit in the Bootloader of the Flash memory and on a user application in the application area of the memory. Bootloader 0x1FFFF Application 0x0000 We highly recommend to lock the flash memory content according to the Avoiding Flash Memory Content Loss procedure and to avoid in-flight flash memory reprogramming 2

When the memory is fully locked, both the bootloader and the application are protected against any write operation, thus preventing unexpected data loss. Data retention is also guaranteed. Application being locked, no application reprogramming is possible. Whereas we recommend not to use flash reprogramming during flight, it is possible to use the capability to reprogram the device. If end-user wants to use such in-flight flash programming, he can rely on one of the two possible setup proposed here after. 1.3.1 Application re-programming from the Boot. The reference configuration hypothesis for this use case are the following: Bootloader is locked - refer to Avoiding Flash Memory Content Loss procedure Application is not locked When the Boot is locked to avoid any corruption in the critical area of the software, the ATmegaS128 still allows to reprogram the application from the boot. 0x1FFFF Bootloader Program by UART, SPI, TWI.. Application 0x0000 The bootloader is always protected against unexpected lost. Data retention of bootloader is guaranteed. Application is not protected against unexpected data loss. Data retention of application after in flight programming have to be re-assessed with respect to the post write TID characterization results presented in the ATmegaS128 radiation report. 1.3.2 Application re-programming from ISP interface. The reference configuration hypothesis for this use case are the following: Bootloader is locked - refer to Avoiding Flash Memory Content Loss procedure Application is locked - refer to Avoiding Flash Memory Content Loss procedure 3

When both the boot and the application are locked, it is not possible anymore to reprogram the application through the bootloader, the only way to reprogram the application is to perform reprogramming through the external ISP Bootloader 0x1FFFF External re-programming is possible using ISP (SPI) Application 0x0000 Bootloader and application are always protected against unexpected data loss. Retention the two s after in flight programming have to be re-assessed with respect to the post write TID characterization results presented in the ATmegaS128 radiation report. 1.4 Fuse Bits Considerations The ATmegaS128 embeds a full set of fuse bits for configuration of the device parameters. As for the flash memory array itself, the fuse bits are SEU immune. The applicative effect of the fuses is only effective once at power-on they have been latched into volatile memory cells. Those volatile cells can be affected by SEU. If an error is induced in this cell by a heavy ion, the only way to recover from the faulty state is to apply a poweroff/power-on sequence to the device. The fuse bits loss will not be recovered by the internal watchdog as fuse bits are sampled at power-on only. Some fuse bits functionalities are critical for the application as the clock selection, the BOD level or the boot reset. To avoid dead lock of the device, we recommend to implement an external mechanism to cycle power-off then power-on the device when application does not answer anymore. Occurrence of such event is very low. For more details, refer to the ATmegaS128 radiation report. Whereas not related to radiation considerations, wrong configuration of the fuse bits may lead to a dead lock of the device without any possibility to recover on board. Please take care of the HW/SW alignment prior to any configuration of the fuse bits. 4

2 Bootloader Considerations The ATmegaS128 bootloader is intended for reprogramming of the application all along the life of the device. If the end-user needs to reprogram its application during his mission (in-flight write to flash) through the bootloader, he shall consider the following tips carefully. To avoid any corruption on the bootloader area (critical software for reprogramming), as mentioned in the before, the boot code shall be locked - refer to Avoiding Flash Memory Content Loss procedure. The following startup sequence shall be privileged to secure the correct user application execution Reset into the boot and check if bootloader activation is requested a. If the bootloader is requested, Run the bootloader, b. If the bootloader is not requested (application start requested), Check the application content (CRC or checksum) If the result is correct (application content not modified), then run the application by jumping at address 0x0000. If application check is incorrect, run the bootloader to download a correct application Take care of the watchdog behavior especially if the WDTON bit is programmed during startup sequence refer to Watchdog here after for details on recommendations over Watchdog behavior 3 Watchdog Considerations The ATmegaS128 embeds watchdog features that user must take care of in his software design to avoid unexpected time-out of his application. When WDTON (Watchdog enable On) is programmed, the watchdog is running directly after reset (with a default configuration of 16K clock cycles before it expires). To ensure a correct behavior of the application without spurious time-out, we recommend to clear the watchdog and set the watchdog to the value fitting the application requirement in the application startup file, this before any other applicative task. We remind user that watchdog excursion in temperature must be taken into account with enough margins. Refer to the datasheet for details on watchdog excursion. 5

4 Internal Oscillator Considerations The OSCCAL value is copied at reset from signature row into OSCCAL register. In case of use of OSCCAL register in the application, we recommend to make copies of this parameter in the RAM memory to be able to control its integrity all along the life of the application. The RAM being sensitive to SEU events, three locations should be used as copy of the OSCCAL parameter to allow efficient checking. In any case a reset will reconfigure the OSCCAL register with the default factory value. 5 ADC Considerations As SEU can affect ADC conversion results we recommend to execute multiple conversion and treatment before taking the converted value into account. 6 I/O Considerations The registers used for configuration of the IOs can be affected by SEU by modifying the PIN/PORT direction registers and I/O values. An optimized IO configuration process is recommended for each IO access. 6.1 Reading PIN/PORT registers Systematically configure the PIN/PORT in input before any port reading. Execute multiple PIN/PORT read to get the value. 6.2 Writing PIN/PORT registers Systematically configure the PIN/PORT in output before any port writing. 6.3 IO Conflict Management In case of SEU affecting the PORT direction, conflict on the IO lines could appear (risk of multiple drivers on the same line). To avoid such conflict, we recommend to Add a line resistor on all input pin to avoid conflict in case of SEU changing I/O direction to output Refresh port direction on a fast time basis to avoid long term switch to the faulty direction 6

7 Communication Links Considerations 7.1 USART As SEU can affect USART communication, we recommend to implement data integrity check mechanisms at application level. In case of error, the transmitter shall be warned of the error and shall take the decision to resend (or not) the data/frame to the receiver. 7.2 SPI At hardware level, on the USART, byte control can be activated use of the parity bits inside the USART configuration. At application level, frame control with CRC, checksum, security check, can be instantiated. As SEU can affect SPI communication, we recommend to implement data integrity check mechanisms at application level. In case of error, the transmitter shall be warned of the error and shall take the decision to retry (or not) the data/frame to the receiver. At application level, frame control with CRC, checksum, security check, can be instantiated 7.3 TWI In case of SPI use for memory access, we recommend to execute several reading of the required memory cell to ensure correct data reading As SEU can affect TWI communication, we recommend to implement data integrity check mechanisms at application level. In case of error, the transmitter shall be warned of the error and shall take the decision to retry (or not) the data/frame to the receiver. At application level, frame control with CRC, checksum, security check, can be instantiated. In case of TWI use for memory access, we recommend to execute several reading of the required memory cell to ensure correct data reading 7

8 General Considerations 8.1 Code behavior and Code limits 8.1.1 Default State of the Flash Memory In case of unexpected loss of PC or SP, the application can fetch anywhere in the flash memory. By default, in flash memory, un-programmed bytes are set to 0xFF. 0xFFFF (16 bit instruction code) corresponds to a valid opcode in the ATmegaS128 instruction set: sbrs r31,7 (Skip if Bit 7 in Register R31 is Set) In case of loss of the PC, if the PC is going above the end of your program, it will continue to fetch and execute all the flash memory up to rollover to 0x0000. We recommend to fill unused bytes of the flash memory with an opcode allowing infinite loop and let the watchdog expire. The opcode 0xFCFF rjump @PC is the infinite loop opcode. The PC is always aligned by words (2 bytes). It means that if all unused code memory is filled with 0xFCFF, the processor will never fetch 0xFFFC. 8.1.2 Unknown opcodes Due to SEU event, data may be corrupted while fetching the operations to be executed. In case of fetch of unexpected opcode opcode that is not allowed in the ATmegaS128 instruction set, the core executes a NOP. 8.2 Interrupts In case of unexpected interrupt (for example interrupt from an unused peripheral), user software can just jump in and out of the interrupt subroutine without doing anything inside this routine. User software can also decide to enter in an endless loop waiting for the watchdog to reset the part. 8.3 SFR/Register Regular Update We recommend initializing all the interrupt vectors, even if they are not used. We recommend the user to periodically refresh all the SFRs to their wanted values to correct all SEU effect on SFRs. 8.4 FMEA at System Level At system level, the end-user shall think about the criticality of the different signals/events managed by the ATmegaS128 to elaborate an adequate mitigation between the consecutive refreshes of the application. Key points to be answered are What happens if a signal is missing for a short period of time What happens if a signal is wrong for a short period of time 8

9 Revision History Doc Rev. Date Comments A 05/2016 Initial document release. 9

SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death ( Safety -Critical Applications ) without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation o f nuclear facilities and weapons systems. Atmel products are ATmegaS128 not designed nor intended Safety for use for in military Space or aerospace Application applications [APPLICATION or environments unless NOTE] specifically designated by Atmel as military-grade. Atmel products are not designed nor Atmel-41086A-AERO- intended for use in Safety_Management_for_Space_Environment_Application-ApplicationNote_05/2016 automotive applications unless specifically designated by Atmel as automotive-grade. 10 Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 www.atmel.com 2016 Atmel Corporation. / Rev.:. Atmel Confidential: For Release Only Under Non-Disclosure Agreement (NDA) Atmel, Atmel logo and combinations thereof, Enabling Unlimited Possibilities, and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. ARM, ARM Connected logo, and others are the registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others. DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORT H IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LI MITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accurac y or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.