- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to expect 3 bytes : one as the return of sending the command byte and two bytes for the sent zeroes. Because sending and receiving runs in parallel in SPI conversions you can be sure that after the while(!(SPIM_ReadTxStatus() & SPIM_STS_SPI_DONE)){}
your SPIM_GetRxBufferSize() returns 3.
And for heavens sake use someting like
#define Wait(x)
...
while (SPIM_GetRxBufferSize()==0) Wait();
That will be quite better readable than just a semicolon..
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob
Could you help me with the PSoC 5 LP and Arducam mini Communication device, I don't understand how to do the Inicialitacion of Protocol SPI and verify the response of arducam
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Whenever a SPI master writes a value, it also read a value back in. So when you send the Control_Byte, the master reads a value which contains a dummy value. You need to throw this away. So only the second byte you read is valid.