Unable to update firmware on GT2560

Hello All,

It seems like common issue, but I have red many threads about firmware updates failing and none of them seems to be same as mine (at least solutions discovered doesn't work for me).

Some background:
So to begin with I have Geetech Prusa i3 Pro B, using Marlin software. All works fine, but I have upgraded Z-axis with lead screws (and planning to do same for X and Y). Now obviously lead screws have different pitch and default settings no longer works. Default setting for Z-Axis travel (mm) was 2560 steps and I have calculated that mine should be ~398 steps. I have set that on printer itsef and it is gives me very accurate travel on Z-Axis. However, every time I turn the printer off the settings gets defaulted to 2560 steps and it is very painful to re-adjust them in 0.1 increments.

So that is where I though the best way is to flash updated firmware with custom configurations to change these default settings (please let me know if there is any other options).

What I tried so far:

I have followed all the steps from here: http://www.geeetech.com/forum/viewtopic.php?f=20&t=17181
So I have downloaded Andruido IDE - 1.6.12 and 1.6.0 doesn't want to validate firmware from Geetech, 1.0.1 (recommended by Geetech) file is corrupted from Adruido download site, so I have settled with version 1.06 which seems to work well.

I have as well downloaded standard firmware for Geetech Prusa i3 Pro B from here : http://www.geeetech.com/forum/download/file.php?id=1552

Changed my desired values in configuration.h, but when I hit upload I have one of following issues:

  1. It uploads (done uploading), printer restarts (the screen turns on/off anf then the line loads until is says - "ready"), but no values gets changed in the firmware.
  2. It uploads (done uploading), but printers does not restart and no values gets changed in the firmware
  3. It uploads (done uploading), but displays error in Andruido IDE:
    "avrdude: usbdev_open(): did not find any USB device "usb""
  4. It uploads (done uploading), but displays error in Andruido IDE:
    "avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: stk500v2_getsync(): timeout communicating with programmer"
    Printer obviously doesn't take any action on 3 and 4.

I have tried changing programmers, using both "upload" and "upload using programmer" options (to be honest I was clicking on all of the options to see what happens), but always ended up with one of 4 options above.

I have selected my board as "Andruido Mega 2560or Mega ADK" as per instructions. Actual board is: http://www.geeetech.com/wiki/index.php/GT2560

The board is discovered as COM7 and drivers seems to be correct, especially considering option 1 - board definitely receives something, but after loading is complete configuration stays the same.

I am using Windows 10 64bit, but have tried all the same on Windows 7 64bit with the same results. Tried different usb ports, restarted both PC and printer many times.

Completely, unsure what I am doing wrong so that configurations doesn't change after upload or fails uploading.

Any ideas? any help would be greatly appreciated.

Bump, please someone help us, I have the same issue on Windows 10 x64.

It is probably no point complaining on how poor is search function on this forum or mentioning that even find your own posts is nightmare...

Anyway after scrolling through 30 pages I realised how common is this problem on GT2560 (ATMEGA2560 CPU).

The only problem is that so far I haven't found a single thread with any progress on this topic just some seemingly random suggestions.

So far I have only reinstalled my second PC and started everything all over again - fresh installation of W7 64bit, Arduino (1.0.6 - seemingly the only version which wants to work for me), fresh drivers for Rt232q... and still having same problems.

Based on some random info I found the problem can be related with long USB cable, my one is ~1.35m long (some weird length), and 2 others I have are both 1.75m. I was surprised how hard is to find good quality cable for this obsolete type 2.0 A-B, especially the short one. Finally, found one 25cm long and will retests when I receive it.

Few questions i have right now are:

  1. How to do loop-back on GT2560? http://www.geeetech.com/wiki/index.php/GT2560 There are no jumpers or anything I can add caps on and so majority of instructions I found won't work.
  2. It seems that at any baud-rate I am getting junk response e.g. in serial monitor "no line ending" 38400 baud response:
¢<3 #!…¬“…©ÿ¡
•Àà%ғ
.3·¤‘ÿÿÿà®5ÿ~ã/¶¹¶.ó

Similarly in uploading in verbose mode I can see that recv is junk:

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM4
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: wiring_open(): releasing DTR/RTS
avrdude: wiring_open(): asserting DTR/RTS
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: . [e1] 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: q [71] 
avrdude: Recv: X [58] 
avrdude: Recv: . [f1] 
avrdude: Recv: t [74] 
avrdude: Recv: L [4c] 
avrdude: Recv: e [65] 
avrdude: Recv: . [90] 
avrdude: Recv: H [48] 
avrdude: Recv: . [14] 
avrdude: Recv: ] [5d] 
avrdude: Recv: p [70] 
avrdude: Recv: H [48] 
avrdude: Recv: . [2e] 
avrdude: Recv: . [03] 
avrdude: Recv: 9 [39] 
avrdude: Recv: l [6c] 
avrdude: Recv: . [ab] 
avrdude: Recv: . [08] 
avrdude: Recv: . [16] 
avrdude: Recv: $ [24] 
avrdude: Recv: . [88] 
avrdude: Recv: . [b4] 
avrdude: Recv: K [4b] 
avrdude: Recv: - [2d] 
avrdude: Recv: . [88] 
avrdude: Recv: . [f6] 
avrdude: Recv: . [96] 
avrdude: Recv: O [4f] 
avrdude: Recv: > [3e] 
avrdude: Recv: . [a3] 
avrdude: Recv: . [14] 
avrdude: Recv: . [08] 
avrdude: Recv: ~ [7e] 
avrdude: Recv: . [d8] 
avrdude: Recv: I [49] 
avrdude: Recv: E [45] 
avrdude: Recv: ' [27] 
avrdude: Recv: M [4d] 
avrdude: Recv: P [50] 
avrdude: Recv: . [9a] 
avrdude: Recv: | [7c] 
avrdude: Recv: . [04] 
avrdude: Recv: . [f8] 
avrdude: Recv: . [fc] 
avrdude: Recv: } [7d] 
avrdude: Recv: q [71] 
avrdude: Recv: . [d2] 
avrdude: Recv: . [16] 
avrdude: Recv: $ [24] 
avrdude: Recv: . [82] 
avrdude: Recv: . [88] 
avrdude: Recv: . [16] 
avrdude: Recv: ] [5d] 
avrdude: Recv: t [74] 
avrdude: Recv: H [48] 
avrdude: Recv: ~ [7e] 
avrdude: Recv: . [03] 
avrdude: Recv: . [f0] 
avrdude: Recv: ~ [7e] 
avrdude: Recv: B [42] 
avrdude: Recv: . [e9] 
avrdude: Recv: . [08] 
avrdude: Recv: . [90] 
avrdude: Recv: ] [5d] 
avrdude: Recv: q [71] 
avrdude: Recv: . [b3] 
avrdude: Recv: . [93] 
avrdude: Recv: . [ba] 
avrdude: Recv: . [0e] 
avrdude: Recv: . [9e] 
avrdude: Recv: m [6d] 
avrdude: Recv:   [20] 
avrdude: Recv: . [16] 
avrdude: Recv: { [7b] 
avrdude: Recv: N [4e] 
avrdude: Recv: S [53] 
avrdude: Recv: . [1e] 
avrdude: Recv: . [af] 
avrdude: Recv: . [9b] 
avrdude: Recv: X [58] 
avrdude: Recv: . [00] 
avrdude: Recv: . [e9] 
avrdude: Recv: . [14] 
avrdude: Recv: . [80] 
avrdude: Recv: 6 [36] 
avrdude: Recv: . [9b] 
avrdude: Recv: X [58] 
avrdude: Recv: w [77] 
avrdude: Recv: . [c2] 
avrdude: Recv: . [16] 
avrdude: Recv: $ [24] 
avrdude: Recv: / [2f] 
avrdude: Recv: . [92] 
avrdude: Recv: . [b0] 
avrdude: Recv: N [4e] 
avrdude: Recv: . [bc] 
avrdude: Recv: I [49] 
avrdude: Recv: e [65] 
avrdude: Recv: . [83] 
avrdude: Recv: . [10] 
avrdude: Recv: H [48] 
avrdude: Recv: . [7f] 
avrdude: Recv: B [42] 
avrdude: Recv: . [e1] 
avrdude: Recv: . [f9] 
avrdude: Recv: . [13] 
avrdude: Recv: . [d9] 
avrdude: Recv: ] [5d] 
avrdude: Recv: . [f8] 
avrdude: Recv: ' [27] 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: . [1a] 
avrdude: Recv: A [41] 
avrdude: Recv: . [16] 
avrdude: Recv: " [22] 
avrdude: Recv: . [e9] 
avrdude: Recv: e [65] 
avrdude: Recv: . [cc] 
avrdude: Recv: 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: Recv: 
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

