CC1101不reste就发送不出信号?为什么while(1){
RESET_CC1101();
halRfWriteRfSet
tings();
halSpiWriteBurstReg(CCxxx0_PATABLE, PaTabel, 8);
halRfSendPacket(TxBuf,8); }
上电之后reset
芯片,设置各项参数,设置发射功率,然后进入发送模式可以发射信号
RESET_CC1101();
halRfWriteRfSettings();
halSpiWriteBurstReg(CCxxx0_PATABLE, PaTabel, 8);
while(1){halRfSendPacket(TxBuf,8); }
但是如果只重置一次芯片,然后配置,再循环发送,就无法发出信号
因为要实现快速跳频,所以重置芯片的方法速度实在太慢,各位坛友这个怎么破,谢谢!
static uint8 txSendPacket(uint8* data, uint8 length)
{
uint16 key;
packetSent = FALSE;
// Write data to FIFO
halRfWriteFifo(data, length);
// Set radio in transmit mode
halRfStrobe(CC1101_STX);
// Wait for packet to be sent
key = halIntLock();
while(!packetSent)
{
halMcuSetLowPowerMode(HAL_MCU_LPM_3);
key = halIntLock();
}
halIntUnlock(key);
return(0);
}
一周热门 更多>