i.mx6 uart hardware flow control RTS/CTS

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

i.mx6 uart hardware flow control RTS/CTS

3,490 Views
shanxigjz
Contributor II

Hi all

I want to use UART2 for BT module, the BT module have RTS/CTS.

UART2_TXD----------->BT_UART_RX

UART2_RXD<-----------BT_UART_TX

UART2_RTS----------->BT_UART_CTS

UART2_CTS<-----------BT_UART_RTS

My uart2 configuration in kernel as bellow:

static const struct imxuart_platform_data mx6_uart1_data __initconst = {

  .flags      = IMXUART_HAVE_RTSCTS | IMXUART_USE_DCEDTE | IMXUART_SDMA,

  .dma_req_rx = MX6Q_DMA_REQ_UART2_RX,

  .dma_req_tx = MX6Q_DMA_REQ_UART2_TX,

};

imx6q_add_imx_uart(1, &mx6_octpath_uart1_data);

But, after doing this, the UART2_RTS pin is always high, which should be low i think to tell BT module to send data.

Is there other setting for this?

Thank you.

Labels (2)
0 Kudos
2 Replies

1,256 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Jianzhong,

      Please see following suggestions!

1. Please check  if UART2 multiplexing is correct.

2.if you didn't still resolve the issue, would you please provide the following information?

(1) schematic of UART2 on CPU side.

(2) All source code on UART2 configurations including IOMUX

the source code you submitted was not complete, so please give me a part of complete source code on UART2.

In addition, I have to remind you signal io directions of UART:

UART2_TXD-----------Output

UART2_RXD-----------Input

UART2_RTS-----------Input

UART2_CTS-----------Output

I feel your connections on hardware are not correct, please check it !

Regards,

Weidong

0 Kudos

1,256 Views
shanxigjz
Contributor II

Hi

The schematic parts of uart is as bellow.

1.png

And bellow is the uart source code.

/* BT iomux setting*/
MX6Q_PAD_GPIO_7__UART2_TXD,
MX6Q_PAD_GPIO_8__UART2_RXD,
MX6Q_PAD_EIM_D28__UART2_CTS,
MX6Q_PAD_EIM_D29__UART2_RTS,

/* source in XXXboard.c */

static const struct imxuart_platform_data mx6_uart1_data __initconst = {

  .flags      = IMXUART_HAVE_RTSCTS | IMXUART_USE_DCEDTE | IMXUART_SDMA,

  .dma_req_rx = MX6Q_DMA_REQ_UART2_RX,

  .dma_req_tx = MX6Q_DMA_REQ_UART2_TX,

};

imx6q_add_imx_uart(1, &mx6_uart1_data);

0 Kudos