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.

CCS/TMS320F2812: TMS320F2812 Cpu_timer2 interrupt is not working

Part Number: TMS320F2812


Tool/software: Code Composer Studio

Hi sir,

Here i am using Two cputimers one is timer0 another one is timer2.

But the problem is cputimer2 interrupt is not raising. But cputimer0 interrupt is working fine.

Can anyone send sample code for cputimer2 interrupt code.

Thanks & Regards

Hari

  • Hi,

    Can you share your interrupt initiation and ISR code for better assistance.

    Thanks

    Vasudha

  • #include "DSP281x_Device.h"
    #include "stdio.h"

    #pragma CODE_SECTION(cpu_timer0_isr, "ramfuncs");
    interrupt void cpu_timer0_isr ( void );

    #pragma CODE_SECTION(INT14_ISR, "ramfuncs");
    interrupt void INT14_ISR ( void );


    void MemCopy(Uint16 *SourceAddr, Uint16* SourceEndAddr, Uint16* DestAddr);
    void InitFlash(void );

    extern Uint16 RamfuncsLoadStart;
    extern Uint16 RamfuncsLoadEnd;
    extern Uint16 RamfuncsRunStart;
    extern Uint16 PieVectTableInit;


    interrupt void cpu_timer0_isr ( void )
    {


    PieCtrlRegs.PIEACK.all |= PIEACK_GROUP1;
    }


    interrupt void INT14_ISR ( void )
    {


    StopCpuTimer2();
    }
    main()
    {
    Disable_WatchDog ( );
    InitSysCtrl ( );
    InitPeripheralClocks ( );
    InitGpio ( );
    InitSystem ( );
    InitCpuTimers ( );
    External_Interrupt_Init ( );

    ConfigCpuTimer ( &CpuTimer0 , 150 , 5000 );
    ConfigCpuTimer ( &CpuTimer2 , 150 , 6000 );

    MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
    InitFlash();

    StartCpuTimer0();

    StartCpuTimer2();

    while(1);
    }

  • Hi,

    harish hari said:
    StopCpuTimer2();

    Is the above operation intended? Is the timer2 ISR getting hit atleast once?

    Thanks

    Vasudha