How I calibrate RTC using 32.768KHz crystal? Pls help me. I used mapleRTC
RTClock rt(RTCSEL_LSE, 0x7fff + 14);
how set prescaler?
Thx
How I calibrate RTC using 32.768KHz crystal? Pls help me. I used mapleRTC
RTClock rt(RTCSEL_LSE, 0x7fff + 14);
how set prescaler?
Thx
stafil - there are several threads on using the RTC, for example: http://forums.leaflabs.com/topic.php?id=1058
I used olimexino stm32 and tamper pin(PC13)(LSE/64) frequency is 512.2Hz it is too large for calibration rtc. In AN2821:
01032 /* Calulate Deviation in ppm using the formula :
01033 Deviation in ppm = (Deviation from 511.968/511.968)*1 million*/
01034 if(f32_Frequency > 511.968)
01035 {
01036 f32_Deviation=((f32_Frequency-511.968)/511.968)*1000000;
01037 }
01038 else
01039 {
01040 f32_Deviation=((511.968-f32_Frequency)/511.968)*1000000;
01041 }
01042 DeviationInteger = (uint16_t)f32_Deviation;
01043
01044 if(f32_Deviation >= (DeviationInteger + 0.5))
01045 {
01046 DeviationInteger = ((uint16_t)f32_Deviation)+1;
01047 }
my f32_Frequency = 512.2Hz and DeviationInteger = 638 is too large (0-121) is possible.
Where is the problem? Pls help me.
stafil - What time reference are you using to measure the output of PC13?
How are you calculating the deviation?
Is it plausible that some of the error comes from the way the deviation is being measured?
You must log in to post.