This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F53xx+capture

Other Parts Discussed in Thread: MSP430F5329

I AM USING msP430f5329 FOR MEASURING FREQUENCY.

The input sine wave (0.7V rms, 40 to 65 HZ signal  ) is level  shifted by 1.25V DC voltage so as to make it compatible for  unipolar ADC (0-2.5VDC) vref=2.5VDC.

This input  signal is compared with 1.25V DC   for zero crossing detection  to measure frequency.  For this I am using Comparator B which selects input signal via CBIPSEL  and 1.25VDC via CBIMSEL.  Refer below diagram

The two analog signals to  be compared  are fed to comparator B which detects the falling edge and the out put is given to timer capture (Time A1 , Channel 1) internally via CCI1B.  I have set filter CBFDLY to 3600 ns. I am using Capture mode with SYS=1  and the  capture gives correct values which matches with input frequency . This continues for hours and no issue. No problem with consecutive captures . All match input period.

However, some times the same code and configuration give erratic results for frequency measurement . Whenever I experience erratic capture to confirm whether there is  a noise issue or whether comparator out put is erratic, i am configuring the code to get external  CBOUT and I find that the CBOUT waveform is absolutely stable and no noise on DCRO. If I again switch back to internal CCIB I get erratic measurement . When I analyze, each capture, some capture values match with input ,some are totally lost .

I DO NOT UNDERSTAND WHY THE SAME CODE AND SAME CIRCUIT WORKS ABSOLUTELY FINE FOR HOURS even for DAYS and some time it works ERRATICALLY.

I EVEN CHECKED THE RIPPLE OF POWER SUPPLY AND IS WITHIN  ACCEPTABLE LIMIT.

WHENEVER IT BEHAVES ERRATICALLY, I CHANGED THE COMPARATOR  OUTPUT TO CBOUT EXTERNAL SIGNAL AND FOUND THAT CBOUT IS A CLEAN SQUARE WAVE AND WITH  STABLE EDGES . TIME PERIOD IS Consistent with INPUT . THIS CONFIRMED THAT THE THERE WAS NO PROBLEM WITH COMPARATOR OUTPUT  AND THE PROBLEM IS WITH CAPTURE MODE.

 CAN ANY BODY HELP TO SOLVE THIS ?

Attached is THE COMPARTOR JPG

  • kk ss said:
    I DO NOT UNDERSTAND WHY THE SAME CODE AND SAME CIRCUIT WORKS ABSOLUTELY FINE FOR HOURS even for DAYS and some time it works ERRATICALLY.

    I don't too.

    Manly because I don't know the code. :)

**Attention** This is a public forum