]> sigrok.org Git - libsigrokdecode.git/blob - decoders/avr_pdi/__init__.py
decoders: Various cosmetic/consistency/typo fixes.
[libsigrokdecode.git] / decoders / avr_pdi / __init__.py
1 ##
2 ## This file is part of the libsigrokdecode project.
3 ##
4 ## Copyright (C) 2016 Gerhard Sittig <gerhard.sittig@gmx.net>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, see <http://www.gnu.org/licenses/>.
18 ##
19
20 '''
21 PDI (Program and Debug Interface) is an Atmel proprietary interface for
22 external programming and on-chip debugging of the device.
23
24 See the Atmel Application Note AVR1612 "PDI programming driver" and the
25 "Program and Debug Interface" section in the Xmega A manual for details.
26
27 The protocol uses two pins: the RESET pin and one dedicated DATA pin.
28 The RESET pin provides a clock, the DATA pin communicates serial frames
29 with a start bit, eight data bits, an even parity bit, and two stop bits.
30 Data communication is bidirectional and half duplex, the device will
31 provide response data after reception of a respective request.
32
33 Protocol frames communicate opcodes and their arguments, which provides
34 random and sequential access to the device's address space. By accessing
35 the registers of internal peripherals, especially the NVM controller,
36 it's possible to identify the device, read from and write to several
37 kinds of memory (signature rows, fuses and lock bits, internal flash and
38 EEPROM, memory mapped peripherals), and to control execution of software
39 on the device.
40 '''
41
42 from .pd import Decoder