Hi,
I am trying to optimise for raw TX throughput. I am running the raw_tx_packet sample. I am using a nrf7002-dk and running v3.1.99 with the following configuration changes to the prj.conf:
# APPLICATION CONFIG_RAW_TX_PKT_SAMPLE_INTER_FRAME_DELAY_MS=1 CONFIG_RAW_TX_PKT_SAMPLE_TX_MODE_FIXED=y CONFIG_RAW_TX_PKT_SAMPLE_FIXED_NUM_PACKETS=10000 CONFIG_RAW_TX_PKT_SAMPLE_QUEUE_NUM=3 # RATE CONFIG_RAW_TX_PKT_SAMPLE_RATE_VALUE=5 CONFIG_RAW_TX_PKT_SAMPLE_RATE_FLAGS=2 # DRIVER CONFIG_NRF70_MAX_TX_AGGREGATION=1 # CHANNEL CONFIG_RAW_TX_PKT_SAMPLE_CHANNEL=52
I use the "overlay-tx-prio.conf' from your documentation to maximize tx performance
# CONFIG_NRF70_AP_MODE=n # CONFIG_NRF70_P2P_MODE=n CONFIG_NET_PKT_TX_COUNT=32 CONFIG_NET_PKT_RX_COUNT=10 CONFIG_NET_BUF_TX_COUNT=64 CONFIG_NET_BUF_RX_COUNT=10 CONFIG_NRF70_RX_NUM_BUFS=10 CONFIG_NRF_WIFI_CTRL_HEAP_SIZE=20000 CONFIG_NRF_WIFI_DATA_HEAP_SIZE=199856 CONFIG_SPEED_OPTIMIZATIONS=y CONFIG_NRF70_QSPI_LOW_POWER=n CONFIG_NRF70_UTIL=n CONFIG_NRF70_MAX_TX_AGGREGATION=9 CONFIG_NRF70_MAX_TX_TOKENS=12 CONFIG_ZVFS_OPEN_MAX=20 CONFIG_NET_SOCKETS_POLL_MAX=20 # Sockets: select + poll take up more stack CONFIG_MAIN_STACK_SIZE=5200 CONFIG_SHELL_STACK_SIZE=5200 CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600 CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=25000 CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=15000
I am interested in sending slitghtly larger packets than the sample so I set
#define BEACON_PAYLOAD_LENGTH 512
I have also made some small differences to the sample code to improve performance like setting the nrf5340 in 128MHz mode by
nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
and also using an aligned buffer for the "test_frame". Also, to be able to get more than 1000 packets out per second I have changed
k_msleep(CONFIG_RAW_TX_PKT_SAMPLE_INTER_FRAME_DELAY_MS);
to
k_usleep(various_different_values)
I am still not able to get more than 1000 packets/second out. This corresponds roughly to 600*8*1000 ~ 4.8Mbits/second. I am testing on a basically empty channel so there should not be too much contention or interference, and I am also using the voice class for my traffic so CW should not be large. The theoretical max throughput on MCS 5 is roughly 50 Mbits/second. I don't need that much but was hoping to get above 10Mbits/second. Is this a limitation in the nrf5340 or is there any else I can do increase the throughput?
Best regards,
Erik