NUVOTON + NRF24L01 Software Development. (SPI Communication)

Hello Everyone,

I try to develop Nuvoton + NRF24L01 SPI communicate each other. And I don't understand why MISO bus has 0x0E after I send Write_Command 0x20?

void NRF24_AdressTX(uint8_t reg, uint8_t *dataa)
{
    SPI_send_byte(0x20 | reg);
    SPI_send_byte(dataa[0]);
    SPI_send_byte(dataa[1]);
    SPI_send_byte(dataa[2]);
    SPI_send_byte(dataa[3]);
    SPI_send_byte(dataa[4]);
}

void NRF24_Init()     //NRF24L01 CONFIGURATIONS
{
    nrf24_WriteReg(CONFIG, 0x02);
    nrf24_WriteReg(EN_AA, 0x00);                   
    nrf24_WriteReg(EN_RXADDR, 0x01);            
    nrf24_WriteReg(SETUP_AW, 0x03);       
    nrf24_WriteReg(SETUP_RETR, 0x00);        
    nrf24_WriteReg(RF_CH, 0x00);                
    nrf24_WriteReg(RF_SETUP, 0x0E);     
    NRF24_AdressTX(TX_ADDR, TxAddr);
}

And I send these configurations to MOSI bus as you can see in the picture. Is it correct way?

while(1)
        {
            NRF24_Transmit(0x01);
            delayMS(500);
        }

After configurations datas, I send 0xA0(PAYLOAD) and 0x01(MY DATA). I still get 0x0E, Why MISO Bus return 0x0E every write command?

NOTE: This code works as only transmitter. Not Reciever.

Questions

1) Is it correct way to control NRF24L01? If I am not what is the correct way for it?

2) My SCK Delay is 15us HIGH 15us LOW, is it enough?

3) When I Triggered CE pins HIGH TO LOW, I started to write period and send 1 byte data as well, but Is CE Pin need to be HIGH to finished sending all data? Or CE trigger is okay as you can see at above the picture.

Related