Harmony v.2.06, static SPI continuous slave receiver
I'm using Harmony 2.06 and trying to implement a continuous SPI slave receiver (SDO is not used). I'm using interrupt mode, without dma, static SPI implementation.
I'm setting up a set of buffers and adding tasks to SPI. Taking care to add new tasks as I read data from the buffers, so tasks should never end.
So far I have found two... well... strange implementations:
Near end of implementation of DRV_SPI0_BufferAddRead2 there is following code:
Well, in master mode this would probably work as in master mode dummy writes are automatically enabled when scheduling a "read only" task. In slave mode dummy writes are NOT done (they are not needed). No dummy writes = no transmit interrupts. I guess we should enable receive interrupt, not transmit.
/* Flush out the Receive buffer */
This code is executed on interrupt, when starting transfer of next buffer, after completing previous one. Why is it clearing hardware buffers? It causes data loss...
Are those errors indeed Harmony errors or am I doing something wrong?