English
Language : 

PXR40RM Datasheet, PDF (778/1434 Pages) Freescale Semiconductor, Inc – PXR40 Microcontroller
Enhanced Modular Input/Output Subsystem (eMIOS200)
— When MODE[6] is set, the external clock is selected. In this case, the internal counter clears
when the match signal is asserted and the input event occurs. The channel FLAG bit is set at
the same time the counter is cleared. See Figure 23-61 and Figure 23-65.
— When MODE[6] is cleared, the internal clock source is selected. In this case, the internal
counter clears when the match signal is asserted and the prescaler tick occurs. The channel
FLAG bit is set at the same time the counter is cleared. See Figure 23-61 and Figure 23-65.
NOTE
If the internal clock source is selected and the prescaler of the internal
counter is set to 1, the MC mode behaves the same way even in Clear on
Match Start or Clear on Match End sub-modes.
When in up/down count mode (MODE = 001_01bb), a match between the internal counter and register A1
sets the FLAG and changes the counter direction from increment to decrement. A match between register
B1 and the internal counter changes the counter direction from decrement to increment and sets the FLAG
only if MODE[5] bit is set.
Only values other than 0x00_0000 must be written into register A (EMIOS_CADR). Loading 0x00_0000
leads to unpredictable results.
Updates on register A (EMIOS_CADR) or the counter in MC mode may cause a loss of match in the
current cycle if the transfer occurs near the match. In this case, the counter may roll over and resume
operation in the next cycle.
Figure 23-32 and Figure 23-33 show how the unified channel can be used as a modulus counter in up mode
and up/down mode, respectively.
MODE[4] = 0
EMIOS_CCNTR[n]
0xFFFFFF
Write
to A2
A1 Match
A1 Match
Write
to A2
A1
Match
A1 Match
0x000303
0x000200
0x000000
FLAG pin/register
A1 value1 0xxxxxxx 0x000303
0x000303
0x000303
0x000200
0x000200
Time
Notes: 1. EMIOS_CADR[n] = A1
A2 = A1 according to OU[n] bit
Figure 23-32. MC Up Mode Example
23-38
PXR40 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor