Hello,
I have problem with TCI for rotation detection using ScanIF. I use Test cycles to inject 7 additional tests of my analog signal and check if signal is in expected boundaries. To calculate digital value of signal using comparator I use simple binary search algorithm:
// [...]
if((SIFCTL2 & 0x0001) != 0)
dac1_value += delta;
else
dac1_value -= delta;
SIFDACR6 = dac1_value;
if((SIFCTL2 & 0x0002) != 0)
dac2_value += delta;
else
dac2_value -= delta;
SIFDACR7 = dac2_value;
delta >>= 1;
if(delta == 0)
{
// end of calibration process
// dac1_value and dac2_value are my results.
}
Unfortunately During calibration process I get additional interrupts from PSM that generates false rotation counts. If I comment out these two lines everytihng is ok:
//SIFDACR6 = dac1_value;
//SIFDACR7 = dac2_value;
Above diagram shows 7 TCI during normal operation without modification of SIFDAC6/7. DBG0 - interrupt handler from ScanIF. DGB1 End of scan interrupt handler (SIFIFG1).
Above diagram shows additional counting cycles from PSM when SIFDAC6/7 are modified during 7 test cycles. Those additional cycles are in random place, on random end of scan Interrupt (picture shows only example).
DBG2 shows handler for SIFIFG3 interrupt. DBG3 is toogled when SIFDEBUG setup to 0x0001 (check current PSM state) differs from prev. That mean that real turning is detected by PSM, not only false interrupts are generated. During whole process coils are undamped and they are in stable conditions. So no state change should be done in PSM.
I use channel 0 and 1 for normal operation and SIFDAC0/1/2/3 are setup on init to constant values and not changed during whole calibration process.
Whet am I doing wrong?
Regards Maciek



