nrf5-calendar-example
nrf5-calendar-example copied to clipboard
Softdevice support
Hi there,
I tried the example and it worked fine with SDK 17.0. But I cannot integrate it into another example that uses the softdevice - err_code = nrf_sdh_enable_request(); from ble_stack_init() function returns error.
Do you plan on updating the code to support softdevice? Would also be fine if you could help me modify it in order to work.
Thank you!
Hi!
You can't use RTC0, the softdevice uses it for its timing. I was able to successfully enable the softdevice by moving the calendar to RTC1:
#define CAL_RTC NRF_RTC1
#define CAL_RTC_IRQn RTC1_IRQn
#define CAL_RTC_IRQHandler RTC1_IRQHandler
AND moving softdevice initialization code after the calendar:
nrf_cal_init();
nrf_cal_set_callback(calendar_updated, 4);
...init softdevice here...
Bye!