Hi,
I think you should enable the gated clock of TA0 and TA1 modules before you write any registers of TA0 or TA1.
SIM_PCE|=0x03; //enable both TA0 and TA1 clock.
Hope it can help you
BR
XiangJun Rong
Thank you very very much!!!
the TMR has already started.
but I have another problem.
The program can't go into the interrupt function.
My program as follow:
The intialization of TMR1 as follow:
The interrupt function as follow:
I am sorry for that you can take your time to solve my problem.
Could you help me solve it?
Thank you very much!!!
Hi,
Pls check the I0/I1 bits in SR register,I0/I1 should be cleared, check the priority bits of TWR0 located at chapter 12 Interrupt Controller (INTC), check the interrupt enable bit in TMR0_nSCTRL.
Hope it can help you
BR
XiangJun Rong
ok,thank you very very much