2016-12-08 11:29 AM
Hi,
In the scheduling system we use we need a simple 32kHz low power counter value.
Exactly like in the stm32F1 family is present.
But in any other family, the RTC registers are replaced by Time and Date registers.
I am able to covert the Time register back to a counter value that overflows every 24 hours and add the number of days.
This way I can get a 32 bit counter value running at 32kHz.
But it is an enourmous hassle and it takes a lot more processing time than needed.
Is there a simple way to get a low power 32kHz counter value, so we can use it for our scheduling?
We aim to disable the HSI/HSE/PLL clocks when no tasks needs to run, but keep de Low power LSE/LSI running to wakeup from stop mode.
We do not need any timestamp values like year month day hour minute second.
Thank you!
2017-01-20 3:26 AM
I
this to the Annual Wishlist.JW
2017-12-21 6:55 AM
Thanks for bumping this post, I can't believe how incredibly awesomely it demonstrated my point...
The primary rule is being divisible by 4.
If it is divisible by 100 but not 400 is is not.
2000 % 4 == 0
2000 % 400 == 0
1901 .. 2099 being very simple to implement in silicon due to (year % 4) being easy to implement, and the only test needed in that range.
Beware of code written and tested by idiots.. They do the stupidest things at the most inappropriate times..
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.