This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC1310: How to preserve RTC counter after a software reset by watchdog

Part Number: CC1310
Other Parts Discussed in Thread: WMBUS

Tool/software: TI-RTOS

Hi,

I want to know is it possible to preserve the RTC counter for CC1310 after a software system reset by watchdog timer?

currently we are developing a wmbus project for a water meter. 

for stability consideration, we enable the watchdog, which will config to reset the system in case of unpredictable abnormal conditions.

The date/time was designed to be  set when the product was shipped from the factory.

during the long term running, the system could be reset by some case. anyway we want to preserve the date/time in that case. as the time log was demanded for a water meter application. and, it's not possible to re-config the time manually after installation and running on the field.

so, how to preserve the date/time value?

currently we use Seconds_set(seconds) to set the seconds value, and use Seconds_get() to get the counters' reading.

if without a software reset, the functions is ok; but after reset, the value will be lost.

B/R,

Shaowei

  • Hi,

    shaowei said:
    I want to know is it possible to preserve the RTC counter for CC1310 after a software system reset by watchdog timer?

    It is not clear to me what you want to achieve. Do you want to keep the RTC running? This is not possible. You would always lose a few ticks during reset. If you just want to keep a value during reset, then you could specify a NOINIT section in your linker command file and store the RTC counter there just before the watchdog issues the reset. The RAM content on the CC1310 survives a reset, but it is usually initialized by the application loader. I am not sure though whether the bootloader uses the RAM. 

    shaowei said:
    currently we use Seconds_set(seconds) to set the seconds value, and use Seconds_get() to get the counters' reading.

    Seconds_set(seconds) does not modify the RTC, but stores just an offset value. Seconds_get() reads the raw RTC value and adds the offset.

    shaowei said:

    The date/time was designed to be  set when the product was shipped from the factory.

    during the long term running, the system could be reset by some case. anyway we want to preserve the date/time in that case. as the time log was demanded for a water meter application. and, it's not possible to re-config the time manually after installation and running on the field.

    I am not sure if I understand you correctly and I don't know what WMBus profile you use. But wouldn't it be better to keep the date/information in the network and deploy it to the meters?

  • Hi, Richard,

    Thank you.

    what we want is, we want the RTC perform some similar as external RTC. once it starts, and have power on it, it never stop. so the time can be kept regardless software reset, etc.

    As we once used STM32, its RTC , as noted in their manual, states as : "... 

    As long as the supply voltage remains in the operating range, the RTC never stops,
    regardless of the device status (Run mode, low power mode or under reset). ..."

    AS i see in CC1310 datasheet, its RTC located at the always on domain, so I think maybe it's possible to keep it running always.

    and in many case, a network connection might be not available to the meters, so it's not possible to update its time on the field during running time.

    B/R,

    Shaowei

  • I see. That's unfortunately not possible on the CC13xx. A watchdog reset will always reset the RTC as well.