Cypress技术论坛
直播中

杨娟

8年用户 268经验值
私信 关注
[问答]

WDT在低功耗模式下出现问题

我有一个项目的CYBLY-02200 - 00在自定义板。(附)
它有WDT和一个按钮冲突
当低功耗模式被禁用时,两者都工作良好。
当它被启用时(在主C中调用函数EnterLowPowerMode)计数器MaunyLoopLyStCyt和O.ISryCalt永远不会递增。
EntLoopPotoMead函数是从E.Prutt的帖子中复制的,类似的问题,所以我毫不怀疑它的工作原理。
有什么想法吗?
谢谢
安迪
LPM-WDT1.ZIP
850.6 K

以上来自于百度翻译


     以下为原文
  I have a project for a  CYBLE-022001-00 on a custom  board.(attached)
It has  WDT and a button interrrupt
Both work fine when low power mode is disabled
When it is enabled ( function EnterLowPowerMode is called in main.c) the counters main_loop_count   and _isr_count  never increment.
The EnterLowPowerMode function was copied from e.pratt's post for the similar issue so I have no doubts that it works
Any ideas ?
Thanks
Andy


回帖(21)

黎歆俭

2018-12-29 16:09:13
我相信您的按钮ISR可能会被错误地声明为格式(C++语法很好,只是CyPress语法)
用途:
CysISR(BTN-ISR){
/ISR代码
检查程序BTNYSTATE = TRUE;
ButoNo.ISW.CultSt除除器();
}
如果没有声明为CyPress中断,编译器的行为可能会有所不同?我知道有中断处理程序的硬件,但我不记得需要做什么来配置,如果有的话。
在我看来,TopDead中的组件声明看起来不错。

以上来自于百度翻译


     以下为原文
  I believe your button ISR might be declared incorrectly for the format (c++ syntax is fine, just the cypress syntax  )
Use:
 
CY_ISR(Btn_Isr) {
//Code for ISR here
    _check_btn_state = TRUE;
    Button_Isw_ClearInterrupt();
}
 
Potentially, the compiler is behaving differently if it is not declared as a Cypress Interrupt? I know there is the interrupt handler hardware, but I don't remember what needs to be done to configure that if any.
The component declarations in the TopDesign look okay to me.
举报

杨娟

2018-12-29 16:28:36

WDT和Butt在低功耗模式代码被禁用时中断火灾。
WDT ISR使用CyPress语法声明,而按钮不是
当启用电源模式时,两者都不会发生火灾。我将尝试更改按钮声明,并让您知道这是否有帮助。
我怀疑这里还有别的事情发生。
谢谢你
安迪

以上来自于百度翻译


     以下为原文
  Both WDT and Button interrupts fire just fine when low power mode code  is disabled
WDT ISR is declared using Cypress syntax and the button is not
Both do not fire when power mode is enabled.I'll try changing the button declaration and will let you know if that helped.
I suspect something else is going on here.
Thank you
Andy
举报

杨娟

2018-12-29 16:37:22

在按钮ISR中使用CyPrS语法没有帮助
我注意到的3件事:
1。不管我让程序运行多长时间,当我暂停它时,它就停在同一个地方。(下图)
2。该设备在CyScript中可见,RSSI值变化,表明至少BLE堆栈正在运行。
但是,没有到达我的断点,主循环和WDT ISR计数器没有增加。
三。WDT ISR点火4次,然后停止。有时它根本不着火,有时火灾2-3次。它应该每800毫秒发射一次
我不明白。这个问题很奇怪地让我想起了我在ISR中的一个外部问题。ISR也在零星地发射。我放弃了一种WDT的方法,它工作得很好,直到我启用低功耗模式。
不知道这些问题是否相关,只是指出它。

以上来自于百度翻译


     以下为原文
  Using the Cypres syntax in the button ISR did not help
3 things I'm noticing:
1. No matter how long I let the program run it stops at the same place when I pause it.(image below)
2. The device is visible in CySmart and the RSSI values change which indicates that at least the BLE stack is running
However none of my breakpoints are reached and the main loop and the  WDT ISR counters do not increment
3. The WDT ISR did fire 4 times and then stopped. Sometimes it does not fire at all, sometimes fires 2-3 times. It should fire every 800 ms
and I don't see that. The issue is strangely reminiscent of the problem I had with ISR from an external part. There too the ISR was firing sporadically. I abandoned that method in favor of a WDT which worked great until I enabled low power mode.
Don't know if these issues are related,just pointing it out.
举报

黎歆俭

2018-12-29 16:53:52

1。停止位置就像是与RTC有关,你是否有RTC运行和正常工作而没有低功耗模式?总是跑步吗?还是大部分?
2。你能用CyScript连接到BLE吗?你能读/写/通知值等吗?
三。奇怪的是,它发射了一些次数,然后失败……如果RTC系统棒需要每100毫秒点火才能正常工作,但是该单元进入睡眠,并且不及时启动RTC系统。这可能会引起一些问题,比如失控的程序或扰乱计时器/ WDT。

以上来自于百度翻译


     以下为原文
  1. The stop location likes like it is something to do with the RTC; Do you have the RTC running and working properly without low power mode? Is it always running? Or just mostly?
2. Are you able to connect  to the BLE with CySmart? Can you read/write/notify values etc.?
3. Odd that it fires some number of times then fails...If the RTC systick needs to fire each 100 ms to work properly, but then the unit goes to sleep and doesn't fire the RTC systick in time... That could be causing issues, like a runaway program or messing up timers/WDT.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分