ATWINC15x0 SPI Issue
ATWINC1510 firmware version 19.6.1 running in "ethernet/bypass mode"
I'm able to init the device with m2m_wifi_init() and get back firmware version etc.
However, when I issue a m2m_wifi_request_scan() it fails with a -6 (BUS ERROR; see nm_common.h) . In looking into this...
The bus works fine right up until the first "DMA Extended WR" (0xC7) command is issued. The command goes out. It is accepted and responded too by the ATWINC device. The master then sends 0xF3 to (Data-packet-header) followed by 8 bytes of payload. The issue is that on the 8th byte the device jumps on the MISO line and transmits its 0xC3 response **while the master is still transmitting its 8th byte**. The master then looks for a response, but it has already occurred. Ergo, BUS_ERROR -6. (See image).
What would cause this behavior by the ATWINC device to transmit its response one clock-train pulse too early?