求大神们帮帮忙,万分感谢。
按照手册,IRQ变低电平有三种情况,为什么我的一直为高。
void TX_Mode(uchar * BUF)
{
CE = 0;
SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS, TX_ADR_WIDTH); //写发送地址
SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, RX_ADDRESS, TX_ADR_WIDTH); //写接收地址
SPI_Write_Buf(WR_TX_PLOAD, BUF, TX_PLOAD_WIDTH); //写数据到TX FIFO
SPI_Write_Reg(WRITE_REG + EN_AA, 0x01); // 通道0自动应答
SPI_Write_Reg(WRITE_REG + EN_RXADDR, 0x01); // 使能通道0接收
SPI_Write_Reg(WRITE_REG + STATUS, 0x0e); //状态寄存器复位
SPI_Write_Reg(WRITE_REG + SETUP_RETR, 0x05); // 自动重发延时,次数
SPI_Write_Reg(WRITE_REG + RF_CH, 93); //射频通道
SPI_Write_Reg(WRITE_REG + RF_SETUP, 0x0f); //传输速率2Mbps,发射功率0dBm
SPI_Write_Reg(WRITE_REG + NRF_CONFIG, 0x0e); // CRC使能,发送模式,上电
CE = 1;
}
|