TCXO activation for timers

Hi,

I am using a NRF9160. I would like to use nrfx_timer with a base frequency of 32MHz with the TXCO as clock source.

I saw in the documentation that timers use the base frequency of 16MHz with the XTAL as clock source.

How can I make this change?

Parents
  • Hi,

     

    Unfortunately, nRF91xx does not have 32 MHz capable NRF_TIMER instances, as they are clocked from the PCLK16M.

     

    Kind regards,

    Håkon

  • My problem is that I want to run 1PPS and LTE at the same time. But after a few tries, I found that the modem crashes after a few minutes.
    And I saw that in the documentation, pps can not work at the same time as LTE.
    But I noticed that by activating 1PPS at regular intervals (every 10s for example), the modem does not crash. During the period when 1PPS is not activated, I simulate 1PPS with the help of timers. Which works.
    The problem is that after a few minutes, the simulated 1PPS is less and less accurate.
    I saw that there is this functionality in the gnss library: nrf_modem_gnss_timing_source_set(NRF_MODEM_GNSS_TIMING_SOURCE_TCXO).
    So it is possible to use the TCXO when the 1PPS is not there anymore by calling this function.

    Is it possible to have an example of code that has the same behavior as this function?

  • Hi,

     

    jp52800 said:
    modem crashes after a few minutes.

    Can you elaborate on what you're seeing here? Are you seeing that a function does not work simultaneously, or are you observing a modem assertion? The latter is quite critical.

    jp52800 said:
    But I noticed that by activating 1PPS at regular intervals (every 10s for example), the modem does not crash. During the period when 1PPS is not activated, I simulate 1PPS with the help of timers. Which works.
    The problem is that after a few minutes, the simulated 1PPS is less and less accurate.

    How much of a drift are you seeing?

    If you do not enable the HFCLK (ie. the device runs on internal 64 MHz RC oscillator), you will see a high drift. Here's a method of requesting the HFCLK:

    https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/samples/cellular/at_client/src/main.c#L16-L24

     

    Could you try this and see if this improves the overall drift?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    jp52800 said:
    modem crashes after a few minutes.

    Can you elaborate on what you're seeing here? Are you seeing that a function does not work simultaneously, or are you observing a modem assertion? The latter is quite critical.

    jp52800 said:
    But I noticed that by activating 1PPS at regular intervals (every 10s for example), the modem does not crash. During the period when 1PPS is not activated, I simulate 1PPS with the help of timers. Which works.
    The problem is that after a few minutes, the simulated 1PPS is less and less accurate.

    How much of a drift are you seeing?

    If you do not enable the HFCLK (ie. the device runs on internal 64 MHz RC oscillator), you will see a high drift. Here's a method of requesting the HFCLK:

    https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/samples/cellular/at_client/src/main.c#L16-L24

     

    Could you try this and see if this improves the overall drift?

     

    Kind regards,

    Håkon

Children
Related