Hi ,
I need to preserve a clock counter without any drift or delay even the system having Soft reset,
I am using the Device BLE NUS bare metal example and running also the RTC ( instance 2 ) , On nrf52840 evb
And init the RTC in the start ( please see the close below )
So.. my bottom-line question :
1) what will happen if I reinit the RTC again after soft reset
2) what will happen if I not re-init after soft reset only after hardware reset
3) during the soft reset the RTC is running ? or it enters the delay or drift clock?
Thanks,
ZG
int main(void)
{
uint32_t err_code;
bool erase_bonds;
// Initialize.
rtc_init();
err_code = app_timer_init();
APP_ERROR_CHECK(err_code);
uart_init();
log_init();
buttons_leds_init(&erase_bonds);
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
printf("\r\nUART Start!\r\n");
NRF_LOG_INFO("UART Start!\r\n");
err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);
// Enter main loop.
for (;;)
{
power_manage();
}
}
void rtc_init(void)
{
leds_config();
lfclk_config();
rtc_config();
}