Hello,
I am running an ADC in circular mode, and I am using the analog watchdog interrupt. Is it possible to retrieve the position of the last filled sample in the buffer from within the adcerrorcallback function (interrupt routine), when the voltage has fallen outside of the specified range? If yes - how?
My project runs on a NucleoF411Re board.
Thank you,
Maxim
Retrieve position in buffer in ADC error callback function
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Retrieve position in buffer in ADC error callback function
Hi,
Look at examples, you need to verify the driver state, if the state is ADC_COMPLETE then the 2nd half of the buffer has been filled, else it is the 1st half.
Giovanni
Look at examples, you need to verify the driver state, if the state is ADC_COMPLETE then the 2nd half of the buffer has been filled, else it is the 1st half.
Giovanni
Who is online
Users browsing this forum: No registered users and 21 guests