I have an ALFAT-SD board which I’m trying to communicate with using the SPI bus. I’ve got it to initialise and I am (confirmed with a logic analyzer) reading the banner string back from the board. This suggests everything should be lovely.
Then I send the version command (‘V’, 0x0A); ALFAT responds with RFB == 1, but when I go to read the response, it’s all zeroes.
See the attached logic analyzer screenshot. The “\n” from the initialization banner is visible on the left side. Following is the V command write, then the attempts to read the response - 3 bytes at first, then 1 byte at a time.
Scrolling through the analyzer I can the whole string was read, up to and including the trailing !00\n (the \n you see in the screenshot is from the last 4 bytes). I have not counted the exact number of bytes received, but it all appears to be there.
The PIC is running at 8 MHz, with manually bit-banged SPI. I’ve also inserted (for debugging purposes) delays between bit transitions so that it’s running at sub-1MHz.
I’ll check adding an extra long delay after sending the V\n command when I get back. I have the specified 4uS delay after writing the command before attempting to read the response back.
Testing with a 1 second delay (actually 1.6 seconds due to picking some arbitrary numbers for a delay loop) between the write frame of “V\n” and the read frame - no difference. Still coming back with zeroes.