AN2541
Functional Safety Demonstrator Using ATtiny3217
Features
Core Independent Operation Using Configurable Custom Logic (CCL) and 16-Bit Timer/Counter
Type A to Create Heartbeat Signal
Core Independent Cyclic Redundancy Check Memory Scan (CRCSCAN)
Core Independent Operation Using 12-Bit Timer/Counter Type D (TCD) to Drive a Fan Motor
Core Independent TCD Fault Handling Using Event System (EVSYS), Analog Comparator (AC),
and Digital-to-Analog Converter (DAC)
Using Charlieplexing Technique to Drive a Large Number of LEDs with a Low Number of Pins,
using 16-Bit Timer/Counter Type B (TCB) and Priority Interrupt
Core Independent Watchdog Timer (WDT) in Window Mode
Real-Time Counter Periodic Interrupt (RTC) (PIT)
Board Controller with Touch Slider using the Peripheral Touch Controller (PTC) to Adjust Voltage to
ATtiny3217, Demonstrating Voltage Level Monitor (VLM) interrupt, Brown-out Detector (BOD), and
Power-on Reset (POR)
Onboard Mini Embedded Debugger (mEDBG) for Programming and Debugging
Introduction
Safety and reliability are important and critical topics in many applications. Imagine if the buttons of a
stovetop, that are controlled by a microcontroller, suddenly break. In this scenario, it is very important for
the controller to detect the issue and safely turn the stovetop OFF to avoid potential danger. The safety
and robustness features of the AVR
®
microcontrollers, in conjunction with the Class B firmware library, are
valuable tools in handling robustness issues.
The Functional Safety Field Engagement Board demonstrates various features of an AVR microcontroller,
such as Watchdog Timer (WDT), Cyclic Redundancy Check (CRC), Brown-out Detection (BOD), Voltage
Level Monitoring (VLM), Power-on Reset (POR), and Timer/Counter type D (TCD) fault detection. In
addition, Class B self-tests are designed to detect various faults on start-up or during program execution
and shut down the application safely in case of a fault.
© 2018 Microchip Technology Inc.
Application Note
DS00002541A-page 1
Table of Contents
Features.......................................................................................................................... 1
Introduction......................................................................................................................1
1. Relevant Devices.......................................................................................................4
1.1. tinyAVR
®
0-series......................................................................................................................... 4
1.2. tinyAVR
®
1-series......................................................................................................................... 4
1.3. megaAVR
®
0-series......................................................................................................................5
2. Functional Safety Field Engagement Board.............................................................. 6
2.1. Functional Safety Field Engagement Board Overview.................................................................6
2.1.1. FSFEB Calibration.........................................................................................................8
2.2. Operating Voltage.........................................................................................................................9
2.2.1. Voltage Level Monitoring (VLM)...................................................................................10
2.2.2. Brown-out Detect (BOD).............................................................................................. 11
2.2.3. Power-on Reset (POR)................................................................................................ 11
2.3. Application Heartbeat Setup.......................................................................................................11
2.3.1. TCA0 Setup................................................................................................................. 12
2.3.2. CCL Setup................................................................................................................... 12
2.4. Reset Register and Class B Status............................................................................................13
2.4.1. Reset Register Status..................................................................................................13
2.4.2. Class B........................................................................................................................ 15
2.5. Window Watchdog Timer (WDT) Setup..................................................................................... 16
2.6. Cyclic Redundancy Check (CRC) Setup....................................................................................18
2.7. Fault Detection Using Event System Setup............................................................................... 19
2.8. Charlieplexing Status LEDs........................................................................................................22
2.8.1. Charlieplexed LEDs Setup...........................................................................................23
2.9. Embedded Debugger Implementation........................................................................................23
2.10. CRC Checksum Setup............................................................................................................... 23
3. Get Source Code from Atmel | START.................................................................... 25
4. Revision History.......................................................................................................26
The Microchip Web Site................................................................................................ 27
Customer Change Notification Service..........................................................................27
Customer Support......................................................................................................... 27
Microchip Devices Code Protection Feature................................................................. 27
Legal Notice...................................................................................................................28
Trademarks................................................................................................................... 28
AN2541
© 2018 Microchip Technology Inc.
Application Note
DS00002541A-page 2