Shop OBEX P1 Docs P2 Docs Learn Events
USB port restarting QickStart — Parallax Forums

USB port restarting QickStart

FishermanFisherman Posts: 14
edited 2013-12-02 20:42 in Propeller 1
Hi
Found a pattern in Quick Start Resetting - in earlier thread.

Situation:
Fujitsu Lifebook, Win XP, USB port and QuickStart.

Problem:
Every 48 secs the blue LED left to USB port blinks two times ( 2 secs between) and current program stops and EEPROM program starts.

All 3 USB ports works the same way - 48 secs time sync from connecting USB into PC.

Running the same program, cable and QS-card on an older HP laptop - and no reset after an hour!

Is it a PC, driver or hw effect?

/Stefan

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-16 07:02
    The PC is losing the connection to the QuickStart Board, then reestablishing it. When the PC re-enumerates the USB connection, that process causes a reset (and results in the blinks seen).

    That description doesn't explain why this is happening. If you have circuitry connected to the QuickStart Board, that may be drawing too much current and the Lifebook can't handle the drain while the older HP could. If you have just the QuickStart Board connected to the PC, it's hard to say what's going on since the QuickStart Board shouldn't draw enough current to cause the USB ports to shut down. Can you provide more information about what the QuickStart Board is supposed to be doing?
  • SapiehaSapieha Posts: 2,964
    edited 2012-11-16 07:23
    Hi Fisherman.

    Looks like Current control problems in Yours Laptop's USB

    Fisherman wrote: »
    Hi
    Found a pattern in Quick Start Resetting - in earlier thread.

    Situation:
    Fujitsu Lifebook, Win XP, USB port and QuickStart.

    Problem:
    Every 48 secs the blue LED left to USB port blinks two times ( 2 secs between) and current program stops and EEPROM program starts.

    All 3 USB ports works the same way - 48 secs time sync from connecting USB into PC.

    Running the same program, cable and QS-card on an older HP laptop - and no reset after an hour!

    Is it a PC, driver or hw effect?

    /Stefan
  • FishermanFisherman Posts: 14
    edited 2012-11-16 08:00
    Mike Green wrote: »
    The PC is losing the connection to the QuickStart Board, then reestablishing it. When the PC re-enumerates the USB connection, that process causes a reset (and results in the blinks seen).

    That description doesn't explain why this is happening. If you have circuitry connected to the QuickStart Board, that may be drawing too much current and the Lifebook can't handle the drain while the older HP could. If you have just the QuickStart Board connected to the PC, it's hard to say what's going on since the QuickStart Board shouldn't draw enough current to cause the USB ports to shut down. Can you provide more information about what the QuickStart Board is supposed to be doing?

    I have reduced the situation to :
    * nothing connected - only USB cable.
    * loading a simple LED blinking with F10 from propeller tool with "Simple_Spin_Template" (doing nothing) in EEPROM
    just to see the difference

    After a time double blink and EEPROM program is running.
    Then with a rep time of 48 secs (+- < 1 sec with my mobile) double blink occures.

    /Stefan
  • cavelambcavelamb Posts: 720
    edited 2012-11-16 08:09
    Question:
    How tight are the USB connectors?

    Do they slide apart easily?
    Or are they fairly tight?
  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-16 08:11
    You could post the actual program you're using. I can imagine some simple mistakes in such a program that would result in a reset about once every 50 seconds, but that wouldn't explain the USB re-enumeration (resulting in the double blink).

    There could be a problem with the Lifebook's USB ports. Try putting a powered USB hub between the Lifebook and the QuickStart Board.
  • FishermanFisherman Posts: 14
    edited 2012-11-16 08:29
    cavelamb wrote: »
    Question:
    How tight are the USB connectors?

    Do they slide apart easily?
    Or are they fairly tight?

    I have just now tried 4 different USB cables - long, short, "sloppy", tight, with and whitout ferrite core.

    Same double pulse every 48 secs!

    /Stefan
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-11-16 09:06
    This is just a total guess, but try adding these two statements to the beginning of your program (assuming you're not using the serial port for anything):
    dira[30]~~
    outa[30]~~
    

    What this does is to establish a normal marking state on the serial out line. My thought is that if the laptop sees an extended BREAK condiiton (space state), it may try to reestablish the connection.

    -Phil
  • LawsonLawson Posts: 870
    edited 2012-11-16 10:49
    Fisherman wrote: »
    I have reduced the situation to :
    * nothing connected - only USB cable.
    * loading a simple LED blinking with F10 from propeller tool with "Simple_Spin_Template" (doing nothing) in EEPROM
    just to see the difference

    After a time double blink and EEPROM program is running.
    Then with a rep time of 48 secs (+- < 1 sec with my mobile) double blink occures.

    /Stefan


    Have you tried putting a program with a different blink pattern into EEPROM? This would would let you differentiate weather the code in RAM locked up, or the chip reset. With your stated testing scheme, these two situations would look the same.

    "Resetting" repeatably every 48 seconds sounds suspiciously like an issue with CNT rollover and WaitCNT. Also if the computer is re-enumerating the port, that WILL reset the propeller. Never had the vanilla FTDI inc. drivers do that to me though. Finally, USB is pretty sensitive to noise. I've built several propeller boards that live near Q-switched lasers, and the USB connections give me trouble once in a while.

    Lawson
  • FishermanFisherman Posts: 14
    edited 2012-11-16 11:02
    Mike Green wrote: »
    You could post the actual program you're using. I can imagine some simple mistakes in such a program that would result in a reset about once every 50 seconds, but that wouldn't explain the USB re-enumeration (resulting in the double blink).

    There could be a problem with the Lifebook's USB ports. Try putting a powered USB hub between the Lifebook and the QuickStart Board.

    I have tried different programs without any hw connected - with same result and timing.
    BUT all programs works without reset on an older HP laptop!

    Here are the files: (reduced to close to nothing)

    Simple loaded in EEPROM and LED... as current

    Simple_Spin_Template.spin , LED_0r0.spin

    /Stefan
  • FishermanFisherman Posts: 14
    edited 2012-11-16 11:17
    Lawson wrote: »
    Have you tried putting a program with a different blink pattern into EEPROM? This would would let you differentiate weather the code in RAM locked up, or the chip reset. With your stated testing scheme, these two situations would look the same.

    "Resetting" repeatably every 48 seconds sounds suspiciously like an issue with CNT rollover and WaitCNT. Also if the computer is re-enumerating the port, that WILL reset the propeller. Never had the vanilla FTDI inc. drivers do that to me though. Finally, USB is pretty sensitive to noise. I've built several propeller boards that live near Q-switched lasers, and the USB connections give me trouble once in a while.

    Lawson

    Yes - I checked with diff LED blinking to confirm that EEPROM program became active after double blink.

    CNT rollower - isn't that 57 secs or so ...

    LASER, magnetic, static fields, power glithes ... I live out in the archipelago of Stockholm but - you never know what neighbors are doing ...

    /Stefan
  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-16 11:33
    There's nothing in the LED_0r0.spin program that would cause what you're seeing. It must be a defect in the Lifebook's USB power management. If it were due to a short circuit in the QuickStart Board, the problem would also show up (perhaps differently) on the HP as well. In addition to trying a powered USB hub between the Lifebook and the QuickStart Board, you might try a different QuickStart Board (if you can find someone else with one) and yet another type of laptop or desktop PC
  • SapiehaSapieha Posts: 2,964
    edited 2012-11-16 12:41
    Hi Fisherman..


    Disconnect USB 5V power between QuickStart and USB and supply QuickStart with 5V form any other source and see what hapen's


    Fisherman wrote: »
    Yes - I checked with diff LED blinking to confirm that EEPROM program became active after double blink.

    CNT rollower - isn't that 57 secs or so ...

    LASER, magnetic, static fields, power glithes ... I live out in the archipelago of Stockholm but - you never know what neighbors are doing ...

    /Stefan
  • FishermanFisherman Posts: 14
    edited 2012-11-16 12:52
    Mike Green wrote: »
    There's nothing in the LED_0r0.spin program that would cause what you're seeing. It must be a defect in the Lifebook's USB power management. If it were due to a short circuit in the QuickStart Board, the problem would also show up (perhaps differently) on the HP as well. In addition to trying a powered USB hub between the Lifebook and the QuickStart Board, you might try a different QuickStart Board (if you can find someone else with one) and yet another type of laptop or desktop PC

    I have a lot of boards - tried on several with same result so there is not a defect on one card. I dont have a powered USB hub at the moment.

    The reason I want this Lifebook work with QS-board is that I'm teaching programming (playing with light, sound, movement ...) using Spin on QSboards - to young students. We have 1-1 = one Lifebook to each student in our scool.

    So It looks quite clear now to dig more into the Lifebook and it's USB. Any hints for direction?

    Thanks for all replies so far ...

    /Stefan.
  • FishermanFisherman Posts: 14
    edited 2012-11-16 13:00
    Sapieha wrote: »
    Hi Fisherman.

    Looks like Current control problems in Yours Laptop's USB

    Hej Sapieha

    Any idea if it's about hardware, driver or windows? Or where to start digging?

    /Stefan
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-11-16 13:02
    Stefan,

    Did you try my idea about setting P30 high? I don't give it much chance of success, but since you're already grasping at straws ...

    -Phil
  • David CarrierDavid Carrier Posts: 294
    edited 2012-11-16 13:13
    Stephen,
    There are two signals on the FT232R that the Lifebook could be toggling that would cause the QuickStart to reset. One is DTR, which is inverted by a BJT transistor and connected to the reset line. The other possibility is the PWREN# signal, which is output on the CBUS3 pin and connected, through the QuickStart's /USB_PWR_EN net, to a high-side FET transistor the turns power on and off to the entire board. If the Lifebook is toggling DTR, it will be difficult to workaround in hardware, as the reset is needed to program the Propeller. If it is toggling PWREN#, you can drive /USB_PWR_EN low, by tying pin 30 on the QuickStart header to ground, and prevent the Lifebook from powering off the QuickStart.

    If you have more than one Lifebook, and the drivers were installed separately on each one, I'd recommend trying different Lifebooks to see if they all behave the same. If the problem is with DTR toggling, it could be a USB or serial port driver issue. If the problem is with PWREN# toggling, it could be a USB or ACPI driver issue.

    — David Carrier
    Parallax Inc.
  • Bill HenningBill Henning Posts: 6,445
    edited 2012-11-16 13:14
    I assume you tried all of the USB ports on the Lifebook.

    Try putting a powered USB hub between the Lifebook and the Quickstart - perhaps the +5 is flakey on its USB

    Try putting a scope between +5 and GND on a USB cable on the Lifebook and see if the power is good, and that it is clean
    Fisherman wrote: »
    I have a lot of boards - tried on several with same result so there is not a defect on one card. I dont have a powered USB hub at the moment.

    The reason I want this Lifebook work with QS-board is that I'm teaching programming (playing with light, sound, movement ...) using Spin on QSboards - to young students. We have 1-1 = one Lifebook to each student in our scool.

    So It looks quite clear now to dig more into the Lifebook and it's USB. Any hints for direction?

    Thanks for all replies so far ...

    /Stefan.
  • FishermanFisherman Posts: 14
    edited 2012-11-16 14:00
    Stefan,

    Did you try my idea about setting P30 high? I don't give it much chance of success, but since you're already grasping at straws ...

    -Phil

    Hi Phil
    Not yet - I'll try that out tomorrow (it's late here now)

    /Stefan
  • FishermanFisherman Posts: 14
    edited 2012-11-17 06:29
    Stephen,
    There are two signals on the FT232R that the Lifebook could be toggling that would cause the QuickStart to reset. One is DTR, which is inverted by a BJT transistor and connected to the reset line. The other possibility is the PWREN# signal, which is output on the CBUS3 pin and connected, through the QuickStart's /USB_PWR_EN net, to a high-side FET transistor the turns power on and off to the entire board. If the Lifebook is toggling DTR, it will be difficult to workaround in hardware, as the reset is needed to program the Propeller. If it is toggling PWREN#, you can drive /USB_PWR_EN low, by tying pin 30 on the QuickStart header to ground, and prevent the Lifebook from powering off the QuickStart.

    If you have more than one Lifebook, and the drivers were installed separately on each one, I'd recommend trying different Lifebooks to see if they all behave the same. If the problem is with DTR toggling, it could be a USB or serial port driver issue. If the problem is with PWREN# toggling, it could be a USB or ACPI driver issue.

    — David Carrier
    Parallax Inc.

    David
    Tying pin 30 QuickStart's /USB_PWR_EN to gnd, makes no difference. And power levels and stability looks OK.

    Moving the USB mini to one Protocard via Propeller plug - I observe same effect = Reseting EEPROM program every 48 secs.

    Can't try other Lifebook during weekend. I am not so familiar with USB ports / drivers issues - but know that all Lifebooks are reloaded with the same "image" before delivery to students.

    The 48 secs intervalls are syncronises (starting) with USB conection time - and independent of Propeller program phase.

    /Stefan
  • FishermanFisherman Posts: 14
    edited 2012-11-17 06:36
    This is just a total guess, but try adding these two statements to the beginning of your program (assuming you're not using the serial port for anything):
    dira[30]~~
    outa[30]~~
    

    What this does is to establish a normal marking state on the serial out line. My thought is that if the laptop sees an extended BREAK condiiton (space state), it may try to reestablish the connection.

    -Phil

    Phil
    The only difference I can see is a short red LED blink after the blue duoble blink. The effect of driving Propeller TX hi.

    /Stefan
  • cavelambcavelamb Posts: 720
    edited 2012-11-17 17:29
    I just got home from taking some friends sailing today.
    When I fired up the computer, I noticed that I had left a
    QuickStart board attached to the USB hub. Ok.

    Then I plugged in my phone to download some pics.

    And saw the QuickStart re-start!

    RED/BLUE leds on, some handshaking - and
    the IR remote control program (in eeprom) restarted.

    Disconnecting the phone caused the Quick to restart again.

    I'm not saying it's anything related, but I didn't know
    that one device would cause another to do anything like that.
    .
  • bozobozo Posts: 70
    edited 2013-12-01 21:12
    hi Stefan did you resolve this?

    I have a similar problem on a HP laptop but with an interval of about 35 seconds between resets, and I get the same symptoms of a double-blink on the blue LED (CBUS0) followed by the reset.

    It doesn't matter which USB port I use ... the same thing happens on all the spare ports I tried.

    But if I swap to another HP laptop (different model), no such problem happens at all. Same Quickstart board, same USB cable. All I am doing is flashing one LED so surely current draw can't be an issue.

    I'm keen to know if this can be corrected by way of some configuration in the laptop.

    cheers,
    Mark
  • bozobozo Posts: 70
    edited 2013-12-02 18:42
    I reloaded the FTDI drivers (2.08.24) and the problem persisted.

    However, if I open (and enable) the Parallax Serial Terminal, the problem goes away.
    Note here that the Quickstart is not sending or receiving anything via serial.
    The program running on it actually does nothing but flash some LEDs on start (so I can tell when it is coming out of reset) then go into an infinite loop
    of incrementing a variable after extinguishing all LEDs ... so I get a visual alert that a reset occurs.

    The same symptoms happens if I use BST - the board cyclically resets every 35 seconds.
    But, if I open the serial terminal from within BST (and connect it) the problem goes away.

    I loaded a later driver from FTDI (2.08.30) and the problem remained.
    Then I went back to 2.08.24 and the problem was still there.

    I'm using Windows7, 64-bit machine. Same as my 2nd laptop which doesn't exhibit the problem at all.

    Anybody got any clues? I tried everything from earlier in this thread to no avail.

    Swapping laptops is not the solution.

    cheers,
    Mark
  • bozobozo Posts: 70
    edited 2013-12-02 20:42
    Solved.

    the solution is here:
    http://forums.parallax.com/showthread.php/131996-Propeller-demo-board-keeps-reseting-while-connected-with-USB-cable?p=1005023&viewfull=1#post1005023

    I turned off the Sony-Ericsson software and the problem disappeared.

    cheers,
    Mark
Sign In or Register to comment.