Boards

BoardDescription
Air Quality WingAir Quality WingFeatherwing for Air Quality Monitoring
nRF9160 FeathernRF9160 FeatherFeather using nRF9160 to connect via LTE CAT M1 or CAT NB1.

Introduction to the nRF9160 Feather

The nRF9160 Feather by Jared Wolff (aka Circuit Dojo LLC) is an electronics development board. It features a Nordic Semiconductor nRF9160-SICA part. This part is capable of both CAT M1 LTE and NB-IoT for communication with the outside world. It's compatible primarily with Zephyr via the nRF Connect SDK. Other toolchains and languages coming soon to a Github repository near you.

Air Quality Wing Board

Glamour Shots

nRF9160 Feather with OSHWA nRf9160 Feather Trimmed nRf9160 Feather Back

Overview

Diagram

This board can be powered several ways. The most popular way to power Feather boards is by using the USB port. This board is no exception. It works well across both USB and LiPoly batteries.

The board is designed from the ground up to be power efficient at the most used power state: standby. That's right, if you're developing something that's battery powered, your most used state will usually be standby mode. As of this writing the estimated current draw in this state should be about 2µA. That's approximately 8.5 years on a 150mAH cell!

Speaking of power, this board also has a fully fledged DC/DC Buck Boost. That whether your input voltage is 5.5 or 2.8V you'll get a nice stable 3.3V at the output.

This board also sports some external flash for storing your application data. Use it with the built in support for LittleFS in Zephyr. Or, use one of your choice! What ever tickles your fancy.

Finally, but not least, the nRF9160. I've been watching this part very carefully since the CEO had it locked in a mysterious black case years back. It's here and it's real and the module is half the price of other modules. I won't bore you with all the technical details. (Technical details get you excited? Go here.) Needless to say, it's awesome.

Logos

I'll be launching in collaboration with the awesome folks at Hackster.io and GroupGets. We're all very excited to bring these boards to you!

If you want real-time updates, sign up here and i'll stay in touch. I can't wait to share more with you!

Specifications and Requirements

Specs photo

