1) There are some special mechanisms for adjusting accuracy of RTC in STM32
2) You read written prescaler value from an incorrect place
3) Are you have objective measurement results probative RTC slowering obtained from some laboratory equipment? If so than we need fix current RTC driver.
The RTC driver topic
Re: The RTC driver topic
First, the problem revealed that the clock does not depend on STM32_LSECLK. Then I found out that depends, but after a power reset to 32768 and the clock runs slower.
1. Yes, I used to do that BKP->RTCCR, but the problem is the same as with RTC->PRLL.
2. The value of what I'm reading to a speed of the clock.
3. Well, when I decide the problem, write here
1. Yes, I used to do that BKP->RTCCR, but the problem is the same as with RTC->PRLL.
2. The value of what I'm reading to a speed of the clock.
3. Well, when I decide the problem, write here
Re: The RTC driver topic
That does not explain if do:
Clock runs slower (twice) just before the power failure. This can be seen without equipment.
While it may be you are right. Today, I double-check.
Code: Select all
#define STM32_LSECLK 65536Clock runs slower (twice) just before the power failure. This can be seen without equipment.
While it may be you are right. Today, I double-check.
Re: The RTC driver topic
Ok I will try to reproduce bug this evening myself.
1) Ensure your RTC crystal oscillating in absence of main power supply (with oscilloscope for example)
2) Ensure not other code running in your MCU resets RTC (bootloader for example)
3) What version of Chibios you use?
1) Ensure your RTC crystal oscillating in absence of main power supply (with oscilloscope for example)
2) Ensure not other code running in your MCU resets RTC (bootloader for example)
3) What version of Chibios you use?
Re: The RTC driver topic
1) If I turn off the power for 10 seconds after the power is turned on time correctly
2) No boot, only ChibiOS
3) ChibiOS / RT 2.6.4
I was sure. Now I doubt. I also recheck.
2) No boot, only ChibiOS
3) ChibiOS / RT 2.6.4
I was sure. Now I doubt. I also recheck.
Re: The RTC driver topic
I can not reproduce bug on my STM32F103-STK board using RTC application from testhal. Please check your RTC battery setup.
Re: The RTC driver topic
Operates. This led me astray:
1) To apply the divider is necessary to disable the battery.
2) RTC-> PRLL displayed incorrectly after a power failure.
Time is depending on the the constant STM32_LSEKLK even after a power failure.
Thank you very much for your help.
1) To apply the divider is necessary to disable the battery.
2) RTC-> PRLL displayed incorrectly after a power failure.
Time is depending on the the constant STM32_LSEKLK even after a power failure.
Thank you very much for your help.
Re: The RTC driver topic
hi Giovanni.
I need RTC (and ChibiOS-v3) for my current project and will to work on it. I know you want to design RTC HAL from scratch. Could you explain how do you imagine your dream RTC?
I need RTC (and ChibiOS-v3) for my current project and will to work on it. I know you want to design RTC HAL from scratch. Could you explain how do you imagine your dream RTC?
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: The RTC driver topic
Hi,
It is mostly already there, just RTCv1 is missing and the default conversion to DOS time in the high level.
There is no external lib required this time.
Giovanni
It is mostly already there, just RTCv1 is missing and the default conversion to DOS time in the high level.
There is no external lib required this time.
Giovanni