- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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();
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked with the developers and they believe that your code should work fine as is....
Is your baud rate set to 115200?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi mwf_mmfae,
Thanks for confirmation with developers. Really appreciated.
I will try different things including baud rate 115210 and let you updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content