]> sigrok.org Git - libsigrokdecode.git/blame - decoders/avr_pdi/__init__.py
atsha204a: Use the Python 'in' keyword to improve readability.
[libsigrokdecode.git] / decoders / avr_pdi / __init__.py
CommitLineData
f0349f7f
GS
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'''
21PDI (Program and Debug Interface) is an Atmel proprietary interface for
22external programming and on-chip debugging of the device. See the Atmel
23Application Note AVR1612 "PDI programming driver" and the "Program and
24Debug Interface" section in the Xmega A manual for details.
25
26The protocol uses two pins: the RESET pin and one dedicated DATA pin.
27The RESET pin provides a clock, the DATA pin communicates serial frames
28with a start bit, eight data bits, an even parity bit, and two stop bits.
29Data communication is bidirectional and half duplex, the device will
30provide response data after reception of a respective request.
31
32Protocol frames communicate opcodes and their arguments, which provides
33random and sequential access to the device's address space. By accessing
34the registers of internal peripherals, especially the NVM controller,
35it's possible to identify the device, read from and write to several
36kinds of memory (signature rows, fuses and lock bits, internal flash and
37EEPROM, memory mapped peripherals), and to control execution of software
38on the device.
39'''
40
41from .pd import Decoder