#if (_MCU_ == _S12_)
void lin_lld_timer_S12_init
(
void
)
{
...
#if (defined(_MC9S12ZVML128_H) || defined(_MC9S12ZVL32_H)||defined(_MC9S12ZVHY64_H)||defined(_MC9S12ZVH128_H))
/*Configure the timer*/
// TIM0TSCR2 = 0x08; /*Timer prescaler = 32 (6.25MHZ/32 ~ 5.12[us]) */
TIM0TIOS_IOS2 = 1; /*Enable Channel 2 as Output Compare */
TIM0TIE_C2I = 1; /*Enable Channel 2 interrupt */
TIM0TC2 = (MCU_BUS_FREQ/1000000)*TIME_BASE_PERIOD;
TIM0TSCR1_TSFRZ = 1; /*Disable the timer when the MCU is in freeze mode */
TIM0TSCR1_TEN = 1; /*Enable the Timer */
#endif
...
}