1
NXPTM M522XX, KINETIS and i.MX RT / Re: Setting up ADC
« on: May 13, 2010, 04:01:34 PM »
hi mark,
thank you for your idea of disable the threshold interrupt, it works!!! i can see raw hex values with threshold interrupt disabled. does this mean the threshold interrupt and output of the ADC value can't work together? if i enable the threshold interrupt, it is stuck at the handling function adc_level_change_high and can't see the value.
secondly, if i want to include adc_level_change_high and adc_level_change_low both in fnConfigureADC() can i just add this:
which i can't make it work actually.
thank you for your idea of disable the threshold interrupt, it works!!! i can see raw hex values with threshold interrupt disabled. does this mean the threshold interrupt and output of the ADC value can't work together? if i enable the threshold interrupt, it is stuck at the handling function adc_level_change_high and can't see the value.
secondly, if i want to include adc_level_change_high and adc_level_change_low both in fnConfigureADC() can i just add this:
Code: [Select]
adc_setup.int_handler = adc_level_change_high;
adc_setup.int_handler = adc_level_change_low;
adc_setup.int_adc_int_type = (ADC_HIGH_LIMIT_INT | ADC_LOW_LIMIT_INT);
adc_setup.int_low_level_trigger = (unsigned short)(ADC_VOLT * 1.5);
adc_setup.int_high_level_trigger = (unsigned short)(ADC_VOLT * 2);
which i can't make it work actually.