Switching UPDI pin to GPIO

As the title suggests I would like to know if there is a way to switch the UPDI pin to GPIO using the Arduino IDE or in code.

which chip? did you check its spec?

ATTiny3217. The datasheet doesn’t show how unless I am missing something.

Indeed I don’t think PORTMUX Allows for this

It is very rare for the hardware programming pins of a micro to be changeable...

I must admit I had never looked (the part I know of is that the UPDI pin can be configured as GPIO or RESET which could be useful if you are short in pins and don’t need the feature).

Thats why I need to use that pin. Not that I am short of pins on the chip but to the external world. I have 12V, GND, Analog in and digital out. I need to use the UPDI pin as the analog in.

Surely there is a way to set other fuses via code.

The ATtiny datasheet clearly spells out ALL possible functions for ALL pins. Is the function you want is not listed in the datasheet for the pin in question, then it is NOT possible.

Read the datasheet!

It is listed and you can do it. I just want to know how.