Technical Details

  • Nordic nRF9160*
    • Microcontroller
      • ARM Cortex M33
      • 1MB Flash
      • 256kB RAM
      • ARM® TrustZone®
      • ARM® Cryptocell 310
      • Up to 4x SPI, I2C and UART with Easy DMA
      • I2S w/ EasyDMA
      • 4x PWM with EasyDMA
      • 12bit SADC with EasyDMA
      • 2x RTC
      • PPI (Programmable peripheral interconnect) interface
    • Radio
      • Transceiver and baseband
      • 3GPP LTE release 13 Category M1 and NB1 compliant
      • 3GPP release 14 NB2 compliant
      • GPS receiver (GPS L1 C/A supported) - Active antenna only.
      • RF Transceiver for global coverage supporting bands:
        • Cat-M1: B1, B2, B3, B4, B5, B8, B12, B13, B14, B17, B18, B19, B20, B25, B26, B28, B66
        • Cat-NB1/NB2: B1, B2, B3, B4, B5, B8, B12, B13, B17, B18, B20, B25, B26, B28, B66
      • Supports 4FF Nano SIM
  • Micro USB connection for USB-to-Serial and DFU
  • Pre-programmed MCUBoot bootloader
  • External NOR Flash by Winbond
    • 2MB 4MB of space (Upgraded for all boards as of August 2, 2020!)
    • Max bus speed of 133MHz
    • Standard SPI
  • Power supply
    • 3.3V Buck/Boost up to 0.9A of current draw
    • Operating range 2.8 to 5.5V
    • External LiPoly battery connection (JST SPH type)
    • LiPoly set to 300mA with indication
  • Programmer
    • Capable of interfacing with Jlink and CMSIS-DAP based programmers
    • Use with a Tag Connect TC2030-CTX-NL over Serial Wire Debug (SWD)
  • Low Power RTC on board for time keeping and as a low power wakeup source.
  • User I/O
    • Standard feather form factor GPIOs (0.1" pitch)
    • 2x buttons (1 Reset, 1 General Purpose)
    • 1x Blue LED connected to D7
  • Antenna connections:
    • 1x U.FL for LTE with matching network
    • 1x U.FL for active GPS antennas
  • Feather form factor
    • 50.8mm x 22.86mm (2" x 0.9")

* nRF9160 tech specs provided from the nRF9160 Product Specification

Block Diagram

Electrical

Here are the elctrical specifications for the nRF9160 Feather. Most of the specifications here are based on the nRF9160 Product Specification. You can get the latest version of the nRF9160 Product Specification here. All previous versions can be found here.

Board Supply

  • Output voltage: 3.3V ± 0.3V
  • Max output current: 800mA
  • Off current w/ Low Power RTC: < 3µA

Pin Ratings (MD/A0-A5/D0-D8/TX/RX/CIPO/COPI/SCK/RST)

  • Max input voltage: 3.6V

Enable Pin

  • Max input voltage: 8V¹

¹Enable pin is active low.

External Power Supply

The nRF9160 Feather can be powered via battery or USB. See below for the specifics for each power source

USB Requirements

  • Operating range: 5V ± 0.2V
  • Current requirements: >500mA

Battery Requirements

  • Battery type: LiPoly
  • Operating range: 2.8-5.5V
  • Current/power rating: Able to support at least 2W of power
  • Battery capacity: > 300mAH²
  • Charging current: 294mA ± 10%

²Batteries below this capacity are not recommended nor supported.

GPS Antenna

GPS Antenna

The U.FL port on the nRf9160 Feather is to be used with an active GPS antenna only.

  • Antenna supply voltage: 3.3V ± 0.3V
  • Antenna current rating: 15mA

The port works with most U.FL based active antenna parts. The nRF9160 Feather has been tested and verified with the following parts:

Part NumberManufacturererDatasheetNotes
ACTPAT182-01-IPInventek SystemsLinkOffered as an addon

Cellular Antenna

The nRF9160 Feather has been tested with these approved antennas. They're chosen specifically to match the FCC requirements as indicated here.

Part NumberManufacturererDatasheetNotes
FH2B4MH1F2F0100Unictron TechnologiesLinkIncluded
ANT-LTE-RPC-UFLLinxLinkGPS/GNSS, Rigid

Only tested antennas are supported. If you choose to use a different one, proceed at your own risk!

Getting Started

Start here

🚨Read this first🚨

There are some important things about the nRF9160 Feather before you get started:

  1. The nRF9160 Feater shouldn't be used with a battery less than 300mAH. More information in the specs section.
  2. If you need to debug your nRF9160 Feather, it requires an external programmer. More information on that in the Requirements for external programming section.
  3. Looking for help? Check out the support forum: https://community.jaredwolff.com

What's included

nRF9160 Feather

  • 1x nRF9160 Feather board
  • 1x set of male headers (16 pin and 12 pin)
  • 1x wide-band LTE antenna
  • 1x getting started card
  • 1x IoT SIM

SDK and Development Environment Setup

Instructions below are based on using Microsoft's Visual Studio Code as your workspace. While you may choose a different editor, most of the steps remain the same.

Getting Started Sections

SDK Setup (Mac OS)

This page is all about getting your Mac compiling code for the nRF9160 Feather. Run into trouble during the process? Post your questions on the community forum.

Installing IDE

  1. Install or use the code editor of your choice. I personally use Microsoft Visual Studio Code. The download link is here
  2. If you decide to use Visual Studio Code, make sure you install the C/C++ and Cortex-Debug extentions using the built in extension marketplace.

Installing SDK

Before we start, if you already have NCS installed, you can skip to Step 8. Let's begin!

Installing the latest SDK is a snap and only takes a few steps. Let's walk through them here:

  1. Download and install nRF Connect For Desktop

    Download page for nRF Connect For Desktop

  2. Copy the app to your Applications folder

    Installer

  3. Open up the app and install the Toolchain Manager

    Toolchain Manager install

  4. Then open it up.

    Open Toolchain Manager

  5. Scroll to the bottom and click Install package from other source

    Other source install

  6. Then paste this url into the box and click ok.

    http://developer.nordicsemi.com/.pc-tools/toolchain/ncs-toolchain-v1.4.1-20201215-7ecf886-minimal.dmg
    

    Insert into box

  7. The download and install will take a few minutes. Hang out, take a walk, sing a song and come back later.

  8. Finally, once installed you'll have a dropdown that you can access. Click on it and then the Open Terminal option. Open terminal

  9. To get the nRF9160 Feather examples we'll update /opt/nordic/ncs/v1.4.1/nrf/west.yml. First in the remotes section add:

     - name: circuitdojo
       url-base: https://github.com/circuitdojo
    

    So it looks like:

    - name: alexa
      url-base: https://github.com/alexa
    - name: circuitdojo
      url-base: https://github.com/circuitdojo
    
  10. Then in the projects section add at the bottom:

    - name: nfed
      repo-path: nrf9160-feather-examples-and-drivers
      revision: v1.4.x
      path: nfed
      remote: circuitdojo
    

    So it looks like:

    ...
    - name: Alexa-Gadgets-Embedded-Sample-Code
      path: modules/alexa-embedded
      revision: face92d8c62184832793f518bb1f19379538c5c1
      remote: alexa
    - name: nfed
      repo-path: nrf9160-feather-examples-and-drivers
      revision: v1.4.x
      path: nfed
      remote: circuitdojo
    
  11. Then run west update in your freshly created terminal session. This will fetch the nRF9160 Feather examples.

Installing newtmgr

  1. For loading code to your nRF9160 Feather, you'll need to download and copy a custom version of newtmgr. Open a terminal window and run:

    cd ~/Downloads
    wget "https://docs.jaredwolff.com/files/newtmgr/darwin/newtmgr.zip"
    unzip newtmgr.zip
    mv newtmgr /opt/nordic/ncs/v1.4.1/toolchain/bin
    rm newtmgr.zip
    
  2. Then you'll need to add your serial profile to make it easier to download/update your device:

    newtmgr conn add serial type=serial connstring='dev=/dev/tty.SLAB_USBtoUART,baud=1000000'
    

    If you have multiple Silicon Labs CP2102 connected to your machine your serial port may be named differently. I recommend you unplug all devices that could be named tty.SLAB_USBtoUART to ensure you're targeting the correct device during programming.

  3. Having trouble? You may have to install the drivers.

For more info in using newtmgr checkout the programming section of this documentation.

Migrating from previous instructions

Follow the same steps as above. Except for Step 9. Then copy your nfed directory from your old setup to the new SDK folder. It will be in /opt/nordic/ncs/v1.4.1/. You'll want to checkout the latest using git pull && git checkout v1.4.1.

Testing it

Now you can get to playing around with some of the nRF9160 Feather example code! Remember you'll always have to open a terminal using the Toolchain Manager to build code!

You can quickly test if your SDK is set up correctly by checking out the blinky example.

SDK Setup (Mac OS)

This page is all about getting your Mac compiling code for the nRF9160 Feather. Run into trouble during the process? Post your questions on the community forum.

Installing IDE

  1. Install or use the code editor of your choice. I personally use Microsoft Visual Studio Code. The download link is here
  2. If you decide to use Visual Studio Code, make sure you install the C/C++ and Cortex-Debug extentions using the built in extension marketplace.

Installing SDK

  1. Install Python3. The easiest way is with Homebrew. Install brew first, then open a terminal and run:

    brew install python3 git cmake ninja wget
    
  2. Once complete, check to make sure that python3 is installed. Here's the example output. (Your version may be different.)

    > python3 --version
    Python 3.8.6
    

    💡Note: if you've freshly installed Homebrew or get an error that python3 is not found, you may have to add /usr/local/bin to your PATH. For example here's an entry for .bash_profile or .zshrc:

    export PATH=/usr/local/bin/:$PATH
    

    For a shell like fish you'll need:

    set -U fish_user_paths /usr/local/bin/ $fish_user_paths
    
  3. Also check that git is installed with:

    ❯ git --version
    git version 2.27.0
    
  4. Install west. West is the most important utility for using nRF Connect SDK & Zephyr. You'll become quite familliar with very soon.

    pip3 install west
    

    💡Note: you can update west by issuing pip3 install -U west It will uninstall the version on your machine and replace it with the latest. (It won't do anything if you have the latest installed.)

  5. Now create a folder on your machine and call it nfed (short for nRF9160 Feather Examples and Drivers). Open a terminal to this folder and initialize nRF Connect SDK using west:

    cd ~
    mkdir nfed
    cd nfed
    west init -m https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers --mr main
    
  6. Once your nRF Connect SDK compontents are downloaded, you'll need to fetch the remaining SDK:

    west update
    

    You'll see a bunch of output go by as west downloads dependencies using Git.

    Here's what your nfed folder should look like:

    ❯ tree -L 1
    .
    ├── bootloader
    ├── build
    ├── latest
    ├── mbedtls
    ├── modules
    ├── nrf
    ├── nrf9160-feather
    ├── nrfxlib
    ├── test
    ├── tools
    └── zephyr
    
  7. Install the remaining python3 requirements by running these commands in your nfed directory.

    pip3 install -r zephyr/scripts/requirements.txt
    pip3 install -r nrf/scripts/requirements.txt
    pip3 install -r bootloader/mcuboot/scripts/requirements.txt
    

The ARM Embedded Toolchain

  1. Install the toolchain by pulling it from ARM. Run these commands:

    cd ~
    wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2"
    tar xvfj gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2
    rm gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2
    

    Note for Catalina users you will get an error when running these utilities for the first time. You must allow them to be executed in your Security preferences.

    Error running ARM Toolchain

  2. Finally you'll need export a few important environment variables for things to work. For bash here's the entry for .bash_profile that I have:

    # Zephyr related
    export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    export GNUARMEMB_TOOLCHAIN_PATH="~/gcc-arm-none-eabi-9-2019-q4-major"
    

    💡Note: this should also work for .zshrc for those folks who are using newer versions of Mac OS (or just plain prefer zsh)

    For folks using fish you're going to use:

    set -Ux ZEPHYR_TOOLCHAIN_VARIANT gnuarmemb
    set -Ux GNUARMEMB_TOOLCHAIN_PATH "~/gcc-arm-none-eabi-9-2019-q4-major"
    

newtmgr

  1. For loading code to your nRF9160 Feather, you'll need to download and copy a custom version of newtmgr to a folder in your PATH.

    cd ~/Downloads
    wget "https://docs.jaredwolff.com/files/newtmgr/darwin/newtmgr.zip"
    unzip newtmgr.zip
    sudo mv newtmgr /usr/local/bin
    rm newtmgr.zip
    

    If you're not sure, /usr/local/bin/ is always a good spot for these types of binaries.

  2. Then you'll need to add your serial profile to make it easier to download/update your device:

    newtmgr conn add serial type=serial connstring='dev=/dev/tty.SLAB_USBtoUART,baud=1000000'
    

    If you have multiple Silicon Labs CP2102 connected to your machine your serial port may be named differently. I recommend you unplug all devices that could be named tty.SLAB_USBtoUART to ensure you're targeting the correct device during programming.

  3. Having trouble? You may have to install the drivers.

For more info in using newtmgr checkout the programming section of this documentation.

Testing it

You can quickly test if your SDK is set up correctly by checking out the blinky example.

SDK Setup (Windows)

This page is all about getting your Windows machine compiling code for the nRF9160 Feather. Run into trouble during the process? Post your questions on the community forum.

IDE Setup

  1. Install or use the code editor of your choice. I personally use Microsoft Visual Studio Code. The download link is here
  2. If you decide to use Visual Studio Code, make sure you install the C/C++ and Cortex-Debug extentions using the built in extension marketplace. Extensions installed

SDK Install

Before we start, if you already have NCS installed, you can skip to Step 8. Let's begin!

  1. Download and install nRF Connect For Desktop

    Download page for nRF Connect For Desktop

  2. Once downloaded, run the installer.

    nRF Connect Install

  3. Open up the app and install the Toolchain Manager

    Toolchain Manager install

  4. Then open it up after installing.

  5. Scroll to the bottom and click Install package from other source

    Other source install

  6. Then paste this url into the box and click ok.

    http://developer.nordicsemi.com/.pc-tools/toolchain/ncs-toolchain-v1.4.1-20201215-7ecf886-minimal.zip
    

    Insert into box

  7. The download and install will take a few minutes. Hang out, take a walk, sing a song and come back later.

  8. Finally, once installed you'll have a dropdown that youc an access. Click on it and then the Open Bash or Open Command Prompt option. (I prefer bash since I use *nix a lot) Open terminal

  9. To get the nRF9160 Feather examples we'll update /opt/nordic/v1.4.1/nrf/west.yml. First in the remotes section add:

     - name: circuitdojo
       url-base: https://github.com/circuitdojo
    

    So it looks like:

     - name: Alexa-Gadgets-Embedded-Sample-Code
       path: modules/alexa-embedded
       revision: face92d8c62184832793f518bb1f19379538c5c1
       remote: alexa
     - name: nfed
       repo-path: nrf9160-feather-examples-and-drivers
       revision: v1.4.x
       path: nfed
       remote: circuitdojo
    
  10. Then in the projects section add at the bottom:

    - name: nfed
      repo-path: nrf9160-feather-examples-and-drivers
      revision: v1.4.x
      path: nfed
      remote: circuitdojo
    

    So it looks like:

    ...
    - name: Alexa-Gadgets-Embedded-Sample-Code
      path: modules/alexa-embedded
      revision: face92d8c62184832793f518bb1f19379538c5c1
      remote: alexa
    - name: nfed
      repo-path: nrf9160-feather-examples-and-drivers
      revision: v1.4.x
      path: nfed
      remote: circuitdojo
    
  11. Then run west update in your freshly created bash/command prompt session. This will fetch the nRF9160 Feather examples.

newtmgr

  1. For loading code to your nRF9160 Feather, you'll need to download and copy a custom version of newtmgr.
  2. Extract it and move it into your toolchain/bin/ directory. This will likely be: C:\Users\<your username>\ncs\v1.4.1\toolchain\bin
  3. Then, you'll need to add your serial profile to make it easier to download/update your device:
    newtmgr conn add serial type=serial connstring="dev=COM5,baud=1000000"
    
    Make sure that the COM port matches the one attached to the nRF9160 Feather. An easy way to check is to remove and add the device to see which COM port shows up in device manager.
  4. Having trouble? You may need to install the Silabs VCP driver.. Download and install the CP210x VCP Windows option.

For more info in using newtmgr checkout the programming section of this documentation.

Migrating from previous instructions

Follow the same steps as above. Except for Step 9. Then copy your nfed directory from your old setup to the new SDK folder. It will be in /opt/nordic/ncs/v1.4.1/. You'll want to checkout the latest using git pull && git checkout v1.4.1.

Testing it

You can quickly test if your SDK is set up correctly by checking out the blinky example. Make sure that you've closed and re-opened all terminals and Visual Studio Code so the environment is correct. Otherwise you may have issues compiling or flashing code.

SDK Setup (Windows)

This page is all about getting your Windows machine compiling code for the nRF9160 Feather. Run into trouble during the process? Post your questions on the community forum.

IDE Setup

  1. Install or use the code editor of your choice. I personally use Microsoft Visual Studio Code. The download link is here
  2. If you decide to use Visual Studio Code, make sure you install the C/C++ and Cortex-Debug extentions using the built in extension marketplace. Extensions installed

SDK Install

  1. Install the Chocolatey (choco) package manager. In the start menu type cmd then right click and open with Administrative Privledges.

    Powershell w/ Admin

  2. Then paste the install script and press enter:

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    

    For more info check out this page.

  3. Now, lets install the remaining deps we'll need for Zephyr/nRF Connect using choco. In a new cmd.exe session (with Administrator privledges) run:

    choco feature enable -n allowGlobalConfirmation
    choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' --version 3.18.5
    choco install ninja gperf python git
    
  4. Next install west using pip. West is the most important utility for using nRF Connect SDK & Zephyr. You'll become quite familliar with very soon.

    pip install west
    

    💡Note: you can update west by issuing pip3 install -U west It will uninstall the version on your machine and replace it with the latest. (It won't do anything if you have the latest installed.)

  5. Now create a folder on your machine and call it nfed (short for nRF9160 Feather Examples and Drivers). For windows it's best to put it in C:\. Open a new cmd.exe prompt in this folder and initialize nRF Connect SDK using west:

    cd C:\
    mkdir nfed
    cd nfed
    west init -m https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers --mr main
    
  6. Once your nRF Connect SDK compontents are downloaded, you'll need to fetch the remaining SDK:

    west update
    

    You'll see a bunch of output go by as west downloads dependencies using Git. (This will take hot minute so make sure you're prepared with something else to do. 😬)

    Here's what your nfed folder should look like:

    C:\nfed>dir
     Volume in drive C has no label.
     Volume Serial Number is B013-63F8
    
     Directory of C:\nfed
    
    10/27/2020  12:25 PM    <DIR>          .
    10/27/2020  12:25 PM    <DIR>          ..
    10/27/2020  12:22 PM    <DIR>          .west
    10/27/2020  12:24 PM    <DIR>          bootloader
    10/27/2020  12:25 PM    <DIR>          mbedtls
    10/27/2020  12:27 PM    <DIR>          modules
    10/27/2020  12:22 PM    <DIR>          nrf
    10/27/2020  12:22 PM    <DIR>          nr9160-feather
    10/27/2020  12:24 PM    <DIR>          nrfxlib
    10/27/2020  12:24 PM    <DIR>          test
    10/27/2020  12:26 PM    <DIR>          tools
    10/27/2020  12:24 PM    <DIR>          zephyr
                   0 File(s)              0 bytes
                  11 Dir(s)  29,099,958,272 bytes free
    
  7. Installing the remaining SDK requirements using pip3:

    pip install -r zephyr/scripts/requirements.txt
    pip install -r nrf/scripts/requirements.txt
    pip install -r bootloader/mcuboot/scripts/requirements.txt
    

    Note you will get an error during this process related to Visual Studio (not Visual Studio Code). You can ignore this issue.

The ARM Embedded Toolchain

  1. You can download and install the toolchain with this direct link.

  2. One installed, re-open your prompt (or use the provided DOS prompt that will pop up post install) and run arm-none-eabi-gcc --version to make sure it's installed correctly.

    arm-none-eabi-gcc --version
    arm-none-eabi-gcc (GNU Arm Embedded Toolchain 9-2019-q4-major) 9.2.1 20191025 (release)
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
  3. You will have to set some important environment variables. Here's what they should look like:

    setx ZEPHYR_TOOLCHAIN_VARIANT gnuarmemb
    setx GNUARMEMB_TOOLCHAIN_PATH "C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major"
    

newtmgr

  1. For loading code to your nRF9160 Feather, you'll need to download and copy a custom version of newtmgr to a folder in your PATH.

    If you're not sure, C:\bin\ is always a good spot for these types of binaries.

  2. You'll have to make sure that C:\bin\ is added to your system PATH. Hit the start menu or Windows key and type "environment variables". Open the "Edit the system environment variables." option.

  3. Go to the System variables section and find path.

  4. Click Edit Edit system variables

  5. Click New

  6. Enter C:\bin\ into the new line.

  7. Press Ok for the remaining prompts.

  8. Then, you'll need to add your serial profile to make it easier to download/update your device:

    newtmgr conn add serial type=serial connstring="dev=COM5,baud=1000000"
    

    Make sure that the COM port matches the one attached to the nRF9160 Feather. An easy way to check is to remove and add the device to see which COM port shows up in device manager.

  9. Having trouble? You may need to install the Silabs VCP driver.. Download and install the CP210x VCP Windows option.

For more info in using newtmgr checkout the programming section of this documentation.

Testing it

You can quickly test if your SDK is set up correctly by checking out the blinky example. Make sure that you've closed and re-opened all terminals and Visual Studio Code so the environment is correct. Otherwise you may have issues compiling or flashing code.

SDK Setup (Linux - Ubuntu)

This page is all about getting your Linux machine compiling code for the nRF9160 Feather. Run into trouble during the process? Post your questions on the community forum.

Installing IDE

  1. Install or use the code editor of your choice. I personally use Microsoft Visual Studio Code. You can download directly from the Ubuntu Software Install utility. Ubuntu software install
  2. If you decide to use Visual Studio Code, make sure you install the C/C++ and Cortex-Debug extentions using the built in extension marketplace.

Installing SDK

  1. Install dependencies using apt-get

    sudo apt install --no-install-recommends git cmake ninja-build gperf \
    ccache dfu-util device-tree-compiler wget \
    python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
    make gcc gcc-multilib g++-multilib libsdl2-dev
    
  2. Check your cmake version:

    cmake --version
    

    If it's older than 3.13.3, you'll have to install a newer version using the instructions here.

  3. Install west. West is the most important utility for using nRF Connect SDK & Zephyr. You'll become quite familliar with very soon.

    pip3 install --user -U west
    
  4. Then make sure that ~/.local/bin is added to your path:

    echo 'export PATH=~/.local/bin:"$PATH"' >> ~/.bashrc
    source ~/.bashrc
    
  5. Now create a folder on your machine and call it nfed (short for nRF9160 Feather Examples and Drivers). Open a terminal to this folder and initialize nRF Connect SDK using west:

    cd ~
    mkdir nfed
    cd nfed
    west init -m https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers --mr main
    
  6. Once your nRF Connect SDK compontents are downloaded, you'll need to fetch the remaining SDK:

    west update
    

    You'll see a bunch of output go by as west downloads dependencies using Git.

    Here's what your nfed folder should look like:

    ❯ tree -L 1
    .
    ├── bootloader
    ├── build
    ├── latest
    ├── mbedtls
    ├── modules
    ├── nrf
    ├── nrf9160-feather
    ├── nrfxlib
    ├── test
    ├── tools
    └── zephyr
    
  7. Installing the remaining SDK requirements using pip3:

    pip3 install --user -r zephyr/scripts/requirements.txt
    pip3 install --user -r nrf/scripts/requirements.txt
    pip3 install --user -r bootloader/mcuboot/scripts/requirements.txt
    

    Note: there may be an error during the first pip3 install you can safely ignore them.

The ARM Embedded Toolchain

  1. First download the latest Zephyr SDK installer:
    cd ~
    wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.11.4/zephyr-sdk-0.11.4-setup.run
    
  2. Then run it:
    chmod +x zephyr-sdk-0.11.4-setup.run
    ./zephyr-sdk-0.11.4-setup.run -- -d ~/zephyr-sdk-0.11.4
    
  3. Finally install the udev rules which allows you to flash boards using a programmer.
    sudo cp ~/zephyr-sdk-0.11.4/sysroots/x86_64-pokysdk-linux/usr/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d
    sudo udevadm control --reload
    

newtmgr

  1. For loading code to your nRF9160 Feather, you'll need to download and copy a custom version of newtmgr to a folder in your PATH.

    cd ~/Downloads
    wget "https://docs.jaredwolff.com/files/newtmgr/linux/newtmgr.zip"
    unzip newtmgr.zip
    mv newtmgr ~/.local/bin
    rm newtmgr.zip
    

    If you're not sure, ~/.local/bin is always a good spot for these types of binaries.

  2. Then you'll need to add your serial profile to make it easier to download/update your device:

    newtmgr conn add serial type=serial connstring='dev=/dev/ttyUSB0,baud=1000000'
    newtmgr -c serial reset
    

    If you have multiple Silicon Labs CP2102 connected to your machine your serial port may be named differently. I recommend you unplug all devices that could be named ttyUSB0 to ensure you're targeting the correct device during programming.

    Note if you get a Error: open /dev/ttyUSB0: permission denied error. You'll have to fix permissions for the serial device for all users. Here are the steps:

    Open this .rules file in vi (or your editor of choice)

    sudo vi /etc/udev/rules.d/50-myusb.rules
    

    Then within the editor hit i, paste this:

    KERNEL=="ttyUSB[0-9]*",MODE="0666"
    KERNEL=="ttyACM[0-9]*",MODE="0666"
    

    Hit the esc button and then type :wq!.

For more info in using newtmgr checkout the programming section of this documentation.

Testing it

You can quickly test if your SDK is set up correctly by checking out the blinky example.

Compiling an Application

Prerequisites/SDK Setup

If you haven't already, make sure you've set up the SDK:

Side note One of the engineers at Nordic configured a Docker Image you can also use to build your code. I'll be adding a section on this when I get a chance to test it!

Board Defintion Files

Currently the 1.2 and 1.3 branchs of the nRF Connect SDK does not have support for the nRF9160 Feather built in. You'll need to download and copy the appropriate board defintion files from the downloads page. If you're using the latest nRF SDK those defintions should be included.

To install, unzip the contents of the board defintions to ncs/zephyr/boards/arm/ It should create a folder called circuitdojo_feather_nrf9160. Congrats your board files are installed! You should be able to use the circuitdojo_feather_nrf9160ns target for your Zephyr builds!

Here are the direct downloads:

Note: if you're using the v1.2.x branch of nRF Connect SDK, make sure you're using the v1.2.x definitions. Same for the v1.3.x definitions.

Example

As long as you have all the requirements from the guide above, compiling for the nRF9160 Feather should be as simple as running the following:

west build -b circuitdojo_feather_nrf9160ns

If you would like to "clean" your project before building add the -p parameter.

west build -b circuitdojo_feather_nrf9160ns -p

Note: having trouble building? Make sure you check out the troubleshooting page.

The output assets are placed in the build/zephyr folder. If you're programming from scratch, you'll want the merged.hex. If you're using newtmgr then you'll want the app_update.bin. More info on different programming methods in the programming and debugging section using newtmgr and an external programmer.

For subsequent builds you don't need -b circuitdojo_feather_nrf9160ns if you're not using the -p param.

west build

west uses the last board that was indicated for the re-build.

Here's an example compile output from the blinky sample:

$ west build -b circuitdojo_feather_nrf9160ns
[0/1] Re-running CMake...
Including boilerplate (Zephyr base (cached)): /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client
-- Zephyr version: 2.3.99 (/Users/jaredwolff/Git/nrf-connect/ncs/zephyr)
-- Found west: /usr/local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Board: circuitdojo_feather_nrf9160ns
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/Users/jaredwolff/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160ns.dts
circuitdojo_feather_nrf9160ns.dts.pre.tmp:358.32-362.5: Warning (simple_bus_reg): /soc/cryptocell-sw: missing or empty reg/ranges property
circuitdojo_feather_nrf9160ns.dts.pre.tmp:57.42-69.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@40000000/kmu@39000)
circuitdojo_feather_nrf9160ns.dts.pre.tmp:306.19-312.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
-- Generated zephyr.dts: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/zephyr/include/generated/devicetree_unfixed.h
Parsing /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/Kconfig
Loaded configuration '/Users/jaredwolff/Git/nrf-connect/ncs/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160ns_defconfig'
Merged configuration '/Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/prj.conf'
Configuration saved to '/Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/zephyr/.config'
Kconfig header saved to '/Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/zephyr/include/generated/autoconf.h'
-- Cache files will be written to: /Users/jaredwolff/Library/Caches/zephyr
Changed board to secure circuitdojo_feather_nrf9160 (NOT NS)

=== child image spm -  begin ===
Including boilerplate (Zephyr base (cached)): /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/spm
-- Zephyr version: 2.3.99 (/Users/jaredwolff/Git/nrf-connect/ncs/zephyr)
-- Found west: /usr/local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Board: circuitdojo_feather_nrf9160
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/Users/jaredwolff/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160.dts
circuitdojo_feather_nrf9160.dts.pre.tmp:57.42-69.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@50000000/kmu@39000)
circuitdojo_feather_nrf9160.dts.pre.tmp:306.19-312.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)
-- Generated zephyr.dts: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/spm/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/spm/zephyr/include/generated/devicetree_unfixed.h
Parsing /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/Kconfig
Loaded configuration '/Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/spm/zephyr/.config'
No change to configuration in '/Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/spm/zephyr/.config'
No change to Kconfig header in '/Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/spm/zephyr/include/generated/autoconf.h'
-- Cache files will be written to: /Users/jaredwolff/Library/Caches/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/spm
=== child image spm -  end ===

