UART resource conflict?

Discussion to talk about hardware related topics only.
Post Reply
jstubbs
Posts: 2
Joined: Thu Dec 11, 2014 2:43 pm

UART resource conflict?

Post 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!
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: UART resource conflict?

Post 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.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: UART resource conflict?

Post by rnixon »

Then of course rebuild the system libs and your project.
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: UART resource conflict?

Post 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
Dan Ciliske
Project Engineer
Netburner, Inc
jstubbs
Posts: 2
Joined: Thu Dec 11, 2014 2:43 pm

Re: UART resource conflict?

Post by jstubbs »

Thanks a lot, this took care of the issue!
Post Reply