I have been using the MC9S08DZ60. I need to know if there's a Gated Time Accumulator as in HC11 controllers.
The intention is : If a GPIO line goes high, a timer starts running and when the Pulse Accumulator Register overflows, the controller is driven into an interrupt service routine.
Your inputs please,.
Solved! Go to Solution.
Please see section 220.127.116.11 "Counter Overflow and Modulo Reset", an interrupt flag and enable are associated with the 16-bit main counter. The flag (TOF) is a software-accessible indication that the timer counter has overflowed. When the timer counter overflowed, if TOIE is set, then, the contoroller is driven into an interrupt service routine and TOF is set.Hope it helps!
Hi Yong Li,
I need to start or stop the Timer based on The state of Capture pin TPM1Channel1.
Please check this thread : S08 Capture Mode and Timer Queries.
Request you to help me with this.
Mods : Sorry for creating a new thread.
what you are asking for is available in every S12 and S12X device. This feature is not available in S08D.
If you could use external clock, then you could gate that external clock using external '(n)and' gate device and set up TPM to use this gated external clock. Another TPM unit could be setup to produce this external clock (one of channels in PWM mode).
I am afraid. The controller is now finalized and the custom PCB is on the way. I can not insert an external component into it.
I understand your approach, but have a question here.
On selecting the "External Source" for this timer TPM Clock Source Selection, would it not take in clock from the External Crystal?
If yes, I have a constraint. This crystal clock is the source for all other modules viz. UART, SPI, etc.
Did I mis-interpret your statement?
I meant clocking only TPM from external clock. See Fig 16-2. TPM Block diagram. TPM counter may be clocked from bus clock, from fixed system clock, or from external clock fed to TPMxCLK pin. So if you could apply externally gated external clock to TPMxCLK, this would function similar to gated pulse accumulator on HC11/S12.