When I have a test using nRF24l01+ with STM32, I can only get a playload datarate no more than 450kbps using nRF24l01+ 2M mode. How can increase the playload data rate and what is the maximum for the playload data rate? Thanks.
When I have a test using nRF24l01+ with STM32, I can only get a playload datarate no more than 450kbps using nRF24l01+ 2M mode. How can increase the playload data rate and what is the maximum for the playload data rate? Thanks.
Hi,
Thanks for you feedback. 1)The auto ACK NOT enable.I used maximum payload size (32). 2)In the testing, when a packer(32bytes) sent, 300-400us will wait for sending the next.It will take more than 500us to send a single packet.If this were is no wait, the receiver can not get correct packets. 3)The radio capability for the throughput is 2Mbps. In my testing, the sending throughput is much lower the capability .
I also have a test for the EN_AA enabled, Looks the throughput is no more than 500kbps.
In my testing, looks the receiver can not get the data immediately if keep a low error packet rate.
The configuration as below:
FOR TX:
NRF24L01_CE=0;
NRF24L01_Write_Buf(WRITE_REG+TX_ADDR,(u8*)TX_ADDRESS,TX_ADR_WIDTH);
NRF24L01_Write_Buf(WRITE_REG+RX_ADDR_P0,(u8*)RX_ADDRESS,RX_ADR_WIDTH);
NRF24L01_Write_Reg(WRITE_REG+EN_AA,0x00);
NRF24L01_Write_Reg(WRITE_REG+EN_RXADDR,0x01);
//NRF24L01_Write_Reg(WRITE_REG+SETUP_RETR,0x1a);
NRF24L01_Write_Reg(WRITE_REG+SETUP_RETR,0x0);
NRF24L01_Write_Reg(WRITE_REG+RF_CH,120);
//NRF24L01_Write_Reg(WRITE_REG+RF_SETUP,0x0f);
NRF24L01_Write_Reg(WRITE_REG+RF_SETUP,0x0f);
//NRF24L01_Write_Reg(WRITE_REG+CONFIG,0x0e);
NRF24L01_Write_Reg(WRITE_REG+CONFIG,0x02);
NRF24L01_CE=1;
FOR RX:
NRF24L01_CE=0;
NRF24L01_Write_Buf(WRITE_REG+RX_ADDR_P0,(u8*)RX_ADDRESS,RX_ADR_WIDTH);
NRF24L01_Write_Reg(WRITE_REG+EN_AA,0x00);
NRF24L01_Write_Reg(WRITE_REG+EN_RXADDR,0x01);
//NRF24L01_Write_Reg(WRITE_REG+EN_RXADDR,0x00);
NRF24L01_Write_Reg(WRITE_REG+RF_CH,120);
NRF24L01_Write_Reg(WRITE_REG+RX_PW_P0,RX_PLOAD_WIDTH);
NRF24L01_Write_Reg(WRITE_REG+RF_SETUP,0x0f);
//NRF24L01_Write_Reg(WRITE_REG+CONFIG, 0x0f);
NRF24L01_Write_Reg(WRITE_REG+CONFIG, 0x03);
NRF24L01_CE = 1;
Is there any unreasonable configuration?
Thanks Yong
Hi,
Thanks for you feedback. 1)The auto ACK NOT enable.I used maximum payload size (32). 2)In the testing, when a packer(32bytes) sent, 300-400us will wait for sending the next.It will take more than 500us to send a single packet.If this were is no wait, the receiver can not get correct packets. 3)The radio capability for the throughput is 2Mbps. In my testing, the sending throughput is much lower the capability .
I also have a test for the EN_AA enabled, Looks the throughput is no more than 500kbps.
In my testing, looks the receiver can not get the data immediately if keep a low error packet rate.
The configuration as below:
FOR TX:
NRF24L01_CE=0;
NRF24L01_Write_Buf(WRITE_REG+TX_ADDR,(u8*)TX_ADDRESS,TX_ADR_WIDTH);
NRF24L01_Write_Buf(WRITE_REG+RX_ADDR_P0,(u8*)RX_ADDRESS,RX_ADR_WIDTH);
NRF24L01_Write_Reg(WRITE_REG+EN_AA,0x00);
NRF24L01_Write_Reg(WRITE_REG+EN_RXADDR,0x01);
//NRF24L01_Write_Reg(WRITE_REG+SETUP_RETR,0x1a);
NRF24L01_Write_Reg(WRITE_REG+SETUP_RETR,0x0);
NRF24L01_Write_Reg(WRITE_REG+RF_CH,120);
//NRF24L01_Write_Reg(WRITE_REG+RF_SETUP,0x0f);
NRF24L01_Write_Reg(WRITE_REG+RF_SETUP,0x0f);
//NRF24L01_Write_Reg(WRITE_REG+CONFIG,0x0e);
NRF24L01_Write_Reg(WRITE_REG+CONFIG,0x02);
NRF24L01_CE=1;
FOR RX:
NRF24L01_CE=0;
NRF24L01_Write_Buf(WRITE_REG+RX_ADDR_P0,(u8*)RX_ADDRESS,RX_ADR_WIDTH);
NRF24L01_Write_Reg(WRITE_REG+EN_AA,0x00);
NRF24L01_Write_Reg(WRITE_REG+EN_RXADDR,0x01);
//NRF24L01_Write_Reg(WRITE_REG+EN_RXADDR,0x00);
NRF24L01_Write_Reg(WRITE_REG+RF_CH,120);
NRF24L01_Write_Reg(WRITE_REG+RX_PW_P0,RX_PLOAD_WIDTH);
NRF24L01_Write_Reg(WRITE_REG+RF_SETUP,0x0f);
//NRF24L01_Write_Reg(WRITE_REG+CONFIG, 0x0f);
NRF24L01_Write_Reg(WRITE_REG+CONFIG, 0x03);
NRF24L01_CE = 1;
Is there any unreasonable configuration?
Thanks Yong
Hi Yong
What is the SPI clock speed?
Have you looked at the SPI communication with the scope to check how much of the time it is active?
Best regards
Hi Torbjørn, In my testing SPI clock speed is 9MHz. Looks like SPI is quick enough so that 400-500us sleep need after send a packet with 32 Bytes by SPI. Is possiable with about 500kbps thoughput and 60M distance and no more than 2% pakcet error or lost? Thanks. Yong
Hi Yong
You can't really guarantee less than 2% packet loss at 60m. If you have line of sight, a good antenna and little interference then you might achieve it, but in other situations I am sure you will have much higher packet loss (like if you have walls in between, if there is a lot of 2.4GHz interference in the area, if the antenna is not properly tuned and so forth).
Best regards
Hi Torbjørn, I agree with u. Another question, what is the max through put for the NACK Mode, can it reach 1.5mbps? Thanks. Yong
Hi Yong
If you take advantage of the possibility to keep CE enabled over multiple packets (up to a maximum time of 4ms) you can reach 1.5Mbps or more in legacy Shockburst mode, yes.
For this to work you have to upload the next packet to the FIFO while the current packet is being transmitted.
Still, it is important to disable the TX temporarily after 4ms, otherwise the carrier frequency might drift out of spec and the packets will be lost.
Best regards