[SOLVED]Unwanted RTC reset at reboot

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: Unwanted RTC reset at reboot

Post by barthess »

I have no good ideas. This is not a BKP reset because reset value of RTCSEL is 0x0. As RM0090 says:
Once the RTC clock source has been selected, it cannot be changed anymore unless the Backup domain is reset.

Probably some supply/clock glitches?
Laurent
Posts: 35
Joined: Mon Mar 25, 2013 9:01 am

Re: Unwanted RTC reset at reboot

Post by Laurent »

After some intensive debugging I found it was a problem on my side... I'm really sorry. Everything works fine now.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: Unwanted RTC reset at reboot

Post by Tectu »

May you tell us what the problem was and how you fixed it? This is very essential for people coming across a similar problem in the future.


~ Tectu
Laurent
Posts: 35
Joined: Mon Mar 25, 2013 9:01 am

Re: Unwanted RTC reset at reboot

Post by Laurent »

I forgot that my firmware was not run directly upon startup, it is launched by a custom bootloader. It's been there for so long that I completely forgot about it. And the one who wrote the bootloader (which uses ChibiOS too) configured the RTC to use the LSI clock.

That was really stupid :oops:
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: Unwanted RTC reset at reboot

Post by Tectu »

Don't worry, we all do, and there's nobody excluded, make "stupid" mistakes. That's actually making things even still for experts interesting.
Glad to her that you got it working now, enjoy the hacking!


~ Tectu
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: Unwanted RTC reset at reboot

Post by barthess »

Hi Laurent,
1) Please mark this topic as [SOLVED].
2) Tectu is correct. We spent our time trying to solve problem and we interested a lot in solution. Even there is not Chibios problem we want to know where problem may come from. Do not be lazy (or confused) to explain where problem exactly was.
Laurent
Posts: 35
Joined: Mon Mar 25, 2013 9:01 am

Re: Unwanted RTC reset at reboot

Post by Laurent »

1) Please mark this topic as [SOLVED].

How?
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: Unwanted RTC reset at reboot

Post by Tectu »

Go to your first post, click the 'edit' button and then edit the Subject.

And just a small example: I spend 10 and a half hour one saturday, ending up in a stupid problem... I wrote some new board files. I took an existing one as a template since it's only slightly different. Everything worked great, I copied it, edited it and included the new board.mk correctly. However, As I found out after what painful amount of time, I didn't edit the board.mk content. Therefore, I did include the correct Makefile, but the paths in that Makefile still referred to the old board.


~ Tectu
Laurent
Posts: 35
Joined: Mon Mar 25, 2013 9:01 am

Re: Unwanted RTC reset at reboot

Post by Laurent »

Sorry to look like such a noob, but I can't seem to be able to edit my first post. I can only edit the last one.

And I noticed that no other thread on this forum (at least in the few sections I looked) is marked "[SOLVED]". Strange.
Post Reply