Figure 3—The timer interface module (TIM) has three main parts: a prescaler, 16-bit counter, and capture/compare unit. Two independent channels use an I/O either as input for counting or output for signal generation.