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

How can software reboot nrf9160?

I found a function, sys_reboot() that apparently reboots the nRF9160.   In order to use this function, what must be configured and what are the correct .h files?

Thanks

Parents Reply
  • I added the line

    #include <power/reboot.h>

    What is the difference between power/reboot.h and misc/reboot.h?

    Note that after changing proj,conf, in order for changes to to take affect one must:

    1.  Close the project and exit SEGGER

    2.  Delete the build directory build_nrf9160_pca10090ns

    3.  Restart SEGGER

    4.  Select File --> Open nRF Connect SDK project

      and select the project  in question

    5.  Do Build --> Clean

     then Build --> Build Solution.

    This procedure should not be necessary.

Children
  • Hi.

    misc/reboot.h has been moved to power/reboot.h, and is empty except for a message informing about the move, and including power/reboot. So they are the same, except for misc/reboot.h being deprecated.

    After changing prj.conf, it should be enough to select File -> Open nRF Connect SDK Project, select the project in question and check the "Clean Build Directory" checkbox.

    While simpler than your procedure, I agree that it is still too complicated.

    An alternative approach is to use Project -> Configure nRF Connect SDK Project. One detail to be aware of with this approach is that the changes are stored inside the build directory, so if you were to delete the build directory the changes would be lost.

    A third option is to use west on the command line. west will detect changes in prj.conf and re-configure the project automatically.

Related