NRF7002 memory overflow

Hello, I am currently developing with NRF52840 and NRF7002 chips. I am running a custom version of the wifi scan sample, using the baremetal library and custom shim file. The current state machine works as follows: Power up 7002 and set scan parameters, scan 10 times for wifi SSIDS, Power off 7002, sleep for a couple of minutes.

This works as intended, but the issue is as follows: after running this process for over 300 cycles, the 7002 chip stops initializing due to being unable to allocate memory for the scan parameters. I am following the clean up procedure used in the scan example, ie: freeing the required memory that was allocated for scan parameters. Somewhere, somehow memory is leaking and it causes this issue. After a full power cycle, the 7002 chip functions as intended.

Any help on this would be greatly appreciated. Thanks.

Related