I am trying to implement GPS code.

I am trying to implement GPS code in the nrf9160 but I cant find the function nrf_modem_gnss_init(); to initialize GNSS inside the modem in , is it being initialised within nrf_modem_gnss_start() function internally ?   please help on this.

Parents Reply
  • Can you confirm whether you are using COEX or not?

    Modem team; All COEX and MAGPIO pins seem to be NC, so I don’t think the %XCOEX0 configuration matters. I checked the code snippet and it looks like the LNA should get enabled using the GPIO pin (as long as the pin configuration in DT is correct).

    From SW point of view, I can’t think of anything else that would be missing.

Children
  • Hi  As shown in the schematic all COEX and MAGPIO are NC only.

    And it's correct that we are trying to enable LNA via GPS_EN GPIO pin and I am already getting the volatge around D1(2.489 at cathode ) , D2 (2.673 at cathode ) which further goes to c1(2.48), c2(2.49)  and c3(2.67), c4(2.67) which are sufficient to power up LNA.

    Also just for clarification we have separate antennas for LTE and GPS. And here all I am doing is in GNSS mode only.

  • Hi   I have tried implementing the GPS functionality on nrf9160DK board on this it is working fine and I am able to get the coordinates. but I have not written any code line explicitly to enable the LNA in it.

    Can you please confirn how this is being taken care internally ? Is it enabled by COEX or MAGPIO and why it's not needed to enable COEX / MAGPIO  explicitly for nrf9160DK board?

  • Gunjan Yadav said:
    Can you please confirn how this is being taken care internally ? Is it enabled by COEX or MAGPIO and why it's not needed to enable COEX / MAGPIO  explicitly for nrf9160DK board?

    When building for the nRF9160 DK, the Modem antenna library (CONFIG_MODEM_ANTENNA) gets enabled by default. The Modem antenna library configures COEX0 correctly for the DK based on whether CONFIG_MODEM_ANTENNA_GNSS_ONBOARD or CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL is enabled. LNA is enabled when using the onboard antenna, and disabled when using an external antenna.

  • Hi   Can you please suggest how to explicitly enable coex pin ? We have made some changes in the board and now LNA is connected to COEX0 but when I am trying to run the apis as above it is not being taken care internally and LNA may not be getting powered up.    Can you please suggest how to do this now ?

  • Modem can be configured to enable COEX0 pin when GNSS is used with the following AT command: AT%XCOEX0=1,1,1565,1586

    The command should be sent during startup, before enabling RF (for example AT+CFUN=1).

Related