Integrating nRF7002 with RP2040

Good Day,

We have an ongoing project that uses an RP2040 MCU (with FreeRTOS) and we need to add WiFi capabilities to it. It needs to be dual-band and fairly high throughput, both of which the nRF7002 fit the description of. It's clear, after reading the docs, that the nRF7002 is meant to be used with the other nRF MCUs, although usage with other MCUs is mentioned in passing. After thinking through how this would be achievable on an RP2040, I've narrowed it down to three key steps:

  1. Implement QSPI using the RP2040's PIO.
  2. Write C functions to communicate with the nRF7002 through QSPI.
  3. Write the necessary callback functions for the FreeRTOS+TCP port layer to link the nRF7002 and the network stack together.
    1. https://www.freertos.org/Documentation/03-Libraries/02-FreeRTOS-plus/02-FreeRTOS-plus-TCP/10-Porting/03-Embedded_Ethernet_Porting#creating_a_simple_network_interface_port_layer

The problem is, after reviewing the product specification (https://docs-be.nordicsemi.com/bundle/ps_nrf7002/attach/nRF7002_PS_v1.2.pdf?_LANG=enus), while it goes into some detail on the nRF7002 QSPI commands (page 17), there are still some details missing, like the memory map of the device. I guess my big questions are:

  1. At a conceptual level, what are the typical steps (QSPI commands) to initiate a transmission? And likewise, what are the typical steps for a reception.
  2. How do you program the OTP?

Any guidance would be greatly appreciated.

Thanks much,

Matt

  • Hi

    Yes, the nRF7002 should be possible to use with other host devices, as it is a companion IC. However, we don't focus on writing firmware for non-Nordic host devices, so on the development itself here you will be on your own, but we'll do our best to give you advice here.

    First off, if you're new to the nRF7002 and WI-Fi in general, I would strongly recommend going through the Nordic DevAcademy Wi-Fi fundamentals course where we have an introduction to Wi-Fi and how to get started with the nRF7002. 

    1. Are you completely new to the concept of QSPI as well? I'm not entirely sure at what level you want me to explain here. To enable QSPI you need to enable the QEN bit, then the supported read and write commands are generally used for communication.

    2. The memory map of the nRF7002 isn't too complex as it only has an OTP memory. We have an application note on nRF70 series Device and commissioning and characterization here that covers among other things how to do OTP memory programming.

    Best regards,

    Simon

  • Hi Simon,

    Thank you for your assistance. I'm more than willing to implement my own driver for the RP2040, there's just a few key pieces of information that are not covered in the product specification docs. I'm not looking for an explanation at the QSPI level necessarily, but the pieces of information I'd appreciate are:

    1. What address, if any do I write the data to that I want to transmit? Because both READ4IO and PP4IO require a 24-bit address before the data, as seen here from the nRF7002 product specification docs. You've said the address map is used for the OTP, but where am I supposed to write the transmission data to? And how do I trigger that transmission?

    2. Likewise for receptions, I assume HOST_IRQ is asserted so the host can read the data. But what address is the data stored at so I can read it into the host MCU?

    Thank you again, Simon

    Matt

  • Hi Matt

    I see. Yes, the documentation is on the light side in this regard I'm afraid, and we don't have too much. What we do have, is the nRF70 bare-metal driver available as an open source Github repo: https://github.com/nrfconnect/nrf70-bm I hope this will work as a starting point for you. It showcases scanning and radio_test applications from a bare metal point of view. The documentation for the nRF70 BM driver is available in the nrf70_bm_lib/docs directory.

    Best regards,

    Simon

Related