AnsweredAssumed Answered

Problem UART CTS and BLE module

Question asked by Daniele Cortellazzi on Apr 6, 2018
Latest reply on Apr 9, 2018 by Daniele Cortellazzi

Hello,

 

i have a problem using the UART CTS with my K22FX512 and the BLE module RN4871.

I have enable the CTS pin with:

 

PORTC->PCR[15] = PORT_PCR_MUX(3); /* set PORTC pin 15 to UART4_TX*/
PORTC->PCR[14] = PORT_PCR_MUX(3); /* set PORTC pin 14 to UART4_RX*/
PORTC->PCR[13] = PORT_PCR_MUX(3); /* set PORTC pin 12 to UART4_RTS*/
PORTC->PCR[12] = PORT_PCR_MUX(3) | PORT_PCR_PE_MASK; /* set PORTC pin 13 to UART4_CTS*/

and 

/* Enable CTS flow control */
UART4->MODEM |= UART_MODEM_TXCTSE_MASK;
/* Enable receiver and transmitter */
UART4->C2 |= (UART_C2_RIE_MASK | UART_C2_TE_MASK | UART_C2_RE_MASK);

so the CTS is active and the RTS no.

 

Doing this happen that the CTS pin go high (despite the pull-down enable) and no communication begin. 

 

If i disable the CTS pin with

PORTC->PCR[15] = PORT_PCR_MUX(3); /* set PORTC pin 15 to UART4_TX*/
PORTC->PCR[14] = PORT_PCR_MUX(3); /* set PORTC pin 14 to UART4_RX*/
PORTC->PCR[13] = PORT_PCR_MUX(1);
PORTC->PCR[12] = PORT_PCR_MUX(1)

 

all work and the CTS pin remain low.

 

Why this happen? the cpu active a pull-up when the CTS pin is enable? 

 

PS: On my module RN4871 the flow control is always active.

 

Thanks

Outcomes