原文:
The following software sequence is required to power-down the C64x+ megamodule:
1. Enable power-down by setting the MEGPD field to 1 in the PDCCMD register.
2. Enable the CPU interrupt(s) that you want to wake-up the C64x+ megamodule. Disable all other
interrupts.
3. Execute the IDLE instruction.
The C64x+ megamodule stays in a power-down state until awakened by the interrupt(s) that are enabled
in step 2.
理解:
PDCCMD = 0x00010000,
使能中断,(定时器)
IDLE
然后,DSP进入 休眠模式,等待定时器中断唤醒,执行定时器中断服务程序后,继续执行IDLE之后的指令。
但是,CCS V5.4 simulator,的时候,上述指令后,出现奇怪现象:
1、定时器照计时,溢出也中断,IER使能,IFR置位,但是不执行中断代码
2、第二次定时器中断后,提示:TMS320C64X+: Warning: CPU:Interrupt No. 12 dropped, an earlier interrupt is pending to be taken
3、当然,IDLE之后的代码也不执行,一直停在IDLE处。
不过,我把指令改为:(只取消了 PDCCMD=0x00010000; 一个与语句)
使能中断,(定时器)
IDLE
则,
IDLE后,程序停在IDLE,
定时器中断唤醒,执行定时器中断服务程序后,继续执行IDLE之后的指令。
一切正常。
奇怪!请高人解释,我是否什么地方理由有误?