Shop OBEX P1 Docs P2 Docs Learn Events
RE: Propellar Chip Resets Itself when USB cable is removed — Parallax Forums

RE: Propellar Chip Resets Itself when USB cable is removed

schwiegjcschwiegjc Posts: 41
edited 2008-10-15 04:00 in Propeller 1
When I run my Propellar program from EEPROM with the USB cable removed, the program will run for a·couple·of seconds then reset itself. This will repeat itself. I thought I read that there had to be a delay?·

Comments

  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-10-13 21:41
    If you are using fullduplexserial you need to disable the tx line if it is not connected to the usb. It will cause the ftdi to reset the prop.
  • schwiegjcschwiegjc Posts: 41
    edited 2008-10-14 01:36
    Is that a piece of software code or switch on the Propellar Demo Board??
  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-14 01:44
    The problem is that the USB chip is not powered (because it's not connected to a USB port) and, if your program attempts to transmit to the programming port or otherwise makes that pin a high output, the signal supplies enough power to the USB chip that it can accidentally reset the Propeller. The solution is to not try to use the programming port transmit line (pin 31?) unless it's connected to a USB port.
  • schwiegjcschwiegjc Posts: 41
    edited 2008-10-14 17:47
    The program that I am writing captures an ASCII data stream (Baud of 4800). To use the
    BS2.Serin_Wait(COMPASS_RX,@DataIn,"T",4800,1,8) command, the BS2.BS2_Start (30,31) command has to be sent first. Do you think that is why the Propellar will reset itself if the Propellar USB port is not attach to the PC?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-14 18:01
    Yes

    You could put a "dira[noparse][[/noparse]31]~" right after the call to BS2_Start. This will change the transmit pin back to input mode so it can affect the USB chip for only a millisecond or so.
  • schwiegjcschwiegjc Posts: 41
    edited 2008-10-15 04:00
    Thank you. Inserting dira[noparse][[/noparse]31]~ after the BS2_Start(30,31) resolved the problem.
Sign In or Register to comment.