avr-updi - communicate with an AVR microcontroller over UPDI
$ avr-updi [--port PORT] [--part PART] COMMAND ARGS... [COMMAND ARGS ...]
This program contains a number of sub-commands for interacting with an AVR microcontroller using a UPDI interface.
Optional. Provides the USB device where the UPDI adapter is connected. If absent a default of /dev/ttyUSB0 will apply.
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.
-mmcu
-p
Optional. Sets a different baud rate for communications. If not supplied, will default to 115200.
If communications are unreliable, try setting a slower speed.
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.
write-fuses
Files read from or written to will be in raw binary format, instead of Intel hex.
Multiple commands may be specified simultaneously; they will be executed in the given sequence. This may be useful for writing flash and EEPROM at the same time
$ avr-updi -p t814 write-flash flash.hex write-eeprom eeprom.hex
Sends a reset request.
$ avr-updi reset
Note that this command does not need the --part to be specified.
--part
Reads the System Information Block
$ avr-updi read-sib
Reads the 3-byte signature from the chip and prints it.
$ avr-updi read-signature -p t814
Erases the entire chip. Normally not required because a write-flash operation will do this anyway, but this command may be handy for erasing a chip to reset it back to factory state.
write-flash
$ avr-updi erase -p t814
Reads from the flash portion of non-volatile memory ("NVM").
$ avr-updi read-flash -p t814 flash-save.hex [LENGTH]
Optionally reads only the given length.
Writes to the flash portion of non-volatile memory ("NVM").
$ avr-updi write-flash -p t814 firmware.hex
Reads from the EEPROM portion of non-volatile memory ("NVM").
$ avr-updi read-eeprom -p t814 eeprom-save.hex
Writes to the EEPROM portion of non-volatile memory ("NVM").
$ avr-updi write-eeprom -p t814 data.hex
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.
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.
Paul Evans <leonerd@leonerd.org.uk>
To install Device::AVR::UPDI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::AVR::UPDI
CPAN shell
perl -MCPAN -e shell install Device::AVR::UPDI
For more information on module installation, please visit the detailed CPAN module installation guide.