This relates to a data capture and streaming application, where at its fastest (currently) a combination of ADC results, time stamp, encoder count and input byte are written to a buffer in the ADC data ready ISR.
Total number of bytes per sample is 18 (could go up to 30) so 2.3 to 3.2Mbytes / second.
In the streaming mode, this is read from the buffer (currently a circular one) and streamed out either a UART or UDP over ethernet.
All is well until I get to 128ksps and then my current queue seems to be falling apart. I am using a nice queue library from here:
https://github.com/rlogiacco/CircularBuffer
It seems as though I should fall back to a simplified lower overhead (ie faster) and interrupt safe buffering approach.
Should I stick with a circular buffer approach or a very simple ping pong two linear buffer pattern?
Any other suggestions?
Total number of bytes per sample is 18 (could go up to 30) so 2.3 to 3.2Mbytes / second.
In the streaming mode, this is read from the buffer (currently a circular one) and streamed out either a UART or UDP over ethernet.
All is well until I get to 128ksps and then my current queue seems to be falling apart. I am using a nice queue library from here:
https://github.com/rlogiacco/CircularBuffer
It seems as though I should fall back to a simplified lower overhead (ie faster) and interrupt safe buffering approach.
Should I stick with a circular buffer approach or a very simple ping pong two linear buffer pattern?
Any other suggestions?