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.

Generate Interrupt in TMS320F2812

Other Parts Discussed in Thread: TMS320F2812

Hi I'm Aaron,

I'm working with eZdsp TMS320F2812 in control motrol, and my software generates an interrupt according to the Event Manager module, I mean:

PieVectTable.T1UFINT = &MainISR;

I use the underflow of timer1 to generate the interrupt each 2KHz, and I generate a pwm pulse of 1KHz period with timer3. The period is easily configurable with the instruction "pwm1.PeriodMax". The problem I found is the interrupt is not syncronized with the generation of pwm.

For this reason, I would like to generate an interrupt that could be in syncronization with the generation of pwm pulses and I don't find the way to do it. I don't know which is the way to generate interrupts by myself.

Someone could help me?

  • How are your timers configured?  What do you mean by "not synchronized"?    If your interrupt is drifting with respect to the pwm cycle, then your timer period is not set correctly. 

  • Hi Martin,

    T1 is my timer for generate an interrupt request and is programmed to 2 KHz

    T3 is my timer for generate pwm pulses of 1KHz.

    And I'm using the SVGEN_DQ module to generate the pulses.

    T1 and T2 are syncronized, but this not happens for T1 and T3.

    For this reason, the ISR is generated in different moments of T3 pwm pulses, thats I mean with "synchronized".

    I can't find an alternative way and I don't know how generate an alternative interrupt myself, is there any way to do it?

  • Hello Aaron,

    have a look at the document spru791a.pdf

    There you can find the chapter Timer-Base Counter Synchronisation. You can set the SYNC signal in your ISR so the pwm should be synchronized.

    good luck

    Eggi

  • Hi Eggi,

    Thanks for answering me, I'll read the document and I hope that solve my problems.

    Best Regards