Login Register
TLSR8258 Real Time Clock
Jul 08, 2022 15:38




How to create a Real Time Clock? I know that I can connect an external 32k crystal, or use internal 32k RC oscillator, but can I get a 1 sec pulses that are not lost in all modes. Is there an internal counter that would count in sleep/deep sleep mode that I could use?

How accurate can it be?

I would like to use the clock in Zigbee scenes, timed on/off etc.

1 replies
TL_Soyo Jul 11, 2022 10:33


  You can call clock_time() get current system Timer time in non-sleep mode,and use cpu_sleep_wakeup(DEEPSLEEP_MODE_RET_SRAM_LOW16K , PM_WAKEUP_TIMER,(clock_time() + 1000*CLOCK_16M_SYS_TIMER_CLK_1MS)); to set one sec sleep in sleep mode