adcconvert behaviour regression

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

adcconvert behaviour regression

Post 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
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: adcconvert behaviour regression

Post 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
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: adcconvert behaviour regression

Post by Giovanni »

Could you isolate the defective revision? the subversion log should show the commits on adc_lld.c|h.

Giovanni
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: adcconvert behaviour regression

Post 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
Post Reply