Changed board to secure circuitdojo_feather_nrf9160 (NOT NS)

=== child image mcuboot -  begin ===
Including boilerplate (Zephyr base (cached)): /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr
-- Zephyr version: 2.3.99 (/Users/jaredwolff/Git/nrf-connect/ncs/zephyr)
-- Found west: /usr/local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Board: circuitdojo_feather_nrf9160
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/Users/jaredwolff/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160.dts
-- Found devicetree overlay: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Found devicetree overlay: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Found devicetree overlay: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Found devicetree overlay: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Found devicetree overlay: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
circuitdojo_feather_nrf9160.dts.pre.tmp:57.42-69.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@50000000/kmu@39000)
circuitdojo_feather_nrf9160.dts.pre.tmp:306.19-312.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)
-- Generated zephyr.dts: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
Parsing /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/Users/jaredwolff/Git/nrf-connect/ncs/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_defconfig'
Merged configuration '/Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration '/Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/boards/circuitdojo_feather_nrf9160.conf'
Configuration saved to '/Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/mcuboot/zephyr/.config'
Kconfig header saved to '/Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/mcuboot/zephyr/include/generated/autoconf.h'
-- Cache files will be written to: /Users/jaredwolff/Library/Caches/zephyr
MCUBoot bootloader key file: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/root-rsa-2048.pem
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build/mcuboot
=== child image mcuboot -  end ===

