Shop OBEX P1 Docs P2 Docs Learn Events
USB Proto Bd #32212: Boot Loader issue when not Connected to USB — Parallax Forums

USB Proto Bd #32212: Boot Loader issue when not Connected to USB

Dave D'AmatoDave D'Amato Posts: 6
edited 2011-09-02 14:13 in Propeller 1
All,

Ok, new issue... lol!

The attached spin code works flawlessly when connected to USB host communications.
+250Vdc high voltage ramps in ~ 400ms as designed/expected via A/DC and SSR control.

BUT....
with USB disconnected, it works but becomes extremely slow in the refrsh rate... It seems to be rebooting but only when USB is disconnected...

Any ideas?

Thanks,

Dave

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2011-09-02 13:29
    Firtstly, welcome to this fabulous forum and the fantastic Propeller chip :)

    Yes Dave. It's a known problem and is described in many threads. Just don't have a link handy, so please search for threads on Propeller rebooting or USB problems or similar. Hopefully someone will chime in with a link for you (just busy at the mo'). Most likely you have a serial object loaded using pins P30 & P31. What happens is that the output from the prop partially powers the FTDI chip via P30 which causes resets to be issued to the propeller. Just disable your serial object and all should be good.
  • Dave D'AmatoDave D'Amato Posts: 6
    edited 2011-09-02 13:34
    I was afraid of that being a possible cause...
    Bs2 functions out the door for the mS, uS and ADC control.... Arghhhh.... lol!

    I'll give it a shot using other ADC code & waitcnt and post the results...

    Thanks for the reply...
  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-02 13:36
    This is a known problem with the USB interface. The problem is that your program attempts to communicate with the PC that isn't there. In doing so, it transmits to the serial to USB interface and this provides enough power for the reset circuitry to erroneously reset. The easiest solution is to check for the presence of a connection to the PC by checking the receive line (pin 31). It should be high if the USB line is connected and initialized. If not, then do not use the pins 30/31 serial interface. Since you're using the BS2_Functions object, try using "BS2.start(31,31)" instead of "BS2.start(31,30)". Debug output won't work, but the Prop won't reset when USB is disconnected.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-09-02 14:08
    Mike: Why would that work? Wouldn't the BS2.start(31,31) make the output pin now be 31? And that would (a) create a conflict between the prop and the ftdi chip both driving P31 and (b) wouldn't that still likely power the ftdi chip?

    I would suggest trying BS2.start(31,x) where x= an unused prop pin (if you have one) or try x=-1 (because some drivers detect a negative value for non-existent pins). Note I know nothing about the BS2 driver.
  • Dave D'AmatoDave D'Amato Posts: 6
    edited 2011-09-02 14:13
    'Start (Debug_rx, Debug_tx)
    BS2.Start(31,31) .....

    Wholly Smile, Friggin worked... Awesome, thanks Mike!
Sign In or Register to comment.