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.
工具/软件: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