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

Uart2bufmod #1437

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Uart2bufmod #1437

wants to merge 4 commits into from

Conversation

xjikka
Copy link
Contributor

@xjikka xjikka commented Nov 23, 2024

I added new routines to enable simultaneous use of both UARTs on Beken. Each UART has its own Ring Buffer. It is allocated only when used. The new routines use the uartindex parameter - specifying the port and also the buffer.

The goal is to use a measuring cube with two BL0942, each on one UART /I am working on the modification/.

Backward compatibility with UART switching in the config using the OBK_FLAG_USE_SECONDARY_UART flag has been preserved.

Currently only for the Beken platform, but it should not be a problem to add other platforms.

@MaxineMuster
Copy link
Contributor

MaxineMuster commented Nov 24, 2024

Just for I'm curious: Did you take into account, that actually the second UART is used for device logging?
Did you maybe already change this?

Oh, sorry, I just now found the Elektroda thread about all this. Forget my comment ...

@xjikka
Copy link
Contributor Author

xjikka commented Nov 24, 2024

Just for I'm curious: Did you take into account, that actually the second UART is used for device logging? Did you maybe already change this?

Oh, sorry, I just now found the Elektroda thread about all this. Forget my comment ...

Of course, for using UART2, it is good to first turn off the log by using "logtype none" in autoexec (as I do).

Anyway /and this surprised me/ it can also work in parallel. Ie. log on UART2 + BL0942. Only with the fact that the log is also at 4800 baud which slows down the system, but it works fine. BL0942 ignores the other data on port.

But I recommend turning off the log when using it.

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

Successfully merging this pull request may close these issues.

2 participants