Olimex Support Forum

Microcontrollers => AVR => Topic started by: Dilberto on November 21, 2020, 08:33:08 PM

Title: AVR ISP MK2 x ATtiny402
Post by: Dilberto on November 21, 2020, 08:33:08 PM
Hi.

Recently I've bought 2 pieces of AVR-ISP-MK2 and I was planning to use them for programming the ATtiny402 but the manual doesn't mention UPDI interface, which is the one used by ATtiny402.

Besides that, I'd like to use AVRDUDESS or another GUI to do the job, because AVRDUDE is an uncomfortable command prompt based tool.

Is it possible? What must I make to accomplish that?

Thanks a lot.
Title: Re: AVR ISP MK2 x ATtiny402
Post by: LubOlimex on November 23, 2020, 11:00:44 AM
Unfortunately, AVR-ISP-MK2 does not have UPDI programming interface. UPDI-only targets are not supported.
Title: Re: AVR ISP MK2 x ATtiny402
Post by: kralovic on April 01, 2023, 02:40:11 PM
It's very late to reply, but somebody may still find it useful: Olimex AVR ISP MK2 can be easily used for UPDI-only AVR chips.

It is sufficient to flash USBtoSerial firmware from Lufa project. The programmer then behaves like usb to serial adapter, and avrdude can use it to flash UPDI devices. You still get the nice things from the programmer - target power switch and target voltage switch.

For compiling the Lufa firmware, it is sufficient to modify USBtoSerial/makefile to contain:
MCU          = at90usb162
BOARD        = USBTINYMKII
F_CPU        = 16000000

Title: Re: AVR ISP MK2 x ATtiny402
Post by: LubOlimex on April 19, 2023, 02:09:18 PM
Thanks for the feedback. I managed to compile it and downloaded it to the programmer but I am kind of lost. I also loaded "LUFA USBtoSerial.inf" as drivers. But how do I use it with avrdude, which configuration to use for it?
Title: Re: AVR ISP MK2 x ATtiny402
Post by: vloeby on April 20, 2023, 09:19:20 AM
I never succeeded to use avrdude. if you want to use a other chip you have to enter many new parameters in the " parameter field" and their it go wrong.
I use libusb (via communication port )
In my previous post, on step 5 (page 17) on the olimex manual it was not so clear.
I repeat this step (AVR-ISP-MK2-firmwarewindowsdrivers.zip, was already loaded en EXTRACT!!.

so: file: AVR-ISP-MK2-firmware-windowsdrivers >> firmware-drivers >> firmware for AVRDUDE-LIBUSB >> AVRISP-MKII.hex

then " run " and so on.
Then it works.

You can use now any AVR chip
I use several attiny chips ( on a experimental printboard )

So success.

Regards
Title: Re: AVR ISP MK2 x ATtiny402
Post by: kralovic on April 27, 2023, 03:40:10 PM
With the LUFA USBtoSerial firmware, I am using avrdude as follows (on linux, no experience with other OSes):

avrdude -p avr32db48 -c serialupdi -P /dev/ttyACM0 -U flash:w:firmware.hex:a

In fact, it's very comfortable to have this in a Makefile, so I can just "make write" and everything is compiled and flashed.