Page 1 of 1

UART resource conflict?

Posted: Thu Dec 11, 2014 3:21 pm
by jstubbs
I have a custom PCB using MOD5441X that routes out 4 UARTs (UART0, UART4, UART5, UART7). Due to unexpected issues with external hardware, I had to repurpose UART0 to be used as a normal serial com port instead of a debug/monitor port. To do this, I first close UART0, move stdout/stdin/stderr over to another UART (UART5 for now), then reopen UART0 to be used for normal serial communication. However, when I do this, it seems that UART4 gets clobbered as soon as UART0 is reopened. If I don't reopen UART0, UART4 works perfectly. It seems like there is some sort of resource conflict causing an issue here. Any idea what might be going on? Thanks!

Re: UART resource conflict?

Posted: Thu Dec 11, 2014 3:45 pm
by rnixon
I had a problem with this recently and netburner fixed it. The problem is that rts/cts for uart0 are the secondary function pins for uart5 rx/tx. Got to serial.cpp, find OpenSerial(), and change the pin assignments from 0xFF to 0x0F. The 0xFF assigns rts, cts, tx, rx for uart0. 0x0F assigns only rx, tx.

Re: UART resource conflict?

Posted: Thu Dec 11, 2014 3:46 pm
by rnixon
Then of course rebuild the system libs and your project.

Re: UART resource conflict?

Posted: Thu Dec 11, 2014 9:05 pm
by dciliske
This issue is fixed in 2.7.0. Yes, it's just as silly as it seems, but it's one of those how often does anyone try to do that specific sequence of calls...

- Dan

Re: UART resource conflict?

Posted: Fri Dec 12, 2014 8:58 am
by jstubbs
Thanks a lot, this took care of the issue!