I'm using ASF4 to drive a WINC1500 in STA mode.
I have code that times out if the call to m2m_wifi_connect() doesn't return soon enough (i.e. the AP hasn't responded). At that point, I try to shut down the WINC even though it's still waiting for the AP to respond. I've tried a bunch of things to shut down the transaction cleanly, including things like:
... but I end up with a bunch of errors of the form:
(APP)(ERR)[spi_data_read][nmi spi]: Failed data response read...(20)
(APP)(ERR)[spi_read_reg][nmi spi]: Failed data read...
(APP)(ERR)[spi_read_reg]Reset and retry 10 1400
(APP)(ERR)[chip_deinitfailed to de-initialize
(APP)(ERR)[nm_drv_deinit][nmi stop]: chip_deinit fail
What's the approved way to shut down the WINC1500 from inside a call to m2m_wifi_connect()?