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
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
You should get what you need by setting CONFIG_REBOOT=y in your prj.conf
The function is declared in include/power/reboot.h
Does it it to include any other file? The build failed due to error:
implicit declaration of function 'sys_reboot'
Hi again,
I found it is also needed to include this line:
#include <misc/reboot.h>
No, you should only have to add CONFIG_REBOOT=y to prj.conf and:
#include <misc/reboot.h>
in any file that calls sys_reboot(0);
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.