Page 1 of 1

adcconvert behaviour regression

Posted: Wed Apr 03, 2013 12:28 pm
by alex31
Hi,

I have meet a problem with stm32f4.

I have a program which does conversion on a channel at 1000hz,
and with newer version of master branch, after a few dozens of conversions,
the thread which does conversions blocks on adcConvert and remains in SUSPENDED state.

With a 2 months old version of Chibios, program run smoothly and
adcConvert does not block, so i suspect a regression between
2 months and now.

Alexandre

Re: adcconvert behaviour regression

Posted: Wed Apr 03, 2013 1:13 pm
by alex31
If, instead of using synchronous function adcConvert, i use, as a workaround, asynchronous function
adcStartConversion, and callback to process converted data, it works using current master branch.

Alexandre

Re: adcconvert behaviour regression

Posted: Wed Apr 03, 2013 3:22 pm
by Giovanni
Could you isolate the defective revision? the subversion log should show the commits on adc_lld.c|h.

Giovanni

Re: adcconvert behaviour regression

Posted: Wed Apr 03, 2013 4:52 pm
by alex31
seems to be more complicated than i have thought first.

* with 2 months old chibios, it works.

* if i copy old adc_lld.c|h on newest chibios, bug remains, so problem seems to not belong to adc_lld.c|h.

* if i slightly modify testhal/STM32F4xx/ADC to loop on adcConvert, i am not able to trigger the bug

So, it should be a side effect elsewhere, in my application, something somewhere does a nasty things and
thread remain in SUSPENDED state, so i think that the itr (or event) which should wake up the thread upon
adc completion never arrive.

Alexandre