//start timer with microSeconds
void Timer_Start(uint32_t microSeconds, uint32_t TotalCount)
{
//maybe some is invalib ,such TMR_PRESCALE_VALUE_4, DRV_TMR_CLKSOURCE_INTERNAL is Peripheral clock,now is 64,000,000 Hz
DRV_TMR_ClockSet(timerData.drvtimerHandle,DRV_TMR_CLKSOURCE_INTERNAL,TMR_PRESCALE_VALUE_64);
//get timer input clock frequency,100ns
uint32_t frequency = DRV_TMR_CounterFrequencyGet(timerData.drvtimerHandle);
Uart_printf("Timer 2 Frequency is : %u\n",frequency);
uint32_t us = frequency/1000000;
Uart_printf("Timer 2 half period is : %u\n",us*microSeconds);
//Set timer gap and register callback function
DRV_TMR_AlarmRegister(timerData.drvtimerHandle, us*microSeconds, true, 0, (DRV_TMR_CALLBACK)Timer_Tick_Callback);
//enable the alarm
DRV_TMR_AlarmEnable(timerData.drvtimerHandle, true);