Skip to content

app: Change CTS pull-down to pull-up#219

Merged
MarkusLassila merged 1 commit into
nrfconnect:mainfrom
MarkusLassila:change-rts-pull-direction
Mar 23, 2026
Merged

app: Change CTS pull-down to pull-up#219
MarkusLassila merged 1 commit into
nrfconnect:mainfrom
MarkusLassila:change-rts-pull-direction

Conversation

@MarkusLassila
Copy link
Copy Markdown
Contributor

Previously CTS was pulled up, this prevented hosts without
hardware flow control from using the default Serial Modem build.

Changing CTS to pull-down allows Serial Modem to send even
when the CTS and RTS pins float.

This relies in DTR as main mechanism for UART control. The host
must first enable its own UART before it enables Serial Modem
UART with DTR.

  • With hardware flow control, this means that host drives it's
    RTS pin, so there is no difference in operation.
    Host should also have a pull-up for it's CTS pin, so when SM
    starts driving it's RTS, the host knows that SM is ready to
    receive.

  • Without hardware flow control, the Serial Modem is able to
    send (TX) to host. However, the timing with DTR needs to be
    taken into account as host cannot observe it's CTS.
    Instead host must monitor the RI signal, which is de-asserted
    when SM UART is ready. Or alternatively, have a sufficient
    timeout between asserting DTR and first TX operation.

Important: It is highly recommended to use hardware flow control
with Serial Modem.

@MarkusLassila
Copy link
Copy Markdown
Contributor Author

MarkusLassila commented Mar 18, 2026

  • hw-flow-control still works with PPP and AT sample.

  • If hw-flow-control is disabled in PPP sample, the sample does not work, supposedly as it would require a timeout after DTR is set and before TX operations is done.

  • if hw-flow-control is disabled in AT sample, it was sufficient to add 100ms timeout before first TX operation.

  • nRF9151DK is usable both with VCOM0 HWFC autodetect lines configured and not configured.

Comment thread app/boards/nrf9151dk_nrf9151_ns.overlay
Comment thread app/boards/nrf9151dk_nrf9151_ns.overlay
Copy link
Copy Markdown
Contributor

@SeppoTakalo SeppoTakalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem to work OK.

I even verified against Linux host to leave FC pins floating:

Image

@SeppoTakalo
Copy link
Copy Markdown
Contributor

Also the nrf54L host is able to connect to network when CTS is floating on nRF91 side.

@MarkusLassila MarkusLassila force-pushed the change-rts-pull-direction branch from c1cfe66 to 7912676 Compare March 19, 2026 15:37
Comment thread doc/uart_configuration.rst Outdated
Comment thread doc/uart_configuration.rst Outdated
Comment thread doc/uart_configuration.rst Outdated
@MarkusLassila MarkusLassila force-pushed the change-rts-pull-direction branch from 7912676 to 6483e1e Compare March 23, 2026 08:29
@MarkusLassila MarkusLassila requested a review from trantanen March 23, 2026 08:33
Comment thread doc/uart_configuration.rst Outdated
Comment thread doc/uart_configuration.rst Outdated
Comment thread doc/uart_configuration.rst Outdated
Comment thread doc/uart_configuration.rst Outdated
Previously CTS was pulled up, this prevented hosts without
hardware flow control from using the default Serial Modem build.

Changing CTS to pull-down allows Serial Modem to send even
when the CTS and RTS pins float.

This relies in DTR as main mechanism for UART control. The host
must first enable its own UART before it enables Serial Modem
UART with DTR.

- With hardware flow control, this means that host drives it's
  RTS pin, so there is no difference in operation.
  Host should also have a pull-up for it's CTS pin, so when SM
  starts driving it's RTS, the host knows that SM is ready to
  receive.

- Without hardware flow control, the Serial Modem is able to
  send (TX) to host. However, the timing with DTR and when
  SM is able to receive needs to be taken into account as
  host cannot observe it's CTS. Instead host must monitor the
  RI signal, which is de-asserted when SM UART is ready.
  Or alternatively, have a sufficient timeout between host
  asserting DTR and host's first TX operation.

Important: It is highly recommended to use hardware flow control
with Serial Modem.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
Co-authored-by: Divya S Pillai <91891495+divipillai@users.noreply.github.com>
@MarkusLassila MarkusLassila force-pushed the change-rts-pull-direction branch from a470e40 to ed34306 Compare March 23, 2026 10:43
@MarkusLassila MarkusLassila merged commit 5d44b7c into nrfconnect:main Mar 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants