I am using the GNSS Sample in SDK 1.8.99 to test sleep/wake cycles.
The GNSS example is correctly operating in single shot mode by setting the interval to 0. After getting a single fix, execution ceases and current draw drops.
I created a kernel timer based on https://devzone.nordicsemi.com/f/nordic-q-a/59164/internal-rtc-example with the objective of waking the 9160 from idle, Within my timer function I stop and start the gnss based on the guidance from here, https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_modem/doc/gnss_interface.html#gnss-interface
I have these lines in my timer function,
printk("Timer function execution\n");
if (nrf_modem_gnss_stop() != 0) {
LOG_ERR("Failed to stop GNSS in timed reset");
return -1;
}
if (nrf_modem_gnss_start() != 0) {
LOG_ERR("Failed to start GNSS in timed reset");
return -1;
}
However, the gnss is not restarting/reacquiring a fix even though the print statement from my timer is printed to the serial and no error messages are printed either. I can tell gnss is off both from the current draw not increasing an no updated NMEA/fix info on the terminal.
What other steps are required to restart the gnss? Would I have a different result if I put the system to sleep directly with __WFI() vs using the built in sleep from the GNSS lib?
Thanks!