adcConvert

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Has thanked: 10 times
Been thanked: 5 times

adcConvert

Post by neums »

Hi,
i used the OS-less HAL osal. Can i call adcConvert from an interrupt? This function hangs in osalThreadSuspendS.

Thanks
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: adcConvert

Post by Giovanni »

Hi,

Of course not, you cannot suspend in an ISR regardless if you use an OS or not. You need to use adcStartConversionI(), the callback is the signal that the conversion is over.

Giovanni
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Has thanked: 10 times
Been thanked: 5 times

Re: adcConvert

Post by neums »

Of cource. epic fail. :-)
Post Reply