主题: CC1101中讨论的其他部件
尊敬的TI E2E团队:
我无法通过发送器获得正确的数据。
我遵循了这些步骤。
1. Cs=low,在brust模式下初始化寄存器,未使用的寄存器written = 0x00,
保留值和寄存器值来自RF Studio。 CS=高
。
//radio_write_access |radio_burst_access-access |CC115L_IOCFG2 = 0x40
UINT8_t Init_RF_N_Reg[49]={0x40,0x2E,0x2E,0x06,0x47,0xD3,
0x91,0x1E,0x00,0x04,0x00,
0x01,0x00,0x00,0x10,0x09,
0x7A,0xC8,0x84,0x11,0x22,
0xE5,0x33,0x00,0x30,0x18,
0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xFB,0x00,0x10,
0xE9,0x2A,0x00,0x1F,0x00,
0x00,0x59,0x7F,0x3F,0x81,
0x35,0x09,0x00};
突出显示的字节是标头字节。
2.命令闪灯STX
低;
//delay_1ms (1);
while (SPI_miso);/* Pull CS_N low and wait for miso to go low before.(while (SPI_miso);/*拉低CS_N并等待miso降低。 通信开始*/
com_busy_flag = 0U;
cmd_Strobe(CC115L_STX);
while (!com_busy_flag);
HI (高);
3.发送数据
PAYLOAD缓冲器[0]=CC11xL_FIFO;RADIO_STUSTREG_ACCESS|RADIO_WRITY_ACCESS|RADIO_WRITE_ACCESS;
对于(I=1;I<31;I++) Payload_buff [I]=speed_0[I];
低;
Delay_1ms (1);
while (SPI_miso);/* Pull CS_N low and wait for miso to go low before communication starts *(while (SPI_miso);/*拉低CS_N,等待miso降低,然后通信开始*
com_busy_flag = 0U;
TxRx_Status = R_CSI00_Send_Receive (Payload_buff,31,0U);
while (!com_busy_flag);
HI (高);
4. Cs_LO;
Delay_1ms (1);
while (SPI_miso);/* Pull CS_N low and wait for miso to go low before communication starts *(while (SPI_miso);/*拉低CS_N,等待miso降低,然后通信开始*
com_busy_flag = 0U;
cmd_Strobe(CC115L_sidle);
while (!com_busy_flag);
Delay_1ms (1);
HI (高);
我收到损坏的数据。只有2或3次获得实际数据。 我正在使用轮询模式(即仅SPI连接)。