Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/overlay-external-mcu.conf
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although I am not really looking forward to running into VCOM0 not being enabled for 91 products, when I am switching development areas, this might be our trigger to move from UART2 to UART0 and default pins.

The issue is also present if HWFC is not set for UART0 and using that would allow us to set the values in prj.conf.

Opinions are welcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SeppoTakalo opinion on this?

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Hardware RX byte counting is required when UART2 is used without hardware flow control.
CONFIG_UART_2_NRF_HW_ASYNC_TIMER=2
CONFIG_UART_2_NRF_HW_ASYNC=y
2 changes: 2 additions & 0 deletions app/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ tests:
sysbuild: true
build_only: true
extra_args:
- EXTRA_CONF_FILE="overlay-external-mcu.conf"
- EXTRA_DTC_OVERLAY_FILE="overlay-external-mcu.overlay"
platform_allow:
- nrf9151dk/nrf9151/ns
Expand Down Expand Up @@ -56,6 +57,7 @@ tests:
build_only: true
extra_args:
- EXTRA_CONF_FILE="overlay-cmux.conf;overlay-ppp.conf"
- EXTRA_CONF_FILE="overlay-external-mcu.conf"
- EXTRA_DTC_OVERLAY_FILE="overlay-external-mcu.overlay"
platform_allow:
- nrf9151dk/nrf9151/ns
Expand Down
3 changes: 3 additions & 0 deletions doc/app/nRF91_as_Zephyr_modem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ In addition, if the controlling chip is an external MCU, the following configura
* :file:`overlay-external-mcu.overlay` - To configure UART (pins, baud rate), DTR and RI pins that |SM| will use.
Make sure to update the UART configuration (pins, baud rate) so that it matches your setup.

* :file:`overlay-external-mcu.conf` - To enable hardware RX byte counting on UART2.
This configuration is required when UART2 is used without hardware flow control.

Finally, if you want more verbose logging that includes the AT commands and responses, you can enable debug logging by uncommenting ``CONFIG_SM_LOG_LEVEL_DBG=y`` in the :file:`prj.conf` configuration file.

Controlling chip running Zephyr
Expand Down
5 changes: 4 additions & 1 deletion doc/app/sm_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ The following configuration files are provided:
The overlay is pin compatible with nRF9151DK.
For other setups, you can customize the overlay to fit your configuration.

* :file:`overlay-external-mcu.conf` - This configures the ``uart2`` to use hardware RX byte counting.
This overlay is required when ``uart2`` is used without hardware flow control.

* :file:`overlay-carrier.conf` - Configuration file that adds |NCS| `LwM2M carrier`_ support.
See :ref:`sm_carrier_library_support` for more information on how to connect to an operator's device management platform.

Expand Down Expand Up @@ -376,7 +379,7 @@ Connecting with an external MCU
If you run your user application on an external MCU (for example, an nRF52 Series development kit), you can control the |SM| application on an nRF91 Series device directly from the application.
See the :ref:`sm_shell_sample` for a sample implementation of such an application.

To connect with an external MCU using UART_2, include the :file:`overlay-external-mcu.overlay` devicetree overlay in your build.
To connect with an external MCU using UART_2, include the :file:`overlay-external-mcu.overlay` devicetree overlay and :file:`overlay-external-mcu.conf` in your build.
This overlay configures the UART_2 pins, DTR pin, and RI pin for the nRF9151 DK.

If you use a different setup, you can customize the :file:`overlay-external-mcu.overlay` file to match your hardware configuration in (for example) the following ways:
Expand Down
4 changes: 2 additions & 2 deletions doc/app/sm_dtr_ri.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ When the DTR signal is deasserted and asserted (the button is pushed and release
DTR and RI with External MCU
****************************

When you are using an external MCU as a host, you need to include the :file:`app/overlay-external-mcu.overlay` file in your build.
This overlay file configures the UART, DTR, and RI pins for the nRF9151 DK.
When you are using an external MCU as a host, you need to include the files :file:`app/overlay-external-mcu.overlay` and :file:`app/overlay-external-mcu.conf` in your build.
The overlay file configures the UART, DTR, and RI pins for the nRF9151 DK.
Depending on your board, you might need to modify the overlay file to match your specific hardware configuration.
See :ref:`sm_connecting_91dk_mcu` for more information.

Expand Down
2 changes: 1 addition & 1 deletion doc/samples/sm_host_shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See more information on the functionality of this sample from the :ref:`lib_sm_h
Requirements
************

The |SM| application should be configured with :file:`app/overlay-external-mcu.overlay` on the nRF91 Series DK side.
The |SM| application should be configured with the overlay files :file:`app/overlay-external-mcu.overlay` and :file:`app/overlay-external-mcu.conf` on the nRF91 Series DK side.

The sample supports the following development kits:

Expand Down