+ Reply to Thread
Page 1 of 5 12345 LastLast
Results 1 to 20 of 82

Thread: Can Parallax do something about the FTDI reset bug?

  1. #1

    Default Can Parallax do something about the FTDI reset bug?

    So, I just finished up a robotic project for a fellow classmate, and when I took the programing cable out and started to run the device by itself it kept reseting over and over again.

    I managed to fix it by disabling all the code involving serial data transfer. However, I would rather of not had to do that.

    Now I know this issue has been brought up before. But can Parallax do an official review of the problem and publish a paper or something on how to avoid it?

    I know the problem is not the propeller chip's fault but its not to my advantage or anyone else's advantage that this bug is only known about and the fix isburied deep within these forums. Maybe at least there should be an official sticky on this so that everyone knows.

    Thank you,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
    Last edited by Kye; 04-17-2012 at 05:13 PM. Reason: Forum Migration

  2. #2

    Default

    Kye, are you just talking about your software crashing because it is waiting to run commands from the programming port and the FTDI chip is bus powered and so pulls the rx line low when disconnected? Surely you just want break detection and rejection in your serial code (which BTW should be standard). Otherwise you may just need a pullup on the reset line if you have it running more than a very short distance.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  3. #3

    Default

    I've found (at least I'm pretty sure) that putting series 1k resistors on the RX and TX linesavoids the problem...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: http://www.rayslogic.com/propeller/propeller.htm
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  4. #4

    Default

    Phil said...
    This is a known problem with the USB circuitry when it's not plugged into a USB port. Put a 2.2K pullup from A30 to Vdd, and the problem should go away. Here's a link that explains why:

    forums.parallax.com/forums/default.aspx?f=25&m=192068

    The pullup isn't the best solution, since it's actually being used to power the FTDI chip. nono A better solution would be buffer circuitry between the FTDI chip and the Prop, so current doesn't backfeed through the FT232R's serial I/O pins.



    More Info:

    http://forums.parallax.com/showthread.php?p=651731

    Post Edited (Bob Lawrence (VE1RLL)) : 10/12/2009 12:28:43 AM GMT
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  5. #5

    Default

    Here's another thread by yet another (I think) victim of this issue: http://forums.parallax.com/showthread.php?p=847305. In the face of so many complaints about this, spanning more than two years, it would be nice if Parallax would at least acknowledge that a problem exists. Although it's too late for a full solution to the problem where the Prop Plug is involved (the required open-drain buffer needs access to both Vdd and VccIO supplies), it's not too late to begin designing this buffer into boards that include both the Prop and FTDI chip.

    For Prop Plug users, of course, the solution is simpler: just unplug the USB cable and Prop Plug, instead of just the USB cable.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 10/12/2009 1:25:08 AM GMT
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  6. #6

    Default

    Hey guys,

    I've met Fred Dart from FTDI (one of the owners), having visited us before here in Rocklin in recent years. I'm aware of the problem, too, but may need a definitive explanation of the problem AND the solution before we start making requests.

    Phil, can you brief me on the FULL solution you mention above so I'm making the right request to Fred?

    Thanks,

    Ken Gracey
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  7. #7

    Default

    Ken,

    Thanks for joining the discussion! Now I know we'll see some action!

    The problem is this: When the USB cable is unplugged, a program that uses pin A30 for a serial output will assert that pin high after reset. This, in turn, will power the FTDI chip through its RXD input pin, which causes the DTR# output to rise, sending a reset back to the Prop. During reset, pin A30 tristates, and the FTDI chip loses power until the Prop comes out of reset again, starting the cycle all over. Putting a pullup on pin A30 "solves" the problem by keeping the FTDI chip powered during reset, thus preventing repeated edges on DTR#. But this is a poor solution, since it relies on the FTDI's internal protection diodes to keep it powered whenever the Prop is powered.

    A better solution is to isolate the FTDI chip from the Prop circuitry using an open-drain buffer like the 74LVC2G07. This chip (and the entire LVC logic family) is capable of isolating independent supplies so the chip cannot power circuitry on either side from the other side's supply or input voltages. 'Best of all it's cheap. (It's used on the MoBoStamp-pe, BTW, for this very application.)

    Here's a circuit (the "full solution") that can be used on a board that has both the FTDI chip and Prop:



    Here's a circuit for an improved Prop Plug. It's not a "full" solution, though, since any Prop board that uses it needs to have pin A31 pulled up to Vdd:



    Instead of the 74LVC2G07 on the Prop Plug, one could use a non-open-drain buffer (e.g. 74LVC2G34), which would solve the reset problem, but it would still allow a connected USB port to power the Prop through pin A31. It's better, as I pointed out above, just to unplug the Prop Plug when the USB connection isn't being used.

    But for boards with both FTDI chip and Prop, a 74LVC2G07 buffer, along with a couple pullups, is the way to go.

    BTW, this is not an FTDI problem, so I don't feel that they are responsible for providing a solution. Nor is it a Propeller issue, per se. It's just a more generic matter of how two independent circuits should be interfaced when only one is being powered.

    Thanks,
    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 10/12/2009 4:12:58 AM GMT
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  8. #8

    Default

    I don't seem to have this reset problem but my circuits are a little bit different anyway. I like the little SOT style logic chips too but here is an easy retrofit solution that should work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	USB ISOLATION.png‎