So I am wondering can it be only bad cable or maybe USB controller is faulty (or something else?!)

Please note that Printer works fine, I can print through SD and USB without any problems and the only reason I am struggling now with re-flashing is that I have upgraded Z axis to lead screw and steps needs changing from 2560 to ~399, but so far have made no progress due to the problems above.

Answers above 2 questions would be greatly appreciated.

OK ... so new 25cm shielded cable arrived... nothing else changed.

So I would so far rule out cable or other software interference...

What is left, bad bootloader, fauly usb chip/board..

Any advice on above questions or any general advice?

Hi
I have a same probleme like you.
do you have any feedback regarding your troubleshooting?

Well... moving in some direction, not sure if that is right one.

Ok... so I have discovered that the problem why I am getting junk response from the board is that my board uses 250k baud rate, for what ever reason some Andruino build allows 250k baud, others don't e.g. 1.0.6 can do max 115.2k. Latest build allows correct baud, but does not compile the code provided by board manufacturer, what is funny that versions of "classic" Andruino (1.0.6 and below) does compile the code without any errors, but does not communicate in 250k baud at all. I understand that Arduino is kind of beta software for people to hack shit out of it, but in many ways it is fairly poor, I do appreciate the open source development but at this stage I am almost sad I made donation. The discrepancy between each version and how it compiles the code is simply unacceptable... if in C++ one cannot use typedef-name together with fpos_t.. then why 1.0.6 is fine with that, but other versions simply stops compiling... anyway that is beyond my understanding.

