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

I want to move the UART on thingy91:nRF9160.

I want to move the UART on thingy91:nRF9160.

prj_thingy91_nrf9160ns.conf added the following two line.

CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y

The asset_tracker added to the main function of the sample as follows.

/* Initialize the UART module */
uart_dev = device_get_binding(DT_LABEL(DT_NODELABEL(uart0)));
if (uart_dev == NULL) {
LOG_ERR("Cannot bind UART device\n");
return -EINVAL;
}
err = uart_callback_set(uart_dev, uart_cb, NULL);
if (err) {
LOG_ERR("Cannot set callback: %d", err);
return -EFAULT;
}

The callback uart_cb a function that does nothing.

static void uart_cb(const struct device *dev, struct uart_event *evt, void *user_data)
{}

If you do this, booting will repeat infinitely.

*** Booting Zephyr OS build v2.4.0-ncs2 ***
[00:00:00.214,385] [0m<inf> BH1749: BH1749 initialized[0m
[00:00:00.225,799] [0m<inf> asset_tracker: Asset tracker started[0m
[00:00:00.226,074] [0m<inf> watchdog: Watchdog timeout installed. Timeout: 60000[0m
[00:00:00.226,379] [0m<inf> watchdog: Watchdog started[0m
[00:00:00.226,623] [0m<inf> watchdog: Watchdog feed enabled. Timeout: 30000[0m
*** Booting Zephyr OS build v2.4.0-ncs2 ***
[00:00:00.214,385] [0m<inf> BH1749: BH1749 initialized[0m
[00:00:00.225,799] [0m<inf> asset_tracker: Asset tracker started[0m
[00:00:00.226,074] [0m<inf> watchdog: Watchdog timeout installed. Timeout: 60000[0m
[00:00:00.226,379] [0m<inf> watchdog: Watchdog started[0m
[00:00:00.226,623] [0m<inf> watchdog: Watchdog feed enabled. Timeout: 30000[0m
*** Booting Zephyr OS build v2.4.0-ncs2 ***
[00:00:00.214,416] [0m<inf> BH1749: BH1749 initialized[0m
[00:00:00.231,811] [0m<inf> asset_tracker: Asset tracker started[0m
[00:00:00.232,086] [0m<inf> watchdog: Watchdog timeout installed. Timeout: 60000[0m
[00:00:00.232,391] [0m<inf> watchdog: Watchdog started[0m
[00:00:00.232,635] [0m<inf> watchdog: Watchdog feed enabled. Timeout: 30000[0m

uart_callback_set a comment that is calling for a comment, it will move.

*** Booting Zephyr OS build v2.4.0-ncs2 ***
[00:00:00.214,385] [0m<inf> BH1749: BH1749 initialized[0m
[00:00:00.225,799] [0m<inf> asset_tracker: Asset tracker started[0m
[00:00:00.226,074] [0m<inf> watchdog: Watchdog timeout installed. Timeout: 60000[0m
[00:00:00.226,379] [0m<inf> watchdog: Watchdog started[0m
[00:00:00.226,623] [0m<inf> watchdog: Watchdog feed enabled. Timeout: 30000[0m
*** Booting Zephyr OS build v2.4.0-ncs2 ***
[00:00:00.214,447] [0m<inf> BH1749: BH1749 initialized[0m
[00:00:00.231,842] [0m<inf> asset_tracker: Asset tracker started[0m
[00:00:00.232,116] [0m<inf> watchdog: Watchdog timeout installed. Timeout: 60000[0m
[00:00:00.232,421] [0m<inf> watchdog: Watchdog started[0m
[00:00:00.232,666] [0m<inf> watchdog: Watchdog feed enabled. Timeout: 30000[0m
[00:00:00.245,849] [0m<dbg> nrf_cloud_transport.nct_client_id_get: client_id = nrf-352656101122565[0m
[00:00:00.246,215] [0m<dbg> nrf_cloud_transport.nct_topics_populate: shadow_base_topic: $aws/things/nrf-352656101122565/shadow[0m
[00:00:00.246,643] [0m<dbg> nrf_cloud_transport.nct_topics_populate: accepted_topic: nrf-352656101122565/shadow/get/accepted[0m
[00:00:00.247,070] [0m<dbg> nrf_cloud_transport.nct_topics_populate: rejected_topic: $aws/things/nrf-352656101122565/shadow/get/rejected[0m
[00:00:00.247,528] [0m<dbg> nrf_cloud_transport.nct_topics_populate: update_delta_topic: $aws/things/nrf-352656101122565/shadow/update/delta[0m
[00:00:00.248,016] [0m<dbg> nrf_cloud_transport.nct_topics_populate: update_topic: $aws/things/nrf-352656101122565/shadow/update[0m
[00:00:00.248,443] [0m<dbg> nrf_cloud_transport.nct_topics_populate: shadow_get_topic: $aws/things/nrf-352656101122565/shadow/get[0m
[00:00:00.249,389] [0m<inf> asset_tracker: Connecting to LTE network.[0m

What causes it not to move?

Parents Reply Children
No Data
Related