完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我仔细阅读了用户指南和各种应用笔记,但似乎无法让RTC唤醒定时器开始运行,所以没有WU中断,我陷入停顿模式。
有人可以给我一个不同的清单,列出需要设置/重置哪些寄存器位以启动定时器。我需要通过阅读用户手册来检查我认为我应该做些什么。 非常感谢 杰里米 以上来自于谷歌翻译 以下为原文 I've pored over the user guide and various app notes but cannot seem to get the RTC wakeup timer to start running, so no WU interrupt and I get stuck in halt mode. Can someone give me a difinitive checklist of what register bits need to be set/reset to get the timer started. I need to check that what I think I should be doing from reading the user manual is right. Many thanks Jeremy |
|
相关推荐
3个回答
|
|
|
我会使用固件库,因为它已经编写,测试和记录。然后,您可以花时间在您的应用程序上,而不是浪费时间重写已经有效的东西。
您可以在此处下载固件库: - http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm8l15x_stdperiph_lib.zip 如果你真的想最小化代码大小,那么代码中的每个函数调用都会删除你需要的代码行。 例如 CLK_PeripheralClockConfig(CLK_Peripheral_RTC,ENABLE); 找到这个函数,查看代码并去掉实际启用外设的代码行。 以上来自于谷歌翻译 以下为原文 I would use the firmware library as its already written,tested and documented. You can then spend time on your application instead of wasting time re-writing something which already works. You can download the firmware library here:- http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm8l15x_stdperiph_lib.zip If you really want to minimise the code size then for each of the function calls in the code strip out the lines of code you need. For example CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE); Find this function, look at the code and strip out the lines of code which actually enable the peripheral. |
|
|
|
|
|
我正在使用STM8L151和外部32khz晶体(LSE)
这是设置代码,在我的应用程序中用作50ms的systick中断 CLK_PeripheralClockConfig(CLK_Peripheral_RTC,ENABLE); CLK_RTCClockConfig(CLK_RTCCLKSource_LSE,CLK_RTCCLKDiv_1); RTC_WakeUpClockConfig(RTC_WakeUpClock_RTCCLK_Div16); RTC_ITConfig(RTC_IT_WUT,ENABLE); RTC_SetWakeUpCounter(_50ms_TIMER_VAL); RTC_WakeUpCmd(ENABLE); 然后启用中断 RTC_ITConfig(RTC_IT_WUT,ENABLE); 在中断处理程序中清除中断源 if(RTC_GetFlagStatus(RTC_FLAG_WUTF)== SET) { RTC_ClearITPendingBit(RTC_IT_WUT); } 以上来自于谷歌翻译 以下为原文 I am using STM8L151 with external 32khz crystal ( LSE) Here is the setup code, in my application used as a 50ms systick interrupt CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE); CLK_RTCClockConfig(CLK_RTCCLKSource_LSE, CLK_RTCCLKDiv_1); RTC_WakeUpClockConfig(RTC_WakeUpClock_RTCCLK_Div16); RTC_ITConfig(RTC_IT_WUT, ENABLE); RTC_SetWakeUpCounter(_50ms_TIMER_VAL); RTC_WakeUpCmd(ENABLE); then enable interrupts RTC_ITConfig(RTC_IT_WUT, ENABLE); In interrupt handler clear the interrupt source if( RTC_GetFlagStatus(RTC_FLAG_WUTF) == SET ) { RTC_ClearITPendingBit(RTC_IT_WUT); } |
|
|
|
|
|
你好帕特里克
你还在使用这个处理器吗? 你能为这个发送最小的完整例子吗? 最好的祝福 哈坎 以上来自于谷歌翻译 以下为原文 Hello Patrick Are you still working with this processor ?? Can you please send the smallest possible complete example for this ?? best regards Hakan |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1464 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1517 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3662 浏览 1 评论
3855 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2474 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
742浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
674浏览 5评论
722浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
961浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
761浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-8 17:14 , Processed in 0.635099 second(s), Total 78, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2825