TI中文支持网
TI专业的中文技术问题搜集分享网站

关于28027F lab4中应用中,定时器改为其他用途是否会影响电机驱动?

void HAL_setupTimers(HAL_Handle handle,const float_t systemFreq_MHz)
{HAL_Obj  *obj = (HAL_Obj *)handle;uint32_t  timerPeriod_0p5ms = (uint32_t)(systemFreq_MHz * (float_t)500.0) - 1;uint32_t  timerPeriod_10ms = (uint32_t)(systemFreq_MHz * (float_t)10000.0) - 1;// use timer 0 for frequency diagnosticsTIMER_setDecimationFactor(obj->timerHandle[0],0);TIMER_setEmulationMode(obj->timerHandle[0],TIMER_EmulationMode_RunFree);TIMER_setPeriod(obj->timerHandle[0],timerPeriod_0p5ms);TIMER_setPreScaler(obj->timerHandle[0],0);// use timer 1 for CPU usage diagnosticsTIMER_setDecimationFactor(obj->timerHandle[1],0);TIMER_setEmulationMode(obj->timerHandle[1],TIMER_EmulationMode_RunFree);TIMER_setPeriod(obj->timerHandle[1],timerPeriod_10ms);TIMER_setPreScaler(obj->timerHandle[1],0);// use timer 2 for CPU time diagnosticsTIMER_setDecimationFactor(obj->timerHandle[2],0);TIMER_setEmulationMode(obj->timerHandle[2],TIMER_EmulationMode_RunFree);TIMER_setPeriod(obj->timerHandle[2],0xFFFFFFFF);TIMER_setPreScaler(obj->timerHandle[2],0);return;
}  // end of HAL_setupTimers() function

以上是lab4 中关于定时器的应用设置,请问如果我改为其他用途,比如计时等是否有影响电机控制?

赞(0)
未经允许不得转载:TI中文支持网 » 关于28027F lab4中应用中,定时器改为其他用途是否会影响电机驱动?
分享到: 更多 (0)