How to retrive buffer index in ADC error callback?
Posted: Sun Aug 06, 2023 5:40 pm
Hello,
I am using an ADC in circular mode, and I set an AWD interrupt in order to detect when the signal has fallen below a given value. My error callback is called correctly.
What I want to do now, in the error callback, is to retrieve the index of the buffer when the interrupt occurred, i.e. to determine where was the last sample written in the buffer just before the interrupt stopped the conversion. I cannot find any information about this in the documentation.
Would this be possible in a direct manner? Otherwise do you see any workarounds?
Thank you in advance
I am using an ADC in circular mode, and I set an AWD interrupt in order to detect when the signal has fallen below a given value. My error callback is called correctly.
What I want to do now, in the error callback, is to retrieve the index of the buffer when the interrupt occurred, i.e. to determine where was the last sample written in the buffer just before the interrupt stopped the conversion. I cannot find any information about this in the documentation.
Would this be possible in a direct manner? Otherwise do you see any workarounds?
Thank you in advance