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

How can we flash the original factory (out-of-the-box) FW for the nRF9160?

Somehow my nRF9160 DK board has become essentially unresponsive. Flashing new modem using nRF Connect Programmer, and downloaded nRF FW,  "seem" to work. But nothing else. No signal can be seen, no AT command response, no LED 3/4 are ever on. So it's impossible to know what happened. So this possibly due to lacking instructions in how to setup the device?

How can we flash the original factory (out-of-the-box) FW for the nRF9160 DK board?

(a) Do we need to flash also the on-board nRF82840? (How to tell the difference what is getting flashed?)

(b) Where is the correct FW to flash for my board? 

  • Hi E3V3A,

    Please check the Getting started tutorial for nrf91DK.

    Please check the Getting started tutorial for NCS.

    a) There is a physical switch on the nRF91DK that chooses if you are going to program nrf52 or the nrf91.

    You do not need to re-program the nrf52 if you are not going to route the signals from e.g. VCOM0 to the "Arduino pins".

    The default nrf52 board controller FW is located here.

    b) Depends what you mean by the "correct" FW.

    The default "asset_tracker" application that came with the kit: asset_tracker.hex

    I am also adding a precompiled .hex file of the at_client sample: at_client.hex

    You can use the programmer app in nRF connect for desktop to flash the precompiled applications, and check the serial output in the LTE Link Monitor.

  • Hi Martin!

    Thanks for the quick feedback!

    - Of course I have already been reading and trying to follow all your Getting started tutorials. However, none of them provide a step-by-step procedure, from plugging in the DK board to actually having the AT commands work in the LTE Link Monitor.

    Incredibly enough, I was able to flash the hello_world app from command line. Super easy!


    But trying the same and using the EmStudio keep failing for me. Surely it just me not understanding how to use it. There are so many configuration options and it almost impossible to even remove or rename the "solutions"! So now I'm constantly greeted with the message:

    How to get rid of this, and clean out broken settings?
    Perhaps paths to some directories that need to be removed?

    (a) Ok, I got the SW5 part, never really flipped it until I started getting desperate! Slight smile

    (b) There are 2 FW's on your download page. One for updating the modem and another for the board controller, to be used "Only needed if you accidentally erase the firmware in the board controller". Now, it would have been helpful to better understand how these are related, where they are both put in "memory" (what kind) etc. I tried both and all sorts of variations, but the board never came back to out-of-box behavior.

    (c) When I flash an app, such as the hello_world (above), does that overwrite something? (If yes, then what? If no, where does it go?)

    (d) What are all the correct settings for EmStudio when trying to compile the "asset_tracker" or "at_client" apps?

    I'm looking at these:

    ^^ What directories need to be created vs. what are made by default?

    ^^ What's the difference between these?

    ^^ Here I should just respond LoL! Does anyone know what this means? 


    Awesome! I'll try those pre-compiled hex files to see if I have some weird connection issues.

  • Ok, I can confirm that both the apps as HEX provided by Martin, (at_client, asset_tracker) works.
    The other issues mentioned remain.

    The iBasis eSIM doesn't register on the network here. There are no available AT command I find useful to see what is the problem. LED-3 just keep blinking.

  • Hi E3V3A,

    Please try to do the following:

    1. Make sure you use the latest west tool:

    pip3 install west --upgrade

    2. Then let's make sure that the NCS is set up correctly:

    cd ncs/nrf
    git checkout master
    git pull
    git checkout v1.0.0
    west update

    3. Then delete the build folder in the asset tracker folder.

    4. Open Segger Embedded studio and click File --> Open nRF Connect SDK project

    If you get an error please share the Output from the terminal:


    You should not need to mess with any other settings that you described in your last post.


    The board controller FW on the nRF52 is just routing the different signals from the nRF91 either out to the external pins or VCOM ports. (That would be flashed in the nrf52 Flash.)
    see more info in the documentation.

    The modem firmware is saved in the modem flash, and the applications that you flash to nrf91 is flashed to the applications' own flash.

    best regards,

    Martin L.

  • Thank you Martin!

    Following your detailed instructions made it quite easy!
    The only issue was that you need to force the git checkout to discard old cruft.

    git checkout -f master
    

    As for the rest, I'll fill in the blanks:

    - Follow the steps (by Martin) above. I'll try to clarify some of that. If you have cleaned out the build directories and have a semi-pristine EmStudio, then when you start it, it should look like this:


    Enter the info as suggested:

    This will load the project and add all the relevant files.
    If successful it should look like this:

    Now the project is ready to be built. Select:
    Build > Build Solution  (or simply press Shift+F7)

    This will compile the project and create the HEX files:

    $ cd "C:\NordicS\ncs\nrf\applications\asset_tracker"
    $ find ./ -iname "*.hex"
    ./build_nrf9160_pca10090ns/spm/zephyr/zephyr.hex
    ./build_nrf9160_pca10090ns/zephyr/merged.hex
    ./build_nrf9160_pca10090ns/zephyr/zephyr.hex
    
    # Welcome to Cygwin! :)
    

    Opening the project folder, you should see the merged.hex file, that you can use to flash the asset_tracker.
    You can use the nRF Connect - Programmer to do this, but you can also do it within the EmStudio by connecting the J-Link and "download" the HEX file. (Here "download" means, download from your PC to the nRF9160 DK).

    Do this:

    (a) connect the J-Link programmer:

    (b) "Download" the HEX file to your "target":

    The output should be:

    You can now fire up your nRF Connector - LTE Link Monitor and everything should work.

    The hardest part is to get the LTE connection with the provided iBasis SIM card...

Related