Multiple SPI job queues data loss at higher data rates
When sending SPI data between PIC32 microcontrollers at higher speeds (800+ kbps), multiple SPI jobs may be required to support the data transfers. However, on the receiving microcontrollers, when one job is completed, the currentJob is set to NULL and the next job will not be queued until the following PolledTasks iteration. In the intermediate time, data may enter the SPI buffer; however, when the next job is finally queued, the SPI Rx buffer is cleared. This leads to data/pattern loss.
Solution: (drv_spi_tasks.c) DRV_SPI_PolledSlaveEBMxxxBitTasks() --8,16,32 bit verisons
Remove the call to PLIB_SPI_BufferClear(spiId) when pulling a job from the queue and setting it as the current job
Test Setup: 2 Separate PIC32MX795F512L dev boards, Fireberd BERC transmitting pseudorandom (QRSS, 2^23-1) patterns @ 2 Mbps