CMake Warning at /Users/jaredwolff/Git/nrf-connect/ncs/nrf/cmake/mcuboot.cmake:115 (message):


        ---------------------------------------------------------
        --- WARNING: Using default MCUBoot key, it should not ---
        --- be used for production.                           ---
        ---------------------------------------------------------


Call Stack (most recent call first):
  /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/zephyr/CMakeLists.txt:1 (include)


CMake Warning at /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/CMakeLists.txt:1379 (message):
  __ASSERT() statements are globally ENABLED


-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build
[0/180] Performing build step for 'spm_subimage'
[151/155] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       32256 B        48 KB     65.62%
            SRAM:        5488 B        64 KB      8.37%
        IDT_LIST:          40 B         2 KB      1.95%
[155/155] Linking C executable zephyr/zephyr.elf
[2/176] Performing build step for 'mcuboot_subimage'
[248/253] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       42500 B        48 KB     86.47%
            SRAM:       26800 B        64 KB     40.89%
        IDT_LIST:          72 B         2 KB      3.52%
[253/253] Linking C executable zephyr/zephyr.elf
[163/176] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       76868 B     441856 B     17.40%
            SRAM:       36928 B       128 KB     28.17%
        IDT_LIST:         120 B         2 KB      5.86%
[174/174] Generating zephyr/merged.hex
MacBook-Pro:at_client jaredwolff$ newtmgr -c serial image upload build/zephyr/app_update.bin
MacBook-Pro:at_client jaredwolff$ cd ../../..
MacBook-Pro:nrf jaredwolff$ cd ..
MacBook-Pro:ncs jaredwolff$ cd zephyr/samples/basic/blinky
MacBook-Pro:blinky jaredwolff$ code prj.conf
MacBook-Pro:blinky jaredwolff$ west build -b circuitdojo_feather_nrf9160ns
[0/16] Performing build step for 'spm_subimage'
ninja: no work to do.
[1/9] Performing build step for 'mcuboot_subimage'
[0/1] Re-running CMake...
Including boilerplate (Zephyr base (cached)): /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr
-- Zephyr version: 2.3.99 (/Users/jaredwolff/Git/nrf-connect/ncs/zephyr)
-- Found west: /usr/local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Board: circuitdojo_feather_nrf9160
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/Users/jaredwolff/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160.dts
-- Found devicetree overlay: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Found devicetree overlay: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
-- Found devicetree overlay: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
circuitdojo_feather_nrf9160.dts.pre.tmp:57.42-69.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@50000000/kmu@39000)
circuitdojo_feather_nrf9160.dts.pre.tmp:306.19-312.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)
-- Generated zephyr.dts: /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/samples/basic/blinky/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/samples/basic/blinky/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
Parsing /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration '/Users/jaredwolff/Git/nrf-connect/ncs/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160_defconfig'
Merged configuration '/Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/prj.conf'
Merged configuration '/Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/boot/zephyr/boards/circuitdojo_feather_nrf9160.conf'
Configuration saved to '/Users/jaredwolff/Git/nrf-connect/ncs/zephyr/samples/basic/blinky/build/mcuboot/zephyr/.config'
Kconfig header saved to '/Users/jaredwolff/Git/nrf-connect/ncs/zephyr/samples/basic/blinky/build/mcuboot/zephyr/include/generated/autoconf.h'
-- Cache files will be written to: /Users/jaredwolff/Library/Caches/zephyr
MCUBoot bootloader key file: /Users/jaredwolff/Git/nrf-connect/ncs/bootloader/mcuboot/root-rsa-2048.pem
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jaredwolff/Git/nrf-connect/ncs/zephyr/samples/basic/blinky/build/mcuboot
[247/252] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       42528 B        48 KB     86.52%
            SRAM:       26800 B        64 KB     40.89%
        IDT_LIST:          72 B         2 KB      3.52%
