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中断不起作用

Guru**** 2185635 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/890242/ccs-tms320f2812-tms320f2812-cpu_timer2-interrupt-is-not-working

器件型号:TMS320F2812

工具/软件:Code Composer Studio

您好、先生、

在这里、我使用两个 cputimers、一个是 timer0、另一个是 timer2。

但问题是 cputimer2中断没有产生。 但 cputimer0中断工作正常。

是否有人可以发送 cputimer2中断代码的示例代码。

谢谢、此致

哈里

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    您能否共享中断启动和 ISR 代码以获得更好的帮助?

    谢谢

    Vasudha

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

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

    #pragma CODE_SECTION (cpu_timer0_isr、"ramfuncs");
    中断 void cpu_timer0_isr (void);

    #pragma CODE_SECTION (INT14_ISR、"ramfuncs");
    中断 void INT14_ISR (void);


    空 Memcopy (uint16 * SourceAddr、uint16* SourceEndAddr、uint16* DestAddr);
    空 InitFlash (空);

    extern UINT16 RamfuncsLoadStart;
    extern UINT16 RamfuncsLoadEnd;
    extern UINT16 RamfuncsRunStart;
    extern UINT16 PieVectTableInit;


    中断 void cpu_timer0_isr (void)


    PieCtrlRegs.PIEACX.ALL |= PIEACK_Group1;


    中断 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);

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    [引用 user="Harish Harhari"] StopCpuTimer2();

    上述操作是否适用? timer2 ISR 是否至少命中一次?

    谢谢

    Vasudha