To be honest I am not even sure my board should be set to 250k baud, but some clues are in the Marlin code which states that default baud is 250k.. I am starting to wonder maybe somebody incorrectly programmed it to communicate in 250k baud?

One way or another I am getting completely fine responses on 250k baud, so USB controller and cables are all ok:

start
echo:Marlin1.0.0
echo: Last Updated: Jan  4 2016 19:03:56 | Author: (John, default config)
Compiled: Jan  4 2016
echo: Free Memory: 3795  PlannerBufferBytes: 1232
echo:Hardcoded Default Settings Loaded
echo:Steps per unit:
echo:  M92 X78.74 Y78.74 Z2560.00 E105.00
echo:Maximum feedrates (mm/s):
echo:  M203 X400.00 Y400.00 Z2.00 E45.00
echo:Maximum Acceleration (mm/s2):
echo:  M201 X1400 Y1400 Z100 E80000
echo:Acceleration: S=acceleration, T=retract acceleration
echo:  M204 S1400.00 T5000.00
echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
echo:  M205 S0.00 T0.00 B20000 X13.50 Z0.30 E5.00
echo:Home offset (mm):
echo:  M206 X0.00 Y0.00 Z0.00
echo:PID settings:
echo:   M301 P19.86 I1.00 D98.93

The newer versions (1.6.7 and up, but not 1.6.0) does allow 250k baud, but does not compile the code. The error I am getting is:

exit status 1
using typedef-name 'fpos_t' after 'struct'

Obliviously I can figure out how to fix this particular line (change fpos_t to lets say fpos_t1), but I know that after it another billion lines will come up. And that is not even problem with the code, but more like with how Andruino compiles it.

Finally, I have installed all Andruino versions which are available to download (yes all 25 odd) and have found that only 1.6.7 both allows me to upload (still compiles with errors but does not exit) and allows me to use 250k baud... or at least port monitor does.... When I start uploading the code first thing programmer does is overrides baud to 115.2k:

 Using Port                    : \\.\COM4
         Using Programmer              : stk500v2
         Overriding Baud Rate          : 115200

I have little hope to get answers.. but:

  • is there a way to force programmer to use 250k baud?
  • should I use 250k baud?

Ok some update as well...

So baudrate can be forced by editing X:(location of your andruino install)\arduino-1.0.1\hardware\arduino\boards.txt

So for GT2560 there are following lines:

