AnsweredAssumed Answered

how to configure UART4 with RTSCTS mode on iMX6 ?

Question asked by Abraham Varricatt on Sep 12, 2013
Latest reply on Mar 2, 2015 by sivakumar ganesan

Hello,

 

I'm trying to interface an iMX6 (dual core) with a bluetooth module via the UART4 bus. (end-user will see android, code below is from linux kernel) I've done the following in my board file,

 

static const struct imxuart_platform_data mx6q_sd_uart4_data __initconst = {
    .flags      = IMXUART_HAVE_RTSCTS,
    .dma_req_rx =   MX6Q_DMA_REQ_UART4_RX,
    .dma_req_tx = MX6Q_DMA_REQ_UART4_TX,
};

static inline void mx6q_sabresd_init_uart(void)
{
    // imx6q_add_imx_uart(3, NULL);
    imx6q_add_imx_uart(3, &mx6q_sd_uart4_data);
    imx6q_add_imx_uart(0, NULL);
}

 

But it does not work.

 

Specifically, when I probe (with an Oscilloscope) the CTS and RTS lines (with respect to iMX6), I can see CTS line toggling - indicating that my bluetooth module wants to talk to the iMX6. But the RTS line just stays high. Which means that from my bluetooth module's point-of-view, the iMX6 is not ready to receive any data. Does anyone know how I could fix this?

 

For reference here are snippets of how I've done the pin multiplexing,

 

> cat arch/arm/mach-mx6/board-mx6q_sabresd.h
/*
 * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved.
<comments snipped out>
 */

#define _BOARD_MX6Q_SABRESD_H
#include <mach/iomux-mx6q.h>


static iomux_v3_cfg_t mx6q_sabresd_pads[] = {
  MX6Q_PAD_CSI0_DAT4__GPIO_5_22,   /* LCD reset at pad N1 */
 MX6Q_PAD_SD3_DAT6__UART1_RXD,
  MX6Q_PAD_SD3_DAT7__UART1_TXD,
// un-needed pins snipped out

/********************* Wifi and bluetooth PIN mux **************************************************/

  MX6Q_PAD_CSI0_DAT12__UART4_TXD, /* uart transmit at pad M2 */
  MX6Q_PAD_CSI0_DAT13__UART4_RXD, /* uart receive at pad L1 */
  MX6Q_PAD_CSI0_DAT16__UART4_RTS, /* UART RTS at pad L4 */
  MX6Q_PAD_CSI0_DAT17__UART4_CTS, /* UART CTS at pad L3 */
  MX6Q_PAD_CSI0_DAT19__GPIO_6_5, /* bluetooth gpio pin at pad L6 */

};

 

-Abraham V.

Outcomes