Other Parts Discussed in Thread: SYSBIOS
器件型号:TDA4VMXEVM
工具/软件:TI C/C++编译器
您好:
我使用具有10秒周期的 MCU 计时器、但实际值仅为768ms、我的代码如下所示:
int main (void) { #ifdef UART_ENABLED AppUtils_Init(); #endif TimerP_Params timerParams; TimerP_Handle 计时器; /*初始化计时器参数*/ TimerP_PARAMS_INIT (&timerParams); timerParams.startMode = TimerP_StartMode_user; timerParams.periodType = TimerP_PeriodType_microsecs; timerParams.period = 10000000; timerParams.arg =空; timerParams.runMode = TimerP_RunMode_Continuous; Timer = TimerP_create (TimerP_ANY、App_TimerFxn、&timerParams); if (NULL!=定时器) { TimerP_START (定时器); } 其他 { BIOS_exit (0); } BIOS_start();/*不返回*/ return (0); } 静态空 App_TimerFxn (UARg a0) { AppUtils_printf (app_utils_print_MSG_normal、"Hello world!\r\n"); }