View previous topic :: View next topic |
Author |
Message |
Peter_Damian_ONeill
Joined: 13 Dec 2021 Posts: 4 Location: Saddleworth, SA
|
Posted: Tue Dec 14, 2021 6:25 am Post subject: OLIMEX AVR-ISP-MK2 Programmer, issues? |
|
|
Recently my old STK500 died and I configured an OLIMEX AVR-ISP-MK2 which I bought a few years ago as a backup.
After re-flashing the programmer, removing old drivers, and installing the LIBUSB driver, I was having issues with three of six ATMega128s I was
using to test the reliability of the programmer. These three devices were giving the same type of errors as if there was no target device connected.
This was just when I was checking the Chip Device ID.
: stk500v2_disable() : failed to leave programming mode, got 0x01
Chip Device ID : 000006
: stk500v2_cmd(): failed to read signature
AVRISP MK2 detected
After playing with the options I found that either checking the checkbox for "Do not set ISP clock frequency" or not checking it but setting the clock frequency to either 1 or 2MHz, I was
able to mostly stop the above error. Sometimes it still occurs but clicking on Chip Device ID will then work correctly.
The other issue I'm having is, regardless of the target device, programming the EEPROM takes a minute not seconds and returns the error
: stk500v2_disable() : failed to leave programming mode, got 0x80
but the EEPROM does program correctly.
Are these issues that others are seeing or am I missing something?
(BASCOM-AVR version : 2.0.8.4 ) _________________ Regards,
Peter O'Neill |
|
Back to top |
|
|
jenalcom
Joined: 10 Apr 2004 Posts: 365 Location: Perth, Western Australia
|
Posted: Tue Dec 14, 2021 9:52 am Post subject: |
|
|
Don't forget that the AVR ISP II clock frequency should be set at one quarter (or less) of the target clock frequency.
Big problem if you are testing with new chips with the internal oscillator set at 8MHz and with divide by 8 enabled. This gives you a processor clock frequency of only 1MHz - so the programmer should be set at 250KHz max! I usually just leave the programmer set at 125KHz and ignore the extra time it takes.
Of course once you have changed the clock frequency and programmed the fusebits accordingly you can increase the programmer clock.
Cheers
Alan |
|
Back to top |
|
|
Peter_Damian_ONeill
Joined: 13 Dec 2021 Posts: 4 Location: Saddleworth, SA
|
Posted: Tue Dec 14, 2021 10:22 am Post subject: |
|
|
In the past I have always used 125KHz for precisely the reason you have suggested
but with the AVR-ISP-MK2 has been flakey at this speed.
And yes the chips are running at 5V and fuse bits set for high clock frequency. _________________ Regards,
Peter O'Neill |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Dec 14, 2021 12:31 pm Post subject: |
|
|
and which programmer did you select? _________________ Mark |
|
Back to top |
|
|
Peter_Damian_ONeill
Joined: 13 Dec 2021 Posts: 4 Location: Saddleworth, SA
|
Posted: Tue Dec 14, 2021 11:19 pm Post subject: |
|
|
USBprog Programmer / AVR ISP mkii _________________ Regards,
Peter O'Neill |
|
Back to top |
|
|
jenalcom
Joined: 10 Apr 2004 Posts: 365 Location: Perth, Western Australia
|
Posted: Wed Dec 15, 2021 11:48 am Post subject: |
|
|
Perhaps try a different USB cable - some are not always the best |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Dec 16, 2021 1:23 pm Post subject: |
|
|
- which libusb version do you use?
- which version of the olimex soft do you use?
how did you connect things? you use stk500 with the 128? or you have some other board?
i remember from stk500v2 board that some jumpers are important that deal with clock and reset.
you best read the stk500 help about the proper settings for that chip.
also, the programmer can either supply vcc or needs it from the target.
when using stk500 i would start with checking that. _________________ Mark |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Thu Dec 16, 2021 10:22 pm Post subject: |
|
|
I esspecially test MK II with M128 and it work fine for me.
My settings are:
|
|
Back to top |
|
|
Peter_Damian_ONeill
Joined: 13 Dec 2021 Posts: 4 Location: Saddleworth, SA
|
Posted: Fri Dec 17, 2021 5:08 am Post subject: |
|
|
I had the USB checkbox checked, I assumed this was necessary but clearly not.
Now with all programming options set to default my OLIMEX AVR-ISP-MK2 now works without
any errors except for programming EEPORM were the EEPROM is programmed correctly but
after it competes stk500v2_disable reports an error when exiting programming mode. _________________ Regards,
Peter O'Neill |
|
Back to top |
|
|
njepsen
Joined: 13 Aug 2007 Posts: 469
|
Posted: Mon Jan 10, 2022 2:07 am Post subject: |
|
|
I have just purchased 2 new Olimex avr-is-mk2 programmers.
they did not work out of the box.
Installing the driver from libusb_win32.sourceforge.net 9 which is the recommended driver in the olimex manual) does not help.
I get "could not initialize programmer"
Any one else got these working ? if so - how ? _________________ Neil |
|
Back to top |
|
|
|