[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
SerialUPDI programmer can be used for programming UPDI-only devices using very simple serial connection. You can read more about the details here https://github.com/SpenceKonde/AVR-Guidance/blob/master/UPDI/jtag2updi.md
SerialUPDI programmer has been tested using FT232RL USB->UART interface with the following connection layout (copied from Spence Kohde’s page linked above):
------------------ To Target device DTR| _______________ Rx |-----------,------------------| UPDI---\/\/-------> Tx---/\/\/\---Tx |----|<|---' .--------| Gnd 470 ohm resistor Vcc|------------------------------| Vcc 1k CTS| .` |_______________ Gnd|-----------------' ------------------ |
There are several limitations in current SerialUPDI/AVRDUDE integration, listed below.
Currently available devices support only UPDI NVM programming model 0, 2 3 and 5, but there is also experimental implementation of model 4 - it has been tested only on a single device, so issues with other devices are expected. Full NVM v4 mode support will be provided once the hardware is widely available.
One of the core AVRDUDE features is verification of the connection by reading device signature prior to any operation, but this operation is not possible on UPDI locked devices. Therefore, to be able to connect to such a device, you have to provide ‘-F’ to override this check.
Please note: using ‘-F’ during write operation to locked device will force chip erase. Use carefully.
Another issue you might notice is slow performance of EEPROM writing using SerialUPDI for AVR Dx devices. This can be addressed by changing avrdude.conf section for this device - changing EEPROM page size to 0x20 (instead of default 1), like so:
#------------------------------------------------------------ # AVR128DB28 #------------------------------------------------------------ part parent ".avrdx" id = "avr128db28"; desc = "AVR128DB28"; signature = 0x1E 0x97 0x0E; memory "flash" size = 0x20000; offset = 0x800000; page_size = 0x200; readsize = 0x100; ; memory "eeprom" size = 0x200; offset = 0x1400; page_size = 0x20; readsize = 0x100; ; ; |
The point of USERROW is to provide ability to write configuration details to already locked device and currently SerialUPDI interface supports this feature. Please note: on locked devices it’s not possible to read back USERROW contents when written, so the automatic verification will most likely fail and to prevent error messages, use ‘-V’.
In case you run into issues with the SerialUPDI interface, please make sure to run the intended command with debug output enabled (‘-v -v -v’) and provide this verbose output with your bug report. You can also try to perform the same action using pymcuprog (https://github.com/microchip-pic-avr-tools/pymcuprog) utility with ‘-v debug’ and provide its output too. You will notice that both outputs are pretty similar, and this was implemented like that on purpose - it was supposed to make analysis of UPDI protocol quirks easier.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Stefan Rueger on August 24, 2024 using texi2html 1.82.