DIAG_TIMER_COUNT_REF

#define DIAG_TIMER_COUNT_REF (uint16_t) ((1e0L * DIAG_TIMER_FREQ) * DIAG_PIT_INTERRUPT_PERIOD_TIME)

This is the reference value for TC count within one PIT interrupt period. Note that multiplying by 1e0L forces the preprocessor to do operations with higher precision.