I tried to merge ble and calendar example but when i call "nrf_cal_init();" I've got error "app: SOFTDEVICE: INVALID MEMORY ACCESS" i tried to use RTC2 in Calendar.h but nothing chenged
I tried to merge ble and calendar example but when i call "nrf_cal_init();" I've got error "app: SOFTDEVICE: INVALID MEMORY ACCESS" i tried to use RTC2 in Calendar.h but nothing chenged
Hi,
The nrf_cal_init function will access the CLOCK peripheral, which has restricted access when the softdevice is enabled (the softdevice controls the clocks).
The LFCLK will always be running with the softdevice enabled. You can use the Clock driver to control the clock if you are switching between having the softdevice enabled and disabled.
Best regards,
Jørgen
Hi,
The nrf_cal_init function will access the CLOCK peripheral, which has restricted access when the softdevice is enabled (the softdevice controls the clocks).
The LFCLK will always be running with the softdevice enabled. You can use the Clock driver to control the clock if you are switching between having the softdevice enabled and disabled.
Best regards,
Jørgen
Thanks for your answer! It is my first experience of using nordic and ble. If I understand you correctly i need to change nrf_cal_init function. I will be very grateful if you give me an example of how to fix it
If you are using the softdevice, it should be sufficient to comment out lines 25-28 in the file I linked on GitHub above.
You also need to use RTC2 like you suggested in your initial post.