[252/252] Linking C executable zephyr/zephyr.elf
[7/7] Generating zephyr/merged.hex

Common errors and warnings

  1. CMake complains about your MCUBoot key

    CMake Warning at /Users/jaredwolff/Git/nrf-connect/ncs/nrf/cmake/mcuboot.cmake:115 (message):
    
    
            ---------------------------------------------------------
            --- WARNING: Using default MCUBoot key, it should not ---
            --- be used for production.                           ---
            ---------------------------------------------------------
    

    The default nRF9160 Feather bootloader uses the default MCUBoot key. If you're working on a secure application, be sure to change this key.

Programming and Debugging

There are currently two ways of programming the nRF9160 Feather. You can use the built-in bootloader or use an external programmer.

Booloader use

Currently the nRF9160 Feather uses the MCUBoot bootloader which comes standard with the nRF Connect SDK. It is the recommended way to load new firmware onto your nRF9160 Feather.

In order to utilize the bootloader, you'll ned to install newtmgr (AKA mcumgr). Here's how below:

IMPORTANT: updates above ~192kB will not work with the current version of the bootloader. Examples like the asset_tracker require a programmer.

Binary Download

Download one of the binary files below. (Install script coming soon...)

Then place that file in your $PATH. On Linux and OSX that location will be /usr/local/bin. On Windows you can place the file in a location of your choice. Then, you'll have to update your $PATH. If you're unfamailiar with the process check out this guide.

Setting your connection configuration (one time only)

In order to easily work with newtmgr you'll need to make a one-time connection profile.

For Mac OS

newtmgr conn add serial type=serial connstring='dev=/dev/tty.SLAB_USBtoUART,baud=1000000'

For Linux

sudo newtmgr conn add serial type=serial connstring="dev=/dev/ttyUSB0,baud=1000000"

Depending on your system, the serial port may show up differently. Replace /dev/ttyUSB0 with the serial port name. Also, sudo is required for Linux to access the serial port properly.

For Windows

newtmgr conn add serial type=serial connstring="dev=COM3,baud=1000000"

In all three cases above you've created a connection called serial. We'll be using that when issuing commands to the nRF9160 Feather.

Using newtmgr

Pre-check: MCUBoot needs to be enabled in your project before you can use it! Make sure that you have CONFIG_BOOTLOADER_MCUBOOT=y in your prj.conf

  1. Put your nRF9160 Feather into DFU mode.
    1. Hold the MODE button
    2. Then tap the RST button while holding mode
    3. Let go of the MODE button
  2. Building your application if you haven't already with west build. It will create a folder called build. The file we care about is build/zephyr/app_update.bin
  3. Load the file using newtmgr
    1. Load the binary file using: newtmgr -c serial image upload build/zephyr/app_update.bin
    2. Reset your board using newtmgr -c serial reset or hit the RST button. Full process below:

Note:

  1. The transfer process is limited to 1M BAUD. In most cases it takes about 8 seconds to transfer application code.
  2. The nRF9160 Feather does not respond to newtmgr commands unless it's in DFU mode. (See step 1 above to get it into DFU mode.)

Requirements for external programming and debugging

You can also use external programmers with the nRF9160 Feather. Here are the current supported external programmers:

  1. nRF5340-PDK
  2. nRF9160-DK

Note: Most commercial J-Link programmers *should* work with the nRF9160 Feather. In particular the J-Link EDU Mini is a great choice if you're building non-commercial products. (Supports Cortex M33 processors. Untested at this time.)

🚨Important: the nRF52 and nRF51 based development kits do not work with the nRF9160 Feather!

👉Additionally, you'll also need a Tag-Connect cable. The nRF9160 Feather was designed to use the TC2030-CTX-NL. For more information check out Tag-Connect's product page.

Installing programmer software

In this next section, I'll be focusing on using the nRF5340-PDK as the programmer of choice. These steps should not be different from other J-Link supported boards.

  1. Download your version of the nRF Command Line Tools

Windows

  1. Then, run the .exe that was downloaded. It will do all the heavy lifting for you.
  2. Run nrfjprog in a cmd window to make sure your install is working.
  3. You may also have to add JLink.exe to your path. It's the exact same proceedure as adding newtmgr except the path you're adding is C:\Program Files (x86)\SEGGER\JLink Paths updated for Windows for JLink
  4. Close/restart VSCode and your Command Prompt
  5. Run jlink.exe and make sure it opens.
    > jlink.exe
    SEGGER J-Link Commander V6.86f (Compiled Oct 23 2020 18:01:48)
    DLL version V6.86f, compiled Oct 23 2020 18:00:13
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    Hardware version: V1.00
    S/N: 960083363
    License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    VTref=3.300V
    
    
    Type "connect" to establish a target connection, '?' for help
    J-Link>
    

Mac

  1. First run nRF-Command-Line-Tools_10_9_0_OSX.pkg
  2. Once that install is done, run JLink_MacOSX_V680a.pkg
  3. Open a fresh terminal window and run nrfjprog and jlinkexe to make sure your install is complete.

Setting up the nRF5340-PDK

Here are a couple of close up shots of how to connect the nRF5340-PDK:

nrf53-dk-connected

nRF9160 Feather w/ USB

nRF9160 Feather w/ Tag Connect

nRF9160 Feather w/ Tag Connect Connected

I highly recommend you jump SB47 on your nRF5340-PDK with some solder. This forces the debugger to think an external devices is permanently connected. If you're only doing external debugging, this is very useful.

nRF5340-DK jumper highlighted

After hooking things up, It's time to do a quick smoke test. Running nrfjprog -r in a terminal should show this result:

$ nrfjprog -r
Applying system reset.
Run.

Success!

Note: these pictures are with an early version of the nRF9160 Feather. The procedure is the same. The orientation of the Tag-Connect though is horizontal not vertical as seen in the pictures.

Programming with the nRF5340-PDK

Programming with the nRF5340-PDK is straight forward in Zephyr using west. Here's what it looks like:

west build -b circuitdojo_feather_nrf9160ns -p
west flash --runner nrfjprog
nrfjprog -r

In the above, i'm:

  1. Doing a pristine build of my application with the nRF9160 Feather as the target.
  2. Then flashing using the nrfjprog runner option. This is preferred for all J-Link boards.
  3. Resetting the board using nrfjprog -r. As of this writing, west does not reset the board after programming.

Getting a modem trace

Sometimes, you may be requested to get a modem trace of your device. This section will focus on helping you get one for your nRF9160 Feather.

