This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using RTC with CGMS

I'm adding the peripheral/RTC project to experimental/CGMS.   I cannot seem to get past ASSERT in nrf_rtc_prescaler_set.  I changed the prescaler from 4095 to 0xffff as I suspected that was the problem, but still getting assert.   Is it even possible to enable RTC with CGMS?  As far as I see I have set up sdk_config.h correctly.  Was surprised that RTC0_ENABLED 1 but NRFX_RTC1_ENABLED 0, though I don't think that is the problem....

Parents
  • Hi.

    Which SDK and which example are you looking at?

    Are you using the SoftDevice?

    Best regards,

    Andreas

  • Hi Andreas,

    I'm using SDK 15.2.0.  Yes Soft Device is in use, I'm looking at using RTC along with Bluetooth CGMS.  The samples I am merging are .\RF5_SDK_15.2.0_9412b96\examples\ble_peripheral\experimental\ble_app_cgms and .\M\nRF5_SDK_15.2.0_9412b96\examples\peripheral\rtc.  I'm suspecting? a conflict with LFCLK.  We do not have an extermal OSC on the board, so I selected,

    #define NRFX_CLOCK_CONFIG_LF_SRC 0,

    #define CLOCK_CONFIG_LF_SRC 0, and

    #define NRF_SDH_CLOCK_LF_SRC 0.

    The ABORT is occurring right around setting the RTC prescale value.  In the original RTC, prescale was 4095 and it appeared that the abort was in the comparison of prescale <= 4095.  Changing the prescale value to 0x0FFF also aborted though.

Reply
  • Hi Andreas,

    I'm using SDK 15.2.0.  Yes Soft Device is in use, I'm looking at using RTC along with Bluetooth CGMS.  The samples I am merging are .\RF5_SDK_15.2.0_9412b96\examples\ble_peripheral\experimental\ble_app_cgms and .\M\nRF5_SDK_15.2.0_9412b96\examples\peripheral\rtc.  I'm suspecting? a conflict with LFCLK.  We do not have an extermal OSC on the board, so I selected,

    #define NRFX_CLOCK_CONFIG_LF_SRC 0,

    #define CLOCK_CONFIG_LF_SRC 0, and

    #define NRF_SDH_CLOCK_LF_SRC 0.

    The ABORT is occurring right around setting the RTC prescale value.  In the original RTC, prescale was 4095 and it appeared that the abort was in the comparison of prescale <= 4095.  Changing the prescale value to 0x0FFF also aborted though.

Children
Related