尊敬的所有人:
我有一个 TMS320C5505-eZdsp、现在 μ Timer0工作正常、我 只需修改 hGpt = GPT_open (gpt_0、&gptObj、&status);-至->hGpt = gpt_open (gpt_1、&gptObj、&status);。 但 Timer1 or timer2不起作用。 我还需要设置什么?
此致
Yudong
int Timer0Init (void)
{
CSL_Status status;
CSL_Config hwconfig;
CSL_GptObj gptObj1;
CSL_Handle hGpt1;
//打开 CSL GPT 模块*/
hGpt1 = GPT_open (gpt_4、&gptObj1、status);//
禁用 GPT (1)/GPT (0);GPT 0 = GPT 0 1//---Just here,--to--/RETO_RELET (0);禁用 GPT (GPT)/ GPT (GPT = GPT) 0)/ GPT (0) 0 * 0 = GPT (0)/ GPT (0)/IGNOT_RETO_RET (0)
/*禁用所有中断*/
IRQ_disableAll();
/*初始化中断矢量表*/
IRQ_setVecs (UINT32)(&VECSTART);
IRQ_plug (tint_event、&Timer_ISR);
IRQ_enable (tint_event);
/* Timer interval 0.5sec (2Hz)*/ rgphw_clock/0x430_prt
hwConfig.autoLoad
= 0x409600/ rgpref_gpref/dc/rgpref/dc/dcprt = 0x4096409600/ r_dec/r/ rgpref/rgpref/rgpref/rgpref/dprt = 0x409640964096_r/ r/ r/ r&ngpref/dprt = 0x409600_r/ r/ r/ rgpref/dprt
//TIM1FLAG=1;
/*配置 Timer0 *//
/hGpt = gpt_open (gpt_2、&gptObj、&status);
status = gpt_config (hGpt1、&hwconfig);
IRQ_globalEnable();
//开始计时器*/
gppt_start (hGpt1);
return CSL_test_passed;
}
中断空 Timer_isr ()
{
无符号字符 TIAFR_VAL_0;
TIAFR_VAL = CSL_SYSCTRL_REGS->TIAFR;
IRQ_CLEAR (tint_VAL =
0x02);{= 0x0002+(= 0x0001+);TIAFR+= 0x000+(0x000+)= 0x000+(0x000+)= 0x000+)