In order to get a modem trace, the TX and RX pins on your board need to be free. You'll also need a UART to USB adapter of some type. I used an FTDI one that has each of the lines broken out.

  1. First, set your prj.conf to include the following lines:

    # Enable modem trace
    CONFIG_BSD_LIBRARY_TRACE_ENABLED=y
    
    # AT host library
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_AT_HOST_LIBRARY=y
    
  2. Then, create a folder in your project/sample called boards and add a new file called circuitdojo_feather_nrf9160ns.overlay We'll want to enable the UART1 interface on pins 23 and 24 like below:

    /*
    * Copyright (c) 2020 Circuit Dojo LLC
    *
    * SPDX-License-Identifier: Apache-2.0
    */
    
    &uart1 {
    status = "okay";
    current-speed = <115200>;
    tx-pin = <24>;
    rx-pin = <23>;
    };
    
  3. Connect your USB to UART adatper. I've used clips from my logic analyzer to hold the wires in place. Connect the yellow wire to the TX on the board. Connect the orange wire to the RX on the board.

    img/programming-and-debugging/Screen_Shot_2020-09-16_at_4.42.58_PM.png

  4. Then, inside LTE link monitor enable the process with:

    AT%XMODEMTRACE=1,2
    AT+CFUN=0
    

    This will perpetually save and keep modem traces on.

  5. Then open the serial port in the modem trace App and click start.

    img/programming-and-debugging/Screen_Shot_2020-09-16_at_4.47.06_PM.png

  6. Then run your app as normal. You should see the Trace size go up little by little as connections are made, etc.

    img/programming-and-debugging/Screen_Shot_2020-09-16_at_5.12.48_PM.png

  7. Then grab the file according to the log output. For example: Tracefile created: /Users/jaredwolff/Library/Application Support/nrfconnect/pc-nrfconnect-tracecollector/trace-2020-09-16T20-47-19.741Z.bin

    For more information, check out Nordic's original article on the subject.

Debugging in Visual Code

Debugging your application is possible with Visual Code. You will need a J-Link programmer and a Tag Connect (TC2030-CTX-NL) cable for this process. Programmers include the nRF9160 DK, nRF532 DK, J-Link EDU (if your project is non-profit) and the standard commercial J-Link programmers.

Here's the process:

  1. Download and install your version of the nRF Command Line Tools

  2. Install the C/C++ Extension and the Cortex-Debug extensions. They're both very handy in development and debugging of Zephyr based projects. C/C++ Extension Cortex M Debug Extension

  3. If you don't have one already, create a .vscode folder in the root of your project. .vscode Fodler

  4. Create a file called launch.json. This is where we'll set up the configuration for debugging.

  5. Here's a real example of a config I was using to debug a project in OSX:

    {
      // Use IntelliSense to learn about possible attributes.
      // Hover to view descriptions of existing attributes.
      // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
      "version": "0.2.0",
      "configurations": [
        {
          "name": "Cortex Debug",
          "cwd": "${workspaceRoot}",
          "executable": "${workspaceRoot}/pyrinas/applications/dreamstars/build/zephyr/zephyr.elf",
          "request": "launch",
          "type": "cortex-debug",
          "servertype": "jlink",
          "device": "nrf9160_xxAA",
          "interface": "swd",
          "armToolchainPath": "/Users/jaredwolff/gcc-arm-none-eabi-9-2019-q4-major/bin"
        }
      ]
    }
    

    For folks on Windows you'll have to modify appropriately:

    {
     // Use IntelliSense to learn about possible attributes.
     // Hover to view descriptions of existing attributes.
     // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
     "version": "0.2.0",
     "configurations": [
        {
            "name": "Cortex Debug",
            "cwd": "${workspaceRoot}",
            "executable": "${workspaceRoot}\\nrf9160-feather\\samples\\blinky\\build\\zephyr\\zephyr.elf",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "jlink",
            "device": "nrf9160_xxAA",
            "interface": "swd",
            "armToolchainPath": "C:\\Program Files (x86)\\GNU Tools Arm Embedded\\9 2019-q4-major\\bin"
        }
     ]
    }
    

    Remember that workspaceRoot refers to the folder you have opened in VSCode. This will most likely be C:\nfed\. You will have to modify the "executable" entry to match the path of your zephyr.elf file.

  6. Change the executable path and the armToolchainPath to reflect your system. Make sure you point the executable option to the .elf file that gets produced during the compilation process.

  7. Next, go to your projects prj.conf and disable the bootloader by commenting out CONFIG_BOOTLOADER_MCUBOOT=y or changing the y to a n. As of this writing, disabling the bootloader is required as it prevents the debugging process from occuring.

  8. In prj.conf you'll also want to enable the CONFIG_DEBUG option. This disables compiler optimizations which makes the debug process hairy or impossible.

  9. Finally, program your project using west build && west flash

  10. At this point, if you've ever done any debugging in Visual Code, you should be able to follow the final steps to debug your application!

  11. Set some breakpoints in your code by pressing the line number you want. A red dot will appear where the breakpoint is set. Breakpoint

  12. Start debugging by clicking the debug icon on the left. Then click the play button in the top left. Debug menu Debug play button

  13. You can use the popup menu on the right to control traversal through your code. Popup debug control

nRF Connect For Desktop

nRF Connect For Desktop

nRF Connect For Desktop is the utility that you can use to manipulate your nRF9160 Feather. In this section we'll be focusing on two apps that will affect you the most:

  1. LTE Link Monitor
  2. Programmer

You can find the download page for nRF Connect For Desktop here.

Linux usesr: nRF Connect for Desktop is distributed as an appimage. Right click and enable running as an executable. Then you can double click and run as any other app.

Appimage Execute nRF Connect Desktop running on Ubuntu

LTE Link Monitor

The best way to debug anything cellular-related is to use the LTE Link Monitor.

To install:

  1. Install nRF Connect For Desktop app
  2. Open it up and in the list of apps find LTE Link Monitor
  3. Click install
  4. Once installed click open and let the fun begin! nRF Connect For Desktop with LTE Link Monitor installed

For more information check out Nordic's Documentation.

Using with LTE Link Monitor

Almost any code example can be used with the AT Host Library. Generally all that is needed is adding these lines to your prj.conf:

# AT host library
CONFIG_AT_HOST_LIBRARY=y
CONFIG_UART_INTERRUPT_DRIVEN=y

Alternatively, for a quick start, simply program the at_client example to your nRF9160 Feather. Then follow these quick steps to get up an running:

  1. Insert your SIM into the nRF9160 Feather.
  2. Attach your LTE antenna.
  3. Plug your nRF9160 Feather into your computer's USB port.
  4. Ensure that Flow Control is turned off, and Auto device/port filter is also unchecked. Flow Control unchecked
  5. Connect to it using the Device dropdown in the top left hand corner of the LTE Link Monitor. Devices dropdown On *nix based systems, the port will show up like /dev/tty.SLAB_USBtoUART. On Windows, you'll have to determine which COM port is associated by using the device manager.
  6. With Automatic requests turned on and the nRF9160 Feather connected, press the AT+CFUN=1 button followed by the AT+CFUN? button. This will cause a few important commands to be automatically sent to your nRF9160 Feather. Additionally, your nRF9160 Feather will attempt to connect to the closest compatible tower possible.
  7. Review the LTE Link Monitor for connection information. LTE Link Monitor connected Yes, the LTE Link Monitor provides some great information. Consider it your go-to tool when debugging cellular or board related issues.

Programmer

The programmer is excellent for updating your application firmware. The most important function it provides is updating the modem firmware.

Updating Application Firmware

Another way of programming your application other firmware images is to use the nRF Connect For Desktop Programmer App.

  1. First, you'll need to install it if you haven't already.
  2. Then open it up and select your programmer Port choices
  3. Then add a hex file using the button on the right side. Add a hex file
  4. Click Browse to loook for your file Add a hex file
  5. Browse your Nordic Connect SDK repo for your file. For instance the at_client hex image is: ncs/nrf/samples/nrf9160/at_client/build/zephyr/merged.hex Add a hex file
  6. Hit write to start the writing process. Remember your programmer has to be connected to the nRF910 Feather for this to work! Add a hex file

Handy trick! Since the nRF Connect For Desktop app is web based, you can use (Command) ⌘ + R to refresh the program. (or CTRL + R on Windows/Linux) This is great when the app goes into a weird state or if your serial device/programmer is now showing up.

Updating Modem Firmware

Your modem firmware plays an important role in the nRF9160. The easiest way, as of this writing, to update is to use the Programmer's Update modem function. It's important to note that not all firmware is certified to work on every provider. For a full up-to-date list, check out Nordic's documentation.

Another note: you will need a programmer and Tag Connect cable in order to update the modem firmware.

Here are the instructions for updating your modem firmware:

  1. Download the modem firmware you need.
  2. Next, open up the Programmer in nRF Connect For Desktop. (You may need to open it first)
  3. Then open up a connection to your programmer. (Your programmer should be connected to USB and attached to your nRF9160 Feather) Port choices
  4. Once opened, the program will read the memory contents of your device and display it. Reading non-volatile mem
  5. To update the modem firmware, scroll down to the bottom right and click Update modem Update modem button
  6. Find your modem firmware Find modem firmware
  7. Start the DFU process by clicking Write! Start the process

