Atmega 4809 portmux

Hello Guys,

I need a little help. I would like to use the Atmega4809 and I have encountered a problem with first time. I would like to use the SPI for programming the 4809 but I have to define the functionality of the PE0-PE3 pins for using the SPI.
The documentation say that I have to use the PORTMUX but I have never ever used it before.
Could someone help me how can I use the PORTMUX under Arduino?
I am really appreciate this,

THX

The ATmega4809 chip is programmed through its UPDI pin unlike, for example, the earlier generation ATmega328p as found on say the Uno which do use SPI for programming.
Are you using your own board design?

There is loads on “ Arduino getting started 4809” which mr Google will find for you .

The really excellent “ Mighty core “ is worth a search too ! - allows you to install a boot loader* (via that single UPDI programming pin ) such that it can then be programmed using a serial port in the same manner as , say, a UNO.

A UNO/NANO can be configured as a UPDI programmer , and run from the Arduino IDE.
Again Google will find this for you

( * a bootloader is not reqd, but this makes life easy)

My 4809 Experimenter/developer board :wink:

Yes, I am using unique design.
I have used SPI for now but the UPDI is still in game.
From my side the UDPI with its one wire is better than the SPI.

Ok, thank you for hint.