9 years, 4 months ago.

Analog interrupt

Hi,

I have not found in handbook or cookbook or forum howto start an analog input conversion setting an interrupt for end of conversion in a platform independent way.

Is that possible?

1 Answer

9 years, 4 months ago.

No this is not supported, currently AnalogIn starts a conversion, waits until it is finished, and reports back the result.

Accepted Answer

Can I run AnalogIn in a thread using RTOS and use the wait time for other threads?

posted by Manel Marin 24 Dec 2014

If other threads have a higher priority they will interrupt the waiting yes, if equal priority they might interrupt, if lower they won't. In general however the AnalogIn conversion time is too short to bother with thread switches.

Btw the KL25 is supported in FastAnalogIn, that lowers the overhead if that is an issue for you.

posted by Erik - 24 Dec 2014