We have a custom PCB with GPS circuit copied from the NR9160-dk board.
The default GPS example is working fine. However, we want to combine GPS tracking and LTE-M connection. The modem init configuration is OK, and the GPS receiver is able to track several (4-5) satellites, but it doesn't succeed in finding a fix. One specific error is printed repeatedly: "GNSS operation blocked by insufficient time windows".
When disabling the LTE connection, the GPS fix is found.
One explanation could be that the COEX0 (GPS_ENABLE) pin is going low regularly (interval of ~300msec) and maybe this results in the GPS receiver to miss GPS signals regularly. Is this a known limitation?
If not, what else could be the reason for this error message?
As a reference, modem initialization code is below.
int err = nrf_modem_lib_init(NORMAL_MODE); if (err) { printk("Failed to initialize modem library!\n"); return; } err = at_notif_init(); if(err != 0) { printk("at_notif_init failed\n"); } err = at_cmd_init(); if(err != 0) { printk("at_cmd_init failed\n"); } err = lte_lc_pdp_context_set(LTE_LC_PDP_TYPE_IP, "tsudp", false, false, false); if(err != 0) { printk("lte_lc_pdp_context_set err %d\n", err); return -1; } lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_LTEM_GPS); err = lte_lc_init(); if(err != 0) { printk("lte_lc_init failed\n"); return -1; } if (at_cmd_write(AT_COEX0, NULL, 0, NULL) != 0) { printk("AT_COEX0 failed\n"); return -1; } //only called if lte_lc_connect below is not called. /*if (at_cmd_write(AT_ACTIVATE_GPS, NULL, 0, NULL) != 0) { printk("AT_ACTIVATE_GPS failed\n"); return -1; }*/ while(1) { printk("LTE Link Connecting ...\n"); err = lte_lc_connect(); if (err == 0) { printk("LTE Link Connected!\n"); break; } printk("LTE link not established. err=%d\n", err); k_sleep(K_SECONDS(10)); }