Page 1 of 1

Question on adc1_get_raw

Posted: Thu Oct 24, 2019 3:22 pm
by johnyan
Hello everyone,

I know adc1_get_raw is blocking cpu on polling meas1_done_sar.

Code: Select all

while (SENS.sar_meas_start1.meas1_done_sar == 0);
Can we add taskYIELD() to make it slightly efficient?

Code: Select all

while (SENS.sar_meas_start1.meas1_done_sar == 0) taskYIELD();
Thanks,
John

Re: Question on adc1_get_raw

Posted: Sun Oct 27, 2019 11:57 am
by Ritesh
johnyan wrote:
Thu Oct 24, 2019 3:22 pm
Hello everyone,

I know adc1_get_raw is blocking cpu on polling meas1_done_sar.

Code: Select all

while (SENS.sar_meas_start1.meas1_done_sar == 0);
Can we add taskYIELD() to make it slightly efficient?

Code: Select all

while (SENS.sar_meas_start1.meas1_done_sar == 0) taskYIELD();
Thanks,
John
What issue you are facing after adding that code? Or you can also add some delay for that.