No output on UART5 even though ttymxc4 is present

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No output on UART5 even though ttymxc4 is present

1,861 Views
rb_ontario
Contributor I

Hello,

I have an imx53 QSB and added a custom expansion board so I can access the signals for UART4 and UART 5 RXD and TXD.   When I run dmesg | grep tty, I can see ttymxc3 at MMIO 0x53ff000 (irq = 13) and ttymxc4 at MMIO 0x63f90000 (irq =86).

My test application tries to write "TEST" to the UART a thousand times but when I look at signal with an oscilloscope, nothing shows up.  If I direct the output of my application to UART1 (ttymxc0), then I see the correct output.

There was a discussion in Nov 2011 that showed how changes may need to be made to board-mx53_loco.c    However, in that instance, it seemed like nothing came back when issuing dmesg, which is not the case in my instance.

Is there something else I have to do to enable UART5?  Do I have to configure the output pin to UART function? If so, how do I do this?

Labels (1)
0 Kudos
6 Replies

1,386 Views
rb_ontario
Contributor I

Hi Guys,

Here's an update on UART4.   On my  expansion board, UART4 feeds into a PIC18 micro controller.  Yesterday, I had not flashed any code into it because I was just checking for output on UART4 with an oscilloscope and was not getting anything.  Today, I put code into the micro controller and started sending test data to see if I could receive data on UART4.  I was successful and can receive data on UART4.  Additionally, it now seems that I can send data on UART4 too.  However, I did not change anything in my i.MX code.   Furthermore, I send test data on UART4 at 115200bps and when my program finishes, it restores the original settings to UART4.  After it does this, I can see "something" being sent at 9600bps.   This only happens as long as my micro controller is sending test data into UART4.  To clarify, the PIC18 is continuously sending test data into the iMX53 UART4 and while this is occuring AND if my test program has restored the original port settings, then the iMX53 sends something out of UART4.   I have not been able to verify what this data is at 9600 baud and I'm not sure if it's data echoing from the PIC18.

I have no explanation for why I can suddenly send data on UART4.  I don't understand why the act of configuring the UART on the PIC18 enabled the UART4 transmitter on the i.MX53.  Does this make any sense to you?  While no code was flashed in the PIC18, it's receive pin should be an input and have no affect on the i.MX TX function..  I know I should be happy that it's working but I'm not comfortable with this seemingly "random behaviour".   Any thoughts on this would be appreciated.

0 Kudos

1,386 Views
rb_ontario
Contributor I

Matthias and Nivelinn

I added the code as you suggested and UART5 TX is working now.  However, there is still an issue with UART4.

I had another look at the mx53_loco.c file and it appears that MX53_PAD_CSI0_DAT12__ is/was also used for the MC34708 interrrupt input.  It seems this was the case for the previous revision of the hardware because there is an if statement around line 905 that checks the board revision.  If the board is Rev 4 (hardware version B), the the mc34708_int  = MX53_PAD_CSIO_DAT5__GPIO5_23.   HOWEVER, on line 881, the first line in the __init mxc_board_init function has

iomux_v3_cfg_t mc34708_int = MX_PAD_CSIO_DAT12__GPIO5_30    Can this be having an impact on how the funtion for CSI0_DAT12 is being assigned?  Is there anything else that could be tripping up the UART4 TXD function?

0 Kudos

1,386 Views
NivelinnPantev
Contributor I

Yes, this one


The file name is different for the newer kernel version
Put the code where uart0 pin configuration is

0 Kudos

1,385 Views
rb_ontario
Contributor I

Hello Matthias and Nivelinn,

Where can I find board-mx53_loco.c?

I can find "mx53_loco.c" in linux-2.6.35.3/arch/arm/mach-mx5 but no "board-mx53_loco.c"

Thanks for your speedy reply

0 Kudos

1,386 Views
NivelinnPantev
Contributor I

Hi Rick,

To set pins for uarts usage, you have to add these in board-mx53_loco.c,


/* UART4 */

MX53_PAD_CSI0_DAT12__UART4_TXD_MUX,

MX53_PAD_CSI0_DAT13__UART4_RXD_MUX,

/* UART5 */

MX53_PAD_CSI0_DAT14__UART5_TXD_MUX,

MX53_PAD_CSI0_DAT15__UART5_RXD_MUX,

Cheers

0 Kudos

1,386 Views
MatthiasFend
Contributor I

to configure the output mux for UART5 just add something like this to  mx53_loco_pads[] (board-mx53_loco.c):

MX53_PAD_KEY_COL1__UART5_TXD_MUX,

MX53_PAD_KEY_ROW1__UART5_RXD_MUX,

i'm not sure if col1/row1 is the correct choice for your hardware - just replace them with the pins you need.

~matthias

0 Kudos