Shop OBEX P1 Docs P2 Docs Learn Events
Propeller ProtoBoard USB : repeated DTR-line-resets using Linux — Parallax Forums

Propeller ProtoBoard USB : repeated DTR-line-resets using Linux

Greg PGreg P Posts: 58
edited 2009-10-21 00:26 in Propeller 1
I just completed a project using the Propeller ProtoBoard USB (#32812) to provide a USB interface to an old surplus XYZ stepper system. Works great ! However, when I attempt to send the same serial commands (from Linux), Linux causes the DTR line to toggle with each "echo" statement from the command line. This, of course, resets the Propeller, causing the PC command to be ignored. I would like to preserve the DTR connection since without it firmware cannot be upgraded.

WHAT QUICK FIX SOLUTIONS EXIST ?

I've examined the layout of components on the PCB. Attached is a sketch of the components and their interconnections near the FT232RQ chip. I could break the DTR signal path from pin 31 of the FT232RQ chip to the 10nF capacitor, then reroute the broken signal path through a 2-pin jumper instead. That would allow me to reprogram the Propeller with the jumper in place, and also ignore the DTR line during normal operation with the jumper removed. I WOULD LIKE TO SUGGEST TO PARALLAX THAT LATER REVISIONS OF THE PROTO-USB BOARD SHOULD INCLUDE A SET OF JUMPERS FOR JUST THIS PURPOSE.

The restriction I'm under with Linux is that the serial commands must be sent via command line statements (like "echo" with com redirect), and not from within compiled code. I would like to block the toggling of the DTR line during 'echo' statements while, ideally, still having a means (again, from the command line) of setting or clearing the DTR line (for remote reset purposes). Any Linux gurus out there with a suggestion on how this might best be accomplished ?
770 x 548 - 37K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-10-20 18:19
    I think the reason you're seeing DTR toggle is that, with each echo, the port is being opened, written to, then closed again. Instead of redirecting directly to the serial port, can you redirect to a program running in the background that keeps the port open and passes on anything that's sent to it?

    -Phil
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-10-20 18:31
    Mgetty settings ... I think... here check this out:
    http://linux.derkeiler.com/Newsgroups/comp.os.linux.development.system/2009-04/msg00048.html

    HTH
    - H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • BradCBradC Posts: 2,601
    edited 2009-10-21 00:26
    stty -F /dev/ttyUSB0 -hup -clocal raw

    ...should to what you want.

    -hup tells the serial driver not to hangup (raise the DTR) when you close the port. The port is opened and closed with each Echo command
    -clocal tells the driver not to use hardware handshaking
    raw tells the driver not to perform any character translation (makes the path 8 bit clean)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lt's not particularly silly, is it?
Sign In or Register to comment.