Hi,
you use the code:
#define TOTAL_AVERAGE_NUMBER 200
for (uint16_t i=0; i<TOTAL_AVERAGE_NUMBER; i++)
{
uivoltage=HW_ADC_Read(0);
temp=calcTemp(uivoltage);
totalTemp+=temp;
}
The above code takes a lot of time so that the core has not time to handle the interrupt.
Pls try to change
#define TOTAL_AVERAGE_NUMBER 2
and have a try.
BR
XiangJun Rong