Hello.
I wanna run a simple timer to control timeouts, but I don´t wanna use Interrupts. I am trying to configure the register to make the timer run, but it doesn´t.
I am doing as follows:
void DL_Timer_Initial_Sb(void)
{
/* TMRA0_CTRL: CM=001,PCS=1110,SCS=0,ONCE=0,LENGTH=0,DIR=0,Co_INIT=0,OM=0 */
TMRA0_CTRL=0x3C00;
/* TMRA0_SCTRL: TCF=0,TCFIE=0,TOF=0,TOFIE=0,IEF=0,IEFIE=0,IPS=0,INPUT=0,Capture_Mode=0,MSTR=0,EEOF=0,VAL=0,FORCE=0,OPS=0,OEN=0 */
TMRA0_SCTRL=0x0000;
TMRA_ENBL=0x0001;
}
I already tried to use the exact same functions PE gives, but it just doesn´t work. PE code is to big and uses interrupts.
What´s is going wrong?
Tks a lot.
Alexandre
Solved! Go to Solution.
Hi.
Found at CPU Bean that there is a TA0 Peripheral Clock that must be set as well. It sets TA0 bit from SIM_PCE1 register, and PE does it at PE_low_level_init().
The configuration of the timer was ok, but SIM_PCE1´s TA0 bit was not set. I couldnt even find a word about it in the Quad Timer Section.
Till next!
Tks.
Hi.
Found at CPU Bean that there is a TA0 Peripheral Clock that must be set as well. It sets TA0 bit from SIM_PCE1 register, and PE does it at PE_low_level_init().
The configuration of the timer was ok, but SIM_PCE1´s TA0 bit was not set. I couldnt even find a word about it in the Quad Timer Section.
Till next!
Tks.