完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨社区
我的SPC560D的实时时钟有问题。 我的应用程序尝试读取RTC.RTCCNT寄存器。每次在读取过程中程序指针都转到0x0000000E0,因此它指向什么 - .- 我认为这是一个基本问题,因为如果配置RTC,会出现同样的问题。 程序代码: ( ){ componentsInit(); uint32_t test = RTC.RTCCNT.R; componentsInit(); } 对定时器结构STM的访问非常有效,但我对RTC变量有任何读或写访问权限。 有没有人有一些经验,或者有解决方案; D 最好的祝福 菲利普 #rtc 以上来自于谷歌翻译 以下为原文 Hi Community I have an issue with the Real time Clock of the SPC560D. My application try to read the RTC.RTCCNT register. Every time during the read process the program pointer goes to 0x0000000E0, therefor it points to nothing -.- I think it is a basically problem, because the same issue occurs, if the RTC get configured. Programm Code: ( ) { componentsInit(); uint32_t test = RTC.RTCCNT.R; componentsInit(); } The access to the timer structure STM works very well, but I have any read or write access to the RTC variable. Has anybody some experience with it, or is there a solution out there ;D best regards Philipp #rtc |
|
相关推荐
6个回答
|
|
|
你好Philipp,
您应该在RM中启用表70中的PCTL 91。 halSPCSetPeripheralClockMode(91, SPC5_ME_PCTL_RUN(2)| SPC5_ME_PCTL_LP(2)); 为什么有2个componentsInit()? 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Philipp , You should enable the PCTL 91 cf Table 70 in the RM. halSPCSetPeripheralClockMode(91, SPC5_ME_PCTL_RUN(2) | SPC5_ME_PCTL_LP(2)); Why there are 2 componentsInit() ? Best regards Erwan |
|
|
|
|
|
嗨二万
谢谢你的快速修复。这对我帮助很大。 是的,第二个componentInit();是一个快速的调试解决方案,并在程序中使nosense:D 亲切的问候 菲利普 以上来自于谷歌翻译 以下为原文 Hi Erwan Thank you for your fast fix. It helped me a lot. Yes, the second componentInit(); was a fast debugging solution and makes nosense in the program :D kind regards Philipp |
|
|
|
|
|
嗨社区
概述: 低功耗模式:待机 主板:SPC560D Discovery有没有人对RTC唤醒有一些经验?我的应用程序应该在一段时间后醒来。这是一次非定期唤醒,因此我将使用RTCVal寄存器而不是API功能。有时我会从RTC中醒来,有时候不会。 在我看来这是一种奇怪的行为,因为只有在之前有另一次唤醒时才会发生RTC唤醒。 我认为初始化存在问题,但我尝试了RTCC寄存器和WRER寄存器的所有组合。 亲切的问候 菲利普 以上来自于谷歌翻译 以下为原文 Hi Community Overview: Low Power Mode: Standby Board: SPC560D DiscoveryHas anyone some experience with the RTC wakeup? My application should wake up after some time. It is a non-periodic wakeup so I will use the RTCVal register and not the API functionality. Sometimes I get a wakeup from the RTC and sometimes not. In my opinion it is strange behavior, because the RTC wakeup occurs only if there is another wakeup before. I think there is an issue with the initialization, but I tried all combinations of the RTCC Register and the WRER Register. kind regards Philipp |
|
|
|
|
|
嗨二湾,
谢谢您的回复。我发现了问题,SIRC源必须在待机状态下处于活动状态并且要存储此配置,必须完成新的模式转换,否则它将无法工作 只有hal_lld.c中的注释才会提示此行为。 感谢您的支持 PS:我希望这些附加信息将添加到文档中 亲切的问候 菲利普 以上来自于谷歌翻译 以下为原文 Hi Erwan, Thank you for your reply. I found the issue, the SIRC source must be active during standby AND to store this configuration a new mode transition must be done otherwise it will not work Only a comment in the hal_lld.c gives a hint to this behavior. Thank you for your support PS: I hope these additional information will be added in the documentation kind regards Philipp |
|
|
|
|
|
你好Philipp,
事实上,在STANDBY模式下使用SIRC时钟作为RTC Periph是合乎逻辑的。 我在第1章中找到了这些信息: DM00074056_LOW_POWER_MODE_SPC564Bxx_SPC56ECxx.pdf 此模式的目的如下: •作为一种极端低功耗模式,除了电源之外,所有电源都断电 允许设备唤醒和最终RTC / API(实时时钟)的必要电路 履行 •软件使用以保持最低功耗状态 要求快速醒来。 用于RTC的SIRC在待机模式下具有最低的消耗 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Philipp , In fact , it is logical to use SIRC clock for the RTC Periph in STANDBY Mode. i have found this information in chap1 : DM00074056_LOW_POWER_MODE_SPC564Bxx_SPC56ECxx.pdf This mode is intended as follows: • As an extreme low-power mode with everything powered down apart from the necessary circuitry to allow device wakeup and eventually a RTC/API (real time clock) implementation • To be used by software to remain in the lowest power consumption state with no requirement to wake up quickly. SIRC for RTC has the lowest consumption in STANDBY Mode Best regards Erwan |
|
|
|
|
|
嗨二万
谢谢您的回复。我认为存在误解:D 我的应用的一个要求是极低的功耗。所以它喜欢使用SIRC。如果SIRC控制寄存器的Standby位置1,则只能使用SIRC。缺少的信息是在设置此位后需要进行模式转换。否则SIRC仍然无法使用。 因此,只有hal_lld.c中的注释才能提示需要进行模式转换。 亲切的问候 菲利普 以上来自于谷歌翻译 以下为原文 Hi Erwan Thank you for your reply. I think there is misunderstanding :D One requirement for my application is extreme low power consumption. So it like to use the SIRC. It is only possible to use the SIRC if the Standby bit of the SIRC control register is set. The missing information for me was that a mode transition is required after setting this bit. Otherwise the SIRC is still not available. So only a comment in the hal_lld.c gives me a hint that a mode transition is required. kind regards Philipp |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1468 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1521 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3668 浏览 1 评论
3860 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2477 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
747浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
680浏览 5评论
726浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
965浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
768浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-11 08:24 , Processed in 3.119524 second(s), Total 82, Slave 65 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1729