完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
你好,
我们在SPC560P44L3上的应用在空闲回路中切换到HALT0模式以节省功耗。 PIT配置为每毫秒唤醒CPU以处理定时器,这很好。 现在我想配置自由运行的STM以保持高时间,但似乎在HALT0状态期间STM计数器不会递增。 遗憾的是,我无法提供小型测试程序,因为事件处理,定时器和省电的逻辑分散在整个项目中。基本上我要做的是重现这个: 为1Khz定时器中断编程PIT读取STM定时器 - > t1通过执行SetRunMode(SPC5_RUNMODE_HALT0)等待中断读取STM计时器 - > t2System时钟设置为16MHz,STM分频器设置为1,所以我期望(t2-t1)为16e6 / 1000 = 16e3。相反,这个数字要小得多,而且各不相同。但是,如果我将使用SetRunMode()的行更改为asm('wait'),则结果与预期完全一致。 HALT0模式配置如下: #define SPC5_ME_HALT0_MC_BITS(0UL | SPC5_ME_MC_MVRON | SPC5_ME_MC_DFLAON_LP | SPC5_ME_MC_CFLAON_LP | SPC5_ME_MC_IRCON | SPC5_ME_MC_PLL0ON | SPC5_ME_MC_XOSC0ON | SPC5_ME_MC_IRCON | SPC5_ME_MC_SYSCLK_FMPLL0) 我可能在数据表中遗漏了关于STM时钟门控的内容,但是我找不到一个用于关闭STM时钟的ME_PCTLx寄存器。 任何提示非常感谢, 以上来自于谷歌翻译 以下为原文 Hello, Our application on the SPC560P44L3 switches to HALT0 mode in the idle loop for power saving. The PIT is configured to wakeup the CPU every msec for handling timers, which works just fine. Now I'd like to configure the free running STM for highres time keeping, but it seems that during HALT0 state the STM counter does not increment. Unfortunately I'm not able to provide a small test program, as the logic for event handling, timers and power saving is scattered throughout the project. Basically what I do to reproduce this is:
HALT0 mode is configured like this: #define SPC5_ME_HALT0_MC_BITS (0UL | SPC5_ME_MC_MVRON | SPC5_ME_MC_DFLAON_LP | SPC5_ME_MC_CFLAON_LP | SPC5_ME_MC_IRCON | SPC5_ME_MC_PLL0ON | SPC5_ME_MC_XOSC0ON | SPC5_ME_MC_IRCON | SPC5_ME_MC_SYSCLK_FMPLL0) I'm probably missing something in the datasheet about clock gating to the STM, but I'm not able to find a ME_PCTLx register which gates the STM clock. Any hints much appreciated, |
|
相关推荐
4个回答
|
|
|
你好格特,
我们已经开发了类似的应用程序 SPC560Dxx_RLA用于发现的WKPU API测试应用程序 如果STM在HALT0中没有增加 我认为你没有在LP上正确配置你的PeripheralClockMode SPCSetPeripheralClockMode(PCTL_STM, SPC5_ME_PCTL_RUN(Y)| SPC5_ME_PCTL_LP(X));最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Gert , we have developped a similar application in SPC560Dxx_RLA WKPU API Test Application for Discovery if STM does not increase in HALT0 i think that you have not configured properly your PeripheralClockMode on LP SPCSetPeripheralClockMode(PCTL_STM, SPC5_ME_PCTL_RUN(Y) | SPC5_ME_PCTL_LP(X)); Best regards Erwan |
|
|
|
|
|
这就是我的想法,但问题是数据表根本没有列出STM的PCTL寄存器。所以问题实际上是:是否有一个PCTL寄存器用于在SPC560P44L3上选通STM,如果是,那是哪一个?
以上来自于谷歌翻译 以下为原文 That's what I was thinking, but the problem is that the datasheet does not list a PCTL register for the STM at all. So the question is actually: is there a PCTL register for gating the STM on the SPC560P44L3, and if yes, which one is it? |
|
|
|
|
|
你好格特,
是的,我错过了PCTL 没有关联的PCTL 在HALT0期间停止STM。 更好地使用eTimer或PIT(另一个频道) 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Gert , Yes , i have missed the PCTL There is no PCTL associated STM is stopped during HALT0. better to use eTimer or PIT (an other channel) Best regards Erwan |
|
|
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1469 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1521 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3668 浏览 1 评论
3860 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2477 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
748浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
680浏览 5评论
727浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
968浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
771浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-12 04:30 , Processed in 0.735167 second(s), Total 49, Slave 42 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
281