CC1101睡眠唤醒后是否需要重新配置寄存器
自己测试了下,进入睡眠后。利用片选脚进行唤醒后,如果不重新配置寄存器的话通信就不正常。
但是查看了官方例程并没有配置寄存器。
直接使用官方例程测试下,是否唤醒后能正常工作
你好,能给一下官方的测试CC113L和CC1150的通信的例程吗?
你好,我现在试着让系统进入睡眠模式,运行的是这两条指令:
CC1101_SET_CSN_HIGH( );
CC1101_Write_Cmd(CC1101_SPWD);
但是没有明显的效果,请问你是怎么进入睡眠模式的?最好能把程序贴出来,先谢谢你了。
你可以参考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
}
你好,能给一下CC113L和CC1150或者CC115L的官方例程链接吗
http://www.ti.com/product/CC113L/toolssoftware
点击“TrxEB RF PER Test Software (Rev. C)”下载
CC11xL的都在里面了。