@@ -12734,6 +12734,197 @@ part
1273412734 ;
1273512735;
1273612736
12737+ #------------------------------------------------------------
12738+ # ATmega16u4
12739+ #------------------------------------------------------------
12740+
12741+ part
12742+ id = "m16u4";
12743+ desc = "ATmega16U4";
12744+ signature = 0x1e 0x94 0x88;
12745+ usbpid = 0x2ff4;
12746+ has_jtag = yes;
12747+ # stk500_devcode = 0xB2;
12748+ # avr910_devcode = 0x43;
12749+ chip_erase_delay = 9000;
12750+ pagel = 0xD7;
12751+ bs2 = 0xA0;
12752+ reset = dedicated;
12753+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
12754+ "x x x x x x x x x x x x x x x x";
12755+
12756+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
12757+ "x x x x x x x x x x x x x x x x";
12758+
12759+ timeout = 200;
12760+ stabdelay = 100;
12761+ cmdexedelay = 25;
12762+ synchloops = 32;
12763+ bytedelay = 0;
12764+ pollindex = 3;
12765+ pollvalue = 0x53;
12766+ predelay = 1;
12767+ postdelay = 1;
12768+ pollmethod = 1;
12769+
12770+ pp_controlstack =
12771+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12772+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12773+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12774+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12775+ hventerstabdelay = 100;
12776+ progmodedelay = 0;
12777+ latchcycles = 5;
12778+ togglevtg = 1;
12779+ poweroffdelay = 15;
12780+ resetdelayms = 1;
12781+ resetdelayus = 0;
12782+ hvleavestabdelay = 15;
12783+ chiperasepulsewidth = 0;
12784+ chiperasepolltimeout = 10;
12785+ programfusepulsewidth = 0;
12786+ programfusepolltimeout = 5;
12787+ programlockpulsewidth = 0;
12788+ programlockpolltimeout = 5;
12789+
12790+ idr = 0x31;
12791+ spmcr = 0x57;
12792+ rampz = 0x3b;
12793+ allowfullpagebitstream = no;
12794+
12795+ ocdrev = 3;
12796+
12797+ memory "eeprom"
12798+ paged = no; /* leave this "no" */
12799+ page_size = 4; /* for parallel programming */
12800+ size = 512;
12801+ min_write_delay = 9000;
12802+ max_write_delay = 9000;
12803+ readback_p1 = 0x00;
12804+ readback_p2 = 0x00;
12805+ read = " 1 0 1 0 0 0 0 0",
12806+ " x x x x x a10 a9 a8",
12807+ " a7 a6 a5 a4 a3 a2 a1 a0",
12808+ " o o o o o o o o";
12809+
12810+ write = " 1 1 0 0 0 0 0 0",
12811+ " x x x x x a10 a9 a8",
12812+ " a7 a6 a5 a4 a3 a2 a1 a0",
12813+ " i i i i i i i i";
12814+
12815+ loadpage_lo = " 1 1 0 0 0 0 0 1",
12816+ " 0 0 0 0 0 0 0 0",
12817+ " 0 0 0 0 0 a2 a1 a0",
12818+ " i i i i i i i i";
12819+
12820+ writepage = " 1 1 0 0 0 0 1 0",
12821+ " 0 0 x x x a10 a9 a8",
12822+ " a7 a6 a5 a4 a3 0 0 0",
12823+ " x x x x x x x x";
12824+
12825+ mode = 0x41;
12826+ delay = 20;
12827+ blocksize = 4;
12828+ readsize = 256;
12829+ ;
12830+
12831+ memory "flash"
12832+ paged = yes;
12833+ size = 16384;
12834+ page_size = 128;
12835+ num_pages = 128;
12836+ min_write_delay = 4500;
12837+ max_write_delay = 4500;
12838+ readback_p1 = 0x00;
12839+ readback_p2 = 0x00;
12840+ read_lo = " 0 0 1 0 0 0 0 0",
12841+ " 0 a14 a13 a12 a11 a10 a9 a8",
12842+ " a7 a6 a5 a4 a3 a2 a1 a0",
12843+ " o o o o o o o o";
12844+
12845+ read_hi = " 0 0 1 0 1 0 0 0",
12846+ " 0 a14 a13 a12 a11 a10 a9 a8",
12847+ " a7 a6 a5 a4 a3 a2 a1 a0",
12848+ " o o o o o o o o";
12849+
12850+ loadpage_lo = " 0 1 0 0 0 0 0 0",
12851+ " x x x x x x x x",
12852+ " x x a5 a4 a3 a2 a1 a0",
12853+ " i i i i i i i i";
12854+
12855+ loadpage_hi = " 0 1 0 0 1 0 0 0",
12856+ " x x x x x x x x",
12857+ " x x a5 a4 a3 a2 a1 a0",
12858+ " i i i i i i i i";
12859+
12860+ writepage = " 0 1 0 0 1 1 0 0",
12861+ " a15 a14 a13 a12 a11 a10 a9 a8",
12862+ " a7 a6 x x x x x x",
12863+ " x x x x x x x x";
12864+
12865+ mode = 0x41;
12866+ delay = 6;
12867+ blocksize = 128;
12868+ readsize = 256;
12869+ ;
12870+
12871+ memory "lfuse"
12872+ size = 1;
12873+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
12874+ "x x x x x x x x i i i i i i i i";
12875+
12876+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
12877+ "x x x x x x x x o o o o o o o o";
12878+ min_write_delay = 9000;
12879+ max_write_delay = 9000;
12880+ ;
12881+
12882+ memory "hfuse"
12883+ size = 1;
12884+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
12885+ "x x x x x x x x i i i i i i i i";
12886+
12887+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
12888+ "x x x x x x x x o o o o o o o o";
12889+ min_write_delay = 9000;
12890+ max_write_delay = 9000;
12891+ ;
12892+
12893+ memory "efuse"
12894+ size = 1;
12895+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
12896+ "x x x x x x x x 1 1 1 1 i i i i";
12897+
12898+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
12899+ "x x x x x x x x o o o o o o o o";
12900+ min_write_delay = 9000;
12901+ max_write_delay = 9000;
12902+ ;
12903+
12904+ memory "lock"
12905+ size = 1;
12906+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
12907+ "x x x x x x x x 0 0 o o o o o o";
12908+
12909+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
12910+ "x x x x x x x x 1 1 i i i i i i";
12911+ min_write_delay = 9000;
12912+ max_write_delay = 9000;
12913+ ;
12914+
12915+ memory "calibration"
12916+ size = 1;
12917+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
12918+ "0 0 0 0 0 0 0 0 o o o o o o o o";
12919+ ;
12920+
12921+ memory "signature"
12922+ size = 3;
12923+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
12924+ "x x x x x x a1 a0 o o o o o o o o";
12925+ ;
12926+ ;
12927+
1273712928#------------------------------------------------------------
1273812929# ATmega32u4
1273912930#------------------------------------------------------------
0 commit comments