Connection problem between Mega 2560 and AVR-ISP-MK2

Started by titaninette, July 04, 2014, 05:01:29 pm

Previous topic - Next topic

titaninette

Hi everybody !

I'm actually trying to burn the bootloader of my board (mega 2560) and replace ot by this : https://github.com/brianrumburg/2boots-2560/tree/master/avr/2boots

I bought the AVR-ISP-MK2 programmer. I tried to use it on Windows and Linux with no results. I'm working now on Linux

I have changed the firmware as it is explicated on the notice : https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/AVR-ISP-MK2.pdf (I did it several time 'cause it was not working at first). Now my programmer has the RED light, it's ok.

I have connected the 6-pin to my board, not on the ICSP 6-pin, the other (don't know the name) and that's not working.

$ avrdude -p m2560 -c avrispmkII -P usb -b 115200
avrdude: usb_open(): cannot read serial number "error sending control message: Operation not permitted"
avrdude: usb_open(): cannot read product name "error sending control message: Operation not permitted"
avrdude: usbdev_open(): error setting configuration 1: could not set config 1: Operation not permitted
avrdude: usbdev_open(): did not find any USB device "usb"


I don't know why, but even on my Arduino IDE that's not working.
Am I obliged to use a ICSP 6-10 pin adaptater?

Thanks for your answers.

PS : Sorry for my approximate english, I'm french ^^

titaninette

I bought the AVR-ICSP adaptator. But it still not working.

Here is my code :
$ avrdude -p m2560 -c avrispmkII -P usb -b 115200
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x10
avrdude: stk500v2_command(): failed miserably to execute command 0x03
avrdude: stk500v2_getparm(): failed to get parameter 0xa1
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500v2_command(): failed miserably to execute command 0x11
avrdude: stk500v2_disable(): failed to leave programming mode

avrdude done.  Thank you.


I don't know what's wrong and what to do. Any idea?

Thanks.

LubOlimex

Hello titaninette,

I'm aware it is an ancient thread, just stumbled upon it and in case somebody else finds it I have few ideas to give in order to solve this problem:

1. Make sure you have properly changed the firmware. AVR-ISP-MK2 requires a firmware change to work with AVRDude. The default firmware is suitable only for AVR/Atmel Studio. There are instructions in the user's manual on how to do it.

It is important to uninstall any drivers it can be associated with (Jungo or Atmel USB ones). Then install the drivers suitable for AVRDude.

2. Make sure the hardware connection to the ATmega2560 is ok. AVR-ISP-MK2 has only 10-pin ISP connector. If your board has only 6-pin ISP connector then you would need to make an adapter/use wires. For example, the ARDUINO ATmega2560 has male 6-pin ICSP header, the AVR-ISP-MK2 has female 10-pin ICSP connector.

Refer to page 15 of the user's manual for more information on how the 10pin <-> 6pin connections can be made with wires. Consider an adapter like AVR-ICSP (https://www.olimex.com/Products/AVR/Programmers/AVR-ICSP/)

3. Try to play with the parameters of the command line. For example set the baudrate of the ISP connection. Try with another macro for avrispmkII (for example, use avrisp2 instead).

Try to following:

avrdude -p m2560 -c avrispmkII -P usb -b 115200

4. Test with a stand-alone release of AVRDUDE. The one packed with Arduino might be somehow faulty. I recommend you version 5.11 since this is the one I've tested previously. AVRDUDE might be downloaded from here (there are also Windows releases): http://download.savannah.gnu.org/releases/avrdude/

5. If possible test the connection with AVR/Atmel studio. Remember to revert back to the firmware and drivers suitable for AVR/Atmel studio operation. This would determine if it is an AVRDUDE related problem.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex