| 1 |
## |
| 2 |
## $Id: mk2-protocol.txt 110 2005-05-27 20:42:13Z joerg_wunsch $ |
| 3 |
## |
| 4 |
## Contrubuted by Colin O'Flynn <[email protected]> |
| 5 |
## |
| 6 |
|
| 7 |
## |
| 8 |
## NB: This file has only historical value. |
| 9 |
## Refer to doc2587 from Atmel (Appnote AVR067). |
| 10 |
## |
| 11 |
|
| 12 |
Get Voltages |
| 13 |
|
| 14 |
1B aa 00 02 00 00 00 0E 03 06 bb cc |
| 15 |
aa seems to increase after each command |
| 16 |
|
| 17 |
|
| 18 |
General Command Syntax |
| 19 |
|
| 20 |
[Sync Byte] [Message Count] [Data] [Checksum LSB] [Checksum MSB] |
| 21 |
|
| 22 |
Sync Byte: 1B |
| 23 |
|
| 24 |
Message Count: Computer increments this every time it sends a message, JTAG responds |
| 25 |
with same value that was sent to it. |
| 26 |
|
| 27 |
Checkmsum: CRC16, |
| 28 |
"initial: 0xFFFF |
| 29 |
poly: 0x1021 |
| 30 |
mode: reflect input, reflect remainder |
| 31 |
The CRC is calculated over all bytes(including 0x1B), byte order is LSB, MSB" |
| 32 |
^^ Thanks to "springbob" on AVRFreaks for this! |
| 33 |
|
| 34 |
|
| 35 |
--------DATA SENT TO JTAG----------- |
| 36 |
|
| 37 |
COMMANDS |
| 38 |
00 01 00 00 00 0E 01: Sync |
| 39 |
|
| 40 |
00 01 00 00 00 0E 13: Erase Device |
| 41 |
00 01 00 00 00 0E 14: Enter Programming Mode |
| 42 |
00 01 00 00 00 0E 15: Leave Programming Mode |
| 43 |
|
| 44 |
--------RESPONSES FROM JTAG--------- |
| 45 |
|
| 46 |
00 1C 00 00 00 0E 86 01 FF s1L s1h 00 FF s2L s2H 00 00: Sync response including versin info |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
00 01 00 00 00 0E 80: OK |