void ADC_WatchdogConfig(void)
{
ADC_AnalogWatchdogSingleChannelConfig(ADC1, ADC_CHANNEL1);
ADC_AnalogWatchdogThresholdsConfig(ADC1,3510,1000);
ADC_AnalogWatchdogCmd(ADC1, ADC_AnalogWatchdog_SingleRegEnable);
ADC_ITConfig(ADC1, ADC_IT_AWD, ENABLE);}
void ADC1_2_IRQnHandler(void){
ADC_ITConfig(ADC1,ADC_IT_AWD,DISABLE);
if(SET == ADC_GetFlagStatus(ADC1,ADC_FLAG_AWD))
{
LED_RED ;
ADC_ClearFlag(ADC1,ADC_FLAG_AWD);
ADC_ClearITPendingBit(ADC1,ADC_IT_AWD); }
ADC_ITConfig(ADC1,ADC_IT_AWD,ENABLE); }
为什么这个看门狗老是进不去中断???感觉自己配置没问题啊。。。而且AD转化也超过门阀电压了,就是进不去中断???? |