# How to do a counting of a timer configured in Mplab Harmony framework?

I'm new to harmony framework, and am trying to find how i can count timer iterations, so i'm doing a simple test.

I configured the timer like this:

Now i want to know if this is the correct way:

    uint32_t teste;
{
while(1){
teste = DRV_TMR0_CounterValueGet;
printf("tmr val %d \r\n",teste);
DRV_TMR0_CounterValueSet(0);
}

break;
}


It happens that when i go see the print it's always the number 1660931680 doesn't make much sense to me, the timer is 16-bit so the maximum number should be somewhere near 65500.

What is wrong here?

You are probably getting the memory address of the DRV_TMR0_CounterValueGet function rather than the return value because you didn't call the function. You must call the function with () i.e.
teste = DRV_TMR0_CounterValueGet();
(not teste = DRV_TMR0_CounterValueGet;)