Go Down

Topic: Where to find mEDBG firmware for Atmega32U4 on Uno Wifi Rev2  (Read 1 time) previous topic - next topic


I am building my own board based on Arduino Uno Wifi Rev2.

Arduino Uno Wifi Rev2 has Atmega4809 microcontroller and mEDBG programmer (based on Atmega32U4).

Where can I find the mEDBG firmware that has been flashed on Atmega32U4?


Today, I got 2 Arduino Wifi Rev2 boards and tried to flash firmware into Atmega32U4 chip, but was not able to successfully do so.

First, I had to figure out how to put Atmega32U4 in DFU USB bootloader mode and I was able to figure it out. First, connect the PE2 pin test point to the GND. While PE2 test point is connected to GND, connect RST pin test pin to GND and then release. This is different from Arduino Uno or Mega, where you just need to give pulse of the reset pin ( https://www.arduino.cc/en/Hacking/DFUProgramming8U2 ).

Using dfu-programmer, I erased the firmware and tried flashing hex file.

Code: [Select]
Downloads nehchal$sudo dfu-programmer atmega32u4 erase
Downloads nehchal$sudo dfu-programmer atmega32u4 flash medbg.hex
19829 bytes used (69.16%)
Downloads nehchal$sudo dfu-programmer atmega32u4 reset

I tried 2 hex availables on the Atmel website:
  • https://spaces.microchip.com/gf/project/avr_xp_mini/frs/?action=FrsReleaseView&release_id=333
  • https://spaces.microchip.com/gf/project/avr_xp_mini/frs/?action=FrsReleaseBrowse&frs_package_id=115 ( hex file inside medbg_fw.zip )

The problem is that, after flashing any of above hex file, I am unable to program Atmega4809 through Arduino IDE (some error in uploading).

I also thought of reading the flash content of Atmega32U4 on working Wifi Rev2 board, but that approach also failed.

Code: [Select]
Downloads nehchal$sudo dfu-programmer atmega32u4 dump > foo.bin
Failed to read 28672 bytes from device.

Maybe the fuse settings are not allowing me to read the flash.

I am kind of stuck. Any help or suggestions would be really appreciated.


Try open the medbg_fw.zip included in the Studio install folder under tools/medbg.  There you will find all four images (dw, sam, tpi and updi).  Of course use UPDI for the m4809.

medbg is not locked.


I cloned mEDBG and hacked it to work with all uC with SPI/dWire/UPDI/TPI/SWD interfaces. You'll find details in hackaday.io project:
As far as I know you can't sell that without Michrochips consent, but you can use it for your own.


Hello all.

I am trying to use https://hackaday.io/project/162372-xplained-yourself example to program my atmega4809.
When I try do upload my sketch, I am getting an error:

Code: [Select]
avrdude: Version 6.3-20171130
        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
        Copyright (c) 2007-2014 Joerg Wunsch

        System wide configuration file is "C:\Users\AndrĂ© Neves\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"

        Using Port                    : usb
        Using Programmer              : xplainedmini_updi
        Overriding Baud Rate          : 115200
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0

avrdude done.  Thank you.

Go Up