NRF24L01,一个发送,一个接收,并且接收方成功接收到数据(通过RS232串口观察),但是发送方就是收不到自动应答信号ACK,查询STATUS 一直是 0x1E(通过RS232串口观察) ,这是怎么回事?
收发配置信息我已对过几遍,未发现问题,不知道是哪里出了问题,哪位有经验的大侠能帮忙提点下,不胜感激,谢谢了!
接收模式配置:
SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS, TX_ADR_WIDTH); // Writes TX_Address to nRF24L01********************************************
接收模式配置:
SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS, TX_ADR_WIDTH); // Writes TX_Address to nRF24L01********************************************
SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, RX_ADDRESS, TX_ADR_WIDTH); // Use the same address on the RX device as the TX device
sta = SPI_RW_Reg(WRITE_REG + EN_AA, 0x01); // Enable Auto.Ackipe0
SPI_RW_Reg(WRITE_REG + EN_RXADDR, 0x01); // Enable Pipe0
SPI_RW_Reg(WRITE_REG + RF_CH, 40); // Select RF channel 40
SPI_RW_Reg(WRITE_REG + RX_PW_P0, TX_PLOAD_WIDTH); // Select same RX payload width as TX Payload width
SPI_RW_Reg(WRITE_REG + RF_SETUP, 0x07); // TX_PWR:0dBm, Datarate:2Mbps, LNA:HCURR
SPI_RW_Reg(WRITE_REG + CONFIG, 0x0f); // Set PWR_UP bit, enable CRC(2 bytes) & Prim:RX. RX_DR enabled..
转载
|