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.

CC1110睡死的问题

Other Parts Discussed in Thread: SIMPLICITI

我用CC1110做了一个产品,睡眠指定的时间后醒来工作一次,测试的时候用示波器观察晶振引脚会间隔睡眠时间就有一次震荡波形出现,这个是正常的。 但是我有一批产品在客户那里工作了半年,结果出现了一部分完全睡死的情况(短时间的集中测试中没有发现该现象),无法醒来跟基站进行无线通讯。测试晶振引脚不再出现间隔的震荡波形,但是工作电流来看确实是出于休眠状态,复位后恢复正常。。所以想请教一下可能是什么情况?如何防止这种情况的发生?下面是一些关键的代码:

1. 代码中含有限制sleeptimer最大休眠时间的代码,因此应该不是某种意外造成sleeptimer睡眠时间过长。

   

if(sleep_time!=0)//经过测试,WOREVT1的值为睡眠时间S*34

if(sleep_time>60)sleep_time=60; 

sleep_time=sleep_time*34;
WOREVT1 = sleep_time>>8;
WOREVT0=sleep_time;
}
else
{
WOREVT0=0x54;//10S默认
WOREVT1=0x01;
}

2. sleeptimer中断中也做了相应的处理


#pragma vector = ST_VECTOR
__interrupt void sleep_timer_isr(void)
{
// Clear Sleep Timer CPU interrupt flag (IRCON.STIF = 0)
STIF = 0;

// Clear Sleep Timer Module Interrupt Flag (WORIRQ.EVENT0_FLAG = 0)
WORIRQ &= ~WORIRQ_EVENT0_FLAG;

// Clear the [SLEEP.MODE] bits, because an interrupt can also occur
// before the SoC has actually entered Power Mode 2.
SLEEP &= ~SLEEP_MODE;


}