cancel
Showing results for 
Search instead for 
Did you mean: 

ADC in debug mode

utelettronico
Associate II
Posted on July 11, 2008 at 13:00

ADC in debug mode

3 REPLIES 3
utelettronico
Associate II
Posted on May 17, 2011 at 12:39

Is it possible to stop the ADC continuous conversion in debug mode?

I configured the ADC1 in continuous mode with EOC interrupt flag activated, so when I try to debug the application the ADC1_2_IRQHandler is continuously called and the other code isn't executed.

Is there a method to stop also the ADC clock like DBGMCU_Config(DBGMCU_IWDG_STOP,ENABLE) functions?

sword_82
Associate II
Posted on May 17, 2011 at 12:39

Hi utelettronico,

According to my little knowldge about the MCU, it is not possible to stop an IP while debugging: so you cannot stop an ADC configured in continuous mode while debugging (I hope that I'm not talking nonsense :-] )

Try to work with polling, put a test on the EOC flag in your code, without activating the interrupt:

while(1)

{

if(ADC_EOC_SET)

{

ADC1_2_IRQHandle

}

your treatment here /* it must be a short code to not exceed the ADC period */

}

B.R.

sword

utelettronico
Associate II
Posted on May 17, 2011 at 12:39

Thank you sword_82,

your solution work perfectly!

Thank you very much

utelettronico