NAME
avr-updi - communicate with an AVR microcontroller over UPDI
SYNOPSIS
$ avr-updi [--port PORT] [--part PART] COMMAND ARGS...
DESCRIPTION
This program contains a number of sub-commands for interacting with an AVR microcontroller using a UPDI interface.
COMMON OPTIONS
--port, -P DEVICE
Optional. Provides the USB device where the UPDI adapter is connected. If absent a default of /dev/ttyUSB0 will apply.
--part, -p PART
Required. Gives the name of the ATmega or ATtiny chip that is expected. Parts may be specified in the following ways:
ATmega4809
atmega4809
m4809
ATtiny814
attiny814
t814
Specifically, these are the same forms as recognised by avr-gcc's -mmcu
option and avrdude's -p
option, for convenience in Makefiles and build scripts.
--baud, -B BAUD
Optional. Sets a different baud rate for communications. If not supplied, will default to 115200.
If communications are unreliable, try setting a slower speed.
--erase, -e
Send the CHIPERASE key as well as the NVMPROG key when enabling programming for the write-fuses
operation. Normally this flag is not required when writing fuses to a newly-programmed chip, but may be necessary to recover from a bad checksum or bad fuse value.
--binary
Files read from or written to will be in raw binary format, instead of Intel hex.
SUBCOMMANDS
reset
Sends a reset request.
$ avr-updi reset
Note that this command does not need the --part
to be specified.
read-flash
Reads from the flash portion of non-volatile memory ("NVM").
$ avr-updi read-flash -p t814 flash-save.hex
write-flash
Writes to the flash portion of non-volatile memory ("NVM").
$ avr-updi write-flash -p t814 firmware.hex
read-eeprom
Reads from the EEPROM portion of non-volatile memory ("NVM").
$ avr-updi read-eeprom -p t814 eeprom-save.hex
write-eeprom
Writes to the EEPROM portion of non-volatile memory ("NVM").
$ avr-updi write-eeprom -p t814 data.hex
read-fuses
Reads fuse values.
$ avr-updi read-fuses -p t814
WDTCFG : 00
WDTCFG.PERIOD : OFF
WDTCFG.WINDOW : OFF
BODCFG : 00
BODCFG.ACTIVE : DIS
BODCFG.LVL : BODLEVEL0
BODCFG.SAMPFREQ : 1KHz
BODCFG.SLEEP : DIS
OSCCFG : 02
...
Decoded values of fields are also printed.
write-fuses
Writes fuse values.
$ avr-updi write-fuses -p t814 BODCFG=02 SYSCFG0.RSTPINCFG=GPIO
Fuses may be specified as numerical values for entire registers, or symbolic names for individual fields.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>