自己测试了下,进入睡眠后。利用片选脚进行唤醒后,如果不重新配置寄存器的话通信就不正常。
但是查看了官方例程并没有配置寄存器。
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.
你可以参考simpliciTI代码中关于sleep和wakeup的操作
/**************************************************************************************************
* @fn MRFI_Sleep
*
* @brief Request radio go to sleep.
*
* @param none
*
* @return none
**************************************************************************************************
*/
void MRFI_Sleep(void)
{
bspIState_t s;
/* Critical section necessary for watertight testing and
* setting of state variables.
*/
BSP_ENTER_CRITICAL_SECTION(s);
/* If radio is not asleep, put it to sleep */
if(mrfiRadioState != MRFI_RADIO_STATE_OFF)
{
/* go to idle so radio is in a known state before sleeping */
MRFI_RxIdle();
mrfiSpiCmdStrobe( SPWD );
/* Our new state is OFF */
mrfiRadioState = MRFI_RADIO_STATE_OFF;
}
BSP_EXIT_CRITICAL_SECTION(s);
}
/**************************************************************************************************
* @fn MRFI_WakeUp
*
* @brief Wake up radio from sleep state.
*
* @param none
*
* @return none
**************************************************************************************************
*/
void MRFI_WakeUp(void)
{
/* if radio is already awake, just ignore wakeup request */
if(mrfiRadioState != MRFI_RADIO_STATE_OFF)
{
return;
}
/* drive CSn low to initiate wakeup */
MRFI_SPI_DRIVE_CSN_LOW();
/* wait for MISO to go high indicating the oscillator is stable */
while (MRFI_SPI_SO_IS_HIGH());
/* wakeup is complete, drive CSn high and continue */
MRFI_SPI_DRIVE_CSN_HIGH();
/*
* The test registers must be restored after sleep for the CC1100 and CC2500 radios.
* This is not required for the CC1101 radio.
*/
#ifndef MRFI_CC1101
mrfiSpiWriteReg( TEST2, SMARTRF_SETTING_TEST2 );
mrfiSpiWriteReg( TEST1, SMARTRF_SETTING_TEST1 );
mrfiSpiWriteReg( TEST0, SMARTRF_SETTING_TEST0 );
#endif
/* enter idle mode */
mrfiRadioState = MRFI_RADIO_STATE_IDLE;
MRFI_STROBE_IDLE_AND_WAIT();
#ifdef MRFI_TIMER_ALWAYS_ACTIVE
stx_active = false; // indicate we're not in transmit
#endif // MRFI_TIMER_ALWAYS_ACTIVE
}
http://www.ti.com/product/CC113L/toolssoftware
点击“TrxEB RF PER Test Software (Rev. C)”下载
CC11xL的都在里面了。