2021-11-03 04:35 AM
Hey everyone.
During my work with the RTC on the STM32H753, I've noticed that you can't set the century or millenium in the Date Register (RTC_DR). Is this correct?
Therefore, I can infer that the hardware is hardcoded to work within the 21st Century, and that it won't account for leap years beyond the turn of the next Century. Is this also correct?
Although this won't be a problem for a long time, I'm seeking some clarification as we're exploring using these chips in Spacecraft, where this is important.
Unfortunately the datasheet is not explicit about this.
Cheers,
Jamie
2021-11-03 06:35 AM
The reference manual gives more specific information on how the chips work. In the RTC date register, you can see the year is stored as only two digits, so you will need to infer the upper two. They don't need to be fixed though. You could set the range from 1980-2079, for example, by calculating the top two digits from the bottom two.
I don't know of any spacecraft with a 100+ year mission life. It would be nice, though.
2021-11-03 07:26 AM
Thanks for your swift response. I'm already setting the Year Units and Year Tens as shown here.
I understand that you could set a range from before the turn of the millennium like you suggested. Yet you could not set a range that moves beyond 2100, due to 2000 being a leap year and 2100 is not. This is a limitation of not being able to set the Year Hundreds and Year Thousands, which other hardware we've analysed does support.
The reference manual states that it supports Automatic Correction for 28, 29 (lear year), 30 and 31 day months. Thus we can infer that the RTC on this chip treats YU and YT values of 0 as if it is the year 2000, which is a leap year. As this is not stated explicitly anywhere that I've looked.
Thank you for clarifying though. The aim is to future proof our codebase, incase it's still being used upon the turn of the next century. If a mission is launched using part of our codebase near the 2100 mark then things could go wonky.
2021-11-03 07:53 AM
Thought: Use an external 32bit raw RTC, advantages:
*I worked with long life battery powered tiny fish & bird electronic archival tags so have designed circuits with some similar requirements.
Paul
2021-11-03 08:19 AM
we're exploring using these chips in Spacecraft
I don't think STM32s are qualified for Space use.
2021-11-03 08:22 AM
Our aim is to make Space more accessible and affordable by using commerical, off the shelf components and Open Sourcing our design and software.
Check out our website if you're interested: https://www.opensourcesatellite.org/
2021-11-03 08:49 AM
MEMs RTC = DS3232MZ+
Binary RTC (Raw 32bit) = DS1682S+, more... Binary Real Time Clocks | Newark Canada