This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

timer2和Sleep timer的使用问题



 

Timer2 可以再PM2模式下工作,我想得到唤醒n次后的Timer2的counter和溢出counter,能否给一个例子呀?

启动Timer2

while(1)

{

do.....

sleep(n);//设置睡眠时间

//设置PM2模式

if(满足条件)

{

//TODO:获取timer2当前值,包括溢出值

}

}

能不能给一个例子呀?谢谢