Arduino Nano Every from scratch

I designed my own Nano Every board because I wanted to make it higher voltage tolerant, add more LDOs to supply more sensors (PMIC) and add special connectors to directly connect to individually addressable LED strips. However, my computer won't see it on the port because atmega4809 is not programmed. What is the best/easiest way to get the correct code on the 4809 so I can push my programs through the USB port? A quick look at the datasheet says it uses UPDI, but I've never encountered this before so I'm looking for a little guidance.

Thanks,
Peter

Hi @circuitsrfun.

I'm not sure I understood correctly what you mean by this. Please provide a more detailed description of what you mean by this in a reply on this forum topic to help us to understand it.

When I plug the board into the USB port on my computer, and go to select the port in the Arduino IDE, it is greyed out. In other words, the computer won't see it. I assume it's because the Atmega4809 is a brand new chip, never used before and needs to be programmed.

Does your board have the SAMD11 processor that the Nano Every uses as a USB interface/UPDI programmer?

Yes it does.

The SAMD11 is what you need to program in order to see the USB port and be able to program the atmega4809. On the Nano Every, the atmega4809 has no bootloader, although it is possible to program it with a bootloader that allows programming through a serial connection.

Thanks, I'll look closer at the datasheet for that part to see if I can find my way.

The binaries for the the ATSAMD11 chip's firmware (referred to by Arduino as "MuxTO") are available here:

This firmware is what causes the chip to produce a USB CDC serial port which is used as the "bridge" for serial communication between the ATmega4809 and the computer, and also implements the UPDI programmer functionality that is used to upload sketch programs to the ATmega4809

That folder also contains the Arduino sketch source code for the firmware. Unfortunately it is now difficult to compile the firmware from source since it relies on the "MattairTech SAM D|L|C core for Arduino" boards platform and the website on which that platform's tool dependencies are hosted has gone dead.

Hi,

the easiest way is to flash using Python.

pyupdi no longer has support: GitHub - mraardvark/pyupdi: Python UPDI driver for programming "new" tinyAVR and megaAVR devices
But here you can have a look at the wiring. Use 3K instead of 1K or a diode
TX/RX comes from a USB serial converter on the PC. FTDI or CH340 or similar.

new pymcuprog: pymcuprog · PyPI (comes from Microchip)

  • install current Python version, check PATH entry
  • install 'pymcupro' in Windows CMD as follows
pip install pymcuprog pip install pip pip install intelhex pip install pylint pip install pyserial 

Example replace the com port.

Start by checking connectivity:
pymcuprog ping -d mega4809 -t uart -u com8

Flash the program:
pymcuprog write -d mega4809 -t uart -u com8 -f filename.hex --erase --verify

You can also read up on this here. MCUdude/MegaCoreX

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.