avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61626] jtagmkii_pdi improvements for jtag2updi use


From: mcudude
Subject: [bug #61626] jtagmkii_pdi improvements for jtag2updi use
Date: Mon, 6 Dec 2021 09:39:59 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36

URL:
  <https://savannah.nongnu.org/bugs/?61626>

                 Summary: jtagmkii_pdi improvements for jtag2updi use
                 Project: AVR Downloader/UploaDEr
            Submitted by: mcudude
            Submitted on: Mon 06 Dec 2021 02:39:57 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: MCUdude
        Originator Email: 
             Open/Closed: Open
                 Release: SVN snapshot
         Discussion Lock: Any
     Programmer hardware: jtagmkii_pdi
             Device type: 

    _______________________________________________________

Details:

Hi!

Since there is some activity here, I might as well share my thoughts on this
topic.

The only FOSS alternative for a UPDI programmer supported by Avrdude at the
moment is the jtag2updi, which uses jtagmkii_pdi as its protocol.

https://github.com/ElTangas/jtag2updi

It implements its own custom programmer option in avrdude.conf:

programmer
  id    = "jtag2updi";
  desc  = "JTAGv2 to UPDI bridge";
  type  = "jtagmkii_pdi";
  connection_type = serial;
  baudrate = 115200;
;

However, there are at least two annoying issues that make the jtag2updi
programmer a little "weak".

First, the maximum supported baud rate is 115200 baud. This ends up being
rather slow on the UPDI side, so uploading takes a long time for larger
programs. Is this something that's possible to fix?

The other one is the same as mentioned in #61624, making it possible to make
use of the DTR/RTS lines to indicate that we're currently in jtag2updi mode.
The official Arduino Nano Every solves this by using an ARM microcontroller
with native USB and using a "1200bps touch" to force it into UPDI mode.
Otherwise, it's in USB to serial mode. This is obviously not possible on AVRs
with no native USB. Would it be possible to optionally pull the DTR/RTS
line(s) low when Avrdude is communicating with the jtag2updi host? This would
make it possible to create a programmer that has some external logic to switch
the serial pins between the jtag2updi host and the microcontroller:

                                                  V_prog          V_target
                                                    +-+              +-+
                                                     |                |
 +----------+                +---------------------+ |                |
+--------------------+
 | PC       |                | jtag2updi           +-+                +-+ 
Target            |
 | avrdude  |                | programmer          |    +----------+    |     
              |
 |       TX +--------+       |                 PD6 +----+    1k    +----+ UPDI
              |
 |          |        |       |                     |    +----------+    |     
              |
 |       RX +------+ |       |                     |               +----+ RX  
              |
 |          |      | |       |                     |               |    |     
              |
 |          |      | |       |                     |               | +--+ TX  
              |
 |      DTR +----+ | |       |                     |               | |  |     
              |
 |          |    | | |       |      RX  TX         |               | | 
+--------------------+
 +----------+    | | |       +------+---+----------+               | |
                 | | |              |   |                          | |
                 | | |       +------+---+----------+               | |
                 | | |       |      RX1 TX1        |               | |
                 | | +-------+ RX              RX2 +---------------+ |
                 | |         |                     |                 |
                 | +---------+ TX   DTR/RTS    TX2 +-----------------+
                 |           |      Switch         |
                 +-----------+ DTR                 |
                             |                     |
                             +---------------------+







    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?61626>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]