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

Queries on RTC pre-scaler and counter registers

Hello,

 

I am using nRF52832, SDK_15.3.0, S132 SoftDevice and Segger for flashing the image. I am using ‘ble_app_blinky’.

 

I have few queries on RTC.

 

1) There are 3 instance of RTC (RTC0, RTC1 & RTC2).

a) Whether PRESCALER of RTC1 can be different from PRESCALER of RTC2.

b) I want RTC CC interrupt for every 30 minutes. For this I am using app_timer with APP_TIMER_CONFIG_RTC_FREQUENCY as 3 so that I can have interrupt after every 30 minutes. Below is the code snapshot. At the same time if I configure RTC2 prescaler with 255 will there be any impact on app_timer.

             

const nrf_drv_rtc_t rtc = NRF_DRV_RTC_INSTANCE(2); /**< Declaring an instance of nrf_drv_rtc for RTC2. */
nrf_drv_rtc_config_t config = NRF_DRV_RTC_DEFAULT_CONFIG;
config.prescaler = 255;
err_code = nrf_drv_rtc_init(&rtc, &config, rtc_handler);
APP_ERROR_CHECK(err_code);
 

 

2) As above, even whether there will be COUNTER register for each instance of RTC. I want to clear COUNTER of RTC2 instance by calling nrf_drv_rtc_counter_clear(&rtc). To my understanding this will not impact COUNTER of app_timer (RTC1)

 

Thanks & Regards

Vishnu Beema

Parents Reply Children
Related