Then, your device will be updated. This process takes about 45 seconds. You can check if the firmware version using the AT+CGMR AT command. Devices running on Verizon must use modem firmware v1.1.2.

Debug Serial Usage

The nRF9160 Feather comes with an on-board Silicon Labs CP2102 USB-to-UART chip. You can use it with most serial terminal viewers. If you have an older version of Windows you will have to install the driver. The download is located here.

Here's some recommendations for software to communicate with the nRF9160 Feather. No matter what program you use, the standard baud rate for the console is 115200. All other options are standard/default (8 bits, oon-pairty, 1 stop bit).

Multi-Platform

nRF Connect For Desktop - LTE Link Monitor

If you haven't already, make sure you check out the LTE Link Monitor. It's a great multi-purpose tool for using and debugging the nRF9160 Feather.

CoolTerm

CoolTerm

CoolTerm has been my go-to for testing and debugging. Fortunately it's also multi-platform! You can download it by going here: https://www.freeware.the-meiers.org

Mac OSX & Linux

screen

You can use screen to view your debug output. Here's a typical command:

screen /dev/tty.SLAB_USBtoUART 115200

The major drawback of using screen is that it does not save your history. It's better to use other utilities for that purpose.

Note: depending on your system your serial port may be named something different from /dev/tty.SLAB_USBtoUART. You can check your dev folder like this to check which one may be it:

ls -l /dev | grep SLAB

cu

You can also use cu to display your debug output. Here's an example:

sudo cu -l /dev/tty.SLAB_USBtoUART -s 115200

If you notice, it requires super user permissions. (This is the only drawback to it IMHO)

To escape from your session type ~.

Example Code

Examples

Approved/pre-tested Examples

Blinky Sample

Change directories to ncs/zephyr/samples/basic/blinky. Then compile as shown before in the compiling section of this guide.

Before you do compile make sure that the following lines are added to the prj.conf:

# Enable Zephyr application to be booted by MCUboot
CONFIG_BOOTLOADER_MCUBOOT=y

This will enable support for the bootloader. Then, build using the build command:

west build -b circuitdojo_feather_nrf9160ns

Note: having trouble building? Make sure you check out the troubleshooting page.

You can see towards the end of this output that both the application and the bootloader have been built and merged.

Programming can be completed with newtmgr:

newtmgr -c serial image upload build/zephyr/app_update.bin
newtmgr -c serial reset

Note: pre-built binary can be downloaded here: blinky-v1.3.2.bin

AT Client Sample

Precompiled Binary

Note: you can get a pre-build binary file compiled using v1.3.2 here.

Instructions

Change directories to ncs/nrf/samples/nrf9160/at_client. Then compile as shown beffore in the compiling section of this guide.

Before you do compile make sure that the following lines are added to the prj.conf:

# Enable Zephyr application to be booted by MCUboot
CONFIG_BOOTLOADER_MCUBOOT=y

This will enable support for the bootloader. Then, build using the build command:

west build -b circuitdojo_feather_nrf9160ns

...

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jaredwolff/Git/nrf-connect/ncs/nrf/samples/nrf9160/at_client/build
[0/180] Performing build step for 'spm_subimage'
[151/155] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       32256 B        48 KB     65.62%
            SRAM:        5488 B        64 KB      8.37%
        IDT_LIST:          40 B         2 KB      1.95%
[155/155] Linking C executable zephyr/zephyr.elf
[2/176] Performing build step for 'mcuboot_subimage'
[248/253] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       42500 B        48 KB     86.47%
            SRAM:       26800 B        64 KB     40.89%
        IDT_LIST:          72 B         2 KB      3.52%
[253/253] Linking C executable zephyr/zephyr.elf
[163/176] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       76868 B     441856 B     17.40%
            SRAM:       36928 B       128 KB     28.17%
        IDT_LIST:         120 B         2 KB      5.86%
[174/174] Generating zephyr/merged.hex

Note: having trouble building? Make sure you check out the troubleshooting page.

You can see towards the end of this output that both the application and the bootloader have been built and merged.

Programming can be completed with newtmgr:

newtmgr -c serial image upload build/zephyr/app_update.bin

During testing, it's recomended to use the LTE Link Monitor whenever you need to manually test or execute commands.

nRF Cloud AGPS Sample

The nrf_cloud_agps sample is the easiest way to get started with generating GPS coordinates with your nRF9160 Feather.

Precompiled Binary

Note: you can get a pre-build binary file compiled previously using NCS v1.3.2 here.

