配置完ADC后相应的中断屏蔽标志ADC_IM_MASK总是为1,这意思是中断没办法被响应吗?
比如这样配置完ADC:
void InitADC()
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
GPIOPinTypeADC(GPIO_PORTD_BASE,GPIO_PIN_2);//PD2
ADCSequenceConfigure(ADC1_BASE, 0, ADC_TRIGGER_PROCESSOR, 3);
ADCSequenceConfigure(ADC1_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);
ADCSequenceStepConfigure(ADC1_BASE, 3, 0, ADC_CTL_CH0 | ADC_CTL_IE | ADC_CTL_END);
ADCReferenceSet(ADC1_BASE, ADC_REF_INT);
ADCIntEnable(ADC1_BASE,3);
IntEnable(INT_ADC1SS3_TM4C123);
IntMasterEnable();
ADCIntClear(ADC1_BASE,3);
ADCSequenceEnable(ADC1_BASE,3);
}
那么ADC_IM_MASK3就变成1,不太懂这个标志的意思,求指教~
此帖出自
小平头技术问答
一周热门 更多>