Using the NRF5340 combined with the NRF7002 in access point mode for data transfer to a host

We are utilizing the nrf5340 alongside the nrf7002 for Bluetooth Low Energy (BLE) and Wi-Fi communication between a wearable device and a host. The host is a laptop connected to a USB dongle that also employs the nrf5340 and nrf7002. Communication between the wearable device and the dongle occurs over Wi-Fi using a hotspot.

The wearable device serves as a sensor, while the device connected to the laptop acts as a gateway. In the sensor device, data is streamed to the nrf5340 over SPI, with the nrf5340 configured as an SPI slave. The streaming rate is approximately 400 KB per second, divided into 40 packets per second, each with a size of around 10 KB. This means that every 25 milliseconds, a 10 KB packet is transferred to the nrf5340 on the sensor board. The sensor board then processes the data and transmits it over Wi-Fi to the gateway board. The gateway board subsequently forwards the data to the host (laptop) via USB CDC.

We are encountering the following issues:

1. There are packet losses in Wi-Fi communication.

2. Reducing the SPI clock speed from 40 MHz to 10 or 5 MHz results in fewer data losses.

This raises the first question: Why does the SPI clock speed, which influences the duration of data transfer within the 25-millisecond window, affect data losses?

Additionally, reducing the packet rate from 40 to 20 packets per second eliminates losses entirely. The second question is: What steps can we take to achieve the required data rate without encountering data losses?

We are using Zephyr v2.5.1 in VS IDE.

Parents
  • Helo,

    The problem you are facing (packet lost in Wi-Fi communication) is sending data through SPI from sensor to host (to nrf5340). Reducing clock speed of SPI 1/4 to 1/8 and reducing packet size helps to reduce packet lost. Which sample you are working on for your application? 

    I have asked our team to get a detail explanation of your queries. I will get back to you lately.

    Thanks.

    BR

    Kazi

Reply
  • Helo,

    The problem you are facing (packet lost in Wi-Fi communication) is sending data through SPI from sensor to host (to nrf5340). Reducing clock speed of SPI 1/4 to 1/8 and reducing packet size helps to reduce packet lost. Which sample you are working on for your application? 

    I have asked our team to get a detail explanation of your queries. I will get back to you lately.

    Thanks.

    BR

    Kazi

Children
Related