This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Couldn't use flow control on 52832

Hi,

I'm using nRF5 SDK v15.0 with S132 v6.0. I have two questions:

1. I use the ble_app_uart example. We want to use high UART baud rate, so I change it to 1M baud rate and  enable flow control(APP_UART_FLOW_CONTROL_DISABLED), it could work and output debug information on PCA10040 board. When I program it to our board, it could advertise, but it couldn't output debug information and the uart couldn't receive and send data any more. I use a USB to serial UART module(FT232RL) to connect our board and I have connect the RTS CTS TX RX GND conrecttly.

2.  I'm using ble_app_multilink_central on PCA10040 board. I add uart_init according to the ble_app_uart example, it could work and I could use print function to output debug information. But when I enable flow control(APP_UART_FLOW_CONTROL_DISABLED), the uart couldn't receive and send data any more.

Could anyone give me some advise? Thanks.

Parents
  • I think that the flow control is incorrectly inverted in the hardware for use with an FTDI part connected to a PC. The complication starts with the meaning of "flow control", as there are at least two versions, the traditional modem CTS/RTS usage and the more modern CTS/RTS handshake. I added these comments to clarify this:

    /**@brief  Function for initializing the UART module.
     * Traditional Modem Flow Control
     * If flow control is enabled, a transmission will be automatically suspended when CTS is deactivated and
     * resumed when CTS is activated again.
     * A byte that is in transmission when CTS is deactivated will be fully transmitted before the transmission is
     * suspended.
     * nRF52 DTE Output pin to DCE - asserts to request transmit
     * nRF52 DTE Input pin from DCE - asserts to allow transmit
     *
     * Hardware Flow Control
     * "RTS/CTS handshaking" the DTE asserts RTS whenever it is ready to receive data from the DCE, and the DCE
     * asserts CTS whenever it is ready to receive data from the DTE. Unlike the original use of RTS and CTS with
     * half-duplex modems, these two signals operate independently from one another.
     * nRF52 DTE Output pin to DCE - asserts to allow DCE to transmit
     * nRF52 DTE Input pin from DCE - asserts to allow nRF52 DTE transmit
     */
    

    The nRF52 hardware supports the traditional modem usage, but the software is written for the more recent CTS/RTS handshake which requires an inverter for proper operation as the nRF52832 does not allow configuring active-high/low operation unless the lines are driven manually (the logic is inverted so does not work correctly)

Reply
  • I think that the flow control is incorrectly inverted in the hardware for use with an FTDI part connected to a PC. The complication starts with the meaning of "flow control", as there are at least two versions, the traditional modem CTS/RTS usage and the more modern CTS/RTS handshake. I added these comments to clarify this:

    /**@brief  Function for initializing the UART module.
     * Traditional Modem Flow Control
     * If flow control is enabled, a transmission will be automatically suspended when CTS is deactivated and
     * resumed when CTS is activated again.
     * A byte that is in transmission when CTS is deactivated will be fully transmitted before the transmission is
     * suspended.
     * nRF52 DTE Output pin to DCE - asserts to request transmit
     * nRF52 DTE Input pin from DCE - asserts to allow transmit
     *
     * Hardware Flow Control
     * "RTS/CTS handshaking" the DTE asserts RTS whenever it is ready to receive data from the DCE, and the DCE
     * asserts CTS whenever it is ready to receive data from the DTE. Unlike the original use of RTS and CTS with
     * half-duplex modems, these two signals operate independently from one another.
     * nRF52 DTE Output pin to DCE - asserts to allow DCE to transmit
     * nRF52 DTE Input pin from DCE - asserts to allow nRF52 DTE transmit
     */
    

    The nRF52 hardware supports the traditional modem usage, but the software is written for the more recent CTS/RTS handshake which requires an inverter for proper operation as the nRF52832 does not allow configuring active-high/low operation unless the lines are driven manually (the logic is inverted so does not work correctly)

Children
No Data
Related