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.

请教关于AM3359 Timer的问题

Other Parts Discussed in Thread: PROFIBUS, SYSBIOS

请教一个问题。

使用ICE V2子板,sysbios 6.42版本,用官网indsdk的profibus 例程。打开DMtimer时,当运行完这第段初始化后,程序就会莫名其妙的挂掉。

timer的初始化程序如下,请指导,多谢!

void profi_timer_init(void)
{
Hwi_Params hwiParams;

//This function will enable clocks for the DMTimer3 instance
DMTimer3ModuleClkConfig();

Hwi_Params_init(&hwiParams);
hwiParams.arg = SYS_INT_TINT3;
hwiParams.priority = 0;
Hwi_create(SYS_INT_TINT3,(Hwi_FuncPtr)profi_timer_isr, &hwiParams, NULL);

//Load the counter with the initial count value
DMTimerCounterSet(SOC_DMTIMER_3_REGS, (0xFFFFFFFF- 24000));

//Load the load register with the reload count value
DMTimerReloadSet(SOC_DMTIMER_3_REGS, (0xFFFFFFFF-24000));

//Configure the DMTimer for Auto-reload and no compare mode
DMTimerModeConfigure(SOC_DMTIMER_3_REGS, DMTIMER_AUTORLD_NOCMP_ENABLE);

Hwi_enableInterrupt(SYS_INT_TINT3);
DMTimerIntEnable(SOC_DMTIMER_3_REGS, DMTIMER_INT_OVF_EN_FLAG);
DMTimerEnable(SOC_DMTIMER_3_REGS);
}