AnsweredAssumed Answered

LPC11C24 ADC_IRQn

Question asked by shen jian on Mar 27, 2019
Latest reply on Apr 1, 2019 by Alice_Yang

i use      lpcopen_v2_00a_keil_iar_nxp_lpcxpresso_11c24 

 

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>");   //------->>>   Can output   A 

 

Chip_ADC_SetStartMode(LPC_ADC, ADC_START_ON_CTOUT15, ADC_TRIGGERMODE_RISING);

 

NVIC_EnableIRQ(ADC_IRQn);    //--------------->>>>Die here.

DB_PutStr("\n B>");    //------->>>   Cannot output   B
}

 

 

Thank you!

Outcomes