1

I'm attempting to program Atmega4809 (Uno Wifi Rev2) via the ICSP pins on the board by connecting in this manner:enter image description here

The difference is that I have a Uno Wifi Rev2 on the right instead of a Uno R3. I've uploaded the ArduinoISP sketch onto the Uno R3 on the left. Here is the avrdude command that I am using:

$ avrdude -v -patmega4809 -cavrisp -P /dev/ttyACM1 -b19200 -U program.elf

...

avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savr_read(): error reading address 0x0000
    read operation not supported for memory "signature"
avrdude: error reading signature data for part "ATmega4809", rc=-2
avrdude: error reading signature data, rc=-2

Full log: https://pastebin.com/LUfhsYeD

I am wondering if I am missing some difference between the UnoR3 and Uno Wifi Rev2... there doesn't seem to be much documentation about external programming of the Uno Wifi Rev2's Atmega 4809.

If it helps, my usecase for trying to program my Uno Wifi Rev2 externally is a need to reprogram the 32u4 as a HID. Once I program the 32u4, I won't be able to program the 4809 via USB (afaik).

If anyone knows what I'm doing wrong or the proper way to program the Uno Wifi Rev2 externally, your help would be greatly appreciated.

1
  • those are not ICSP pins. there is only SPI. the USB chip (32u4) programs the ATmega over UDPI
    – Juraj
    Nov 20, 2020 at 6:50

1 Answer 1

1

The new generation of AVR chips created by Microchip no longer use the same ICSP protocol as the old ones. Instead they use a new protocol called updi.

You need to use a different sketch and wiring to turn your Arduino into a suitable programmer. More information can be found here about how to do that.

2
  • Do the 6 pins labeled ICSP really use UDPI? Is the programming still over these pins? In the schematic, I see a UDPI pin that goes from the 4809 to the 32u4...
    – nametable
    Nov 19, 2020 at 20:18
  • You will have to check the schematics and datasheet for the chip to know what pins to use.
    – Majenko
    Nov 19, 2020 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.