我有一个项目使用CY8C4024AZI S403设备。我有运行代码,但希望创建一个简单的定时器ISR,可以执行的事情,如扫描按键等。
我以前在PoSO4BLE上使用了GualLoad信号,所以我添加了一个名为GulalSaleAl2的附加的iSRY1。在配置窗口中,GualAlxalAl2使用看门狗定时器中断(WdTyt)。
然后我进入LFCLK设置并启用计时器(WDT)作为一个自由运行的计时器(见附件),向主程序添加代码以启动ISR—ISRY11START(),并将代码添加到ISRY1.1.C文件中:
CysISR(ISRY1I-中断)
{
中断,回调,回调
IsRy11ExcTraceTraceTraceBAR();
InEnff/*ISRY11StuttTraceTraceType回调*//
*把你的中断代码放在这里。*/
/*‘启动ISRY11中断’*/
CySysDtCultStultTo();
TEDSCOUNT++;
/*’结尾’*
}
它编译和运行,但似乎从来没有调用ISR作为TEDSCOUNT从不递增。如果我把计时器(WDT)改为模式看门狗(W/Buffic),我的代码似乎陷入了末日循环——不知道发生了什么。
有什么想法吗?
PSOC400CcLS1.1.PNG
40.3 K
以上来自于百度翻译
以下为原文
I have a project using a CY8C4024AZI-S403 device. I have running code but wanted to create a simple
timer ISR that can perform things like scan for key presses etc.
I've used a GlobalSignal before on a PSoC4 BLE so I added one called GlobalSignal_2 with an attached isr_1. In the configuration window, GlobalSignal_2 uses Watch Dog Timer Interrupt (WDTInt).
I then went into the LFClk setting and enabled the Timer (WDT) as a free running timer (see attachment), added code to main to start the isr - isr_1_start(); -and added code to the isr_1.c file as follows:
CY_ISR(isr_1_Interrupt)
{
#ifdef isr_1_INTERRUPT_INTERRUPT_CALLBACK
isr_1_Interrupt_InterruptCallback();
#endif /* isr_1_INTERRUPT_INTERRUPT_CALLBACK */
/* Place your Interrupt code here. */
/* `#START isr_1_Interrupt` */
CySysWdtClearInterrupt();
tedsCount++;
/* `#END` */
}
It compiles and runs but doesn't seem to ever call the ISR as tedscount never increments. If I change the Timer (WDT) to mode Watchdog (w/interrupt) my code seem to get stuck in a doom loop - not sure what's happening
Any ideas what's wrong?