####################
mega2560.name=Arduino Mega 2560 or Mega ADK
mega2560.upload.protocol=stk500v2
mega2560.upload.maximum_size=258048
mega2560.upload.speed=115200
mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
mega2560.bootloader.extended_fuses=0xFD
mega2560.bootloader.path=stk500v2
mega2560.bootloader.file=stk500boot_v2_mega2560.hex
mega2560.bootloader.unlock_bits=0x3F
mega2560.bootloader.lock_bits=0x0F
mega2560.build.mcu=atmega2560
mega2560.build.f_cpu=16000000L
mega2560.build.core=arduino
mega2560.build.variant=mega
####################

Sadly that didn't work ... it seems that change forced different baud and I am even getting meaning full response, but no luck with uploading sketch:

  • Using Port : \.\COM4*
  • Using Programmer : stk500v2*
    _ ** Overriding Baud Rate : 250000**_
    avrdude: serial_baud_lookup(): Using non-standard baud rate: 250000avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]

As a response I basically getting same message as the one in port monitor:

start
echo:Marlin1.0.0
echo: Last Updated: Jan 4 2016 19:03:56 | Author: (John, default config)
Compiled: Jan 4 2016
echo: Free Memory: 3795 PlannerBufferBytes: 1232
X
X
X
X
echo: M205 S0.00 T0.00 B20000 X13.50 Z0.30 E5.00
X
X

.. just each symbol letter are in separate line and with hex value:

avrdude: Recv: e [65]
avrdude: Recv: c [63]
avrdude: Recv: h [68]
avrdude: Recv: o [6f]
avrdude: Recv: : [3a]
avrdude: Recv: [20]
avrdude: Recv: [20]
avrdude: Recv: M [4d]
avrdude: Recv: 2 [32]
avrdude: Recv: 0 [30]
avrdude: Recv: 5 [35][/i]

Finally, it threw some random information which I have not seen before so quite interesting:

avrdude: stk500v2_getsync(): timeout communicating with programmer

  • AVR Part : ATMEGA2560*
  • Chip Erase delay : 9000 us*
  • PAGEL : PD7*
  • BS2 : PA0*
  • RESET disposition : dedicated*
  • RETRY pulse : SCK*
  • serial program mode : yes*
  • parallel program mode : yes*
  • Timeout : 200*
  • StabDelay : 100*
  • CmdexeDelay : 25*
  • SyncLoops : 32*
  • ByteDelay : 0*
  • PollIndex : 3*
  • PollValue : 0x53*
  • Memory Detail :*
  • Block Poll Page Polled*
  • Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack*
  • ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------*
  • eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00*
  • Block Poll Page Polled*
  • Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack*
  • ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------*
  • flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00*
  • Block Poll Page Polled*
  • Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack*
  • ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------*
    _ lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00_
  • Block Poll Page Polled*
  • Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack*
  • ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------*
    _ hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00_
  • Block Poll Page Polled*
  • Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack*
  • ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------*
  • efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00*
  • Block Poll Page Polled*
  • Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack*
  • ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------*
  • lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00*
  • Block Poll Page Polled*
  • Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack*
  • ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------*
  • calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00*
  • Block Poll Page Polled*
  • Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack*
  • ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------*
  • signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00*
  • Programmer Type : STK500V2*
  • Description : Atmel STK500 Version 2.x firmware*
    _ Programmer Model: Unknown_

It seems that values in "boards.txt" and the response from the board (or is that Andruino programmer message?!) contain different values e.g. read back for l/h fuses are 0x00 (which probably means blank)
Programmer model is as well is stated as unknown - does that mean programmer is not burned onto the board?

Anyway... it seems changing baudrate doesn't solve time out issue, nor helped to upload sketch so far.. and I really don't know what else I can try.

Ok.. one more update... So the above information was not response from board, but info stored in "avrdude.conf" - no clue what so ever what is the purpose of Andruino showing this in verbose.

here is part from the file avrdude.conf:

part
id = "m2560";
desc = "ATmega2560";
signature = 0x1e 0x98 0x01;
has_jtag = yes;

stk500_devcode = 0xB2;

avr910_devcode = 0x43;

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 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;

ocdrev = 4;

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 = 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 = 262144;
page_size = 256;
num_pages = 1024;
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 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";

load_ext_addr = " 0 1 0 0 1 1 0 1",
" 0 0 0 0 0 0 0 0",
" 0 0 0 0 0 0 0 a16",
" 0 0 0 0 0 0 0 0";

mode = 0x41;
delay = 10;
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";
;
;

@Zthou, please post your solution.