Programming nrf_cloud_apgs Sample

  1. Change directories to ncs/nrf (Make sure you're using NCS v1.4.0 or newer.)
  2. Then change directories to /nrf/samples/nrf9160/agps/
  3. Add this to prj.conf:
    # Cloud prefix for nRF9160 Feather
    CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX="feather-"
    
    # Enable Zephyr application to be booted by MCUboot
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # COEX0 is used to enable the GPS LNA, but it has to be configured to do so.
    CONFIG_NRF9160_GPS_SET_COEX0=y
    CONFIG_NRF9160_GPS_COEX0_STRING="AT%XCOEX0=1,1,1565,1586"
    

Then compile as normal:

west build -b circuitdojo_feather_nrf9160ns

Note: having trouble building? Make sure you check out the troubleshooting page.

Then load using newmgr:

newtmgr -c serial image upload build/zephyr/app_update.bin
newtmgr -c serial reset

Setting Up nRF Connect for Cloud

During factory test, your nRF9160 Feather is added to nRF Connect for Cloud for your immediate use! The only thing you'll need, other than your nRF9160 Feather, SIM and antenna is your getting started card:

Cloud Code

Every nRF9160 Feather has a device ID generated based on the IMEI. Your full device ID will look something like:

feather-<IMEI> where <IMEI> is the IMEI tied to your specific device. You'll need this in a moment.

Here are the steps to get you the rest of the way.

  1. First, program your device with the nrf_cloud_agps sample.
  2. Then, power up and confirm that the device can connect to the cloud.
  3. Create an nRF Connect for Cloud Account Add new device
  4. Once created, go to the top left and click the big + icon. Add LTE device
  5. Then skip the iBasis setup since we're using Hologram. Skip iBasis
  6. Enter the Device ID and the PIN provided on your card. Enter device ID and pin
  7. Once you press Add Device, nRF Connect for Cloud should notify you that your device has been added!
  8. Navigate to Devices and click on the device you're working wtih! Devices

That's it!

Your device screen will adapt to the example code that you're using. For example, it should display a map when you begin to publish GPS data.

nRF Connect for Cloud Screenshot with map

Troubleshooting

There are some things that can go wrong here. They're usually related to your nRF Cloud certs.

Reloading the certs can be done using the tutorial here.

Serial LTE Modem

The Serial LTE Modem sample is extremely handy when you already have an application that you want to add LTE and/or GPS to. Here are the steps for setting things up:

  1. You can find this sample in ncs/nrf/applications/serial_lte_modem. So let's change directories there and make some modifications.

  2. Add these lines to your prj.conf. This adds bootloader functionality so it can be loaded using newtmgr

    # Enable Zephyr application to be booted by MCUboot
    CONFIG_BOOTLOADER_MCUBOOT=y
    
  3. You'll also have to enable UART2 and disable UART0. Make your Application-specific look like this one:

    # Application-specific
    CONFIG_SLM_LOG_LEVEL_INF=y
    # Enable GPIO wakeup if sleep is expected
    #CONFIG_SLM_GPIO_WAKEUP=y
    # Use UART_0 (when working with PC terminal)
    # CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
    # Use UART_2 (when working with external MCU)
    CONFIG_SLM_CONNECT_UART_2=y
    CONFIG_UART_2_NRF_HW_ASYNC_TIMER=2
    # Use optional TCP/TLS Proxy
    #CONFIG_SLM_TCP_PROXY=y
    # Use optional UDP/DTLS Proxy
    #CONFIG_SLM_UDP_PROXY=y
    
  4. You will also have to create a folder call boards. In that folder create a file called circuitdojo_feather_nrf9160ns.overlay In this overlay file, we'll redirect the AT interface to UART2 for use with an external microcontroller:

    &uart2 {
        compatible = "nordic,nrf-uarte";
        current-speed = <115200>;
        status = "okay";
        tx-pin = <24>;
        rx-pin = <23>;
        rts-pin = <29>;
        cts-pin = <30>;
    };
    

    Note: it's very important that your overlay file ends in .overlay or you will get compilation errors.

  5. When you're done, here's what it should look like:

    boards folder

  6. From the serial_lte_modem folder, compile the example using

    west build -b circuitdojo_feather_nrf9160ns
    

    Note: having trouble building? Make sure you check out the troubleshooting page.

  7. Flash the example using newtmgr:

    newtmgr -c serial image upload build/zephyr/app_update.bin
    
  8. Running the app, you should see the boot message if you open LTE Link Monitor with Flow Control turned off:

    *** Booting Zephyr OS build v2.3.0-rc1-ncs1-2410-g7d20f2ebf259
    ***[00:00:00.207,794] [0m<inf> app: Serial LTE Modem[0m
    
  9. Finally, connect your external MCU. Here's the pinout defintion. Remember you'll need to connect the opposite pins on your mating MCU. (TX->RX, RX->TX, CTS->RTS, RTS->CTS)

PinPin #
TxTx
RxRx
CtsD3
RtsD2

You now should be able to send over an AT and get the response OK. Remember to enable flow control on your external MCU as well!!

For more information on this application, see Nordic's documentation.

Firmware download: here's a binary image of the example above running NCS version bb259bfad1fa3572563444edb512fc8a6f12a3f4: download

Cellular Provider Matrix

Cellular

In order to use a provider below you'll likely have to set the PDP context. This can be done in your project's prj.conf in Zephyr. Here's an example of setting the PDP context to use Hologram.

# Set the PDP context
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_PDP_CMD=y
CONFIG_LTE_PDP_CONTEXT="0,\"IP\",\"hologram\""

Simply replace hologram with a provider specific APN and you'll be good to go.

Some providers also require a username and password. For example, here's what Soracom's looks like:

CONFIG_LTE_PDN_AUTH_CMD=y
CONFIG_LTE_PDN_AUTH="0,\"PAP\",\"sora\",\"sora\""

Side note: in the case of both Hologram an Soracom you do not need the PDP context to transfer data.

Here's a full working list of what plays nicely with the nRF9160 Feather. This list is subject to change at any time.

LTE

Provider NameConnected ToNotesWorkingAPN
HologramSprint/AT&T/T-MobileThe first SIM to get working out of the box. Also supports T-Mobile and Verizon connections. Coverage info.hologram
SoracomAT&TWorking great from Circuit Dojo HQ. More info on coverage here.soracom.io
VerizonVerizonUse Verizon ThingSpace to get starte quickly.
Twilio (Standard Wireles)T-MobileT-Mobile does not support the nRF9160.🔴
Twilio (Super Sim)?Fails to make a full connection. May work with future nRF9160 modem firmware.🔴super
AT&TAT&TUntested.🔶

NB IoT

Provider NameConnected ToNotesWorkingAPN
Twilio (Standard Narrowband)T-MobileT-Mobile does not support the nRF9160.🔴

Emoji usage chart:

EmojiNote
Tested and working
🔶In progress
🔴Tested. Does not work!

💡Side note: unless otherwise noted these are tested along the shoreline of Connecticut. Your mileage may vary so make sure you do your own testing before adopting a provider.

Customer reports

We don't always have the ability to test every single cellular provider. In this section, here are a few providers that customers have reported success with.

Provider NameConnected ToNotesAPN

For the latest information on which providers support the nRF9160 SiP check out Nordic's nRF9160 certification page.

Downloads

Downloads

Hardware Related

TypeDonwload Link
DocumentationLink to Github
HardwareLink to Github
Bill of MaterialsLink to Aligni
3D ModelLink to Github
EnclosureLink to Grabcad

Software Related

TypeDonwload Link
Bootloader (v1)Link
Bootloader (v2)Link
newtmgr CLI (v1)Link
nRF Cloud AGPS example .binLink
AT Client example .binlink
Blinky example .binlink
Board Defintions (v1.3.x)link
Board Definitions (v1.2.x)link

License

All hardware related files are available under the CERN v1.2 license. Click here for more details.

All documentation is released under a Creative Commons Share-alike license. Click here for more details.

Any applicable software is released under the Apache 2.0 license. Click here for more details.

Compliance

Compliance

To make things easier for you, the nRF9160 Feather comes pre-tested and ready for integration. All applicable testing will be done to ensure comppliance with FCC and CE EMI/EMC requirements. See each section below for more information.

Open Source Hardware Certification:

OSHW

CE Compliance

Current status: Compliant

FCC Part15 Compliance

Current status: Compliant

ISED (IC) Compliance

Current status: Compliant

Verizon Network Certification

Current status: Certified

FCC Pre-certification and Markings

When designing the nRF9160 Feather into your own projects, there are some marking requirements. Per the instructions from Nordic, you must have this written on your product somewhere:

  • Contains FCC ID: 2ANPO00NRF9160
  • Contains IC: 24529-NRF9160

Additionally, the nRF9160 Feather must be used at a minimum of 20 cm (7.87 inches) from the body at all times. This means the nRF9160 Feather should not worn on the body without sufficent isolation.

Country of Origin

  • Assembled in the USA 🇺🇸
  • Circuit boards fabricated in Taiwan 🇹🇼

Verizon operation

The nRF9160 Feather is officially on Verizon! If you've been chomping at the bit to get running on their newtwork, here's your chance!

Requirements

There are some requirements related to the use of Verizon's network. Here are the details:

  1. You must use Modem Firmware v1.1.2. The v1.2.x branch of the modem firmware is not supported (and will never be supported) on Verizon. You can check what version of the Modem Firmware you're running by executing this AT command: %SHORTSWVER. It will print something similar to nrf9160_1.1.2

    If you're not on 1.1.2 make sure you update using the guide here.

  2. For production deployments, you must use the 1.2.x branch of the nRF Connect SDK.

  3. If you've purchased a genuine nRF9160 Feather, your IMEI will already be added to Verizon's network. To get started, create a Verizon ThingSpace account. There you'll be able to create a new line with your nRF9160 Feather's IMEI.

    You can get your IMEI by running the AT+CGSN=1 command. The reply should look someting like this:

    AT+CGSN=1
    +CGSN: "352656100367872"
     OK
    
  4. Finally, any device on Verizon's network must be running the LWM2M Carrier Library. This allows Verizon to update the modem firmware in the event it's necessary. Enabling the LWM2M carrier library is as simple as adding CONFIG_LWM2M_CARRIER=y to your prj.conf.

Troubleshooting

This page has a list of common problems and solutions realated to the nRF9160 Feather.

Programming problems

Problem found: the nRF9160 Feather does nothing after being programmed/flashed.

Solution: after being programmed using west flash, you may have to issue an additional nrfjprog -r or hit the RST button on the board. This should start code execution.

GPS Connection issues

Problem found: unable to get a fix after waiting a long time. (Using the gps example.

Potential solution:* If your nRF9160 Feather is plugged into USB, try a different USB power supply. During the testing of the nRF9160 Feather, I found that certain USB C-to-A adapters injected were not properly grounded. This lead to issues getting a fix or prevented it all together. This especially applied to Apple Macbooks.

"The toolchain is unable to build a dummy C file"

If you're trying to build an example and you're getting an error building your code your should delete the Cmake cache:

rm -rf ~/Library/Caches/zephyr

More info here: https://devzone.nordicsemi.com/f/nordic-q-a/55475/the-toolchain-is-unable-to-build-a-dummy-c-file

Also a post on the forum: https://community.jaredwolff.com/d/51-error-whilst-compiling-blinky/3

Support

The best place for support is the Circuit Dojo support forum. In most cases you'll recieve a response within 1-2 business days. For more information see our Terms of Service.

If you have a question relating to your order please contact support@jaredwolff.com

The nRF9160 Feather is licenced under the CERN Open Hardware Licence v1.2. For more details on warranty and liability click here.

Purchase

The nRF9160 Feather has arrived! It's available at our store here:

Circuit Dojo Logo

It's also available on these great sites:

Digikey

GroupGets Logo

Tindie

Changelog

Hardware

V3 - (Late Jan 2021)

  • Fixed SCL/SDA labels
  • Added test points for SIM tests

v2 - (Jan 2021)

Backside of nRF9160 Feather V2

  • Added 3-axis Accelerometer by ST (LIS2DH12TR). Zephyr/nRF Connect SDK includes built-in support for this chip.
  • Added Accelerometer INT1 pin to Pin 2 on the board.
  • Added JMP1 to free up use for Pin 2 (INT1 pin on LIS2DH is push/pull an always on)
  • The power supply enable signal, which originally was inaccessible, is now available next to the TX pin.
  • Added JMP2 to disable PS_EN's connection to the power supply. "Always on" operation by shorting the middle and right pads on JMP2.
  • Updated the bottom side labels thanks to Sparkfun's Buzzard tool. They deserve all the credit there!

Software

NFED (nRF9160 Feather Examples and Drivers) - (Jan 2021)

  • Added accelerometer sample
  • Added bme280 sample

Thanks 🙏

Special thanks to all who have helped make this project successful. Here are a few honorable mentions:

  • Thanks to all the kind folks at Nordic Semiconductor! Eeryone on Devzone to sales to the FAEs in the States have all been very supportive of the project. Thank you, thank you thank you!
  • Many thanks to the Aligni team for making a great product and helping open source projects succeed. You can sign up for you own account here.
  • Thanks to the team at Hologram team! Without you guys no one would have a SIM to connect their nRF9160 Feathers with!
  • Last, by not least, thanks to my main collaborators GroupGets and Hackster. Without them there wouldn't be a nRF9160 Feather to release into the world!