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.

TMS320F2812: EVENT CAPTURE, TIMER

Part Number: TMS320F2812


Tool/software:

Dear Team,

I am working on TMS320F2812. I am getting a strange problem. Sometimes timer is getting disturbed during power ON and sometimes during running. 

Timer1 configured as PWM control for 3ph rectifier. T1CON=0x0842, T1CNT=0, T1PR=Fsw (1.2kHZ equivalent at 150MHZ clock freq). loading duty ratios in CMPR1, CMPR2, CMPR3 registers for 3ph converter control.

Timer4 configured as timer at 10kHZ or 100usec. T4CON=0x1042, T4CNT=10000, T4CMPR=2625 (equivalent to 70usec).

Now my problem is when I am toggling a GPIO at 100usec timer loop. some time it is toggling at 500usec. some times it is not at all toggling, becoming high. due to this 3ph converter PWM signals are misbehaving , due to this fault coming and my switching devices are failing. 

please help me to resolve this timer misbehaving issues. 

Thanks & Regards,

Praveen K Vemula, (DGM-R&D),

+91 9741235769.

Automoters Alliance Ltd.

Noida, India.

  • Hi Praveen,

    Are you using the CPU timer module or the ePWM module as a timer (or both)?

    Best Regards,

    Delaney

  • Hi Delaney,

    Thanks for your reply. I appreciate your quick response.

    I am using ePWM module as timer i.e GP timer.  My timer settings as below. I am not using CPU timer 0, 1, 2.

    crystal = 30MHZ, multipler=5, Clock freq=150Mhz.

    T1CON=0X0842; T1CNT=0; T1PR=62500 (i.e 1.2kHz PWM switching freq); (no interrupt service routine for this)

    T2CON=0X1142; T2CNT=0; T2PR=37500 (i.e 2kHz), T2CMPR=2625 (i.e 70usec); (served interrupt routine -- T2PINT_ISR(void) )

    T3CON=0X0842; T3CNT=0; T3PR=46875 (i.e 800Hz PWM switching freq); 

    T4CON=0X1042; T4CNT=0; T4PR=15000 (i.e 10kHz), T4CMPR=2625 (i.e 70usec); (served interrupt routine -- T4PINT_ISR(void) )

    Please help me to resolve timer hanging issue.

    Thanks,

    Praveen Vemula.

  • Hi Delaney,

    I have one more observation from testing today.

    during normal condition XCLKOUT (pin# 119) is showing 75MHZ. (where as cyrstal=30MHZ, Precaler 5x i.e System clock set to 150MHZ) .

    but during fault condition XCLKOUT is showing only 15MHZ. that is the reason why sometimes during power startup timer is showing 400Hz instead of 2kHZ.

    I dont know why this factor 5 is coming. I understand crystal is not multipled by 5 sometimes during power ON condition due to this timer is also disturbing.

    Please help out to resolve this problem. This problem is coming during power ON only some times and sometimes not.

    Thanks,

    Praveen Vemula.

  • Hi Team,

    My problem has been resolved after doing following changes in the board.

    1. pull up XPLLDISP pin

    2. pull down TRST pin.

    Thanks,

    Praveen Vemula.