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

RTC software reset and in between

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();
}

Parents
  • Hi,

    1) what will happen if I reinit the RTC again after soft reset 

     After a software reset, the RTC peripheral is reset and will get a reset, which means all previous configuration is lost after the soft reset.

     

    2) what will happen if I not re-init after soft reset only after hardware reset

    Then the RTC remains in the reset state. That is reset and not configured.

     

    3) during the soft reset the RTC is running ? or it enters the delay or drift clock?

     during reset, the device state is undefined. After the reset, RTC state is reset. I am not sure what you mean by delay or drift clock.

Reply
  • Hi,

    1) what will happen if I reinit the RTC again after soft reset 

     After a software reset, the RTC peripheral is reset and will get a reset, which means all previous configuration is lost after the soft reset.

     

    2) what will happen if I not re-init after soft reset only after hardware reset

    Then the RTC remains in the reset state. That is reset and not configured.

     

    3) during the soft reset the RTC is running ? or it enters the delay or drift clock?

     during reset, the device state is undefined. After the reset, RTC state is reset. I am not sure what you mean by delay or drift clock.

Children
No Data
Related