Hi all!
I have a couple of questions related to ADC callback invocation frequency.
1) Does it explicitly depend on task switch frequency? In other words, is ADC callback called exactly after physical convertion or when nearest task switch occurs? And what kind of functions should I use inside of the callback, regular or ISR ones? May I get fast ADC conversion rate with relatively small task switch frequency to not waste MCU performance on unnecessary task switches?
2) In the case of circular ADC mode does next convertion start just after previous one or only after leaving callback function? What would happen if it takes more time to execute ADC callback then to perform pending convertion? Is there any kind of callbacks queue? Or should ADC callback be made to return as fast as possible?
Thank you very much in advance!
ADC callback throughput (solved)
Moderators: RoccoMarco, lbednarz, tfAteba
ADC callback throughput (solved)
Last edited by z80 on Thu Oct 25, 2012 10:25 am, edited 2 times in total.
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: ADC callback throughput
Hi,
All kind of callbacks are invoked from ISR context and are not linked to task switching. The ADC callback is code called directly from the ADC ISR and must use APIs meant for ISRs.
Giovanni
All kind of callbacks are invoked from ISR context and are not linked to task switching. The ADC callback is code called directly from the ADC ISR and must use APIs meant for ISRs.
Giovanni