Tool/software:
Hello
I try to implement a control function for DRV8243 and for this, I prepare a timer. But when I call the function Timer_start, the processor freezes. could you please help me.
uint8_t status;
int *ptrInteger = &gui_deviceControlUpdateTask;
//(*fun_ptr) = &gui_deviceControlUpdateTask;
Timer_Params_init(¶ms);
paramstime.periodUnits = Timer_PERIOD_HZ;
paramstime.period = 1000;
paramstime.timerMode = Timer_CONTINUOUS_CALLBACK;
paramstime.timerCallback = *ptrInteger;
handletime = Timer_open(CONFIG_TIMER_0, ¶mstime);
if (handletime == NULL) {
// Timer_open() failed
Display_printf(dispHandle, 13, 0, "drv824xInithandlefail: ");
}
status = Timer_start(handletime);
if (status == Timer_STATUS_ERROR) {
//Timer_start() failed
Display_printf(dispHandle, 14, 0, "drv824xInitfail: ");
}
//sleep(10000);
// Timer_stop(handletime);