Other Parts Discussed in Thread: EVM430-FR6989
Hi Team,
My customer generated code using FlowESI-GUI, but they found bug in the code.
in serviceInterrupts(), when the PERIODIC_AFE2_RECALIBRATION flag is on, the code clears the flag right after "if" as below.
However, ReCalScanIF(), also uses PERIODIC_AFE2_RECALIBRATION in the function. so It seems like the flag should be cleared after ReCalScanIF() execution.
void serviceInterrupts(void){
if(gRecalFlag&PERIODIC_AFE2_RECALIBRATION){
gRecalFlag &= ~PERIODIC_AFE2_RECALIBRATION;
Timer_A_setCompareValue(TIMER_RECALIBRATION_SELECTION,
TIMER_A_CAPTURECOMPARE_REGISTER_0,
RECAL_TIME_OUT);
Timer_A_startCounter(TIMER_RECALIBRATION_SELECTION,TIMER_A_UP_MODE);
ReCalScanIF();
gRecalCounter = TIME_TO_RECAL_REPEAT;
............
Is this right?
Best Regards,
Ted