Shop OBEX P1 Docs P2 Docs Learn Events
Reset Problem — Parallax Forums

Reset Problem

mynet43mynet43 Posts: 644
edited 2010-01-28 14:35 in Propeller 1
I have a small circuit board I've been using that has a strange problem.

It has both prop-plug and USB interface.

When I burn a program into the EEPROM from the USB port, it will not boot from the EEPROM unless the USB cable is plugged in. Once it's booted, I can pull out the USB cable and it will continue to run.

If I cycle the power with the cable unplugged, nothing happens.

Has anyone run into this before, or do you have a clue as to what might be going on? The only possible thing I can think of is that the transistor in the USB circuit may somehow be doing something bad to the reset line when the cable isn't plugged in. It's a pretty standard circuit for the FT232RL chip. I've used the same transistor and circuit on several other boards. It's a BC817-16W-7 from Mouser.

I've attached pictures of the schematic and the front and back of the board layout.

Thanks for your help.

Jim
1024 x 789 - 108K
1024 x 689 - 161K
1024 x 690 - 118K
934 x 644 - 328K
913 x 628 - 236K

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2010-01-27 20:48
    Hi,

    I use 10nF ceramic for the reset cap from DTR, and it has always worked for me.

    I also don't see low value ceramic bypass caps near the prop.

    Hope this helps!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
    Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler Largos - upcoming nano operating system
  • mynet43mynet43 Posts: 644
    edited 2010-01-27 21:03
    Thanks Bill,

    I may try replacing the transistor and using the smaller cap you recommend.

    Anyone else see anything?

    Jim
  • mynet43mynet43 Posts: 644
    edited 2010-01-27 22:23
    OK, I just replaced the cap with Bill's suggestion AND the transistor.

    It's still doing exactly the same thing. Boots perfectly when USB cable plugged in, nothing when cable is removed.

    Here's another clue [noparse]:)[/noparse] It also boots when the Prop Plug is connected without the USB.

    Any other suggestions?

    Thanks!
  • LeonLeon Posts: 7,620
    edited 2010-01-27 22:38
    Each Vdd pin should be decoupled with 100 nF.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-01-27 23:15
    What! no high-frequency decoupling at all on the board! Even if you had one 100nf across the supply rails it should be ok. Other than that I can see that your receive input lacks a pullup resistor which might confuse the prop during boot (your software?) as the level through the indicator led will result in the rx input hovering around the switching threshold (noise). Try loading in a simple program and even set the system clock at a lower frequency. Bear in mind too that the DTR/reset input may be picking up noise and reseting the prop as I see you are driving a motor. For a simple test just pull the dtr line low when you disconnect the programming cable.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • mynet43mynet43 Posts: 644
    edited 2010-01-27 23:27
    Thanks guys for the suggestions.

    You may be right about the decoupling caps. I know you're supposed to do it. I just got lazy because I've done it on several Prop boards and never had a problem.

    I'll try Peter's suggestion to put a 0.1uF across the supply and see if it solves the problem. I'll let you know.

    Thanks!

    Jim
  • mynet43mynet43 Posts: 644
    edited 2010-01-28 00:17
    OK, I tried the two things you suggested.

    1. 100 nF cap from Prop ground to nearby 3.3V rail.

    2. Pull down DTR line with 10K.

    Neither change helped. It still works fine with either USP or Prop Plug plugged in. Without one of these, it won't boot.

    I may try unsoldering the transistor to see if that helps.

    Let me know if you have other suggestions.

    Thanks for the help!
  • mynet43mynet43 Posts: 644
    edited 2010-01-28 00:43
    Progress. I'm isolating the problem.

    Out of desperation, I removed the transistor. Once I did that, everything started working perfectly.

    It looks like it's something in the FT232RL circuit. I had replaced the transistor earlier, so it can't be that. There shouldn't be any high speed signals there, so I don't think it's the decoupling.

    My next step may be to replace the FT chip, which is a pain because of the fine pitch on the pins.

    Let me know if you think of anything else that makes sense.

    Thanks!
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-01-28 01:39
    Try to check what polarity the DTR output is programmed for - perhaps its backwards compared to PropPlug. I ran into that issue a couple of years ago.
    mynet43 said...
    Progress. I'm isolating the problem.

    Out of desperation, I removed the transistor. Once I did that, everything started working perfectly.

    It looks like it's something in the FT232RL circuit. I had replaced the transistor earlier, so it can't be that. There shouldn't be any high speed signals there, so I don't think it's the decoupling.

    My next step may be to replace the FT chip, which is a pain because of the fine pitch on the pins.

    Let me know if you think of anything else that makes sense.

    Thanks!
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
    Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler Largos - upcoming nano operating system
  • RaymanRayman Posts: 14,876
    edited 2010-01-28 02:04
    Does your code use pins 30 or 31 for serial data out or something? It's been observed that this can cause the FTDI chip to power up and then reset the Prop... Anyway, try making sure your code isn't using those pins...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-01-28 03:01
    I think you may be right Ray, I didn't look at the circuit properly and missed the FT232. Easiest fix is to switch the reset circuit out or even not enabling the serial port object because this makes the tx line go high which feeds phantom power to the FT232.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Luis DigitalLuis Digital Posts: 371
    edited 2010-01-28 03:02
    You uses RX and TX as indicators when are available CBUS1(Pin 22) and CBUS0 (Pin23).

    Maybe not related to your problem, but I think this is a good practice.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-28 03:52
    This is a known problem with a documented solution:

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

    Also, you can't simply parallel the Prop Plug with the FT232RL on A31 without causing a bus conflict when the Prop Plug is present.

    -Phil
  • mynet43mynet43 Posts: 644
    edited 2010-01-28 04:28
    Wow! Thanks so much for all the good suggestions.

    This is very frustrating because I've used this exact circuit on many boards and never had this problem. I had no idea it had been lurking here for a while.

    @Phil,

    I've read thru your link. Seems like this has been a problem for several people. Right now I'm looking for the easiest way to patch an existing board with this circuit. Let me know what you recommend.

    @Luis,

    I think you're referring to the FT232RQ chip rather than the FT232RL, which doesn't have LED drivers.

    There might be an even easier solution. I'm not using serial output at this stage bit I am initializing the serial driver. Is is possible just disabling this will solve the problem?

    Thanks all!

    Jim
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-01-28 05:02
    The RQ is just a different package (QFN) vs the RL. The LED drivers are lurking under the CBUSx pins which by default are setup for indicators but you can change the function with the configuration tool (only if you need to).

    Yes, disable the driver as I have previously mentioned to fix the problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-28 05:27
    To patch your existing board, take Peter's advice, and cut the trace from the transistor collector to RESn, then install a jumper for when you wish to reprogram the Prop.

    As a footnote, franky I'm a little perplexed why you would include support for both a Prop Plug and USB. If a person has a Prop Plug, they automatically have USB and could just as easily plug their cable into the USB socket.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 1/28/2010 5:32:12 AM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-01-28 05:41
    Phil Pilgrim (PhiPi) said...
    To patch your existing board, take Peter's advice, and cut the trace from the transistor collector to RESn, then install a jumper for when you wish to reprogram the Prop.

    As a footnote, franky I'm a little perplexed why you would include support for both a Prop Plug and USB. If a person has a Prop Plug, they automatically have USB and could just as easily plug their cable into the USB socket.

    -Phil

    Yeah, I think that's why I missed the fact he had an FT232 onboard as he mentioned a Prop Plug.

    @Jim: Just as PhiPi says, cut the link, as disabling the driver is insufficient when you have sourced leds hanging off the serial lines (or you could remove the leds and disable the driver, your choice).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • mynet43mynet43 Posts: 644
    edited 2010-01-28 13:43
    I'm back. Good morning!

    Phil asked why I have both USB and Prop Plug. Good question. I could get by with just the USB port but the Prop Plug is so easy to include that I usually have both. I often use the Prop Plug for initial board testing and coding. In some cases it works when there's something wrong with the FT232 circuit.

    You've come up with some practical solutions to my problem. Right now I'm leaning toward Peter's final suggestion: to remove the LED's and disable the serial driver. The LED's aren't needed for this application. And, I can re-enable the serial driver when I have the USB plugged in for debugging.

    Since others have gone thru this same agony, it seems like it should be a big red flag in any reference to using the FT232.

    Thanks again for all your help. I'll try this and let you know how it works.

    Jim
  • mynet43mynet43 Posts: 644
    edited 2010-01-28 14:35
    Final result.

    I removed the USB LED's and the serial initialization and this completely solved the problem.

    I added a DEBUG constant to the program to turn on the serial port when needed. I tested this both ways, true and false, and it worked as predicted.

    Suggestion: Modify all the reference circuit descriptions that use the FT232, so this doesn't happen over and over again [noparse]:)[/noparse]

    Thanks so much for all your hard work to fully understand what's going on here.

    Jim
Sign In or Register to comment.