avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] Problem with TPI and "serbb" mode


From: Didrik Madheden
Subject: Re: [avrdude-dev] Problem with TPI and "serbb" mode
Date: Wed, 20 Mar 2019 00:04:42 +0100

That error message means that avrdude tried to sanity check the
connection by sending a 0 and a 1 to "MOSI" and reading it back from
"MISO". This could mean any of the following things:
* The MOSI or MISO connection is broken, incorrect or incorrectly specified.
* The MOSI or MISO connection is shorted to something else.
* The MOSI or MISO connection has incorrect polarity specified. The
FTDI chip can be configured to invert the polarity of signals and
maybe that's what happened.

Quick way to check for the last problem:
Temporarily invert the polarity MISO by removing the ~ used for
inverting the signal.

programmer
  id    = "ftdiprog";
  desc  = "FTDI serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
  type  = "serbb";
  miso  = 8;
  reset = ~7;
  sck   = ~4;
  mosi  = ~3;
;

If you now get:
MOSI->MISO 1 failed (0 instead of 1)
...the advice below does not apply.

If instead you get past the check, avrdude should say "MOSI-MISO link
present". If all goes really well, everything will now work.
Otherwise, try inverting MOSI instead.

programmer
  id    = "ftdiprog";
  desc  = "FTDI serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
  type  = "serbb";
  miso  = ~8;
  reset = ~7;
  sck   = ~4;
  mosi  = 3;
;

Or invert other connections or check for other connection problems.

On Tue, 19 Mar 2019 at 23:14, Wayne Holder <address@hidden> wrote:
>
> I'm trying to use AVRDUDE on macOS 0.14.2 to communicate with an ATTiny10
> that's connected an FTDI breakout board like this:
>
> TXD  --[1K]---+
>               |   +----------------------+
> CTS  ---------+---| TPI DATA (1)   RESET | ------+
> GND  -------------| GND              VCC | ---+  |
> DTR  -------------| TPI CLK           NC |    |  |
>                   +----------------------+    |  |
>                                               |  |
> VCC  -----------------------------------------+  |
>                                                  |
> RTS  --------------------------------------------+
>
> Note: adapted from http://irq5.io/2010/07/15/programming-the-attiny10/
>
> and using this as the definition for the programmer:
>
> programmer
>   id    = "ftdiprog";
>   desc  = "FTDI serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
>   type  = "serbb";
>   miso  = ~8;
>   reset = ~7;
>   sck   = ~4;
>   mosi  = ~3;
> ;
>
> Note: passed using the - C + switch in file ftdiprog.conf
>
> But, when I use the following invocation (paths removed for brevity)  to
> try and read out the device signature value:
>
> avrdude -v -P /dev/cu.usbserial-A50285BI -C +ftdiprog.conf -c ftdiprog -p
> t10 -U signature:r:sig.hex:h
>
> It prints the following error (full, verbose response at end of this
> message):
>
> MOSI->MISO 0 failed
>
> and this has me stumped.  Is this a bug, or am I doing something wrong?
> Also, is there any more information about how to properly use AVRDUDE and
> the TPI protocol?  This information I've found online is either rather
> dated, or contradicts or other information I've read.
>
> Thanks in advance for any help offered,
>
> Wayne
>
> --full response--
>
> avrdude: Version 6.3, compiled on Sep 21 2018 at 19:15:33
>
>          Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
>
>          Copyright (c) 2007-2014 Joerg Wunsch
>
>
>          System wide configuration file is
> "/usr/local/Cellar/avrdude/6.3_1/etc/avrdude.conf"
>
>          User configuration file is "/Users/wholder/.avrduderc"
>
>          User configuration file does not exist or is not a regular file,
> skipping
>
>          Additional configuration file is
> "/var/folders/mt/7rrh06nw8xj05b0052g526300000gn/T/avr-toolchain/etc/ftdiprog.conf"
>
>
>          Using Port                    : /dev/cu.usbserial-A50285BI
>
>          Using Programmer              : ftdiprog
>
>          AVR Part                      : ATtiny10
>
>          Chip Erase delay              : 0 us
>
>          PAGEL                         : P00
>
>          BS2                           : P00
>
>          RESET disposition             : dedicated
>
>          RETRY pulse                   : SCK
>
>          serial program mode           : yes
>
>          parallel program mode         : yes
>
>          Timeout                       : 0
>
>          StabDelay                     : 0
>
>          CmdexeDelay                   : 0
>
>          SyncLoops                     : 0
>
>          ByteDelay                     : 0
>
>          PollIndex                     : 0
>
>          PollValue                     : 0x00
>
>          Memory Detail                 :
>
>
>                                   Block Poll               Page
>           Polled
>
>            Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages
> MinW  MaxW   ReadBack
>
>            ----------- ---- ----- ----- ---- ------ ------ ---- ------
> ----- ----- ---------
>
>            signature      0     0     0    0 no          3   16      0
> 0     0 0x00 0x00
>
>            fuse           0     0     4    0 no          1   16      0
> 0     0 0x00 0x00
>
>            calibration    0     0     0    0 no          1   16      0
> 0     0 0x00 0x00
>
>            lockbits       0     0     0    0 no          1   16      0
> 0     0 0x00 0x00
>
>            flash          0     0   128    0 no       1024   16      0
> 0     0 0x00 0x00
>
>
>          Programmer Type : SERBB
>
>          Description     : design ftdi adatper, reset=dtr sck=tx mosi=rts
> miso=cts
>
>
> MOSI->MISO 0 failed
>
> avrdude: initialization failed, rc=-1
>
>          Double check connections and try again, or use -F to override
>
>          this check.
>
>
>
> avrdude done.  Thank you.
> _______________________________________________
> avrdude-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/avrdude-dev



-- 
/Didrik



reply via email to

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