14.10.1.2.1 Initialization Code
Create an rtc_module struct and add to the main application source file, outside of any functions:
Copy-paste the following setup code to your applications main():structrtc_module rtc_instance;
voidconfigure_rtc_count(void){structrtc_count_config config_rtc_count;rtc_count_get_config_defaults(&config_rtc_count);config_rtc_count.prescaler = RTC_COUNT_PRESCALER_DIV_1;config_rtc_count.mode = RTC_COUNT_MODE_16BIT;#ifdef FEATURE_RTC_CONTINUOUSLY_UPDATEDconfig_rtc_count.continuously_update =true;#endifconfig_rtc_count.compare_values[0] = 1000;rtc_count_init(&rtc_instance, RTC, &config_rtc_count);rtc_count_enable(&rtc_instance);}
