Welcome to Multi-Rotor UK. Please login or sign up.

Friday,April 26, 2024, 18:01:03

Login with username, password and session length

Shoutbox

Gaza07:
23 Apr 2024 08:09:45
The Domain expires for the forum in 60 days, I'm not going to renew it this time unless I see any activity  :beer2:
Gaza07:
20 Apr 2024 18:02:50
Is there anyone who would like to see this forum stay open ? :shrug:
hoverfly:
17 Apr 2024 17:15:13
 :rolleyes:
Bad Raven:
26 Mar 2024 08:41:05
 :(
Andy7:
25 Mar 2024 14:49:21
An excess of work and rain.  :thumbdown:
Bad Raven:
23 Mar 2024 18:12:38
Almost a personal Blog, it would seem. LOTS of members, but NO posts.  :-/   :shrug:
Gaza07:
06 Mar 2024 16:59:49
Anyone still here  :shrug:
ched:
24 Dec 2023 11:48:48
Hope you all have a Great Christmas and a happy New Year.
Bad Raven:
20 Dec 2023 06:17:47
 ~~   :beer2: 
Gaza07:
19 Dec 2023 22:20:27
Merry Christmas All  :beer2:
Members
  • Total Members: 8,195
  • Latest: lokloks
Stats
  • Total Posts: 201,427
  • Total Topics: 20,261
  • Online today: 24
  • Online ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 20
Total: 20

Theme Changer





3d - Printworx

KK2.1.5 verification error, first mismatch at byte 0x0000 0xff != 0

Started by avr_0xff, Monday,February 15, 2016, 18:18:39

Previous topic - Next topic

avr_0xff

Hello guys,

I hope i can get a solution in this forum:
I can';t flash my kk2.1.5 board.

My programmer:
http://www.hobbyelectronica.nl/product/usbasp-avr-programmer-usb/
http://www.hobbyelectronica.nl/product/10-pin-naar-6-pin-adapter-voor-avrisp-mkii-usbasp-stk500/

my command:
C:\Users\Stefan\Desktop\kk2\lib\avrdude\windows\avrdude.exe -C C:\Users\Stefan\Desktop\kk2\lib\avrdude\windows\avrdude.conf -p m644p -P usb -c usbasp -e -U flash:w:C:\Users\Stefan\Desktop\kk2\tmp\KK1_9_MPU6050.hex:i

and my error:
avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x0000
             0xff != 0x0c
avrdude.exe: verification error; content mismatch

What could be the problem here?
I think i have bricked my kk2 board, because it wont boot the firmware when connected to my lipo battery (5v).
This worked before, but after this command my kk2 board stopped working.
It seems like the chip is empty? -e command in avrdude?

Firmware used:
KK2.1 V1.9S1 by steveis

Thanks for the responses! :beer2:



zx81

I don';t know anything about your kk board however I do dabble in AVR programming while I don';t like avrdude (I have real avr programmers) I can tell you that the commands you issued cause the chip to be erased before programming the mismatch error may be because the wrong cpu may be selected.

avr_0xff

Quote from: zx81 on Monday,February 15, 2016, 21:18:21
I don';t know anything about your kk board however I do dabble in AVR programming while I don';t like avrdude (I have real avr programmers) I can tell you that the commands you issued cause the chip to be erased before programming the mismatch error may be because the wrong cpu may be selected.
Yhea, i think my chip is empty now. But what do you mean by "selecting the wrong cpu"?, do you know wich one i need to select then?

zx81

Well there';s a checksum that tells the programmer which chip you are using if it';s the wrong checksum it will not program it ... What is written on the top of the atmel chip?

It could also be caused by having the wrong data speed connected, having the wrong clock fuse set (I';ll affine that';s OK as you haven';t been messing with the fuses) also make sure nothing is connected to the board that can also mess up the programming.

Paul-H


avr_0xff

Quote from: Paul-H on Tuesday,February 16, 2016, 10:06:48
What programming software are you using

If not using it, try the one from Lazyzero  http://lazyzero.de/en/modellbau/kkmulticopterflashtool

Paul

Hi Paul,
Im on work now, but i tried multicopter flashtool too, same error.
That command i pasted in, is from the multicopterflashtool.

zx81

I';ve just thought of something really simple that you should check first .. On your programmer is there a voltage select?
  If you  use the power target device (5v select) you do not need to power the kk board the programmer will power the chip via the ISP header (6 pin header)

avr_0xff

Quote from: zx81 on Tuesday,February 16, 2016, 12:25:49
I';ve just thought of something really simple that you should check first .. On your programmer is there a voltage select?
  If you  use the power target device (5v select) you do not need to power the kk board the programmer will power the chip via the ISP header (6 pin header)
No voltage select on my programmer, but i power the kk2.1.5 board with my programmer, to answer your early question:
What is written on top of the amtel chip: ATMEGA644PA av1421 or au1421.
I can';t set clock speed with this programmer, (or avrdude is just saying i cant..) not sure about that.

I also asked hobbyking what could be the problem, and finally their answer! =):
I appreciate your cooperation. It seems that there is a problem with the batch of FC';s. As a resolution.

So it seems like it was a faulty batch of kk2.1.5 boards.
I';ve been refunded!

But if anyone knows how to bring back life in this kk2.1.5 board, tips are welcome! :frantic:

zx81

If it';s an incorrectly set fuse on the atmel chip then an hv programmer would be required as well as a tqfp socket adapter ..
The actual chip itself is quite cheap if you order it from China.

I have a JTAG ice, avr dragon and stk 500... If you want I could try one of those programmers on it.

avr_0xff

Quote from: zx81 on Tuesday,February 16, 2016, 18:13:33
If it';s an incorrectly set fuse on the atmel chip then an hv programmer would be required as well as a tqfp socket adapter ..
The actual chip itself is quite cheap if you order it from China.

I have a JTAG ice, avr dragon and stk 500... If you want I could try one of those programmers on it.

Thats very kind of you, but i must ship it to england and back then lol, i think about that.
What i tried now is:
C:\Users\Stefan\Desktop\kk2\lib\avrdude\windows\avrdude.exe -c usbasp -p m644p -U lfuse:r:low_fuse_val.hex:h -U hfuse:r:high_fuse_val.hex:h

Read the high fuse and the low fuse:
low fuse:0xd7
high fuse: 0xd1

I dont know what that values mean, because i just started with avr.
And why isn';t it possible to set fuses with my own cheap avr programmer? too low voltage?

avr_0xff

I';ve also been messing around a little bit with the fuses. I try to change some fuses, but apparently it wont work.
This command for example:
Warning: don';t use this on your KK2 board because it will kill your KK2 board

But mines already broken, so i tried this:
C:\Users\Stefan\Desktop\kk2\lib\avrdude\windows\avrdude.exe -C C:\Users\Stefan\Desktop\kk2\lib\avrdude\windows\avrdude.conf -c usbasp -p m644p -U lfuse:w:0xe2:m -U hfuse:w:0xd7:m -U efuse:w:0xfc:m -F

But i think it does not set the fuse correctly, i can run the same command over and over again, and it still says:
avrdude.exe: safemode: lfuse changed! Was e2, and is now d7
Would you like this fuse to be changed back? [y/n]

I choose no, then the next time its still e2 to d7, why it wont work?

zx81

I just assumed you were in the uk (my bad)

don';t mess about with the fuses! lol I was just saying IF the fuses WERE incorrectly set at the factory then it could mess up programming of the chip and the only way to reset some of the fuses is with an HV programmer (high voltage (12v)) the fuses set clock speed, type of clock internal / external, write protection, brown out protection startup times etc.

the screen grab you posted is actually very helpful it appears that the programmer can read the chip id with no problems and the fuse states .. the error is the file its uploading its saying that the contents of the chip don';t match the contents of the hex file.

there is also an error about the SCK which is the Clock that';s used to sync the data transfer and communication with the chip, I suggest you try updating the driver file that was mentioned in the screen grab you posted.


avr_0xff

Quote from: zx81 on Tuesday,February 16, 2016, 19:27:35
I just assumed you were in the uk (my bad)

don';t mess about with the fuses! lol I was just saying IF the fuses WERE incorrectly set at the factory then it could mess up programming of the chip and the only way to reset some of the fuses is with an HV programmer (high voltage (12v)) the fuses set clock speed, type of clock internal / external, write protection, brown out protection startup times etc.

the screen grab you posted is actually very helpful it appears that the programmer can read the chip id with no problems and the fuse states .. the error is the file its uploading its saying that the contents of the chip don';t match the contents of the hex file.

there is also an error about the SCK which is the Clock that';s used to sync the data transfer and communication with the chip, I suggest you try updating the driver file that was mentioned in the screen grab you posted.

What i did:
http://www.fischl.de/usbasp/
downloaded usbasp.2011-05-28.tar.gz
Then disabled driver signature in windows and then installed the driver.

It seems to work.. then i started multicopter flashtool and still nothing see screen cap.
Can';t i set clock speed with -B, like -B4?
If i try with -B4 param..., it will fail too (same error)

avr_0xff


avr_0xff

Here';s a kind of fix to solve the issue:
I knew the kk2 board powers up when i connect my AVR programmer.., so i tried to connect this 5v to another pin:
https://www.youtube.com/watch?v=OQfOPIRNEEI&feature=youtu.be

It is a very crappy video, but what i did is i';ve created a bridge between VCC avr pin to 5v from motor1.
It also works when i press the jumper wire against the right side of r4. See pic.

Why it works?
I really dont know.., but i think when i solder this together, i could fly with it again. :smiley:
What do you guys think about this?

LAST UPDATE:
Just create a bridge from left side of r4 to right side!

Found this link too:
http://www.rcgroups.com/forums/showpost.php?p=23511469&postcount=8334

AAAND LIFE!!! > see pic2..
Soldered a bridge onto R4

Flashing still doesn';t work, but maybe it is my AVR programmer which is causing troubles here...