Mattias has written a very useful explanation for the replacement of the AVR bootloader. To burn the fuses it is said to use avrdude and the // port or ISP cable.
I intended to do it with my Dell latitude (MY90 under NT4) which has a // port
What then the avdude.exe or Atmel programmer to install? I would to like to move things on the Dell as few as possible (no internet) and there is no much space left on the disk. .
There is no MSDOS version of avrdude and WinAVR is quite big. I tried the mingw version which does not run because the hid.dll missing. Strande enough I got avrdude on the other computer where VT is installed.
Thanks for hints
Philippe
Hello Phil,
I have elaborated a bit on which software version(s) to use on the bootloader upgrade page, see: http://vems.hu/vt/help/v3/general/bootloader_upgrade.html.
If you have any further questions, feel free to ask.
Best regards, Dave
Thanks Dave. I am going to buy a cable.
When you say to download avrdude 6.1, what version ? I do not find a windows version. Do we have to run the unix version under using cgwin?
Philippe
Hi Phil,
The Avrdude 6.1 in the bootloader_upgrade.html page is a clickable link to: http://download.savannah.gnu.org/releases/avrdude/avrdude-6.1-mingw32.zip
Which contains the mingw32 version of avrdude, this runs on Windows (tested personally on Windows 7) from command prompt.
Best regards, Dave
Hi,
avrdude failed writing 0x3C in the lock register, after (silly?) attempts I end up with lock bits being 0x00 (terminal says d lock 0000 00).
Following the doc, the lock bits are now programmed and there is no more write or read access to memory. However I can still dump part of the flash memory (d flash 0 16) ?? I am confused.
Is the only possibility left is to erase the chip?. But what next?
Thanks for your hints
Philippe
Hereafter part of the avrdude log
avrdude: Version 6.1, compiled on Mar 13 2014 at 00:09:49
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\avrdude\avrdude.conf"
Using Port : usb
Using Programmer : usbasp
avrdude: seen device from vendor ->www.fischl.de<-
avrdude: seen product ->USBasp<-
AVR Part : ATmega128
Chip Erase delay : 9000 us
......
avrdude: verifying efuse memory against 0xff:
avrdude: load data efuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0x3c"
avrdude: writing lock (1 bytes):
Writing | ***failed;
################################################## | 100% 0.08s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3c:
avrdude: load data lock data from input file 0x3c:
avrdude: input file 0x3c contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x00 != 0x3c
avrdude: verification error; content mismatch
avrdude: safemode: lfuse reads as 2F
avrdude: safemode: hfuse reads as C4
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK (E:FF, H:C4, L:2F)
avrdude done. Thank you.
Hello Phil,
Exactly what command did you issue to get the result listed above ?
Best regards, Dave
Hi Dave
Thanks for your concern
avrdude -c usbasp -p m128 -U lfuse:w:0x2f:m -U hfuse:w:0xc4:m -U efuse:w:0xff:m -U lock:w:0x3c:m -v
At the first try I had a write error ofr the lock register (fuses write are ok) message and a verify which says that lock register is 0x2c.
I tried several times to write 0x3C, always with error in writing and a verify which says that the lock value is 0x2C. Then I tried other values to write on and I always got writing errors.
I realized afterwards that the values are masked before being written and my silly play ends up with lock = 0x00 .
To be sure of that value I entered terminal mode and indeed "avrdude>dump lock " returns 0000 00.
Regards
Philippe
Are you using a usb ISP cable ? This part of the string is only if you use usb "usbasp"
yes, I am using an usbasp cable and driver;
btw avrdude.conf gives the masks avrdude uses for writing or reading :
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";
Avrdude with this configuration masks out bit 6 and 7 and I wrong in believing that the lock register is cleared.
It remains that avrdude returns bits 0-5 = 00 000 . I do not know why.
Hi Phil,
Have you tried to initiate the bootloader upgrade procedure though VT ? If so what is the message ?
Btw avrdude mask out top 2 bits of lock register because these don't have any function.
Best regards, Dave
Hello Dave,
Sorry for the delay to answer (waiting for my usb cable)
When connecting I get
"BootLoader Mode detected ...
Stay reason unknown (0x71)"
What shall I do next? Whall I stay in the mode an upload a fw?
Regards
Philippe
Hello Phil,
Follow the steps outlined on: http://vems.hu/vt/help/v3/general/bootloader_upgrade.html
1) upload 1.1.94_BootUpdate firmware (VT -> firmware -> firmware upload (not wizard) -> choose 1.1.94_BootUpdate)
2) start VT->firmware -> bootupgrade wizard
Please post its response here, if upgrade success that would be nice; If there is a problem we'll work from there.
Best regards, Dave
Hello Dave,
1) Upload 1.1.94_BootUpdate firmware. I got the following widgets in order
- "Ecu Flash upload progress" -> good went to the end
- "Firmware verify" -> "Firmware verify has been finished. Results: Firmware different"
- "V3 detected with serial number 0. Please add number" I put 322 my serial number
- V3 main window fw 1.2.17, run ok with trigger tool input, serial number is 322-0 not 322-322 as before
2) I then went to "FBootloader upgrade" I got
- "you nedd bootlaoder upgrade"
- "firmware capable for bootloader NO"
- "you have to download newer firmwaree
Tried several time ->"Firmware verify " failed as well but I did not get the message "V3 detected with serial number 0" these times.
Tried to upload 1.2.11 fw, "Firmware verify " failed as well.
I understand that there is no write access to the chip?
Regards Philippe
Hello Phil,
When i was reviewing your applied lock=0x2C i suspected this as well. The applied lock (0x2C instead of 0x3c) does not allow further programming of the flash.
Unfortunately the only way to resolve this is to do a full chip erase and then upload bootloader (nhex again), we will prepare a package for you that has the required files, will get back to you in a few hours with link.
After downloading the required files follow steps from: http://www.vems.hu/wiki/index.php?page=MembersPage/MattiasSandgren/NickesBMW/AvrBootCode
Best regards, Dave
Thanks Dave for your help. I sent a message to your box in case you like to use my private mail. Philippe
Hurrah, I finally suceeded to upgrade the Bootloader, but I was nearly to failed.
I bought a cheap clone of the usb avr cable USPasp.
With it when using avrdude 6.1 under win7 I had write errors on lock bits which ends to get lock bits = 0x00 000 which forbids any further writing on the chip.
So the Vems team sent to me a bundle of fw and bootloader to flash the chip after an erase.
After the flash, the verify failed, again and again. To be sure of grounds I powered the chip from the vcc of the cable instead of the vcc of the board. Failed again and I was ready to buy the USBISP cable from the Vemsshop.
As a final try, I downloaded the old WinAVR_20100110 which contains the
avrdude version 5.10
(bin folder) suspecting that the fw of the clone USBasp was quite old as well.
Success, no writing error anymore, I flashed, set the lock bits 0x3c, and downloaded the new bootloader through VT.
Thanks Dave for your help
Philippe
Wow great news Phil, thanks for the update!
What will be the reason for a ecu not being locked, too old?
I think it was the cheap USBasp fw which was too old and so I got writing errors with the new 6.1 avrdude version. Indeed this new 6.1 version uses an automatic sync function. The5.10 version does not.
Not easy to update the fw of the Atmega USBasp chip, you need another USBasp...
Just attempted to apply the lock and got the following results below
C:\temp\avrdude>avrdude -c USBTiny -p m128 -U lfuse:w:0x2f:m -U hfuse:w:0xc4:m -
U efuse:w:0xff:m -U lock:w:0x3c:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e9702
avrdude: reading input file "0x2f"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0x2f:
avrdude: load data lfuse data from input file 0x2f:
avrdude: input file 0x2f contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xc4"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xc4:
avrdude: load data hfuse data from input file 0xc4:
avrdude: input file 0xc4 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xff"
avrdude: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xff:
avrdude: load data efuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0x3c"
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3c:
avrdude: load data lock data from input file 0x3c:
avrdude: input file 0x3c contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.01s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: safemode: Fuses OK (E:FF, H:C4, L:2F)
avrdude done. Thank you.
C:\temp\avrdude>
Do I need to apply any other command or ?
gunni: You should be good to go as long as you're running the "1.1.94_bootloader" firmware -> time for bootloader update wizard,
The lock value "0x3c" has been verified good by avrdude, so you should keep follow the VT procedure http://vems.hu/vt/help/v3/general/bootloader_upgrade.html.
It works straightfully. You have to let the Vems team know the serial number of your genboard so that the new bootloader would be well dowloaded by the VT process.
Philippe
I am now getting no response from the ecu at all through serial.
Seems like it´s bricked.
I do have another ecu that works on the bench so its not any cabling or anything like that.
What is the next step?
Ippe thnk you should run 1.1.94_BootUpdate version before locking
"....After the correct (1.1.94_BootUpdate) firmware has been found by the Wizard, proceeding to the next step checks the ecu flash lock status, outcome can be either:
If all requirements are met, Wizard will now download the new bootloader from upgrade server, proceed to next step.
"Ecu not locked" manual locking of the ecu will be required, follow the following steps: ...."
See Mathias ' message as well.
Philippe
Yea I had already update the firmware.
Can't you detect ecu from the test of the Communication Settings menu?
If not, you probably need to upload some Dave's package (bootloader+fw) as I did.
I think so, dave if you read this can you send me a pm or email on what I need to do from here to sort this out.
Serial is 2695, I am not sure if I ordered this or somebody else.
Hello Gunni,
Whats the latests status on ecu with serial 2695 ? I was not around for a few days. Has the upgrade completed succesfully ?
Best regards, Dave
No.
Vemstune does not recognise when I set it to bootloader mode, In terminal I do see some response when in bootloader mode, but can´t do anything about it, Man doesn´t get any response, Vemstune doesn´t pick up on the ecu if I just restart the ecu,
i have another ecu working through the serial so there is nothing wrong with anything but the unfortunate ecu itself now.
I need to get either a bootloader and or firmware in there, can you prepare me a package to do so?
Hi, sorry for lifting this old thread.
I was about to upgrade my bootloader, I got no problems with the fuse.
But the part to get the bootloader from the server did not work.
(http://i79.photobucket.com/albums/j144/hasselhoffer/tabort/no%20upgrade%20bootloader_zpsmpdmg6ys.jpg) (http://s79.photobucket.com/user/hasselhoffer/media/tabort/no%20upgrade%20bootloader_zpsmpdmg6ys.jpg.html)
What to do to get the file from the server.
Did you send a email with board number to
[email protected] ?
Aaah.. that´s the answere.
I thought asked for access for two old 3,3 boards a while ago.
When I look in my mail now box It seems like I onlyasked for one board.
I simply have to mail them.
Thanx.
It seems like I have mailed them (checked another mail account)and gained access to the server.
how and where do i put the password in vemstune?
Quote from: magoo on February 02, 2015, 06:00:35 PM
It seems like I have mailed them (checked another mail account)and gained access to the server.
how and where do i put the password in vemstune?
just upgrade.
I have exactly the same issue.
Tried to contact vems via their homepage but no response :'(
Also sent email today to
[email protected] and asking if they got my message, but no answer :-[
I have locked down the CPU using avrdude and therefore the bootloader wizard come one step further. I now run the 1.1.94_bootloader fw.
But get access forbidden, same screen as post above.
Someone please advise
I have got password from Vems now and managed to upload to latest! :)