Views:	338
Size:	11.2 KB
ID:	64346  
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  9. #9

    Default

    Peter,

    That, too, would work; but you would need second set going in the other direction to keep a powered FTDI chip from trying to power the Prop, which is another issue. The SOT 74LVC logic family has the additional advantage of 5V-tolerant inputs when powered from 3.3V — not an issue with Prop circuits, certainly, but a motivation for using it on the MoBoStamp-pe. The '2G07 buffer I recommended costs less than 11 cents on a full reel.

    -Phil
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  10. #10

    Default

    Well I do totally agree with you Phil on the use of a cheap and simple buffer chip for new designs and I might use it too. The diode solution is a quick fix for a "help me out now" situation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  11. #11
    Cluso99's Avatar
    Location
    Sydney/Brisbane Australia or 'sailing on the high seas'
    Posts
    10,117

    Default

    I have not thought much about the problem, not having experienced it.

    However, on my TriBlade I have the circuit which includes the 2 x 150R t/hole series resistors. I suspect this is typical of many/most t/hole designs.

    I presume the power is being supplied to the FTDI and therefore only via the SO (P30) pin of the prop. Surely, it is not the power being supplied to the prop as that is already powered???

    If this is so, firstly, we only need to worry about the SO P30 pin. Most likely a high value resistor in this line would work. Alternately, a diode in place of the 150R series resistor, cathode to P30, and a pullup on the FTDI RX pin would work - that is, we make P30 an open drain style output but without the requirement for a software modification. Either of these would most likely be the easiest and simplest circuit modification.

    I will draw a circuit and add to this post shortly.

    Phil: I think the same problem will exist with the '07 buffer -(it is open drain)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    Home of the MultiBladeProps: TriBlade,RamBlade, RetroBlade,TwinBlade,SixBlade, website
    Single Board Computer:3 Propeller ICsand aTriBladeProp board (ZiCog Z80 Emulator)
    Prop Tools under Development or Completed (Index)
    Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    Search the Propeller forums(uses advanced Google search)
    My cruising website is: www.bluemagic.biz MultiBladeProp is: www.bluemagic.biz/cluso.htm

    Post Edited (Cluso99) : 10/12/2009 4:02:56 AM GMT
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  12. #12

    Default

    Cluso99 said...
    Phil: I think the same problem will exist with the '07 buffer -
    It doesn't. I've used it (in the MoBoStamp-pe), and it works as advertised. The key is to use the 74LVC family, which lacks input protection diodes. Check out the datasheet; you'll see what I mean.

    Here a tutorial that explains TI's 74LVC "ioff" circuitry.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 10/12/2009 2:51:54 AM GMT
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  13. #13
    Cluso99's Avatar
    Location
    Sydney/Brisbane Australia or 'sailing on the high seas'
    Posts
    10,117

    Default

    You are correct Phil. I checked out the spec, but omitted to remove the statement.

    Obviously my post crossed Peter's etc. But we have the same thoughts.

    Anyway, here is my recommended circuit. The resistor is the simplest and will most likely work. A diode(1N914 or 1N4148) and pullup resistor (10K) would be second choice.



    BTW - I have not seen any problems with the reverse situation - powering the prop from the FT chip and this I do all the time as I don not disconnect the USB when depowering my TriBlade.

    Phil is probably correct - the shield of the USB should not be connected as this is the slave end, and only one end of a shield should be connected to avoid ground loops.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    Home of the MultiBladeProps: TriBlade,RamBlade, RetroBlade,TwinBlade,SixBlade, website
    Single Board Computer:3 Propeller ICsand aTriBladeProp board (ZiCog Z80 Emulator)
    Prop Tools under Development or Completed (Index)
    Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    Search the Propeller forums(uses advanced Google search)
    My cruising website is: www.bluemagic.biz MultiBladeProp is: www.bluemagic.biz/cluso.htm

    Post Edited (Cluso99) : 10/12/2009 4:06:49 AM GMT
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	PropPlug mod.jpg‎
Views:	1605
Size:	86.4 KB
ID:	64347  
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  14. #14

    Default

    A simple series resistor may not work, given that a pullup is enough to power the FTDI chip. Although the pullups that people have used to "solve" the problem are in the 1K - 2.2K range, a 4.7K resistor from the Prop pin may still provide enough current to cause trouble when A30 transitions high after reset. At the very least, I fear that it would flirt with the margins of reliability. Also, you would need the same protective circuitry going the other way on A31 to keep the FTDI chip from trying to power an unpowered Prop. (It probably wouldn't be successful, as you've observed, given the current requirements; but some have reported a faint glow from the Vdd LED in this situation, nonetheless. At the very least, the load on TXD could be excessive.) To me, at least, the LVC buffer seems the simpler and more robust solution. Plus, you gain an extra 0.6V of "low" voltage margin with a CMOS output compared to a blocking diode.

    -Phil
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  15. #15

    Default

    A simple resistive load across the FTDI chip and one across the Prop will take care of those currents that find their way to the chip's supply effectively quashing the voltage. I would probably use a value of around 1K if power consumption is not an issue.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  16. #16

    Default

    Don't forget: VCCIO only has to rise a little above 0.6V to trigger the reset transistor.

    -Phil
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  17. #17

    Default

    0.58V (Oops, not quite. Forgot about Vfwd of the protection diode.)

    -Phil
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  18. #18

    Default

    3.3V to 4K7 pullup through 0.3V substrate diode through 1K VCCIO to ground = 0.52V

    But for new designs your idea Phil is a good way to go.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  19. #19
    Cluso99's Avatar
    Location
    Sydney/Brisbane Australia or 'sailing on the high seas'
    Posts
    10,117

    Default

    Yes Peter, agreed.

    I am loathe to use a hard to get component and difficult to use for a hobbyist cure. They are plentiful from Digikey. For a complete smt pcb, such as Peter, others and myself use, this is not a problem. In fact I am using SOT23 and SM8/UM8 etc parts on RamBlade which includes the LCV1G & 2G parts.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    Home of the MultiBladeProps: TriBlade,RamBlade, RetroBlade,TwinBlade,SixBlade, website
    Single Board Computer:3 Propeller ICsand aTriBladeProp board (ZiCog Z80 Emulator)
    Prop Tools under Development or Completed (Index)
    Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    Search the Propeller forums(uses advanced Google search)
    My cruising website is: www.bluemagic.biz MultiBladeProp is: www.bluemagic.biz/cluso.htm
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

  20. #20

    Default

    Thanks guys for the input. All I really care about is that when I buy a parallax demo board and disconnect it from the PC it should still continue to work without me having to comment out my serial driver code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
    Last edited by ForumTools; 09-30-2010 at 02:45 PM. Reason: Forum Migration

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts