Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
You could try disabling interrupts during the buffer-read section of your code to prevent the ISR from corrupting the read operation.
You could also try atomically reading the data from the circular buffer to a secondary buffer before operating to reduce the time spent between the first and last read operations as well as mitigating the risk of an interrupt during the data transfer from the circular buffer to your secondary buffer.