![NXP Semiconductors MPC5605BK Reference Manual Download Page 705](http://html.mh-extra.com/html/nxp-semiconductors/mpc5605bk/mpc5605bk_reference-manual_1721852705.webp)
Chapter 27 Timers
MPC5606BK Microcontroller Reference Manual, Rev. 2
Freescale Semiconductor
703
Figure 27-55. Time base generation with clear on match end
27.4.5.2.2
Coherent accesses
It is highly recommended that the software waits for a new FLAG set event before start reading
EMIOSA[n] and EMIOSB[n] registers to get a new measurement. The FLAG indicates that new data has
been captured and it is the only way to assure data coherency.
The FLAG set event can be detected by polling the FLAG bit or by enabling the interrupt request or DMA
request or CTU trigger generation.
Reading the EMIOSA[n] register again in the same period of the last read of EMIOSB[n] register may lead
to incoherent results. This will occur if the last read of EMIOSB[n] register occurred after a disabled B2
to B1 transfer.
27.4.5.2.3
Channel/Modes initialization
The following basic steps summarize basic output mode startup, assuming the channels are initially in
GPIO mode:
1.
[global]
Disable Global Prescaler.
2.
[timebase channel]
Disable Channel Prescaler.
3.
[timebase channel]
Write initial value at internal counter.
4.
[timebase channel]
Set A/B register.
5.
[timebase channel]
Set channel to MC(B) Up mode.
6.
[timebase channel]
Set prescaler ratio.
7.
[timebase channel]
Enable Channel Prescaler.
8.
[output channel]
Disable Channel Prescaler.
9.
[output channel]
Set A/B register.
10.
[output channel]
Select timebase input through bits BSL[1:0].
11.
[output channel]
Enter output mode.
system clock
input event/prescaler clock enable
internal counter
match value = 3
0
1
3
2
0
PRESCALED CLOCK RATIO = 3
see note 1
Note 1: The match occurs only when the input event/prescaler clock enable is active.
Then, the internal counter is immediately cleared.
1
2
3
FLAG set event
FLAG clear
FLAG pin/register
Summary of Contents for MPC5605BK
Page 2: ...This page is intentionally left blank...
Page 20: ...MPC5606BK Microcontroller Reference Manual Rev 2 20 Freescale Semiconductor...
Page 103: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 103 Clocks and power...
Page 645: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 643 Timers...
Page 715: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 713 ADC system...
Page 787: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 787 Memory...
Page 893: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 893 Integrity...
Page 943: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 943 Debug...