Getting Error while connecting nRF7002-EK module to IMXRT1050-EVKB(host) module with spi and use it for wifi scannig

Hi Nordic Team,

We are using the MIMXRT1050-EVK as the host and the nRF7002EK as the Wi-Fi module with an SPI connection. However, we are encountering frequent errors that we are unable to fully understand.

I believe the SPI connection is working correctly since the rpu_init and rpu_enable have been successfully verified. The issue occurs specifically when rpu_validate_comms fails.

I have attached the overlay files and logs for your reference.

We are using nRF Connect version v2.9.1 and the sample from ncs/v2.9.1/nrf/samples/wifi/scan.


00> [00:00:05.014,000] <inf> phy_mc_ksz8081: PHY 0 is down
00> [00:00:05.017,000] <inf> wifi_nrf_bus: SPIM spi@40394000: freq = 8 MHz
00> [00:00:05.017,000] <inf> wifi_nrf_bus: SPIM spi@40394000: latency = 0
00> [00:00:05.021,000] <err> wifi_nrf_bus: Error: RPU comms test: sig failed: expected 0x42000020, got 0xffffffff
00>
00> [00:00:05.022,000] <err> wifi_nrf: zep_shim_bus_qspi_dev_add: RPU enable failed with error -1
00> [00:00:05.022,000] <err> wifi_nrf: nrf_wifi_bus_qspi_dev_add: nrf_wifi_osal_bus_qspi_dev_add failed
00> [00:00:05.022,000] <err> wifi_nrf: nrf_wifi_bal_dev_add: Bus dev_add failed
00> [00:00:05.022,000] <err> wifi_nrf: nrf_wifi_hal_dev_add: nrf_wifi_bal_dev_add failed
00> [00:00:05.022,000] <err> wifi_nrf: nrf_wifi_fmac_dev_add: nrf_wifi_hal_dev_add failed
00> [00:00:05.022,000] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_add failed
00> [00:00:05.022,000] <err> wifi_nrf: nrf_wifi_if_start_zep: nrf_wifi_fmac_dev_add_zep failed
00> *** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d ***
00> *** Using Zephyr OS v3.7.99-ca954a6216c9 ***


mimxrt1050_evk_mimxrt1052_hyperflash.overlay6378.nrf7002ek.overlay5873.prj.conf

Parents
  • Hi,

    Can you try this bustest, to rule out faulty interfacing between the host and nRF70?

    Regards,

    Håkon

  • Hi Hakon, thanks for your time! I'm unable to access the link.

     "mail_id" doesn't have access to Confluence on nordicsemi.atlassian.net.



  • Wops. My mistake. 

    You can find the test in zephyr/tests/boards/nrf/nrf70/bustest. Build it the way you normally would for your board.

    Regards,

    Elfving

  • Hi Håkon,
    I actually already tried that. If CONFIG_WIFI_NRF70 is not enabled (which it isn't enabled /tests/boards/nrf/nrf70/bustest), it just skips the rpu_validate_comms() function.
    I also tested the system bus and peripheral bus, but those tests failed as well.

    00> *** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d ***
    00> *** Using Zephyr OS v3.7.99-ca954a6216c9 ***
    00> [00:00:00.000,000] <inf> shutdown: Starting mimxrt1050_evk with CPU frequency: 528 MHz
    00> 
    00> [00:00:00.000,000] <dbg> wifi_nrf_bus: rpu_gpio_config: GPIO configuration done...
    00> 
    00> [00:00:00.002,000] <dbg> wifi_nrf_bus: rpu_pwron: Bucken = 1, IOVDD = 1
    00> 
    00> [00:00:00.002,000] <inf> wifi_nrf_bus: SPIM spi@40394000: freq = 9 MHz
    00> [00:00:00.002,000] <inf> wifi_nrf_bus: SPIM spi@40394000: latency = 0
    00> [00:00:00.002,000] <dbg> wifi_nrf_bus: rpu_wrsr2: Written 0x1 to WRSR2
    00> [00:00:00.002,000] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 1 1 1 1 1
    00> [00:00:00.002,000] <dbg> wifi_nrf_bus: spim_wait_while_rpu_wake_write: RDSR2 = 0x1
    00> [00:00:00.002,000] <dbg> wifi_nrf_bus: spim_read_reg: err: 0 -> 0 2 2 2 2 2
    00> [00:00:00.002,000] <dbg> wifi_nrf_bus: _spim_wait_while_rpu_awake: RDSR1 = 0x2
    00> [00:00:00.002,000] <dbg> wifi_nrf_bus: rpu_clks_on: RPU Clocks ON...
    00> [00:00:01.002,000] <inf> shutdown: 
    00> WIFI ON Done.
    00> 
    00> [00:00:01.003,000] <err> shutdown: test_sysbus: SYSBUS R/W failed (0) : read = 0xffffffff, expected = 0x3f3
    00> [00:00:01.003,000] <err> shutdown: test_peripbus: PERIP BUS R/W failed (0): read = 0x0
    00> [00:00:01.003,000] <inf> shutdown: Going to sleep..
    00> 


  • Sorry about the wait Gokul,

    The bustest logs show SPI freq as 9MHz while the system logs show 8MHz. Could you confirm what is being used?

    And can you set the host HOST CPU freq to 128MHz and try the bustest again and share the logs?

    Note that we would recommend using native Zephyr for this, our Wi-Fi support is upstreamed to enable this usecase.

    Regards,

    Elfving

  • Hi Elfving,

    Thanks for your time! I’ve configured the CPU clock to 520 MHz and set the SPI to 16 MHz. But that wasn’t the issue. I didn’t use NCS(2.9.1) because it’s still based on Zephyr 3.0.0(not sure), and the NXP drivers aren’t up to date there. So I switched to Zephyr 4.1.0, and now everything’s working fine.


    You can go ahead and close the ticket.

Reply
  • Hi Elfving,

    Thanks for your time! I’ve configured the CPU clock to 520 MHz and set the SPI to 16 MHz. But that wasn’t the issue. I didn’t use NCS(2.9.1) because it’s still based on Zephyr 3.0.0(not sure), and the NXP drivers aren’t up to date there. So I switched to Zephyr 4.1.0, and now everything’s working fine.


    You can go ahead and close the ticket.

Children
No Data
Related