Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baudrate 1500000 #34

Open
fransvanberckel opened this issue Mar 5, 2020 · 7 comments
Open

Baudrate 1500000 #34

fransvanberckel opened this issue Mar 5, 2020 · 7 comments

Comments

@fransvanberckel
Copy link

@fransvanberckel fransvanberckel commented Mar 5, 2020

Working on Linux ports, with TTL on Rockchip boards, i need 1,500,000 baud/s with 8N1.

#USB-TTL #UART #Serial Adapter-microcontroller

@Jeija

This comment has been minimized.

Copy link
Owner

@Jeija Jeija commented Mar 8, 2020

Does it work if you enter the baudrate manually? If so, it's just a matter of adding it as another default.

@fransvanberckel

This comment has been minimized.

Copy link
Author

@fransvanberckel fransvanberckel commented Mar 9, 2020

No, it does not, with a manual baud rate set. I am getting a lot of garbage instead. But if i close gtkterm, and open # minicom -s. Setting the port & speed, it runs well!

@wvdakker

This comment has been minimized.

Copy link
Collaborator

@wvdakker wvdakker commented Mar 9, 2020

The program has 2 options with those excessive speeds. 1000000 and 2000000. I dont know if your device can put on 1000000, but that should be helpful to detect the failure.

If you put it on curstom 1500000 as you noted in previous message can you confirm that the interface shows the right speed (not truncated or so)?

@fransvanberckel

This comment has been minimized.

Copy link
Author

@fransvanberckel fransvanberckel commented Mar 13, 2020

That's what i did try. And be sure your TTL board got to support 1,500,000 baud/s. Some of my didn't.

@wvdakker

This comment has been minimized.

Copy link
Collaborator

@wvdakker wvdakker commented Mar 13, 2020

Ok to summarize ...
gtkterm does not work with the predefined 1000000 and 2000000 baud rates.
Minicom however does work with these baud rate.

Ergo: probably the software does not handle very large speeds.

Correct?

@Jeija

This comment has been minimized.

Copy link
Owner

@Jeija Jeija commented Mar 13, 2020

I think the reason might be that for some default speeds (e.g. 115200, 9600, ... baud) we use a different mechanism to configure the hardware than for unknown speeds - 1500000 is one of these unknown baud rates for us.

Look at https://github.com/Jeija/gtkterm/blob/master/src/serial.c#L178 for instance. If the speed is unknown, we call set_custom_speed(config.vitesse, serial_port_fd);.
Minicom, on the other hand, handles some additional baud rates: https://github.com/Distrotech/minicom/blob/54202fe0ea8510dc8fcd23ab49d39d3d8cb2e529/src/sysdep1.c#L394. This includes the B1500000 baud rate.

@Jeija

This comment has been minimized.

Copy link
Owner

@Jeija Jeija commented Mar 13, 2020

@fransvanberckel : I just pushed a (minimal, see 80345e1) change to the fix34 branch. Could you test it and see if it resolves your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.