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

First transmission after reset may release the bus too early #45

Closed
TG9541 opened this issue Jul 2, 2022 · 1 comment
Closed

First transmission after reset may release the bus too early #45

TG9541 opened this issue Jul 2, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@TG9541
Copy link
Owner

TG9541 commented Jul 2, 2022

While working on #44 it turned out that, under certain conditions, a MODBUS Server releases the bus after the second to last byte. The last byte won't be sent on the bus.

The following trace shows the UART TX in D1 and the RS485 transceiver direction in D2:

image

@TG9541 TG9541 added the bug Something isn't working label Jul 3, 2022
@TG9541
Copy link
Owner Author

TG9541 commented Jul 3, 2022

The problem has been identified: RM0016 22.7.1 states that the TC flag has to be cleared by first reading UART_SR and then writing UART_DR. This condition is met - by accident - after the first transmission.

I'm working on a solution that fixes the problem and also takes advantage of >REL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant