Unable to configure UART2 to work on i.MX6SL

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

Unable to configure UART2 to work on i.MX6SL

1,020 Views
dzonim92
Contributor I

Hi everybody,

We are working on a custom board with i.MX6SL Processor.

Unfortunately, we are not able to get UART2 to work. Here is the existing code, that we used on our board:

- Linux release 3.14.28

- For pin muxing we used #defines found in imx6sl-pinfunc.h

      MX6SL_PAD_LCD_ENABLE__UART2_RX_DATA     0x210 0x518 0x804 0x4 0x2

      MX6SL_PAD_LCD_HSYNC__UART2_TX_DATA       0x214 0x51c 0x000 0x4 0x0

      MX6SL_PAD_LCD_VSYNC__UART2_RTS_B            0x21c 0x524 0x800 0x4 0x3

      MX6SL_PAD_LCD_RESET__UART2_CTS_B             0x218 0x520 0x000 0x4 0x0

- Devicetree relevant configuration:

pinctrl_uart2.png

  uart2.png

     

Serial port /dev/ttymxc1 is detected, but still unable to get any communication to work.

To be sure that UART communication is not happening, we connected oscilloscope to the TX and RX lines, and tried to force communication with microcom or echo to /dev/ttymxc1, but still nothing.

Finally, we even tried removing line fsl,uart-has-rtscts and creating loopback between TX and RX lines, no luck.

We are sure that hardware is ok, since when these pins were configured as GPIO, we were able to toggle them.

Currently on the board, we are using UART1 as debug console and UART4 for communication with some other chip successfully.

Any hint would be appreciated,

Nikola

Labels (2)
0 Kudos
Reply
3 Replies

823 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Nikola,

you can check if the device tree config is correct using i.MX Pins Tool

This tool is easy to use and you can generate a device tree file by selecting the pins you need in a graphic interface.

If you have any question please let me know.


Best regards,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

823 Views
dzonim92
Contributor I

Hi Carlos,

Thanks for the help.

We have tried to test our configuration with i.MX Pins Tool, and everything seems to be correct.

Unfortunately, we have still no clue why are we not able to configure these pins in UART mode.

Regards,

Nikola

0 Kudos
Reply

823 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Nikola,

please try disabling control flow and use the driver opening a file with fopen() to reduce variables.

0 Kudos
Reply