GithubHelp home page GithubHelp logo

Comments (10)

P33M avatar P33M commented on June 29, 2024

Do you have an example of a serial terminal program that does not customarily set DTR by default, and does not expose this option to the user?

from debugprobe.

lurch avatar lurch commented on June 29, 2024

See also raspberrypi/pico-sdk#932

from debugprobe.

MrGreensWorkshop avatar MrGreensWorkshop commented on June 29, 2024

Yes there actually is, check the screenshot in this issue. I think you can find more.
raspberrypi/pico-sdk#906

Btw, conflict resolved at PR #33.

from debugprobe.

P33M avatar P33M commented on June 29, 2024

All of the screenshots there offer the user a DTR toggle.

The International Telecommunications Union document ITU-T Rec V.24 has this to say about DTE behaviour in section 3.11:

3.11 Circuit 108/2 – Data terminal ready
Direction: To DCE
Signals on this circuit indicate the status of the DTE.
The ON condition, indicating that the DTE is ready to operate, prepares the DCE to connect the
signal-converter or similar equipment to the line.
The DCE may be connected to the line by a supplementary condition. Examples of such
supplementary conditions include, but are not restricted to, the following:
– depression of a push button at the DCE;
– an incoming call in the case of automatic answering;
– a call request command from the DTE in the case of automatic calling.
The DCE maintains the connection so long as the ON condition persists, except that the ON
condition shall not prevent the operation of disconnection functions optionally implemented in the
DCE. Examples of such disconnection functions are noted in the definition of circuit 108/1.
The DTE is permitted to present the ON condition on circuit 108/2 whenever it is ready to transmit
or receive data.
The OFF condition on this circuit causes the DCE to remove the signal-converter or similar
equipment from the line when the transmission to the line of all data previously transferred on
circuit 103 and/or circuit 118 has been completed. In the case where an intermediate function is
implemented in the DCE, the DCE may delay the removal of the signal converter from the line until
the protocol requirements of the intermediate function have been satisfied (e.g. outstanding data has
been acknowledged or a timeout has occurred).
The OFF condition of this circuit may also be used to direct the DCE to abort or to clear a serial
automatic calling operation (see Recommendation V.25 bis).

Which all but states that a DCE may not transmit data to the host without DTR being asserted.

from debugprobe.

MrGreensWorkshop avatar MrGreensWorkshop commented on June 29, 2024

When hardware flow control / handshaking is been used you are right. When handshaking is off, those doesn't apply. You can check that handshaking is off on those screenshots. I want to add that USB serial converters behaves same. When handshaking is off, DTR / CTS etc. is ignored.

from debugprobe.

P33M avatar P33M commented on June 29, 2024

DTR is/should be orthogonal to flow control. It controls the state of the overall communication channel, not the temporary line conditions requiring pauses (FIFO fill levels) for which RTS/CTS are most often used. See ITU-T rec V.43 section 4.1: Methods for flow control of transmitted data

Circuit 108/2 (DTR) is not included in the associated diagram and not mentioned anywhere in the document. Do you have a source for your assertion?

from debugprobe.

MrGreensWorkshop avatar MrGreensWorkshop commented on June 29, 2024

What I'm saying is the implementation of DTR creates a flow control, which stops sending data to host like RTS/CTS.
That's not how it should be when flow control is off.

These are related to DTR/DSR hardware flow control.

I should add that, if we are using 3rd party software which is using serial port, we don't have any control of DTR, like Android app, we can't expect programmers to turn on DTR in every software nor softwares already exist.

I remember when making Windows apps in VS .NET, DTR is OFF by default unless you enable it. It's the same in Linux and Android apps.

from debugprobe.

sanjay900 avatar sanjay900 commented on June 29, 2024

I've encountered this exact problem while trying to use picoprobe as a UART to program a Ox64 microcontroller. The tooling for this uses the DTR and RTS for triggering resets, and so i ended up needing to make this change myself in order to be able to program my devices

from debugprobe.

P33M avatar P33M commented on June 29, 2024

The picoprobe uart doesn't expose flow-control pins at all. Even if it did, you won't get a DTR pin as it's not a hardware mux option. The proposal above is to gate the transmission of UART characters over USB with DTR.

from debugprobe.

sanjay900 avatar sanjay900 commented on June 29, 2024

I see that makes sense. I was just providing a very odd example where the microcontroller i was programming didn't actually require those pins to function, but the tooling was clearing DTR and RTS anyways, i presume for other variants of that chip, causing me issues when I attempted to program. The fix above was something i was actually trying to find for a while.

from debugprobe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.