I have been working on a project that uses Timer B. It was all working well, for some unknown reason the counter stopped counting. After eliminating the hardware I went back to the eval board and tried to just make Timer B count up using SMCLK. I made a simple Grace project and set the registers. Single stepping, TBR just sits at zero. This has to be something so simple but I can not find what I am missing. I am embarrassed to even ask for help with this.
This is what Grace created:
void Timer_B7_init(void)
{
/*
* TBCTL, Timer_B7 Control Register
*
* CNTL_0 -- 16-bit, TBR(max) = 0FFFFh
* TBSSEL_2 -- SMCLK
* ID_0 -- Divider - /1
* MC_1 -- Up Mode
*/
TBCTL = TBCLGRP_0 + CNTL_0 + TBSSEL_2 + ID_0 + MC_1;
}
Is there something else that's needs to be set in order to make the counter run?