version : MSP432p401r When i call voltage function first i get value ,and if i call temperature next i couldn't get because (uint64_t status = ADC14_getEnabledInterruptStatus()) status remains same . Because of this i couldn't enter into temperature reading function as below. if(status & ADC_INT1) { cal30 = SysCtl_getTempCalibrationConstant(SYSCTL_2_5V_REF, SYSCTL_30_DEGREES_C); cal85 = SysCtl_getTempCalibrationConstant(SYSCTL_2_5V_REF, SYSCTL_85_DEGREES_C); temp= ADC14_getResult(ADC_MEM1); temp = (float) ((int32_t)(ADC14_getResult(ADC_MEM1) - cal30) * (85 - 30)) /(cal85 - cal30) + 30.0f; //tempF = tempC * 9.0f / 5.0f + 32.0f; //temp = (float) (((uint32_t) ADC14_getResult(ADC_MEM0) - cal30) * (85 - 30)) // / (cal85 - cal30) + 30.0f; ltempC = temp; //tempF = tempC * 9.0f / 5.0f + 32.0f; } similarly if read temperature first and voltage next again the same problem status doesn't get changed for voltage reading if (ADC_INT0 & status) { //vltg[i] = ADC14_getResult(ADC_MEM0)*100; vltg =(((ADC14_getResult(ADC_MEM0) *2.5f) / 16384)*2)*10; //i++; } Please suggest a Answer to get control over MSP432p401r .
↧