182 lines
8.5 KiB
HTML
182 lines
8.5 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- Created on March 13, 2022 by texi2html 5.0
|
|
texi2html was written by:
|
|
Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
|
Karl Berry <karl@freefriends.org>
|
|
Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
|
and many others.
|
|
Maintained by: Many creative people.
|
|
Send bugs and suggestions to <texi2html-bug@nongnu.org>
|
|
-->
|
|
<head>
|
|
<title>AVRDUDE: 5.3 SerialUPDI programmer</title>
|
|
|
|
<meta name="description" content="AVRDUDE: 5.3 SerialUPDI programmer">
|
|
<meta name="keywords" content="AVRDUDE: 5.3 SerialUPDI programmer">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="texi2html 5.0">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smalllisp {margin-left: 3.2em}
|
|
pre.display {font-family: serif}
|
|
pre.format {font-family: serif}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
pre.smalldisplay {font-family: serif; font-size: smaller}
|
|
pre.smallexample {font-size: smaller}
|
|
pre.smallformat {font-family: serif; font-size: smaller}
|
|
pre.smalllisp {font-size: smaller}
|
|
span.nocodebreak {white-space:pre}
|
|
span.nolinebreak {white-space:pre}
|
|
span.roman {font-family:serif; font-weight:normal}
|
|
span.sansserif {font-family:sans-serif; font-weight:normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
|
|
|
<a name="SerialUPDI-programmer"></a>
|
|
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
|
<tr><td valign="middle" align="left">[<a href="avrdude_14.html#Programmer-Specific-Information" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_16.html#Atmel-DFU-bootloader-using-FLIP-version-1" title="Previous section in reading order"> < </a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_14.html#Programmer-Specific-Information" title="Up section"> Up </a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_18.html#Platform-Dependent-Information" title="Next section in reading order"> > </a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_18.html#Platform-Dependent-Information" title="Next chapter"> >> </a>]</td>
|
|
<td valign="middle" align="left"> </td>
|
|
<td valign="middle" align="left"> </td>
|
|
<td valign="middle" align="left"> </td>
|
|
<td valign="middle" align="left"> </td>
|
|
<td valign="middle" align="left">[<a href="avrdude.html#Introduction" title="Cover (top) of document">Top</a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
|
|
<td valign="middle" align="left">[Index]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
|
|
</tr></table>
|
|
<a name="SerialUPDI-programmer-1"></a>
|
|
<h2 class="section">5.3 SerialUPDI programmer</h2>
|
|
|
|
<p>SerialUPDI programmer can be used for programming UPDI-only devices
|
|
using very simple serial connection.
|
|
You can read more about the details here
|
|
<a href="https://github.com/SpenceKonde/AVR-Guidance/blob/master/UPDI/jtag2updi.md">https://github.com/SpenceKonde/AVR-Guidance/blob/master/UPDI/jtag2updi.md</a>
|
|
</p>
|
|
<p>SerialUPDI programmer has been tested using FT232RL USB->UART interface
|
|
with the following connection layout (copied from Spence Kohde’s page linked
|
|
above):
|
|
</p>
|
|
<div class="example">
|
|
<pre class="example">-------------------- To Target device
|
|
DTR| __________________
|
|
Rx |--------------,------------------| UPDI---\/\/---------->
|
|
Tx---/\/\/\---Tx |-------|<|---' .--------| Gnd 470 ohm
|
|
resistor Vcc|---------------------------------| Vcc
|
|
1k CTS| .` |__________________
|
|
Gnd|--------------------'
|
|
--------------------
|
|
</pre></div>
|
|
|
|
<p>There are several limitations in current SerialUPDI/AVRDUDE integration,
|
|
listed below.
|
|
</p>
|
|
<p>At the end of each run there are fuse values being presented to the user.
|
|
For most of the UPDI-enabled devices these definitions (low fuse, high
|
|
fuse, extended fuse) have no meaning whatsoever, as they have been
|
|
simply replaced by array of fuses: fuse0..9. Therefore you can simply
|
|
ignore this particular line of AVRDUDE output.
|
|
</p>
|
|
<p>Currently available devices support only UPDI NVM programming model 0
|
|
and 2, but there is also experimental implementation of model 3 - not
|
|
yet tested.
|
|
</p>
|
|
<p>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 ‘<samp>-F</samp>’ to override
|
|
this check.
|
|
</p>
|
|
<p>Please note: using ‘<samp>-F</samp>’ during write operation to locked device
|
|
will force chip erase. Use carefully.
|
|
</p>
|
|
<p>Another issue you might notice is slow performance of EEPROM writing
|
|
using SerialUPDI for AVR Dx devices. This can be addressed by changing
|
|
<em>avrdude.conf</em> section for this device - changing EEPROM page
|
|
size to 0x20 (instead of default 1), like so:
|
|
</p>
|
|
<div class="example">
|
|
<pre class="example">#------------------------------------------------------------
|
|
# 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 = 0x1;
|
|
readsize = 0x100;
|
|
;
|
|
;
|
|
</pre></div>
|
|
|
|
<p>USERROW memory has not been defined for new devices except for
|
|
experimental addition for AVR128DB28. The point of USERROW is to
|
|
provide ability to write configuration details to already locked
|
|
device and currently SerialUPDI interface supports this feature,
|
|
but it hasn’t been tested on wide variety of chips. Treat this as
|
|
something experimental at this point. 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 ‘<samp>-V</samp>’.
|
|
</p>
|
|
<p>Please note that SerialUPDI interface is pretty new and some
|
|
issues are to be expected. In case you run into them, please
|
|
make sure to run the intended command with debug output enabled
|
|
(‘<samp>-v -v -v</samp>’) and provide this verbose output with your
|
|
bug report. You can also try to perform the same action using
|
|
<em>pymcuprog</em> (<a href="https://github.com/microchip-pic-avr-tools/pymcuprog">https://github.com/microchip-pic-avr-tools/pymcuprog</a>)
|
|
utility with ‘<samp>-v debug</samp>’ 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.
|
|
</p>
|
|
<hr>
|
|
<table class="header" cellpadding="1" cellspacing="1" border="0">
|
|
<tr><td valign="middle" align="left">[<a href="avrdude_14.html#Programmer-Specific-Information" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_16.html#Atmel-DFU-bootloader-using-FLIP-version-1" title="Previous section in reading order"> < </a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_14.html#Programmer-Specific-Information" title="Up section"> Up </a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_18.html#Platform-Dependent-Information" title="Next section in reading order"> > </a>]</td>
|
|
<td valign="middle" align="left">[<a href="avrdude_18.html#Platform-Dependent-Information" title="Next chapter"> >> </a>]</td>
|
|
</tr></table>
|
|
<p>
|
|
<font size="-1">
|
|
This document was generated on <i>March 13, 2022</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 5.0</i></a>.
|
|
</font>
|
|
<br>
|
|
|
|
</p>
|
|
</body>
|
|
</html>
|