November 22, 2024, 09:54:36 AM

AVR ISP MK2 x ATtiny402

Started by Dilberto, November 21, 2020, 08:33:08 PM

Previous topic - Next topic

Dilberto

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.

LubOlimex

Unfortunately, AVR-ISP-MK2 does not have UPDI programming interface. UPDI-only targets are not supported.
Technical support and documentation manager at Olimex

kralovic

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


LubOlimex

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?
Technical support and documentation manager at Olimex

vloeby

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

kralovic

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.