Hi,
If the buffer created by xStreamBufferSenFromISR() function is full, will the data be directly discarded or put in when there is space?
xStreamBufferSendFromISR( xStreamBuffer, ads129x_Cache2,48, &xHigherPriorityTaskWoken);
Thanks.
Hi,
If the buffer created by xStreamBufferSenFromISR() function is full, will the data be directly discarded or put in when there is space?
xStreamBufferSendFromISR( xStreamBuffer, ads129x_Cache2,48, &xHigherPriorityTaskWoken);
Thanks.
According to FreeRTOS xStreamBufferSendFromISR() API documentation it puts in as much data as possible telling you how much it was. Since ISRs can’t block the call can’t wait for enough space getting available in case the data block doesn’t fit.
Because I need to save all the data completely, but I find that the streambuffer is filled up quickly. I have applied for 6000 bytes of space. What better solution is there?
If you run into a backlog i.e. the postprocessing task can’t catch up the question is why this happens. If there other higher prio tasks running starving this post-processing task can you bump the prio of that task ? I guess you already estimated that the MCU is capable to handle the data rate of this interface.
The stream buffer data transfer mechanism is pretty lean but it’s a data copy. As further optimization you could try a zero copy approach using a buffer pool and send just the pointer to a buffer to the task.