2023-11-01 01:12 AM
Hello,
I am trying to implement 2 separate UART channels on the single port. I have initialized the two UART channels and have connected the TXs and RXs of the two channels with each other. (Image attached)
When I run them separately, they work just fine. But when the TXs are connected they won't work. Is this the correct way to operate the two channels on same port?
Please assist.
-Regards
2023-11-01 01:49 AM
The point / purpose of this would be what?
2023-11-01 02:09 AM
I have a single port which I can use to transfer the data. I want to transfer and communicate with both the core independently.
2023-11-01 04:05 AM
If Tx pins are set to push-pull as is normal, you can't just simply connect them - they will "fight" with uncertain result, or even get damaged.
JW
2023-11-01 05:00 AM
So what is the solution for this. Should I initialize it to Open Drain. Will this affect the communication?
2023-11-01 08:03 AM
You could use open drain with a pull-up, but you'd still need to manage / arbitrate usage so not to step on each other's communication. As the signal is Normally-High you could use an AND gate, or diodes, to mix a signal in Push-Pull mode.
You could share one UART between cores, both have access to the registers. Arbitrate who has owner ship.
2023-11-01 10:13 PM
OK. Thank you for your suggestion.
I will give this a try and check if it works for me.
-Regards
2023-11-02 07:15 AM
Hi, I tried the solution of open drain with pull-up.
As the port is single, I am sending a data set which eventually reached both the UART channels of the two core. The cores response to the received command by transmitting the data/message back. I am running these steps in a loop.
This entire configuration works for some amount of time but then any one of the core stops completely receiving the data. Can you tell what exactly happens over a period of time? Any solution to this?
-Regards
2023-11-02 07:40 AM
I don't know, you'll need to debug the issue and understand it.
For reception, look at sticky errors like Noise, Framing, Parity, etc as they stop reception until addressed.
Watch for while(1) loops or other places the cores can get stuck. For HardFault_Handler() and Error_Handler() output actionable diagnostics so you can identify it has failed and where.
2023-11-02 09:00 AM
OK. I will check these things for issues. Thank you.