Hello Alice_Yang
Thank you for taking the time to help.
Found a situation, the ADC's ch0,ch1,ch2,ch3,ch5 at the same time open interrupt will appear repeatedly into the interrupt and can not exit, as long as the ch0 interrupt shut down the system will be able to operate normally, excuse me what is this situation? Thank you very much!
like this
void ADC_IRQHandler(void)
{
if(Chip_ADC_ReadStatus(LPC_ADC, ADC_CH0, ADC_DR_DONE_STAT) )
Chip_ADC_ReadValue(LPC_ADC, ADC_CH0, &dataADC0);
if(Chip_ADC_ReadStatus(LPC_ADC, ADC_CH1, ADC_DR_DONE_STAT) )
Chip_ADC_ReadValue(LPC_ADC, ADC_CH1, &dataADC1);
if(Chip_ADC_ReadStatus(LPC_ADC, ADC_CH2, ADC_DR_DONE_STAT) )
Chip_ADC_ReadValue(LPC_ADC, ADC_CH2, &dataADC2);
if(Chip_ADC_ReadStatus(LPC_ADC, ADC_CH3, ADC_DR_DONE_STAT) )
Chip_ADC_ReadValue(LPC_ADC, ADC_CH3, &dataADC3);
if(Chip_ADC_ReadStatus(LPC_ADC, ADC_CH5, ADC_DR_DONE_STAT) )
Chip_ADC_ReadValue(LPC_ADC, ADC_CH5, &dataADC5);
}
static ADC_CLOCK_SETUP_T ADCSetup;
void ADC_INIT(void)
{
Chip_ADC_Init(LPC_ADC, &ADCSetup);
Chip_ADC_EnableChannel(LPC_ADC, ADC_CH0, ENABLE);
Chip_ADC_EnableChannel(LPC_ADC, ADC_CH1, ENABLE);
Chip_ADC_EnableChannel(LPC_ADC, ADC_CH2, ENABLE);
Chip_ADC_EnableChannel(LPC_ADC, ADC_CH3, ENABLE);
Chip_ADC_EnableChannel(LPC_ADC, ADC_CH5, ENABLE);
//Chip_ADC_Int_SetChannelCmd(LPC_ADC, ADC_CH0, ENABLE);
Chip_ADC_Int_SetChannelCmd(LPC_ADC, ADC_CH1, ENABLE);
Chip_ADC_Int_SetChannelCmd(LPC_ADC, ADC_CH2, ENABLE);
Chip_ADC_Int_SetChannelCmd(LPC_ADC, ADC_CH3, ENABLE);
Chip_ADC_Int_SetChannelCmd(LPC_ADC, ADC_CH5, ENABLE);
//Chip_ADC_Int_SetGlobalCmd(LPC_ADC,ENABLE);
Chip_ADC_SetBurstCmd(LPC_ADC, ENABLE);
DB_PutStr("\n A>");
Chip_ADC_SetStartMode(LPC_ADC, ADC_START_NOW, ADC_TRIGGERMODE_RISING);
NVIC_EnableIRQ(ADC_IRQn);
DB_PutStr("\n B>");
}