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

Monday,December 09, 2019, 00:39:04

Login with username, password and session length

Shoutbox

Bad Raven:
02 Dec 2019 20:03:50
Only if the battery is fully charged, leak a few volts and it'll be fine.......
Andy7:
02 Dec 2019 17:19:55
If yo fly a Mavic Mini and get over a gramme of mud on it, do you have to register it?  :rofl:
hoverfly:
02 Dec 2019 08:38:56
Not a problem i've had a body mod, I think of Jean Harlow naked on a trampoline  and the new antenna  extends automatically..   :whistling:
Andy7:
29 Nov 2019 17:17:37
That'll play hell with your FPV signal. :rofl:
hoverfly:
29 Nov 2019 17:10:20
Won't get me i'm wearing my tin foil hat... :wack0
Andy7:
29 Nov 2019 14:19:03
Because GOVERNMENT SPY DRONES are watching us! :frantic:
hoverfly:
29 Nov 2019 11:41:22
BBC News this am ..only 50% of people have registered  for the  CAA  scheme.. If people haven't registered  how do they know it's 50%.. :shrug:
ched:
28 Nov 2019 20:16:14
Very very quiet. I am missing chatting :-( Must be the weather....
Gaza07:
25 Nov 2019 08:28:26
Forums very quiet  :shrug:
ched:
18 Oct 2019 11:25:16
Sounds good yama. Would love to see some images. 3d models sound cool too
Members
Stats
  • Total Posts: 197212
  • Total Topics: 19886
  • Online Today: 50
  • Online Ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 29
Total: 29

Theme Changer





thumbnail

3d - Printworx

Printing 3d Forum

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