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

Anyway of keeping the RTC block in nRF51822 going while device is in Reset, has crashed or powered off?

Hi, Is there anyway to keep the RTC going while in reset, device sw has crasched or in powered off mode or would I need an external RTC for this?

Is there any possibility of adding a backup capacitor to keep the internal RTC block alive?

Anyway of retaing the information in RAM during reset, I know it may sound a bit stupid but if the device has crashed you may want to be able to write the last valid data to flash when device has been reset.? or for debug purposes..

BR, Håkan

Parents
  • There isn't any magic way to keep only the RTC running, no. As section 11.1.7.8 in the Reference Manual shows the peripherals are reset on all types of reset.

    As for keeping RAM over reset, you can see from the same table that RAM isn't reset on a soft reset, so it won't automatically be cleared. However, most standard libraries will clear all static ram in their reset handler, so to keep data, you have to make sure this isn't done on the areas you're interested in. Take a look at this for details.

Reply
  • There isn't any magic way to keep only the RTC running, no. As section 11.1.7.8 in the Reference Manual shows the peripherals are reset on all types of reset.

    As for keeping RAM over reset, you can see from the same table that RAM isn't reset on a soft reset, so it won't automatically be cleared. However, most standard libraries will clear all static ram in their reset handler, so to keep data, you have to make sure this isn't done on the areas you're interested in. Take a look at this for details.

Children
No Data
Related