mx53 uart2 ,uart3 transmit ok ,but no rxdata

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

mx53 uart2 ,uart3 transmit ok ,but no rxdata

2,914 Views
yektaayduk
Contributor II

Hi,

I have an eclipse project which I'm building  for x86 and for i.mx53 .

The code is loading firmware through the UART2 or UART3 at 115200 bps to a modem chip and and  making alive checks (custom board) .

The  code works for x86 and fails  for mx53 .

I observed  the uart Tx pins with a port monitor SW  and realised that some piece of the sent packet is missing  or repeated .

I thought its an alignment problem but the sendbuffer is aligned to four bytes :

} __attribute__((aligned(4),packed)) str_fwbuf;

Any comment?

Labels (2)
0 Kudos
10 Replies

1,264 Views
mbp
Contributor V

yektaayduk,

.....did you ever get Rx working on UART2 and 3?   If so can you point the way!  :smileyhappy:

0 Kudos

1,264 Views
yektaayduk
Contributor II

I applied  "ENGR00252150 Fix MX53 IOMUX setup for all UARTs"   .  Uarts are working now.

Below is the link of the engineering patch:

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_2.6.35_maintain&id=19164f8...

0 Kudos

1,264 Views
mbp
Contributor V

Thanks.  I had stumbled across the incorrect iomux definitions a few weeks ago.  .didn't think it useful to post "found it!".

Greatly appreciate your follow through though - THANKS anyway!

0 Kudos

1,264 Views
yektaayduk
Contributor II

Uart-2 and Uart-3  Tx  Rx are OK.

I applied  "ENGR00252150 Fix MX53 IOMUX setup for all UARTs" patch .

Settings in serial.h :

UART2_UCR4_CTSTL     16

UART2_DMA_ENABLE    0

UART3_UCR4_CTSTL     16

UART3_DMA_ENABLE    0

0 Kudos

1,264 Views
jimmychan
NXP TechSupport
NXP TechSupport

Which board are you using? Which BSP are you using?

0 Kudos

1,264 Views
yektaayduk
Contributor II

Thank you jimmychan

İts a custom board  , BSP version is L2.6.35_11.09.01 .

We have found that the problem is somewhere else :

The port monitor I was using is somehow effected from the activation order of boards. When I first activate CPU board then reset the modem board and then activate the port monitor there are no  missing bytes at the beginning .

So I think mx53  has no missing bytes problem.


But if so why is the modem not receiving 8K firmware bytes and replay to alive checks?

Our CPU board was controlling the modem boards . We saw that an fpga which is not implemented fully yet  was helding the modem in a reset state so that modem doesnt replay.Now FPGA has inactivated the  reset line by default and we are observing uart data from modem with the oscilloscope.

We have still a problem:

Now the modem replay should be received by mx53 UART ,but it doesnt get anything within the timeout window .

I'm using UART2 and UART3 for modem communications.The same project when compiled with x86 and run on PC works without any problem.

QUESTIONS :

In /linux/arch/arm/mx5/serial.h all the uarts are configured differently.DMA is enabled for some for some not ,some of them are using interrupts some of them not. I dont have use the  CTS  ,RTS  pins so from the flow control viewUART2_UCR4_CTSTL  -1  should be correct .

Are these default values and changed somewhere else according to the board configuration or should we change them only  in serial.h if we want en- disable dma ,irq ?

How can I enable the receive part of UART2 or UART3 ( I have to check that the replay coming from modem reaches to UART2 receive pin ,still ).

Should I apply the changes mentioned in  forum MX53 UART2(3) not working  at

0 Kudos

1,264 Views
jimmychan
NXP TechSupport
NXP TechSupport


Please try MX53 UART2(3) not working first.

0 Kudos

1,264 Views
yektaayduk
Contributor II

Hi,

MX53 UART2(3) not working is irrelevant for my case because my pins for uart-2 & -3 are as below:

#define _MX53_PAD_PATA_DMARQ__UART2_TXD_MUX IOMUX_PAD(0x5F8, 0x278, 3, 0x0, 0, 0)

#define _MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX    IOMUX_PAD(0x5FC, 0x27C, 3, 0x880, 3, 0)

#define _MX53_PAD_PATA_CS_1__UART3_RXD_MUX   IOMUX_PAD(0x620, 0x2A0, 4, 0x888, 3, 0)
#define _MX53_PAD_PATA_CS_0__UART3_TXD_MUX   IOMUX_PAD(0x61C, 0x29C, 4, 0x0, 0, 0)


These settings are also used  in mx53_ard.c and mx53_smd.c (for uart2) ,in mx53_ard.c for uart3 .

Did anybody having these boards successfully use the uart2 uart3 ?



0 Kudos

1,264 Views
yektaayduk
Contributor II

ttymxc1 ,ttymxc2,ttymxc3,ttymxc4 seems to receive data with the test code.

I think this is an internal loopback without driving the device pins.

So its a kind of IOMUX problem?

root@freescale /unit_tests$ ./mxc_uart_test.out /dev/ttymxc1

Test: MXC UART!

Usage: mxc_uart_test <UART device name, opens UART2 if no dev name is specified>

/dev/ttymxc1 opened

Attributes set

Test: IOCTL Set

Data Written= Test

Data Read back= Test

root@freescale /unit_tests$ ./mxc_uart_test.out /dev/ttymxc2

Test: MXC UART!

Usage: mxc_uart_test <UART device name, opens UART2 if no dev name is specified>

/dev/ttymxc2 opened

Attributes set

Test: IOCTL Set

Data Written= Test

Data Read back= Test

root@freescale /unit_tests$ ./mxc_uart_test.out /dev/ttymxc3

Test: MXC UART!

Usage: mxc_uart_test <UART device name, opens UART2 if no dev name is specified>

/dev/ttymxc3 opened

Attributes set

Test: IOCTL Set

Data Written= Test

Data Read back= Test

root@freescale /unit_tests$ ./mxc_uart_test.out /dev/ttymxc4

Test: MXC UART!

Usage: mxc_uart_test <UART device name, opens UART2 if no dev name is specified>

/dev/ttymxc4 opened

Attributes set

Test: IOCTL Set

Data Written= Test

Data Read back= Test

root@freescale /unit_tests$

0 Kudos

1,264 Views
admin
Specialist II

Check to see if you have the Daisy Chain setting correct for the UART RXD:

IOMUXC_UART3_IPP_UART_RXD_MUX_SELECT_INPUT

This setting tells the IOMUX which pin to use for RXD.

Brett