完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,
我正在使用STM8L并尝试根据温度变化补偿RTC。但校准值不会像“应用笔记和参考手册”中所写的那样生效。 例如,当我只是将校准值更改为+488,5 ppm(32秒窗口中的最大值)时,我无法看到预期的时间差异。我看到的差异远远低于预期。 我希望得到解决方案或至少任何建议,以解决你... 提前致谢, 最好的祝福, 卡迪尔 #RTC校准 以上来自于谷歌翻译 以下为原文 Hi All, I'm using STM8L and trying to compensate the RTC in terms of the temperature changes. But the calibration value doesnt effect as the written on the Application Notes and Reference Manual. For example, when I simply change the calibration value as to +488,5 ppm (the max in 32 sec window), I cant see the expected difference in time. The difference I see is much more less than expected. I hope to get solution or at least any suggestions to fix it from you.. Thanks in advance, Best Regards, Kadir #rtc-calibration |
|
相关推荐
11个回答
|
|
嗨Yevpator,
首先,感谢您的关注。 我认为在晶体老化和温度方面校准RTC的过程对于大多数STM几乎是相同的。 我首先通过测量RTC 1hz校准输出的频率来计算项目中使用的晶体的校准值。 然后,根据项目,RTC必须在所有天气条件下(-40 * C至+85 * C)进行良好校准。就是这样,例如,我必须找出-40 * C温度下的校准值,并用计算出的校准值校准RTC,但不幸的是,时间终于开始并且变化超过预期。 (应用说明中给出的公式已正确执行。) 可能是造成这种差异的原因是什么? 非常感谢, 卡迪尔 以上来自于谷歌翻译 以下为原文 Hi Yevpator, Firstly, thanks for your attention. I think the process of calibrating RTC in terms of Crystal aging and Temperature is almost the same for most of the STM. I firstly calculated the calibration value for the crystal used in the project by measuring the frequency from the RTC 1hz Calibration Output. Then, According to the project The RTC has to be worked well calibrated in all weather conditions (-40 *C to +85 *C ). That's so, for example, I have to find out the calibration value under the -40 *C temperature and calibrate the RTC with the calculated calibration value but unfortunately The time finally goes ahead and changes more than expected. ( The formulas given in app note has been performed properly.) What could be the reason of the difference? Many thanks, Kadir |
|
|
|
嗨卡迪尔,
我可以问你这是什么意思''我看到的差异比预期的要少得多。''? 预期值和测量值之间有什么区别? 以上来自于谷歌翻译 以下为原文 Hi Kadir, May I ask you what does it mean ''The difference I see is much more less than expected.''? What is the difference between the expected and the measured values ? |
|
|
|
嗨,
我的意思是,虽然我根据温度(-20 * C)定期校准RTC,实时时间在3天内持续6秒,我没想到超过1秒(最大)。 以上来自于谷歌翻译 以下为原文 Hi, What I ment there is, Although I calibrate RTC periodically according to the temperature(-20 *C), real time goes ahead like 6 seconds in 3 days, which I didnt expect more than 1 second (max). |
|
|
|
卡迪尔,
对不起,如果我问你愚蠢的问题,但为什么你期望1秒? 3天内6秒==> 1天内2秒 1天= 24小时x 60分钟x 60秒= 86400秒 2秒/ 86400秒= 2.31E-05秒 1天内2秒是漂移0.002%。这是相当不错的,不是吗? 无论如何,您基于LSI测量校准RTC,但后者取决于HSI频率精度。 因此,如果您需要如此高的精度,也许您还需要定期进行HSI校准? 2.如果在您的环境中频繁且极端的温度变化,您可能需要缩短校准周期吗? 对不起,如果这些提示没有帮助。 以上来自于谷歌翻译 以下为原文 Kadir, Sorry if I'm asking you stupid questions, but why you expect for 1sec ? 6 sec in 3 days ==> 2 sec in 1 day 1day=24h x 60min x 60sec = 86400sec 2sec/86400sec = 2.31E-05 sec 2sec in 1 day is a drift of 0.002%. It is quite good, isn't it ? Anyway, you calibrate RTC based on LSI measurement, but the latter depends on the HSI frequency accuracy. 1. Thus, if you need so high accuracy, maybe you have also to conduct periodic HSI calibration as well ? 2. If in your environment there are frequent and extreme temperature changes, maybe you need to shorter calibration periods ? Sorry if these tips are not helpful. |
|
|
|
喜
对不起,我认为我的系统缺乏一些信息。 我使用LSE(32768 Hz)作为RTC时钟源。为了能够将RTC时间调整到实时,我必须定期校准RTC(15分钟周期),因为正如您所问,可能会在短时间内发生巨大的温度变化。 最大公差可以是一天0.5秒,这意味着0.002 / 4%acc。这就是为什么它应该在任何温度下都能很好地校准。 非常感谢您的关注和抱歉,无法很好地描述问题。 卡迪尔, 以上来自于谷歌翻译 以下为原文 hi, Sorry, I think There are some lack of information about my system. I'm using LSE (32768 Hz) as a RTC Clock Source. To be able to keep RTC Time adjusted to the real time I have to calibrate RTC periodically(15 min. period), because, as you asked, huge temperature changes may occur in a short period.. The max tolerance could be 0,5 seconds in a day, that means 0.002/4 % acc. That's why It should be well calibrated under any temperature. Thank you very much for your attention and sorry that couldn't describe the problem well. Kadir, |
|
|
|
嗨卡迪尔,
我认为仍然缺少有关您的问题的信息。 LSE频率容差在25℃时为10-30ppm。 在整个温度范围内,它可能最大为80-100ppm。 为了弥补这种可能的错误,你应该有另一个频率参考源,它必须比你的更准确。那么,你的参考是什么? 以上来自于谷歌翻译 以下为原文 Hi Kadir, I think still there is missing information about your problem. LSE frequency tolerance is 10-30ppm at 25C. Over the entire temperature range it may be maximum 80-100ppm. In order to compensate for this possible error you should have another frequency reference source that must be more accurate than yours. So, what is your reference ? |
|
|
|
嗨,
我使用的晶体的容差在25 * C时为5 ppm,我首先用更灵敏的器件测量整个系统时晶体的误差。之后,有一个公式来计算温度的影响,以ppm为单位找到校准值。 MCU测量温度,得到一个值,然后将其转换为ppm。(通过公式= Constant_K *(Current_Temperature - T0)^ 2) 最终,两个值的总和给出了将写入RTC的最终值 - >校准寄存器.. 希望现在变得更加清晰.. 如果我回到开头,问题在于最终校准值,我无法将误差降低到可接受的水平。 以上来自于谷歌翻译 以下为原文 Hi, The tolerance of crystal which I used is 5 ppm at 25 *C, I first measure the error of the crystal while working with whole system by more sensitive device. After that, There is a formula to calculate the effect of the temperature to find the calibration value in ppm. MCU measures the temperature, gets a value then converts it into ppm.(by formula which is = Constant_K*(Current_Temperature - T0)^2 ) Eventually, The sum of both values give me the final value which is going to be written to RTC -> Calibration Register.. Hope It gets more clear now.. If I go back to the beginning, the problem is with the final calibration value, I couldnt reduce the error in an acceptable level. |
|
|
|
我没有帮助你,但至少我已经让真正的专业人士更清楚了 - (:
最后的尝试, 您应该检查温度测量精度和ADC精度。 ADC精度: 如果你使用12位分辨率 - 你可以获得总误差的.125% 10位 - 0.225% 8位 - 0.524% 6位 - 1.728% STM8内部温度传感器本身有自己的错误,取决于温度和Vdd,可能是1.5-1C。 请尝试考虑这些因素。 祝你好运 ! 以上来自于谷歌翻译 以下为原文 I haven't helped you, but at least I've made the picture more clear for the real professionals (-: The last attempt, may be you should check the temperature measurement accuracy and ADC accuracy. ADC accuracy: if you use 12-bit resolution - you can get .125% of total error 10-bit - 0.225 % 8-bit - 0.524 % 6-bit - 1.728% STM8 internal temperature sensor itself has its own mistake and depends on temperature and Vdd and may be 1.5-1C. Please try to take these factors into consideration too. Good luck ! |
|
|
|
那么,你有没有设法找出问题?知道......会很有趣
以上来自于谷歌翻译 以下为原文 So, have you managed to find out the problem? It would be interesting to know... |
|
|
|
那么,你有没有设法找出问题?知道......会很有趣
以上来自于谷歌翻译 以下为原文 So, have you managed to find out the problem? It would be interesting to know... |
|
|
|
嗨Yevpator,
考虑到不同应用值的结果,我计算了一个常数乘以校准。温度变化的价值。显然它在所有温度下都能正常工作。 因此,当我拿出83%的校准值时,似乎工作正常。 无论如何,我可能必须找到一个更好的解决方案来解决这个问题.. 以上来自于谷歌翻译 以下为原文 Hi Yevpator, Considering the results with different applied values, I calculated a constant to multiply the calib. value of temperature changes. Apparently it worked under all temperatures. So, when I take 83 % of the calib value, it seems working fine. Anyways, I could have to find out a better solution to fix that problem later.. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2666 浏览 1 评论
3221 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1793 浏览 1 评论
3622 浏览 6 评论
6003 浏览 21 评论
951浏览 4评论
1323浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
597浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1316浏览 3评论
1375浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-2 12:51 , Processed in 1.258201 second(s), Total 66, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号