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.

TMS320F280049C: External interrupt comes early.

Part Number: TMS320F280049C
Other Parts Discussed in Thread: TMS320F28069F

We want to measure frequency of AC Power source. So we have taken external interrupt for ZCD ( Zero crossing detector).

The ZCD circuit give us the pulses of 10 ms. So we should get interrupt at every 10 ms of time. But some time we get interrupt in 16us and after that we got next interrupt after 20 ms.

We have observed the output of our zcd circuit in it looks fine.

Also we have tried using function generator. We have given pulses of 100Hz frequency with 50 % duty cycle to GPIO ( for us it is ZCD) of DSP. In this test we have got proper interrupt.

We have configured the interrupt as per recommended in datasheet and technical user manual.

So why we are getting improper interrupt?

  • Hi Amtech,

    Based on your description, the problem is most likely from the ZCD. You are probably occasionally experiencing an errant pulse between the 20ms pulses that re-triggers an interrupt. You will need to monitor the ZCD output on the scope over a long period and setup the scope to capture/trigger on a glitch or errant pulse.

  • Thanks for your kind reply!

    We have same circuit of ZCD on our previous board in which we have used TMS320F28069F. In that board we are getting proper external interrupt using ZCD.

    In our new board all the peripheral and schematics are same, but we have changed only DSP and change the some section firmware in which configuration for    TMS320F280049C is different from TMS320F28069F, like xbar configuration and ADC configuration.

    Also we have not observed any glitch on ouput of ZCD using Digital Oscilloscope.

  • Amtech,

    The device won't externally interrupt itself. Based on what you described, when you simulate the "ZCD output" with a function generator, everything behaves normally. However when you switch to the ZCD, you get the occasional unexpected interrupt. It seems straightforward to me that the problem is with the ZCD unless i'm misunderstanding the situation.

    Nevertheless, i have a few questions:

    1. Can you provide a scope shot of the ZCD output?

    2. Which edge are you triggering the interrupt on?

    3. Can you post the XINT and INPUTXBAR configuration code?

  • Hi Amtech,

    Can you reply to the previous query? Or if your issue is resolved, kindly let us know.

  • Hi Amtech,

    It's been a while since we heard back from you so i'm going to assume your issue is resolved and hence will be closing this thread. If that's not the case, feel free to reply or create a new thread if this one locks out due to inactivity.