It is because of the thread switching delay. When DMA buffer associated with one THREAD gets exhausted then switching of thread occurs which took time. You can check by increasing buffer size associated with each thread.
Thanks & Regards
It is curious because this effect even presents itself should i increment at a very low rate (10s of Hz).
My goal was to use socket switching which has zero latency, which i believe I was using in this case (I have mapped two different threads to two unique sockets here). If i am in fact using thread switching rather than socket switching, how do i ensure that i am using socket switching?
You have set Counter Limit to 4094 and data bus to 8bit bus.
And the DMA buffer size is set to 8KB = 8192 Bytes.
As per the GPIF state machine, the socket will be switched after every 4095 bytes of data. This means that the socket 4095 bytes out 8192 bytes of a buffer is filled.
Next it goes to another socket, then fills 4095 bytes then switch back to first socket, then it starts filling the rest of the buffer (4095 + 4095 = 8190 bytes) then goes to second socket.
1. Increase the counter limit to 8191 and test.
It is expected that the socket switch happens once the first buffer of socket 1 is full(8192 bytes are received). Then it starts filling the second socket.