RAM optimisation for WiFi

Hello,

I am using the nrf7002 ek and attempting to optimise the RAM assignment for the project. I have reduced the size of several thread stack sizes as well as the heap in order for the application to fit onto my hardware. It's clear that I've cut too much RAM from at least one portion of the application though as I now get the error messages:

[00:00:00.623,138] <err> wifi_nrf: nrf_wifi_fmac_rx_cmd_send: No space for allocating RX buffer

[00:00:00.623,199] <err> wifi_nrf: nrf_wifi_fmac_init_rx: nrf_wifi_fmac_rx_cmd_send(INIT) failed for desc_id = 39

[00:00:00.623,260] <err> wifi_nrf: nrf_wifi_fmac_fw_init: Init RX failed

[00:00:00.623,962] <err> wifi_nrf: nrf_wifi_fmac_dev_init: nrf_wifi_fmac_fw_init failed

[00:00:00.623,992] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_init failed

[00:00:00.624,023] <err> wifi_nrf: nrf_wifi_if_init_zep: nrf_wifi_fmac_dev_add_zep failed

[00:00:00.624,450] <err> wifi_nrf: nrf_wifi_if_start_zep: Invalid MAC address: <unknown>

Are you able to help with which thread stack size or heap might need expanding to solve this? In general is there an easy way to know which area of RAM the application is targeting at any given time? I am aware of the Zephyr thread analyser which has been very helpful already.

Thanks,

Will

Parents
  • Hi,

     

    <err> wifi_nrf: nrf_wifi_fmac_rx_cmd_send: No space for allocating RX buffer

    This comes from the nrf_fmac_rx_cmd_send, which uses the net subsys from zephyr for buffering.

    Try to increase CONFIG_NET_BUF_RX_COUNT and see if this helps.

     

    If it does not help, please share your configuration.

     

    Kind regards,

    Håkon

  • Hi Håkon,

    Thanks for your quick reply. Unfortunately that does not work. Would increasing CONFIG_NET_BUF_RX_COUNT and CONFIG_NET_BUF_TX_COUNT not increase the RAM requirement of the application?

    I've tried using some of the recommend configs from the docs on resource constrained hosts. But with either the same error as above or some other crash causing the application to cycle before setup.

    My proj.conf file is a bit disordered at the moment. I will try to clean it up and share. Any general advice on debugging the rx buffer error or the cycling prior to setup would be appreciated in the meantime.

    Thanks,

    Will 

Reply
  • Hi Håkon,

    Thanks for your quick reply. Unfortunately that does not work. Would increasing CONFIG_NET_BUF_RX_COUNT and CONFIG_NET_BUF_TX_COUNT not increase the RAM requirement of the application?

    I've tried using some of the recommend configs from the docs on resource constrained hosts. But with either the same error as above or some other crash causing the application to cycle before setup.

    My proj.conf file is a bit disordered at the moment. I will try to clean it up and share. Any general advice on debugging the rx buffer error or the cycling prior to setup would be appreciated in the meantime.

    Thanks,

    Will 

Children
Related