Shop OBEX P1 Docs P2 Docs Learn Events
Preventing resets on the QuickStart — Parallax Forums

Preventing resets on the QuickStart

TintinTintin Posts: 37
edited 2015-06-18 11:24 in Propeller 1
The QuickStart resets every time I connect it to a computer. I think this is caused by the DTR line from the onboard FTDI device. Although this reset is needed for programming the board, there are cases where it is undesirable. Is there a way to prevent this reset, either through software, or by nonintrusive hardware? By "nonintrusive" I mean not having to scrape traces off the board to install a jumper!

Comments

  • T ChapT Chap Posts: 4,223
    edited 2015-05-10 08:39
    When the FT232R is in reset, the UART interface I/O pins are tri-stated. Input pins have internal 200kΩ pull-up resistors to VCCIO, so they will gently pull high unless driven by some external logic.

    I wonder what happens if you put a jumper from the FTDI Reset pin to GND when it is not being used. I read this as that if you have a 10K pulldown on the base of the NPN that controls the Prop RST pin, there should be no signal produced on the DTR pin when plugging in the cable. ** This assumes the FTDI reset pin is active low to enter reset mode, which I have not checked.
  • kwinnkwinn Posts: 8,697
    edited 2015-05-10 09:32
    T Chap wrote: »
    When the FT232R is in reset, the UART interface I/O pins are tri-stated. Input pins have internal 200kΩ pull-up resistors to VCCIO, so they will gently pull high unless driven by some external logic.

    I wonder what happens if you put a jumper from the FTDI Reset pin to GND when it is not being used. I read this as that if you have a 10K pulldown on the base of the NPN that controls the Prop RST pin, there should be no signal produced on the DTR pin when plugging in the cable. ** This assumes the FTDI reset pin is active low to enter reset mode, which I have not checked.

    There is a 10K pulldown there already on the schematic (rev A_2). The FTDI is powered from the USB so this is more likely caused by the chip powering up. If there are 200K internal pullups on the FTDI chip perhaps a 10K pulldown on the FTDI DTR pin might work. Of course if powering up the FTD! chip causes a glitch that sets the DTR pin to an output and to high momentarily this may not work either.
  • T ChapT Chap Posts: 4,223
    edited 2015-05-10 09:36
    True but if the device is powered ON while it's reset is held LOW, maybe that would prevent the device from setting it's i/o to a finite state hi or low. In his case, he can leave the jumper in place at all times until he wants to program. It is worth a try and it is very easy to connect the reset pin on the FTDI to GND. I was aware of the existing 10k pull down to the base of the NPN, and the 10k pulldown will negate the 200k pullup on the i/o.
  • kwinnkwinn Posts: 8,697
    edited 2015-05-10 09:48
    Yes, well worth trying, and worth replacing the jumper with a switch if it works and plugging/unplugging is done often enough.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-05-10 10:01
    Maybe Parallax could be persuaded to put a resistor between Q1's collector and nRES in their next iteration. That way, you could just jumper nRES to Vdd. (You might even get by with that now, since the short through Q1 during reset would be very short-lived. But you didn't see me recommend it. :) )

    -Phil
  • TintinTintin Posts: 37
    edited 2015-05-10 10:15
    Thanks for the responses. My board is a Rev B, so the reset pin of the FTDI device is directly connected to 3.3V; tying that to ground would cause a short. Also, I would really like a solution that involves just what I can access from the header of the QuickStart, or even better, a software solution. I looked into FTDI's FT_Prog utility that allows us to reprogram the FTDI device, but it seems that the only thing I can change about DTR is to invert it.

    I've tried Phil's solution in the past, and it seems to work fine. I'm just a bit uneasy about that short-lived short causing the board to be "short-lived" too. Especially that the short is not so short lived if I press the reset button. I wonder if putting a fast resettable fuse between Vdd and nRES would help...
  • T ChapT Chap Posts: 4,223
    edited 2015-05-10 10:25
    Why are you against cutting a trace? Takes 10 seconds and done. There are no solutions that meet your requirements.
  • TintinTintin Posts: 37
    edited 2015-05-10 11:12
    I'd prefer leaving the board intact, so that in the future, if I need to replace it, I don't have to modify it again.

    Tying nRES to Vdd would cause a brief short through Q1 whenever DTR is high, but would tying nRES to Vdd be bad for the propeller chip?
  • kwinnkwinn Posts: 8,697
    edited 2015-05-10 12:02
    You could try plugging a low value resistor (27 ohms) between pins 37 and 38 (RESn & 3.3V) on J1. Q1 can handle the current without risk of damage, and it might prevent the reset.
  • TintinTintin Posts: 37
    edited 2015-05-10 13:45
    kwinn wrote: »
    You could try plugging a low value resistor (27 ohms) between pins 37 and 38 (RESn & 3.3V) on J1. Q1 can handle the current without risk of damage, and it might prevent the reset.

    Well, it seems that even 2 ohms is not low enough. In fact, if the jumper wire between the pins is longer than about an inch, the resulting resistance is still too high! The approach only works with a small jumper wire.
  • T ChapT Chap Posts: 4,223
    edited 2015-05-10 16:24
    You will damage the NPN doing a straight wire, then you are doing a lot of unnecessary work to replace it. This is very simple to accomplish. Take off R9 which is an 0603 or 0402 0.01u cap. Then attach a wire to each of the pads that are left after you remove the cap. Connect a .01uf cap and a switch in series to the pads so you can easily turn on and off the output of DTR but still have the exact same circuit as if the cap was still soldered to the pads.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-05-10 16:55
    Why not just connect a switch across R3? The current drain on #DTR won't be much worse than driving the B-E junction through the cap directly, as it does now.

    Another thought would be to reprogram the FTDI pin for DTR, rather than #DTR (which may or may not help but worth a try), if that can be done, and IIRC it can be. You can also program the pin just to stay low, but you'd have to reprogram it every time you wanted to upload a program to the Prop.

    -Phil
  • T ChapT Chap Posts: 4,223
    edited 2015-05-10 17:06
    That is even easier than my idea. That is the best plan to date. Referring to a switch on R3.
  • TintinTintin Posts: 37
    edited 2015-05-11 03:49
    I must agree. The switch on R3 is a very nice solution. I will do this modification and report back with pictures, in case anybody is interested.

    As for setting the #DTR pin to DTR, that didn't work: the reset still occurs. Moreover, it seems that the only pins on the FTDI that can be reprogrammed beyond inversion are the CBUS pins. I've already changed CBUS0 and CBUS3 to tristates so that only Vin (and not 5V_USB) powers the board, allowing the QuickStart to be turned off while still connected to a computer.
  • base2designbase2design Posts: 78
    edited 2015-05-12 05:34
    +1 Would love to see your mod with pictures.
  • TintinTintin Posts: 37
    edited 2015-06-18 08:21
    Here's an update: To prevent resets, I placed a 0.05'' jumper across the base and emitter of Q1 (which is the same as placing it across R3). I also placed a jumper across the gate and source of Q2. This prevents the USB from powering the board: compared to just putting 5V from an external source on \UPE, this solution works even if the external source is turned off, but the USB is plugged in.

    attachment.php?attachmentid=114501&d=1434639831

    Jumpers.jpg


    Edit: For future reference, I should add that the jumper on Q2 requires the circuitry of the Rev B board, so that \UPE can be driven high.
    624 x 472 - 129K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-06-18 11:24
    Thanks for adding the photo Tintin. I may want to do something similar on a couple of my boards.
Sign In or Register to comment.