STM32F1 Clock/Calendar BUG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-24 6:08 AM
Hello, I noticed a problem in the software implementation of STM32F1 's clock/calendar. If the device is switched off for a long time (>= 255 days) it will enter infinite loop inside CheckForDaysElapsed() (which is inside RTC_Configuration() function) because the for(;;) loop variable is only 8bits in size. I replaced several microcontrollers before finding this as I thought they were faulty.
Has anyone encountered this issue ?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-28 7:03 AM
Which software implementation are you speaking about?
-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-28 1:08 PM
The one from
http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257855
. It is for STM32F1 series only.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-28 2:21 PM
Yes, there appear to be issues with that, and frankly I don't care for that approach to calendering. I built a scheme using a 32-bit second value from epoch (136 years), and computed the date/time when required. A linear view of time is best expressed in seconds, not human centric dates.
Rule#1 For Third-Party calendering solutions : They are usually broken in subtle ways, and the time required to validate them would exceed the time to write correctly from scratch.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-28 3:05 PM
Couldn't agree more Clive, good thing I only used the lib for one project. I then switched to UNIX time format too. As you said it is pretty straightforward.
