bugAVR Downloader/UploaDEr - Bugs: bug #55884, ft232r communication fails on...


You are not allowed to post comments on this tracker with your current authentication level.

bug #55884: ft232r communication fails on programmed part if miso line toggles

Submitter:  Klaus Syttkus <mumpel>
Submitted:  Mon 11 Mar 2019 11:43:09 AM UTC
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Works For Me Privacy:  Public
Assigned to:  None Originator Name:  Klaus Syttkus
Open/Closed:  Open Release:  6.3
Programmer hardware:  ft232r Device type:  t85

Sun 28 Nov 2021 10:34:37 PM UTC, comment #1: 

Well, I tried to reproduce the problem. I wrote a firmware that toggles MOSI each 100 ┬Ás (on an ATmega16 but I don't think that matters much). I can connect to the target without any problems using both, the ft232r as well as the ft245r programmer.

When adding your suggested patch, the ft232r programmer still works, but the ft245r programmer breaks, and cannot connect anymore.

So seems we need some more analysis.

Can you upload a (simplified) firmware that triggers the bug, together with the avrdude commandline used?

Joerg Wunsch <joerg_wunsch>
Group administrator
Mon 11 Mar 2019 11:43:09 AM UTC, original submission:  

I use the miso line for UART emulation on my ATtiny, so that I can use the FT232R in ftdi_sio mode for communication.
In this configuration, reprogramming an ATtiny fails if the ATtiny produces continuous traffic right after RESET ("Device is not responding to program enable. Check connection").
This can be fixed by inserting a call to ft245r_drain in ft245r_program_enable:

--- /tmp/avrdude-6.3/ft245r.c   2014-09-15 21:01:09.000000000 +0200
+++ ft245r.c    2019-03-11 11:21:14.798593714 +0100
@@ -387,6 +387,7 @@
     avr_set_bits(p->op[AVR_OP_PGM_ENABLE], cmd);
     for(i = 0; i < 4; i++) {
+        ft245r_drain(pgm, 0);
         ft245r_cmd(pgm, cmd, res);
         if (res[p->pollindex-1] == p->pollvalue) return 0;

Klaus Syttkus <mumpel>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by mumpel (Submitted the item)
  • -email is unavailable- added by mumpel

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-28 joerg_wunsch StatusNone Works For Me
    2019-03-11 mumpel Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code