AnsweredAssumed Answered

STM8SF103 and keeping seconds

Question asked by currie.mitchell on Aug 5, 2015
Latest reply on Aug 5, 2015 by Philipp Krause
Hi,
I've been digging and researching how to keep the number of seconds in the system (i.e. system clock). On the STM32 it's quite easy as the clock counts into the 32bit (4x8) registers and you can load this with UTC time and go away happily.

After trying to make heads or tails unsuccessfully of what exactly is available on the STM8 I'm not sure how to approach this.  I can use an external DS1307, but I would much rather use it internally somehow, however I require something that can run off LSI during low power and keep ticking away into a register.

Everything I find seems to point to using interrupts, which would not be ideal during low power active halt.

So, in a nutshell, is there a way to have the peripheral LSI tick into one of the system registers? I cannot seem to find it.

I suppose even if there is only 16 bits available for seconds, that's almost a day - and we have to wake up to reset some counters and increase our epoch in SRAM that's better than nothing.

Thanks,
Mitch

Outcomes