IMX6ULL uart2 comunicate

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

IMX6ULL uart2 comunicate

968 Views
wuxiuxinxiuxin
Contributor II

Hello everybody,

I meet some problem about Imx6ull uart2 comunicating problem. I connect "UART2_TX_DATA",  "UART2_RX_DATA", "UART2_RTS_B", "UART2_CTS_B" to a BlueTooth module.

Firstly, the schematic is as bellow:

pastedImage_1.png

Secondly, the DTS configure is as bellow:

#if 1
/*For AP6236 BT*/
pinctrl_uart2: uart2grp {
fsl,pins = <
MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1
MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1
MX6UL_PAD_UART2_RTS_B__UART2_DCE_RTS 0x1b0b1
MX6UL_PAD_UART2_CTS_B__UART2_DCE_CTS 0x110b1

MX6ULL_PAD_SNVS_TAMPER2__GPIO5_IO02 0x1b0b0 /* BT_wake */
MX6ULL_PAD_SNVS_TAMPER3__GPIO5_IO03 0x1b0b0 /* BT_rst */


>;
};

#else
pinctrl_uart2dte: uart2dtegrp {
fsl,pins = <
MX6UL_PAD_UART2_TX_DATA__UART2_DTE_RX 0x1b0b1
MX6UL_PAD_UART2_RX_DATA__UART2_DTE_TX 0x1b0b1
MX6UL_PAD_UART2_CTS_B__UART2_DTE_RTS 0x1b0b1
MX6UL_PAD_UART2_RTS_B__UART2_DTE_CTS 0x1b0b1

>;
};

#endif

 ......


#if 1
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;//DCE
// pinctrl-0 = <&pinctrl_uart2dte>;//DTE
fsl,uart-has-rtscts;
// fsl,dce-mode;
// fsl,dte-mode;
/* for DTE mode, add below change */
/* fsl,dte-mode; */
/* pinctrl-0 = <&pinctrl_uart2dte>; */
status = "okay";
};
#endif

1.  I had configured the 4 pins to GPIO and test their electrical level, I confirm that the 4 pins is OK connect to CPU.

2. when I  use DCE mode and run a application about uart , the "UART2_CTS" is HIGN, "UART2_RTS" is LOW, "UART2_TX"& "UART2_RX" have no signal out in tthe oscilloscope.

3. But when I use DTE mode(the hardware is not change in the DCE mode),  the "UART2_CTS" is HIGN, "UART2_RTS" is LOW,  "UART2_RX" have signal out in the osccilloscope.

4. So I confusion when I use UART2 to communicaton to my BlueTooth module, Should I use the DTE mode and change the Hardware to the DTE mode??? Or what the exactly problem is?

0 Kudos
1 Reply

675 Views
igorpadykov
NXP Employee
NXP Employee

Hi Wuxiuxin

DTE differs from DCE mode by direction of some signals, it is better

described in sect.Table 86. UART I/O Configuration vs. Mode i.MX6DQ Datasheet

http://www.nxp.com/docs/en/data-sheet/IMX6DQCEC.pdf

You can use mode which is working fine.

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

0 Kudos