1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-29 18:52:13 +01:00

Merge branch 'new-extension' of https://github.com/arduino/Arduino into new-extension

Conflicts:
	build/linux/dist/tools/avrdude.conf
This commit is contained in:
Zach Eveland 2011-09-08 20:26:47 -04:00
commit 94879d3ac6
27 changed files with 4942 additions and 358 deletions

View File

@ -176,14 +176,17 @@ public class AvrdudeUploader extends Uploader {
public boolean avrdude(Collection params) throws RunnerException {
List commandDownloader = new ArrayList();
commandDownloader.add("avrdude");
// Point avrdude at its config file since it's in a non-standard location.
if (Base.isLinux()) {
// ???: is it better to have Linux users install avrdude themselves, in
// a way that it can find its own configuration file?
commandDownloader.add("-C" + Base.getHardwarePath() + "/tools/avrdude.conf");
} else {
if(Base.isLinux()) {
if ((new File(Base.getHardwarePath() + "/tools/" + "avrdude")).exists()) {
commandDownloader.add(Base.getHardwarePath() + "/tools/" + "avrdude");
commandDownloader.add("-C" + Base.getHardwarePath() + "/tools/avrdude.conf");
} else {
commandDownloader.add("avrdude");
}
}
else {
commandDownloader.add(Base.getHardwarePath() + "/tools/avr/bin/" + "avrdude");
commandDownloader.add("-C" + Base.getHardwarePath() + "/tools/avr/etc/avrdude.conf");
}

View File

@ -380,28 +380,60 @@ public class Compiler implements MessageConsumer {
// }
if (pieces != null) {
RunnerException e = sketch.placeException(pieces[3], pieces[1], PApplet.parseInt(pieces[2]) - 1);
String error = pieces[3], msg = "";
if (pieces[3].trim().equals("SPI.h: No such file or directory")) {
error = "Please import the SPI library from the Sketch > Import Library menu.";
msg = "\nAs of Arduino 0019, the Ethernet library depends on the SPI library." +
"\nYou appear to be using it or another library that depends on the SPI library.\n\n";
}
if (pieces[3].trim().equals("'BYTE' was not declared in this scope")) {
error = "The 'BYTE' keyword is no longer supported.";
msg = "\nAs of Arduino 1.0, the 'BYTE' keyword is no longer supported." +
"\nPlease use Serial.write() instead.\n\n";
}
if (pieces[3].trim().equals("no matching function for call to 'Server::Server(int)'")) {
error = "The Server class has been renamed EthernetServer.";
msg = "\nAs of Arduino 1.0, the Server class in the Ethernet library " +
"has been renamed to EthernetServer.\n\n";
}
if (pieces[3].trim().equals("no matching function for call to 'Client::Client(byte [4], int)'")) {
error = "The Client class has been renamed EthernetClient.";
msg = "\nAs of Arduino 1.0, the Client class in the Ethernet library " +
"has been renamed to EthernetClient.\n\n";
}
if (pieces[3].trim().equals("'Udp' was not declared in this scope")) {
error = "The Udp class has been renamed EthernetUdp.";
msg = "\nAs of Arduino 1.0, the Udp class in the Ethernet library " +
"has been renamed to EthernetClient.\n\n";
}
if (pieces[3].trim().equals("'class TwoWire' has no member named 'send'")) {
error = "Wire.send() has been renamed Wire.write().";
msg = "\nAs of Arduino 1.0, the Wire.send() function was renamed " +
"to Wire.write() for consistency with other libraries.\n\n";
}
if (pieces[3].trim().equals("'class TwoWire' has no member named 'receive'")) {
error = "Wire.receive() has been renamed Wire.read().";
msg = "\nAs of Arduino 1.0, the Wire.receive() function was renamed " +
"to Wire.read() for consistency with other libraries.\n\n";
}
RunnerException e = sketch.placeException(error, pieces[1], PApplet.parseInt(pieces[2]) - 1);
// replace full file path with the name of the sketch tab (unless we're
// in verbose mode, in which case don't modify the compiler output)
if (e != null && !verbose) {
SketchCode code = sketch.getCode(e.getCodeIndex());
String fileName = code.isExtension(sketch.getDefaultExtension()) ? code.getPrettyName() : code.getFileName();
s = fileName + ":" + e.getCodeLine() + ": error: " + e.getMessage();
s = fileName + ":" + e.getCodeLine() + ": error: " + pieces[3] + msg;
}
if (pieces[3].trim().equals("SPI.h: No such file or directory")) {
e = new RunnerException("Please import the SPI library from the Sketch > Import Library menu.");
s += "\nAs of Arduino 0019, the Ethernet library depends on the SPI library." +
"\nYou appear to be using it or another library that depends on the SPI library.";
}
if (pieces[3].trim().equals("'BYTE' was not declared in this scope")) {
e = new RunnerException("The 'BYTE' keyword is no longer supported.");
s += "\nAs of Arduino 1.0, the 'BYTE' keyword is no longer supported." +
"\nPlease use Serial.write() instead.";
}
if (exception == null && e != null) {
exception = e;
exception.hideStackTrace();

View File

@ -114,17 +114,6 @@ public abstract class Uploader implements MessageConsumer {
String[] commandArray = new String[commandDownloader.size()];
commandDownloader.toArray(commandArray);
String avrBasePath;
if(Base.isLinux()) {
avrBasePath = new String(Base.getHardwarePath() + "/tools/");
}
else {
avrBasePath = new String(Base.getHardwarePath() + "/tools/avr/bin/");
}
commandArray[0] = avrBasePath + commandArray[0];
if (verbose || Preferences.getBoolean("upload.verbose")) {
for(int i = 0; i < commandArray.length; i++) {
System.out.print(commandArray[i] + " ");

Binary file not shown.

View File

@ -1,4 +1,4 @@
# $Id: avrdude.conf.in,v 1.122 2007/05/16 21:29:36 joerg_wunsch Exp $
# $Id: avrdude.conf.in 991 2011-08-26 20:50:32Z joerg_wunsch $ -*- text -*-
#
# AVRDUDE Configuration File
#
@ -16,10 +16,12 @@
# id = <id1> [, <id2> [, <id3>] ...] ; # <idN> are quoted strings
# desc = <description> ; # quoted string
# type = par | stk500 | stk500v2 | stk500pp | stk500hvsp | stk500generic |
# stk600 | stk600pp | stk600hvsp |
# avr910 | butterfly | usbasp |
# jtagmki | jtagmkii | jtagmkii_isp | jtagmkii_dw |
# jtagmkII_avr32 | jtagmkii_pdi |
# dragon_dw | dragon_jtag | dragon_isp | dragon_pp |
# dragon_hvsp; # programmer type
# dragon_hvsp | dragon_pdi | arduino | wiring; # programmer type
# baudrate = <num> ; # baudrate for avr910-programmer
# vcc = <num1> [, <num2> ... ] ; # pin number(s)
# reset = <num> ; # pin number
@ -30,6 +32,14 @@
# rdyled = <num> ; # pin number
# pgmled = <num> ; # pin number
# vfyled = <num> ; # pin number
# usbvid = <hexnum>; # USB VID (Vendor ID)
# usbpid = <hexnum>; # USB PID (Product ID)
# usbdev = <interface>; # USB interface or other device info
# usbvendor = <vendorname>; # USB Vendor Name
# usbproduct = <productname>; # USB Product Name
# usbsn = <serialno>; # USB Serial Number
#
# To invert a bit, use = ~ <num>, the spaces are important.
# ;
#
# part
@ -37,6 +47,8 @@
# desc = <description> ; # quoted string
# has_jtag = <yes/no> ; # part has JTAG i/f
# has_debugwire = <yes/no> ; # part has debugWire i/f
# has_pdi = <yes/no> ; # part has PDI i/f
# has_tpi = <yes/no> ; # part has TPI i/f
# devicecode = <num> ; # deprecated, use stk500_devcode
# stk500_devcode = <num> ; # numeric
# avr910_devcode = <num> ; # numeric
@ -96,6 +108,7 @@
# spmcr = <num> ; # mem addr of SPMC[S]R reg.
# eecr = <num> ; # mem addr of EECR reg.
# # (only when != 0x3c)
# is_avr32 = <yes/no> ; # AVR32 part
#
# memory <memtype>
# paged = <yes/no> ; # yes / no
@ -182,7 +195,7 @@
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
#
#define ATTINY10 0x10
#define ATTINY10 0x10 /* the _old_ one that never existed! */
#define ATTINY11 0x11
#define ATTINY12 0x12
#define ATTINY15 0x13
@ -229,6 +242,8 @@
#define ATMEGA103 0xB1
#define ATMEGA128 0xB2
#define AT90CAN128 0xB3
#define AT90CAN64 0xB3
#define AT90CAN32 0xB3
#define AT86RF401 0xD0
@ -301,12 +316,118 @@
#
default_parallel = "/dev/parport0";
default_serial = "/dev/ttyS0";
# default_bitclock = 2.5
#
# PROGRAMMER DEFINITIONS
#
# http://wiring.org.co/
# Basically STK500v2 protocol, with some glue to trigger the
# bootloader.
programmer
id = "wiring";
desc = "Wiring";
type = wiring;
;
programmer
id = "arduino";
desc = "Arduino";
type = arduino;
;
# this will interface with the chips on these programmers:
#
# http://real.kiev.ua/old/avreal/en/adapters
# http://www.amontec.com/jtagkey.shtml, jtagkey-tiny.shtml
# http://www.olimex.com/dev/arm-usb-ocd.html, arm-usb-tiny.html
# http://www.ethernut.de/en/hardware/turtelizer/index.html
# http://elk.informatik.fh-augsburg.de/hhweb/doc/openocd/usbjtag/usbjtag.html
# http://dangerousprototypes.com/docs/FT2232_breakout_board
# http://www.ftdichip.com/Products/Modules/DLPModules.htm,DLP-2232*,DLP-USB1232H
# http://flashrom.org/FT2232SPI_Programmer
#
# The drivers will look for a specific device and use the first one found.
# If you have mulitple devices, then look for unique information (like SN)
# And fill that in here.
programmer
id = "avrftdi";
desc = "FT2232D based generic programmer";
type = avrftdi;
usbvid = 0x0403;
usbpid = 0x6010;
usbvendor = "";
usbproduct = "";
usbdev = "A";
usbsn = "";
#ISP-signals - lower ACBUS-Nibble (default)
reset = 4;
sck = 1;
mosi = 2;
miso = 3;
#LED SIGNALs - higher ACBUS-Nibble
# errled = 5;
# rdyled = 6;
# pgmled = 7;
# vfyled = 8;
#Buffer Signal - ADBUS - Nibble
# buff = 9;
;
# This is an implementation of the above with a buffer IC (74AC244) and
# 4 LEDs directly attached, active low. The buff and reset pins are
# understood (by avrdude) to be active low, so there's no
# need to invert the bits.
programmer
id = "2232HIO";
desc = "FT2232H based generic programmer";
type = avrftdi;
usbvid = 0x0403;
# Note: This PID is reserved for generic H devices and
# should be programmed into the EEPROM
# usbpid = 0x8A48;
usbpid = 0x6010;
usbdev = "A";
usbvendor = "";
usbproduct = "";
usbsn = "";
#ISP-signals
reset = 4;
sck = 1;
mosi = 2;
miso = 3;
buff = 5;
#LED SIGNALs
errled = ~ 12;
rdyled = ~ 15;
pgmled = ~ 14;
vfyled = ~ 13;
;
programmer
id = "jtagkey";
desc = "Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2";
type = avrftdi;
usbvid = 0x0403;
# Note: This PID is used in all JTAGKey variants
usbpid = 0xCFF8;
usbdev = "A";
usbvendor = "";
usbproduct = "";
usbsn = "";
#ISP-signals => 20 - Pin connector on JTAGKey
reset = 4; # TMS 7 violet
sck = 1; # TCK 9 white
mosi = 2; # TDI 5 green
miso = 3; # TDO 13 orange
buff = 5;
# VTG VREF 1 brown with red tip
# GND GND 20 black
# The colors are on the 20 pin breakout cable
# from Amontec
;
programmer
id = "avrisp";
desc = "Atmel AVR ISP";
@ -331,6 +452,12 @@ programmer
type = stk500v2;
;
programmer
id = "buspirate";
desc = "The Bus Pirate";
type = buspirate;
;
# This is supposed to be the "default" STK500 entry.
# Attempts to select the correct firmware version
# by probing for it. Better use one of the entries
@ -347,6 +474,12 @@ programmer
type = stk500;
;
programmer
id = "mib510";
desc = "Crossbow MIB510 programming board";
type = stk500;
;
programmer
id = "stk500v2";
desc = "Atmel STK500 Version 2.x firmware";
@ -365,6 +498,24 @@ programmer
type = stk500hvsp;
;
programmer
id = "stk600";
desc = "Atmel STK600";
type = stk600;
;
programmer
id = "stk600pp";
desc = "Atmel STK600 in parallel programming mode";
type = stk600pp;
;
programmer
id = "stk600hvsp";
desc = "Atmel STK600 in high-voltage serial programming mode";
type = stk600hvsp;
;
programmer
id = "avr910";
desc = "Atmel Low Cost Serial Programmer";
@ -379,7 +530,7 @@ programmer
programmer
id = "usbtiny";
desc = "USBtiny simple USB programmer";
desc = "USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/";
type = usbtiny;
;
@ -400,6 +551,19 @@ programmer
desc = "Atmel AppNote AVR911 AVROSP";
type = butterfly;
;
# suggested in http://forum.mikrokopter.de/topic-post48317.html
programmer
id = "mkbutterfly";
desc = "Mikrokopter.de Butterfly";
type = butterfly_mk;
;
programmer
id = "butterfly_mk";
desc = "Mikrokopter.de Butterfly";
type = butterfly_mk;
;
programmer
id = "jtagmkI";
@ -471,6 +635,30 @@ programmer
type = jtagmkii_dw;
;
# JTAG ICE mkII in AVR32 mode
programmer
id = "jtagmkII_avr32";
desc = "Atmel JTAG ICE mkII im AVR32 mode";
baudrate = 115200;
type = jtagmkii_avr32;
;
# JTAG ICE mkII in AVR32 mode
programmer
id = "jtag2avr32";
desc = "Atmel JTAG ICE mkII im AVR32 mode";
baudrate = 115200;
type = jtagmkii_avr32;
;
# JTAG ICE mkII in PDI mode
programmer
id = "jtag2pdi";
desc = "Atmel JTAG ICE mkII PDI mode";
baudrate = 115200;
type = jtagmkii_pdi;
;
# AVR Dragon in JTAG mode
programmer
id = "dragon_jtag";
@ -511,6 +699,14 @@ programmer
type = dragon_dw;
;
# AVR Dragon in PDI mode
programmer
id = "dragon_pdi";
desc = "Atmel AVR Dragon in PDI mode";
baudrate = 115200;
type = dragon_pdi;
;
programmer
id = "pavr";
desc = "Jason Kyle's pAVR Serial Programmer";
@ -639,7 +835,8 @@ programmer
# From the contributor of the "xil" jtag cable:
# The "vcc" definition isn't really vcc (the cable gets its power from
# the programming circuit) but is necessary to switch one of the
# buffer lines (trying to add it to the "buff" lines doesn't work).
# buffer lines (trying to add it to the "buff" lines doesn't work in
# avrdude versions before 5.5j).
# With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK
# to SCK (plus vcc/gnd of course)
programmer
@ -711,6 +908,18 @@ programmer
pgmled = 8;
;
# The AT98ISP Cable is a simple parallel dongle for AT89 family.
# http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2877
programmer
id = "89isp";
desc = "Atmel at89isp cable";
type = par;
reset = 17;
sck = 1;
mosi = 2;
miso = 10;
;
#
# some ultra cheap programmers use bitbanging on the
@ -783,6 +992,19 @@ programmer
miso = 8;
;
# C2N232i (jumper configuration "auto")
# reset=dtr sck=!rts mosi=!txd miso=!cts
programmer
id = "c2n232i";
desc = "serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts";
type = serbb;
reset = 4;
sck = ~7;
mosi = ~3;
miso = ~8;
;
#
# PART DEFINITIONS
#
@ -1651,6 +1873,37 @@ part
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 0;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 0;
togglevtg = 0;
poweroffdelay = 0;
resetdelayms = 0;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 15;
chiperasepolltimeout = 0;
programfusepulsewidth = 2;
programfusepolltimeout = 0;
programlockpulsewidth = 0;
programlockpolltimeout = 1;
memory "eeprom"
size = 128;
min_write_delay = 9000;
@ -1662,7 +1915,13 @@ part
write = "1 1 0 0 0 0 0 0 x x x x x x x x",
"x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
mode = 0x04;
delay = 12;
blocksize = 128;
readsize = 256;
;
memory "flash"
size = 2048;
min_write_delay = 9000;
@ -1688,7 +1947,13 @@ part
" x x x x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
mode = 0x04;
delay = 12;
blocksize = 128;
readsize = 256;
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 x x x x x x x x",
@ -2973,6 +3238,386 @@ part
;
;
#------------------------------------------------------------
# AT90CAN64
#------------------------------------------------------------
part
id = "c64";
desc = "AT90CAN64";
has_jtag = yes;
stk500_devcode = 0xB3;
# avr910_devcode = 0x43;
signature = 0x1e 0x96 0x81;
chip_erase_delay = 9000;
pagel = 0xD7;
bs2 = 0xA0;
reset = dedicated;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 6;
togglevtg = 0;
poweroffdelay = 0;
resetdelayms = 0;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
idr = 0x31;
spmcr = 0x57;
rampz = 0x3b;
eecr = 0x3f;
allowfullpagebitstream = no;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 8; /* for parallel programming */
size = 2048;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 x x a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 a2 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x a10 a9 a8",
" a7 a6 a5 a4 a3 0 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 8;
readsize = 256;
;
memory "flash"
paged = yes;
size = 65536;
page_size = 256;
num_pages = 256;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 0 x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 x x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 256;
readsize = 256;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 x x x x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# AT90CAN32
#------------------------------------------------------------
part
id = "c32";
desc = "AT90CAN32";
has_jtag = yes;
stk500_devcode = 0xB3;
# avr910_devcode = 0x43;
signature = 0x1e 0x95 0x81;
chip_erase_delay = 9000;
pagel = 0xD7;
bs2 = 0xA0;
reset = dedicated;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 6;
togglevtg = 0;
poweroffdelay = 0;
resetdelayms = 0;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
idr = 0x31;
spmcr = 0x57;
rampz = 0x3b;
eecr = 0x3f;
allowfullpagebitstream = no;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 8; /* for parallel programming */
size = 1024;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 a2 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x a9 a8",
" a7 a6 a5 a4 a3 0 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 8;
readsize = 256;
;
memory "flash"
paged = yes;
size = 32768;
page_size = 256;
num_pages = 128;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 0 x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 x x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 256;
readsize = 256;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 x x x x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega16
@ -3160,8 +3805,7 @@ part
id = "m164p";
desc = "ATMEGA164P";
has_jtag = yes;
# stk500_devcode = 0x82; # no STK500v1 support
# avr910_devcode = 0x?; # try the ATmega16 one:^
stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
avr910_devcode = 0x74;
signature = 0x1e 0x94 0x0a;
pagel = 0xd7;
@ -3352,8 +3996,7 @@ part
id = "m324p";
desc = "ATMEGA324P";
has_jtag = yes;
# stk500_devcode = 0x82; # no STK500v1 support
# avr910_devcode = 0x?; # try the ATmega16 one:^
stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
avr910_devcode = 0x74;
signature = 0x1e 0x95 0x08;
pagel = 0xd7;
@ -3534,6 +4177,197 @@ part
;
#------------------------------------------------------------
# ATmega324PA
#------------------------------------------------------------
# similar to ATmega324P
part
id = "m324pa";
desc = "ATmega324PA";
has_jtag = yes;
stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
avr910_devcode = 0x74;
signature = 0x1e 0x95 0x11;
pagel = 0xd7;
bs2 = 0xa0;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 0;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
idr = 0x31;
spmcr = 0x57;
allowfullpagebitstream = no;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 4; /* for parallel programming */
size = 1024;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" 0 0 x x x a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 x x x a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x a10 a9 a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 10;
blocksize = 128;
readsize = 256;
;
memory "flash"
paged = yes;
size = 32768;
page_size = 128;
num_pages = 256;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" 0 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
" 0 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" 0 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x21;
delay = 6;
blocksize = 256;
readsize = 256;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lfuse"
size = 1;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x 1 1 1 1 1 i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 x x x x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega644
#------------------------------------------------------------
@ -3544,8 +4378,7 @@ part
id = "m644";
desc = "ATMEGA644";
has_jtag = yes;
# stk500_devcode = 0x82; # no STK500v1 support
# avr910_devcode = 0x?; # try the ATmega16 one:^
stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
avr910_devcode = 0x74;
signature = 0x1e 0x96 0x09;
pagel = 0xd7;
@ -3735,8 +4568,7 @@ part
id = "m644p";
desc = "ATMEGA644P";
has_jtag = yes;
# stk500_devcode = 0x82; # no STK500v1 support
# avr910_devcode = 0x?; # try the ATmega16 one:^
stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
avr910_devcode = 0x74;
signature = 0x1e 0x96 0x0a;
pagel = 0xd7;
@ -3918,6 +4750,198 @@ part
#------------------------------------------------------------
# ATmega1284P
#------------------------------------------------------------
# similar to ATmega164p
part
id = "m1284p";
desc = "ATMEGA1284P";
has_jtag = yes;
stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
avr910_devcode = 0x74;
signature = 0x1e 0x97 0x05;
pagel = 0xd7;
bs2 = 0xa0;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 6;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
idr = 0x31;
spmcr = 0x57;
allowfullpagebitstream = no;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 8; /* for parallel programming */
size = 4096;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" 0 0 x x a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 x x a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 a2 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x a11 a10 a9 a8",
" a7 a6 a5 a4 a3 0 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 10;
blocksize = 128;
readsize = 256;
;
memory "flash"
paged = yes;
size = 131072;
page_size = 256;
num_pages = 512;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 x x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 x x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 x x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 10;
blocksize = 256;
readsize = 256;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lfuse"
size = 1;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x 1 1 1 1 1 i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 x x x x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega162
#------------------------------------------------------------
@ -4133,6 +5157,17 @@ part
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 0;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
@ -4167,8 +5202,12 @@ part
write = " 1 1 0 0 0 0 0 0",
" x x x x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
@ -4205,8 +5244,8 @@ part
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
mode = 0x11;
delay = 20;
blocksize = 128;
readsize = 256;
;
@ -4620,6 +5659,190 @@ part
;
;
#------------------------------------------------------------
# ATmega329P
#------------------------------------------------------------
# Identical to ATmega329 except of the signature
part
id = "m329p";
desc = "ATMEGA329P";
has_jtag = yes;
# stk500_devcode = 0x85; # no STK500 support, only STK500v2
# avr910_devcode = 0x?; # try the ATmega169 one:
avr910_devcode = 0x75;
signature = 0x1e 0x95 0x0b;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
idr = 0x31;
spmcr = 0x57;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 4; /* for parallel programming */
size = 1024;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" x x x x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" x x x x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x a9 a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 8;
readsize = 256;
;
memory "flash"
paged = yes;
size = 32768;
page_size = 128;
num_pages = 256;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" x a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
" x a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" x x x a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 256;
readsize = 256;
;
memory "lfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "hfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "efuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x i i i";
;
memory "lock"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega3290
#------------------------------------------------------------
@ -4805,6 +6028,191 @@ part
;
;
#------------------------------------------------------------
# ATmega3290P
#------------------------------------------------------------
# identical to ATmega3290 except of the signature
part
id = "m3290p";
desc = "ATMEGA3290P";
has_jtag = yes;
# stk500_devcode = 0x85; # no STK500 support, only STK500v2
# avr910_devcode = 0x?; # try the ATmega169 one:
avr910_devcode = 0x75;
signature = 0x1e 0x95 0x0c;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
idr = 0x31;
spmcr = 0x57;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 4; /* for parallel programming */
size = 1024;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" x x x x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" x x x x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x a9 a8",
" a7 a6 a5 a4 a3 a3 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 8;
readsize = 256;
;
memory "flash"
paged = yes;
size = 32768;
page_size = 128;
num_pages = 256;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" x a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
" x a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" x x x a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 256;
readsize = 256;
;
memory "lfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "hfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "efuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x i i i";
;
memory "lock"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega649
#------------------------------------------------------------
@ -5551,6 +6959,7 @@ part
memory "eeprom"
size = 512;
page_size = 4;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0xff;
@ -5723,7 +7132,7 @@ part
" i i i i i i i i";
mode = 0x04;
delay = 10;
delay = 20;
blocksize = 128;
readsize = 256;
;
@ -5883,7 +7292,7 @@ part
" i i i i i i i i";
mode = 0x04;
delay = 10;
delay = 20;
blocksize = 128;
readsize = 256;
;
@ -6782,7 +8191,7 @@ part
" x x x x x x x x";
mode = 0x41;
delay = 5;
delay = 20;
blocksize = 4;
readsize = 256;
;
@ -6969,7 +8378,7 @@ part
" x x x x x x x x";
mode = 0x41;
delay = 5;
delay = 20;
blocksize = 4;
readsize = 256;
;
@ -7070,6 +8479,193 @@ part
;
;
#------------------------------------------------------------
# ATmega88P
#------------------------------------------------------------
part
id = "m88p";
desc = "ATMEGA88P";
has_debugwire = yes;
flash_instr = 0xB6, 0x01, 0x11;
eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
0x99, 0xF9, 0xBB, 0xAF;
stk500_devcode = 0x73;
# avr910_devcode = 0x;
signature = 0x1e 0x93 0x0f;
pagel = 0xd7;
bs2 = 0xc2;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
resetdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no;
page_size = 4;
size = 512;
min_write_delay = 3600;
max_write_delay = 3600;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x x a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 8192;
page_size = 64;
num_pages = 128;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x x x a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 0 x x x x x",
" x x x a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 64;
readsize = 256;
;
memory "lfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "hfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "efuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x x x x x x o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x i i i";
;
memory "lock"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega168
#------------------------------------------------------------
@ -7155,7 +8751,7 @@ part
" x x x x x x x x";
mode = 0x41;
delay = 5;
delay = 20;
blocksize = 4;
readsize = 256;
;
@ -7259,379 +8855,566 @@ part
;
#------------------------------------------------------------
# ATmega328
# ATmega168P
#------------------------------------------------------------
part
id = "m328p";
desc = "ATMEGA328P";
id = "m168p";
desc = "ATMEGA168P";
has_debugwire = yes;
flash_instr = 0xB6, 0x01, 0x11;
eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
0x99, 0xF9, 0xBB, 0xAF;
stk500_devcode = 0x86;
# avr910_devcode = 0x;
signature = 0x1e 0x95 0x0F;
signature = 0x1e 0x94 0x0b;
pagel = 0xd7;
bs2 = 0xc2;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
resetdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no;
page_size = 4;
size = 1024;
size = 512;
min_write_delay = 3600;
max_write_delay = 3600;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 x x x a9 a8",
" 0 0 0 x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x x a9 a8",
" 0 0 0 x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x a9 a8",
" 0 0 x x x x x a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 5;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 32768;
size = 16384;
page_size = 128;
num_pages = 256;
num_pages = 128;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" 0 0 a13 a12 a11 a10 a9 a8",
" 0 0 0 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
" 0 0 a13 a12 a11 a10 a9 a8",
" 0 0 0 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 0 x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" 0 0 a13 a12 a11 a10 a9 a8",
" 0 0 0 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 128;
readsize = 256;
;
memory "lfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "hfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "efuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x x x x x x o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x i i i";
;
memory "lock"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATtiny88
#------------------------------------------------------------
part
id = "t88";
desc = "attiny88";
has_debugwire = yes;
flash_instr = 0xB6, 0x01, 0x11;
eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
0x99, 0xF9, 0xBB, 0xAF;
stk500_devcode = 0x73;
# avr910_devcode = 0x;
signature = 0x1e 0x93 0x11;
pagel = 0xd7;
bs2 = 0xc2;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
resetdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no;
page_size = 4;
size = 64;
min_write_delay = 3600;
max_write_delay = 3600;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x x x",
" x a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 64;
;
memory "flash"
paged = yes;
size = 8192;
page_size = 64;
num_pages = 128;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x x x a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 0 x x x x x",
" x x x a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 64;
readsize = 256;
;
memory "lfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "hfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "efuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x x x x x x o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x x x i";
;
memory "lock"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega328P
#------------------------------------------------------------
part
id = "m328p";
desc = "ATMEGA328P";
has_debugwire = yes;
flash_instr = 0xB6, 0x01, 0x11;
eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
0x99, 0xF9, 0xBB, 0xAF;
stk500_devcode = 0x86;
# avr910_devcode = 0x;
signature = 0x1e 0x95 0x0F;
pagel = 0xd7;
bs2 = 0xc2;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
resetdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no;
page_size = 4;
size = 1024;
min_write_delay = 3600;
max_write_delay = 3600;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x x a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x a9 a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 32768;
page_size = 128;
num_pages = 256;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" 0 0 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
" 0 0 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 0 x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" 0 0 a13 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 128;
readsize = 256;
;
memory "lfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "hfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
;
memory "efuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x x x x x x o o o";
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x i i i";
;
memory "lock"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATtiny2313
@ -7820,6 +9603,188 @@ part
;
;
#------------------------------------------------------------
# ATtiny4313
#------------------------------------------------------------
part
id = "t4313";
desc = "ATtiny4313";
has_debugwire = yes;
flash_instr = 0xB2, 0x0F, 0x1F;
eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
0x99, 0xE1, 0xBB, 0xAC;
stk500_devcode = 0x23;
## Use the ATtiny26 devcode:
avr910_devcode = 0x5e;
signature = 0x1e 0x92 0x0d;
pagel = 0xD4;
bs2 = 0xD6;
reset = io;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
size = 256;
paged = no;
page_size = 4;
min_write_delay = 4000;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
"a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
"a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x x x x x",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 4096;
page_size = 64;
num_pages = 64;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" 0 0 0 0 0 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
" 0 0 0 0 0 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x x x a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 0 x x x x x",
" x x x a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" 0 0 0 0 0 a10 a9 a8",
" a7 a6 a5 x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 32;
readsize = 256;
;
# ATtiny4313 has Signature Bytes: 0x1E 0x92 0x0D.
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
memory "lock"
size = 1;
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x x x i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 2;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# AT90PWM2
#------------------------------------------------------------
@ -8980,7 +10945,7 @@ part
"a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
"a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
"a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
@ -10042,6 +12007,195 @@ part
;
;
#------------------------------------------------------------
# ATmega128RFA1
#------------------------------------------------------------
# Identical to ATmega2561 but half the ROM
part
id = "m128rfa1";
desc = "ATMEGA128RFA1";
signature = 0x1e 0xa7 0x01;
has_jtag = yes;
# stk500_devcode = 0xB2;
# avr910_devcode = 0x43;
chip_erase_delay = 55000;
pagel = 0xD7;
bs2 = 0xE2;
reset = dedicated;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
"x x x x x x x x x x x x x x x x";
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
idr = 0x31;
spmcr = 0x57;
rampz = 0x3b;
allowfullpagebitstream = no;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 8; /* for parallel programming */
size = 4096;
min_write_delay = 50000;
max_write_delay = 50000;
readback_p1 = 0x00;
readback_p2 = 0x00;
read = " 1 0 1 0 0 0 0 0",
" x x x x a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" x x x x a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 a2 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 x x a11 a10 a9 a8",
" a7 a6 a5 a4 a3 0 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 10;
blocksize = 8;
readsize = 256;
;
memory "flash"
paged = yes;
size = 131072;
page_size = 256;
num_pages = 512;
min_write_delay = 50000;
max_write_delay = 50000;
readback_p1 = 0x00;
readback_p2 = 0x00;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" x x x x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" x x x x x x x x",
" x a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 x x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 256;
readsize = 256;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 x x x x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 x x x x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATtiny24
#------------------------------------------------------------
@ -10476,7 +12630,7 @@ part
"a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
"a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
"a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
@ -10775,7 +12929,7 @@ part
read = "0 0 1 1 0 0 0 0 x x x x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
;
#------------------------------------------------------------
# AT90USB646
@ -10784,8 +12938,7 @@ part
part
id = "usb646";
desc = "AT90USB646";
# signature = 0x1e 0x96 0x82; ?
signature = 0x1e 0x97 0x82;
signature = 0x1e 0x96 0x82;
has_jtag = yes;
# stk500_devcode = 0xB2;
# avr910_devcode = 0x43;
@ -10974,8 +13127,7 @@ part
part
id = "usb647";
desc = "AT90USB647";
# signature = 0x1e 0x96 0x82; ?
signature = 0x1e 0x97 0x82;
signature = 0x1e 0x96 0x82;
has_jtag = yes;
# stk500_devcode = 0xB2;
# avr910_devcode = 0x43;
@ -11533,6 +13685,926 @@ part
;
;
#------------------------------------------------------------
# AT90USB162
#------------------------------------------------------------
part
id = "usb162";
desc = "AT90USB162";
has_jtag = no;
has_debugwire = yes;
signature = 0x1e 0x94 0x82;
chip_erase_delay = 9000;
reset = io;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
pagel = 0xD7;
bs2 = 0xC6;
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 4; /* for parallel programming */
size = 512;
num_pages = 128;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0x00;
readback_p2 = 0x00;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 16384;
page_size = 128;
num_pages = 128;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0x00;
readback_p2 = 0x00;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 128;
readsize = 256;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# AT90USB82
#------------------------------------------------------------
# Changes against AT90USB162 (beside IDs)
# memory "flash"
# size = 8192;
# num_pages = 64;
part
id = "usb82";
desc = "AT90USB82";
has_jtag = no;
has_debugwire = yes;
signature = 0x1e 0x93 0x82;
chip_erase_delay = 9000;
reset = io;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
pagel = 0xD7;
bs2 = 0xC6;
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 4; /* for parallel programming */
size = 512;
num_pages = 128;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0x00;
readback_p2 = 0x00;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 8192;
page_size = 128;
num_pages = 64;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0x00;
readback_p2 = 0x00;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 128;
readsize = 256;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega32U2
#------------------------------------------------------------
# Changes against AT90USB162 (beside IDs)
# memory "flash"
# size = 32768;
# num_pages = 256;
# memory "eeprom"
# size = 1024;
# num_pages = 256;
part
id = "m32u2";
desc = "ATmega32U2";
has_jtag = no;
has_debugwire = yes;
signature = 0x1e 0x95 0x8a;
chip_erase_delay = 9000;
reset = io;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
pagel = 0xD7;
bs2 = 0xC6;
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 4; /* for parallel programming */
size = 1024;
num_pages = 256;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0x00;
readback_p2 = 0x00;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 32768;
page_size = 128;
num_pages = 256;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0x00;
readback_p2 = 0x00;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 128;
readsize = 256;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega16U2
#------------------------------------------------------------
# Changes against ATmega32U2 (beside IDs)
# memory "flash"
# size = 16384;
# num_pages = 128;
# memory "eeprom"
# size = 512;
# num_pages = 128;
part
id = "m16u2";
desc = "ATmega16U2";
has_jtag = no;
has_debugwire = yes;
signature = 0x1e 0x94 0x89;
chip_erase_delay = 9000;
reset = io;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
pagel = 0xD7;
bs2 = 0xC6;
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 4; /* for parallel programming */
size = 512;
num_pages = 128;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0x00;
readback_p2 = 0x00;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 16384;
page_size = 128;
num_pages = 128;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0x00;
readback_p2 = 0x00;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 128;
readsize = 256;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega8U2
#------------------------------------------------------------
# Changes against ATmega16U2 (beside IDs)
# memory "flash"
# size = 8192;
# page_size = 64;
# blocksize = 64;
part
id = "m8u2";
desc = "ATmega8U2";
has_jtag = no;
has_debugwire = yes;
signature = 0x1e 0x93 0x89;
chip_erase_delay = 9000;
reset = io;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
pagel = 0xD7;
bs2 = 0xC6;
timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 1;
pp_controlstack =
0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
hventerstabdelay = 100;
progmodedelay = 0;
latchcycles = 5;
togglevtg = 1;
poweroffdelay = 15;
resetdelayms = 1;
resetdelayus = 0;
hvleavestabdelay = 15;
chiperasepulsewidth = 0;
chiperasepolltimeout = 10;
programfusepulsewidth = 0;
programfusepolltimeout = 5;
programlockpulsewidth = 0;
programlockpolltimeout = 5;
memory "eeprom"
paged = no; /* leave this "no" */
page_size = 4; /* for parallel programming */
size = 512;
num_pages = 128;
min_write_delay = 9000;
max_write_delay = 9000;
readback_p1 = 0x00;
readback_p2 = 0x00;
read = " 1 0 1 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
write = " 1 1 0 0 0 0 0 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_lo = " 1 1 0 0 0 0 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 a1 a0",
" i i i i i i i i";
writepage = " 1 1 0 0 0 0 1 0",
" 0 0 0 0 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 0 0",
" x x x x x x x x";
mode = 0x41;
delay = 20;
blocksize = 4;
readsize = 256;
;
memory "flash"
paged = yes;
size = 8192;
page_size = 64;
num_pages = 128;
min_write_delay = 4500;
max_write_delay = 4500;
readback_p1 = 0x00;
readback_p2 = 0x00;
read_lo = " 0 0 1 0 0 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
read_hi = " 0 0 1 0 1 0 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";
loadpage_lo = " 0 1 0 0 0 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
loadpage_hi = " 0 1 0 0 1 0 0 0",
" x x x x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
"a15 a14 a13 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
mode = 0x41;
delay = 6;
blocksize = 64;
readsize = 256;
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
min_write_delay = 9000;
max_write_delay = 9000;
;
memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
"x x x x x x a1 a0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATmega325
#------------------------------------------------------------
@ -12288,3 +15360,1560 @@ part
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
;
#------------------------------------------------------------
# ATXMEGA64A1
#------------------------------------------------------------
part
id = "x64a1";
desc = "ATXMEGA64A1";
signature = 0x1e 0x96 0x4e;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00010000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00001000;
offset = 0x0080f000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00001000;
offset = 0x00810000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00011000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA128A1
#------------------------------------------------------------
part
id = "x128a1";
desc = "ATXMEGA128A1";
signature = 0x1e 0x97 0x4c;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00020000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0081e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00820000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00022000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA128A1REVD
#------------------------------------------------------------
part
id = "x128a1d";
desc = "ATXMEGA128A1REVD";
signature = 0x1e 0x97 0x41;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00020000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0081e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00820000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00022000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA192A1
#------------------------------------------------------------
part
id = "x192a1";
desc = "ATXMEGA192A1";
signature = 0x1e 0x97 0x4e;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00030000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0082e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00830000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00032000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA256A1
#------------------------------------------------------------
part
id = "x256a1";
desc = "ATXMEGA256A1";
signature = 0x1e 0x98 0x46;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x1000;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00040000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0083e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00840000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00042000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA64A3
#------------------------------------------------------------
part
id = "x64a3";
desc = "ATXMEGA64A3";
signature = 0x1e 0x96 0x42;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00010000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00001000;
offset = 0x0080f000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00001000;
offset = 0x00810000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00011000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA128A3
#------------------------------------------------------------
part
id = "x128a3";
desc = "ATXMEGA128A3";
signature = 0x1e 0x97 0x42;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00020000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0081e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00820000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00022000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA192A3
#------------------------------------------------------------
part
id = "x192a3";
desc = "ATXMEGA192A3";
signature = 0x1e 0x97 0x44;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00030000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0082e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00830000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00032000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA256A3
#------------------------------------------------------------
part
id = "x256a3";
desc = "ATXMEGA256A3";
signature = 0x1e 0x98 0x42;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x1000;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00040000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0083e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00840000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00042000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA256A3B
#------------------------------------------------------------
part
id = "x256a3b";
desc = "ATXMEGA256A3B";
signature = 0x1e 0x98 0x43;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x1000;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00040000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0083e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00840000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00042000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA16A4
#------------------------------------------------------------
part
id = "x16a4";
desc = "ATXMEGA16A4";
signature = 0x1e 0x94 0x41;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0400;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00004000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00001000;
offset = 0x00803000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00001000;
offset = 0x00804000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00005000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA32A4
#------------------------------------------------------------
part
id = "x32a4";
desc = "ATXMEGA32A4";
signature = 0x1e 0x95 0x41;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0400;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00008000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00001000;
offset = 0x00807000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00001000;
offset = 0x00808000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00009000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA64A4
#------------------------------------------------------------
part
id = "x64a4";
desc = "ATXMEGA64A4";
signature = 0x1e 0x96 0x46;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00010000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00001000;
offset = 0x0080f000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00001000;
offset = 0x00810000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00011000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# ATXMEGA128A4
#------------------------------------------------------------
part
id = "x128a4";
desc = "ATXMEGA128A4";
signature = 0x1e 0x97 0x46;
has_jtag = yes;
has_pdi = yes;
nvm_base = 0x01c0;
memory "eeprom"
size = 0x0800;
offset = 0x08c0000;
page_size = 0x20;
readsize = 0x100;
;
memory "application"
size = 0x00020000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "apptable"
size = 0x00002000;
offset = 0x0081e000;
page_size = 0x100;
readsize = 0x100;
;
memory "boot"
size = 0x00002000;
offset = 0x00820000;
page_size = 0x100;
readsize = 0x100;
;
memory "flash"
size = 0x00022000;
offset = 0x0800000;
page_size = 0x100;
readsize = 0x100;
;
memory "prodsig"
size = 0x200;
offset = 0x8e0200;
page_size = 0x100;
readsize = 0x100;
;
memory "usersig"
size = 0x200;
offset = 0x8e0400;
page_size = 0x100;
readsize = 0x100;
;
memory "signature"
size = 3;
offset = 0x1000090;
;
memory "fuse0"
size = 1;
offset = 0x8f0020;
;
memory "fuse1"
size = 1;
offset = 0x8f0021;
;
memory "fuse2"
size = 1;
offset = 0x8f0022;
;
memory "fuse4"
size = 1;
offset = 0x8f0024;
;
memory "fuse5"
size = 1;
offset = 0x8f0025;
;
memory "lock"
size = 1;
offset = 0x8f0027;
;
;
#------------------------------------------------------------
# AVR32UC3A0512
#------------------------------------------------------------
part
id = "ucr2";
desc = "32UC3A0512";
signature = 0xED 0xC0 0x3F;
has_jtag = yes;
is_avr32 = yes;
memory "flash"
paged = yes;
page_size = 512; # bytes
readsize = 512; # bytes
num_pages = 1024; # could be set dynamicly
size = 0x00080000; # could be set dynamicly
offset = 0x80000000;
;
;
#------------------------------------------------------------
# ATtiny4
#------------------------------------------------------------
part
id = "t4";
desc = "ATtiny4";
signature = 0x1e 0x8f 0x0a;
has_tpi = yes;
memory "flash"
size = 512;
offset = 0x4000;
page_size = 16;
blocksize = 128;
;
memory "signature"
size = 3;
offset = 0x3fc0;
page_size = 16;
;
memory "fuse"
size = 1;
offset = 0x3f40;
page_size = 16;
blocksize = 4;
;
memory "calibration"
size = 1;
offset = 0x3f80;
page_size = 16;
;
memory "lockbits"
size = 1;
offset = 0x3f00;
page_size = 16;
;
;
#------------------------------------------------------------
# ATtiny5
#------------------------------------------------------------
part
id = "t5";
desc = "ATtiny5";
signature = 0x1e 0x8f 0x09;
has_tpi = yes;
memory "flash"
size = 512;
offset = 0x4000;
page_size = 16;
blocksize = 128;
;
memory "signature"
size = 3;
offset = 0x3fc0;
page_size = 16;
;
memory "fuse"
size = 1;
offset = 0x3f40;
page_size = 16;
blocksize = 4;
;
memory "calibration"
size = 1;
offset = 0x3f80;
page_size = 16;
;
memory "lockbits"
size = 1;
offset = 0x3f00;
page_size = 16;
;
;
#------------------------------------------------------------
# ATtiny9
#------------------------------------------------------------
part
id = "t9";
desc = "ATtiny9";
signature = 0x1e 0x90 0x08;
has_tpi = yes;
memory "flash"
size = 1024;
offset = 0x4000;
page_size = 16;
blocksize = 128;
;
memory "signature"
size = 3;
offset = 0x3fc0;
page_size = 16;
;
memory "fuse"
size = 1;
offset = 0x3f40;
page_size = 16;
blocksize = 4;
;
memory "calibration"
size = 1;
offset = 0x3f80;
page_size = 16;
;
memory "lockbits"
size = 1;
offset = 0x3f00;
page_size = 16;
;
;
#------------------------------------------------------------
# ATtiny10
#------------------------------------------------------------
part
id = "t10";
desc = "ATtiny10";
signature = 0x1e 0x90 0x03;
has_tpi = yes;
memory "flash"
size = 1024;
offset = 0x4000;
page_size = 16;
blocksize = 128;
;
memory "signature"
size = 3;
offset = 0x3fc0;
page_size = 16;
;
memory "fuse"
size = 1;
offset = 0x3f40;
page_size = 16;
blocksize = 4;
;
memory "calibration"
size = 1;
offset = 0x3f80;
page_size = 16;
;
memory "lockbits"
size = 1;
offset = 0x3f00;
page_size = 16;
;
;

View File

@ -28,7 +28,7 @@ buttons.status.font = SansSerif,plain,12
buttons.status.color = #ffffff
# GUI - LINESTATUS
linestatus.color = #17A1A5
linestatus.color = #ffffff
linestatus.bgcolor = #006468
# EDITOR - DETAILS

View File

@ -10,7 +10,6 @@ public:
virtual int connect(IPAddress ip, uint16_t port) =0;
virtual int connect(const char *host, uint16_t port) =0;
virtual size_t write(uint8_t) =0;
virtual size_t write(const char *str) =0;
virtual size_t write(const uint8_t *buf, size_t size) =0;
virtual int available() = 0;
virtual int read() = 0;

View File

@ -95,7 +95,6 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
#else
void serialEvent() __attribute__((weak));
void serialEvent() {}
volatile static unsigned char serialEvent_flag = 0;
#define serialEvent_implemented
#if defined(USART_RX_vect)
SIGNAL(USART_RX_vect)
@ -117,7 +116,6 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
#error UDR not defined
#endif
store_char(c, &rx_buffer);
serialEvent_flag = 1;
}
#endif
#endif
@ -125,13 +123,11 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
#if defined(USART1_RX_vect)
void serialEvent1() __attribute__((weak));
void serialEvent1() {}
volatile static unsigned char serialEvent1_flag = 0;
#define serialEvent1_implemented
SIGNAL(USART1_RX_vect)
{
unsigned char c = UDR1;
store_char(c, &rx_buffer1);
serialEvent1_flag = 1;
}
#elif defined(SIG_USART1_RECV)
#error SIG_USART1_RECV
@ -140,13 +136,11 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
#if defined(USART2_RX_vect) && defined(UDR2)
void serialEvent2() __attribute__((weak));
void serialEvent2() {}
volatile static unsigned char serialEvent2_flag = 0;
#define serialEvent2_implemented
SIGNAL(USART2_RX_vect)
{
unsigned char c = UDR2;
store_char(c, &rx_buffer2);
serialEvent2_flag = 1;
}
#elif defined(SIG_USART2_RECV)
#error SIG_USART2_RECV
@ -155,13 +149,11 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
#if defined(USART3_RX_vect) && defined(UDR3)
void serialEvent3() __attribute__((weak));
void serialEvent3() {}
volatile static unsigned char serialEvent3_flag = 0;
#define serialEvent3_implemented
SIGNAL(USART3_RX_vect)
{
unsigned char c = UDR3;
store_char(c, &rx_buffer3);
serialEvent3_flag = 1;
}
#elif defined(SIG_USART3_RECV)
#error SIG_USART3_RECV
@ -169,38 +161,17 @@ inline void store_char(unsigned char c, ring_buffer *buffer)
void serialEventRun(void)
{
unsigned char flag, oldSREG;
#ifdef serialEvent_implemented
oldSREG = SREG;
noInterrupts();
flag = serialEvent_flag;
serialEvent_flag = 0;
SREG = oldSREG;
if (flag) serialEvent();
if (Serial.available()) serialEvent();
#endif
#ifdef serialEvent1_implemented
oldSREG = SREG;
noInterrupts();
flag = serialEvent1_flag;
serialEvent1_flag = 0;
SREG = oldSREG;
if (flag) serialEvent1();
if (Serial1.available()) serialEvent1();
#endif
#ifdef serialEvent2_implemented
oldSREG = SREG;
noInterrupts();
flag = serialEvent2_flag;
serialEvent2_flag = 0;
SREG = oldSREG;
if (flag) serialEvent2();
if (Serial2.available()) serialEvent2();
#endif
#ifdef serialEvent3_implemented
oldSREG = SREG;
noInterrupts();
flag = serialEvent3_flag;
serialEvent3_flag = 0;
SREG = oldSREG;
if (flag) serialEvent3();
if (Serial3.available()) serialEvent3();
#endif
}

View File

@ -75,6 +75,6 @@ class HardwareSerial : public Stream
extern HardwareSerial Serial3;
#endif
extern void serialEventRun(void);
extern void serialEventRun(void) __attribute__((weak));
#endif

View File

@ -29,16 +29,6 @@
// Public Methods //////////////////////////////////////////////////////////////
/* default implementation: may be overridden */
size_t Print::write(const char *str)
{
size_t n = 0;
while (*str) {
n += write(*str++);
}
return n;
}
/* default implementation: may be overridden */
size_t Print::write(const uint8_t *buffer, size_t size)
{

View File

@ -46,7 +46,7 @@ class Print
void clearWriteError() { setWriteError(0); }
virtual size_t write(uint8_t) = 0;
virtual size_t write(const char *str);
size_t write(const char *str) { return write((const uint8_t *)str, strlen(str)); }
virtual size_t write(const uint8_t *buffer, size_t size);
size_t print(const __FlashStringHelper *);

View File

@ -1,7 +1,7 @@
#ifndef server_h
#define server_h
class Server {
class Server : public Print {
public:
virtual void begin() =0;
};

View File

@ -57,8 +57,6 @@ public:
virtual int endPacket() =0;
// Write a single byte into the packet
virtual size_t write(uint8_t) =0;
// Write a string of characters into the packet
virtual size_t write(const char *str) =0;
// Write size bytes from buffer into the packet
virtual size_t write(const uint8_t *buffer, size_t size) =0;

View File

@ -13,7 +13,7 @@ int main(void)
for (;;) {
loop();
serialEventRun();
if (serialEventRun) serialEventRun();
}
return 0;

View File

@ -74,10 +74,6 @@ size_t EthernetClient::write(uint8_t b) {
return write(&b, 1);
}
size_t EthernetClient::write(const char *str) {
return write((const uint8_t *) str, strlen(str));
}
size_t EthernetClient::write(const uint8_t *buf, size_t size) {
if (_sock == MAX_SOCK_NUM) {
setWriteError();

View File

@ -15,7 +15,6 @@ public:
virtual int connect(IPAddress ip, uint16_t port);
virtual int connect(const char *host, uint16_t port);
virtual size_t write(uint8_t);
virtual size_t write(const char *str);
virtual size_t write(const uint8_t *buf, size_t size);
virtual int available();
virtual int read();
@ -27,6 +26,8 @@ public:
virtual operator bool();
friend class EthernetServer;
using Print::write;
private:
static uint16_t _srcport;

View File

@ -72,11 +72,6 @@ size_t EthernetServer::write(uint8_t b)
write(&b, 1);
}
size_t EthernetServer::write(const char *str)
{
write((const uint8_t *)str, strlen(str));
}
size_t EthernetServer::write(const uint8_t *buffer, size_t size)
{
size_t n = 0;

View File

@ -15,8 +15,8 @@ public:
EthernetClient available();
virtual void begin();
virtual size_t write(uint8_t);
virtual size_t write(const char *str);
virtual size_t write(const uint8_t *buf, size_t size);
using Print::write;
};
#endif

View File

@ -107,12 +107,6 @@ size_t EthernetUDP::write(uint8_t byte)
return write(&byte, 1);
}
size_t EthernetUDP::write(const char *str)
{
size_t len = strlen(str);
return write((const uint8_t *)str, len);
}
size_t EthernetUDP::write(const uint8_t *buffer, size_t size)
{
uint16_t bytes_written = bufferData(_sock, _offset, buffer, size);

View File

@ -67,10 +67,10 @@ public:
virtual int endPacket();
// Write a single byte into the packet
virtual size_t write(uint8_t);
// Write a string of characters into the packet
virtual size_t write(const char *str);
// Write size bytes from buffer into the packet
virtual size_t write(const uint8_t *buffer, size_t size);
using Print::write;
// Start processing the next available incoming packet
// Returns the size of the packet in bytes, or 0 if no packets are available

View File

@ -81,6 +81,8 @@ public:
void setCursor(uint8_t, uint8_t);
virtual size_t write(uint8_t);
void command(uint8_t);
using Print::write;
private:
void send(uint8_t, uint8_t);
void write4bits(uint8_t);

View File

@ -62,10 +62,6 @@ size_t File::write(uint8_t val) {
return write(&val, 1);
}
size_t File::write(const char *str) {
return write((const uint8_t *) str, strlen(str));
}
size_t File::write(const uint8_t *buf, size_t size) {
size_t t;
if (!_file) {

View File

@ -33,7 +33,6 @@ public:
File(void); // 'empty' constructor
~File(void); // destructor
virtual size_t write(uint8_t);
virtual size_t write(const char *str);
virtual size_t write(const uint8_t *buf, size_t size);
virtual int read();
virtual int peek();
@ -50,6 +49,8 @@ public:
boolean isDirectory(void);
File openNextFile(uint8_t mode = O_RDONLY);
void rewindDirectory(void);
using Print::write;
};
class SDClass {

View File

@ -93,6 +93,8 @@ public:
virtual int read();
virtual int available();
virtual void flush();
using Print::write;
// public only for easy access by interrupt handlers
static inline void handle_interrupt();

View File

@ -164,14 +164,6 @@ size_t TwoWire::write(const uint8_t *data, size_t quantity)
return quantity;
}
// must be called in:
// slave tx event callback
// or after beginTransmission(address)
size_t TwoWire::write(const char *data)
{
return write((uint8_t*)data, strlen(data));
}
// must be called in:
// slave rx event callback
// or after requestFrom(address, numBytes)

View File

@ -53,7 +53,6 @@ class TwoWire : public Stream
uint8_t requestFrom(uint8_t, uint8_t);
uint8_t requestFrom(int, int);
virtual size_t write(uint8_t);
virtual size_t write(const char *);
virtual size_t write(const uint8_t *, size_t);
virtual int available(void);
virtual int read(void);
@ -61,6 +60,8 @@ class TwoWire : public Stream
virtual void flush(void);
void onReceive( void (*)(int) );
void onRequest( void (*)(void) );
using Print::write;
};
extern TwoWire Wire;

View File

@ -32,6 +32,7 @@
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif
#include "pins_arduino.h"
#include "twi.h"
static volatile uint8_t twi_state;
@ -63,18 +64,10 @@ void twi_init(void)
{
// initialize state
twi_state = TWI_READY;
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__)
// activate internal pull-ups for twi
// as per note from atmega8 manual pg167
sbi(PORTC, 4);
sbi(PORTC, 5);
#else
// activate internal pull-ups for twi
// as per note from atmega128 manual pg204
sbi(PORTD, 0);
sbi(PORTD, 1);
#endif
// activate internal pullups for twi.
digitalWrite(SDA, 1);
digitalWrite(SCL, 1);
// initialize twi prescaler and bit rate
cbi(TWSR, TWPS0);