PUART RTS/CTS Hardware Flow Control

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

There was a discussion on PUART RTS/CTS Hardware Flow Control in the forum.

The clarification provided was that PUART RTS/CTS is not support on the module board.

We are using 20737 QFN package, so I believe RTS/CTS should be supported and working.

However, followed all the instructions available as in the sample codes and the forum discussion,

I am not able to make RTS/CTS working.

I am wondering if there is anyone in this forum who made RTS/CTS working with PUART.

Double checked RTS line with Oscilloscope, it is not wiggling at all even after RX FIFO overflow situation.

Here is the programming sequences I followed.

And, all PUART pins belongs to the same row of Table 3 Group 1 PUART signal muxing options.

#define PIN_UART_TX   0

#define PIN_UART_RX   2

#define PIN_UART_RTS  1

#define PIN_UART_CTS  3

#define PUART_BAUDRATE 921600

puart_selectUartPads(PIN_UART_RX, PIN_UART_TX, PIN_UART_CTS, PIN_UART_RTS);

puart_init();

puart_flowOn();

// Disable sleep

devlpm_registerForLowPowerQueries(uart_lpm_queriable, 0);

// Clear interrupt

P_UART_INT_CLEAR(P_UART_ISR_RX_AFF_MASK);

// Set RX watermark to 1 byte

P_UART_WATER_MARK_RX_LEVEL(1);

// Set TX watermark to 0 byte

P_UART_WATER_MARK_TX_LEVEL(0);

// enable UART RX Almost Full interrupt

P_UART_INT_ENABLE |= P_UART_ISR_RX_AFF_MASK;

// Set callback function to app callback function.

puart_rxCb = (void *)ble_uart_rx_cb;

// TX_FAE interrupt will be enabled when the data is putting into TX FIFO

puart_txCb = (void *)ble_uart_tx_cb;

// Set baud rate.

puart_setBaudrate(0x00, 0x00, PUART_BAUDRATE);

// Enable the CPU level interrupt

puart_enableInterrupt();

0 Likes
1 Solution

The developers confirmed that there shouldn't be an issue as the PUART was tested with/out HW flow control up to 1.5M.

I suggested using 115200 as a debug step. They said your code looks good.

79rpm

View solution in original post

0 Likes
6 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

I checked with the developers and they believe that your code should work fine as is....


Is your baud rate set to 115200?

0 Likes
Anonymous
Not applicable

Hi mwf_mmfae,

Baud rate is 921600 which has been working fine except flow control.

And that baud rate is below 1.5M this chip is known to be able to support.

Thanks

0 Likes

The developers confirmed that there shouldn't be an issue as the PUART was tested with/out HW flow control up to 1.5M.

I suggested using 115200 as a debug step. They said your code looks good.

79rpm

0 Likes
Anonymous
Not applicable

Hi mwf_mmfae,

Thanks for confirmation with developers. Really appreciated.


I will try different things including baud rate 115210 and let you updated.

0 Likes
Anonymous
Not applicable

Hi mwf_mmfae,

I want to let you know that PUART RTS flow control works now.

Verified with the scope RTS is correctly asserted after receiving data over PUART.

The baud rate is 921600. It appears that default watermark level is 4 bytes.

The reason why it didn't work previously seems like because RTS pin was included

in BLE_PROFILE_GPIO_CFG which was passed in to bleapp_set_cfg().

After removing RTS pin from BLE_PROFILE_GPIO_CFG table, it started working.


Thanks!!

This is great news! Thanks for updating the community as I'm sure others may run into this problem as well.

andrew997 79rpm @_vik86 j.t

0 Likes