Other Parts Discussed in Thread: MSP430FR6989
Hi all,
I tried to test ESI 3 LC sensor of MCU MSP430FR5989, but the ESISTOP flag can't trigger.
Note: The source code works well with MSP430FR6989.
Please help.
//////////////////////////////////////Source
TSM_Auto_cal(); // To find the optimal timing to latch-in of the comparator output
//
Find_Noise_level(); // To find the signal noise level of each channels.
Set_DAC(); // noise level found.
// User need to switch on the motor with half-covered metal disc to finish the calibration
/////////////////////////////////
// The Initialization completed.
// Set the ESI control registers for normal operation
ESIAFE = ESIVCC2 + ESICA1INV + ESITEN; // disable AFE2;
ESITSM = ESITSMTRG1 + ESITSMTRG0 + ESIDIV3B1 + ESIDIV3A1; // ACLK divider trig for TSM sequence, Div by 50 (655Hz sampling rate)
ESIPSM = ESICNT2RST +ESICNT1RST + ESICNT0RST +ESICNT2EN +ESICNT1EN +ESICNT0EN; // ALL counters reset to zero, output TSM clock signal, enable all counters
ReCal_Flag |= BIT5; // indication for a call from InitScanIF
//////////
ESIINT2 &= ~ESIIFG5; // clear INT flag of Q6 of PSM
ESIINT1 |= ESIIE5; // enable INT of Q6
////
ESICTL |= ESIEN;
__bis_SR_register(LPM3_bits+GIE); // wait for the ESISTOP flag