samples: net: cellular_modem: add nRF9160 DK's nRF52840

The added configuration files allow the sample to be run
on the nRF52840 present on the nRF9160 DK with the nRF9160
(running SLM) being the modem and communication happening
through pins that are routed internally between the two.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This commit is contained in:
Tomi Fontanilles 2024-02-22 14:54:45 +02:00 committed by Henrik Brix Andersen
parent 8473c54035
commit 7f9ed8695c
3 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,13 @@
CONFIG_UART_ASYNC_API=y
# Align with the Serial LTE Modem (SLM) application.
CONFIG_MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE=1500
CONFIG_MODEM_CELLULAR_UART_BUFFER_SIZES=1500
# Allow large UART TXs to go through @115200.
CONFIG_MODEM_BACKEND_UART_ASYNC_TRANSMIT_TIMEOUT_MS=200
# Print logs and printk() output on uart0.
CONFIG_LOG=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_MODEM_LOG_LEVEL_DBG=y

View file

@ -0,0 +1,18 @@
#include <nrf9160dk_uart1_on_if0_3.dtsi>
/ {
aliases {
modem = &modem;
};
};
&uart1 {
current-speed = <115200>;
hw-flow-control;
modem: modem {
compatible = "nordic,nrf91-slm";
status = "okay";
mdm-power-gpios = <&interface_to_nrf9160 4 GPIO_ACTIVE_LOW>;
};
};

View file

@ -114,7 +114,7 @@ static void modem_backend_uart_async_event_handler(const struct device *dev,
if (received < evt->data.rx.len) {
ring_buf_reset(&backend->async.receive_rb);
k_spin_unlock(&backend->async.receive_rb_lock, key);
LOG_WRN("Receive buffer overrun (%u/%u dropped)",
LOG_WRN("Receive buffer overrun (%zu/%zu dropped)",
evt->data.rx.len - received, evt->data.rx.len);
break;
}