Shop Learn
Avoiding a new serial interface in Linux toggling DTR, and initiating reboot — Parallax Forums

Avoiding a new serial interface in Linux toggling DTR, and initiating reboot

feilipufeilipu Posts: 22
edited 2021-02-07 21:31 in Propeller 1

This seems to be long running issue that I can't find a resolution for.
Some references of others not finding an adequate answer.

https://raspberrypi.stackexchange.com/questions/9695/disable-dtr-on-ttyusb0
https://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection/

Essentially it is not possible using Linux, to connect a new serial device to the Propeller serial port and NOT have it reboot, as the Plug uses DTF to toggle the Prop bootloader. I've not found any reference to a general solution to killing the DTF toggle on connection.

This is an issue if the Propeller is running code that has an optional transient serial connection, using the same pins as the bootloader serial pins, which I (it turns out stupidly) do.

https://github.com/feilipu/ux_module/issues/11

Has anyone here solved this issue? Would be great to have further opinions?

Phillip

Comments

  • Using the bootloader pins is not the problem.

    Anyways, the best solution is to have a physical jumper that disables the automatic reset.

  • maccamacca Posts: 274

    Essentially it is not possible using Linux, to connect a new serial device to the Propeller serial port and NOT have it reboot, as the Plug uses DTF to toggle the Prop bootloader. I've not found any reference to a general solution to killing the DTF toggle on connection.

    You mean DTR ? :smile:

    The solution from the raspberry stack exchange works for me:

    stty -F /dev/ttyUSB0 -hupcl

    Using Ubuntu 20.10.
    This however only disables the automatic dtr toggling, the program accessing the serial port may still toggle the dtr line for its own purpouses (you can for example still upload the firmware with this option set).
    Tried to send some chars with cat and I don't see reboots.

  • Thanks for the tip. But I’ve tried a number of similar options, unsuccessfully. It is lucky in a way, because it will cause me to fix it properly, with a switch. Then it will be platform neutral.

    Oh, and DTF? I must be spending too long on those other forums. ( :D joke).

  • Ultimately this is a problem simply because the DTR is intended to be used to reset the Prop but also because the simple hardware allows any DTR edge to reset the Prop.
    I have my own serial USB chip that appears as a CP2102 USB serial but does a lot lot more including the ability to distinguish a valid DTR serial load pulse as opposed to any edge or pulse that occurs as on terminal connect/disconnect just as DTR should.

    (forgot to post this draft that's been sitting here for days)

Sign In or Register to comment.