![Freescale Semiconductor PXR4030 Скачать руководство пользователя страница 779](http://html1.mh-extra.com/html/freescale-semiconductor/pxr4030/pxr4030_reference-manual_2330660779.webp)
Enhanced Modular Input/Output Subsystem (eMIOS200)
Freescale Semiconductor
23-39
PXR40 Microcontroller Reference Manual, Rev. 1
Figure 23-33. MC Up/Down Mode Example
23.4.1.1.12
Modulus Counter Buffered (MCB) Mode
The MCB mode provides a time base that can be shared with other channels through the internal counter
buses. Register A1 is double-buffered, thus allowing smooth transitions between cycles when changing
the A2 register value on the fly. Register A1 is updated at the cycle boundary, which is defined as when
the internal counter reaches the value 0x00_0001.
The internal counter values operate within a range from 0x00_0001 up to the value of register A1 in MCB
mode. When entering MCB mode (coming out of GPIO mode), the internal counter value must be within
that range. Otherwise, the first A match will not occur, causing the channel internal counter to wrap at the
maximum counter value of 0xFF_FFFF. After the counter wrap occurs, it returns to 0x00_0001 and
resumes normal MCB mode operation. To avoid this counter wrap condition, make sure the internal
counter value is within the 0x00_0001 to A1 register value range when entering the MCB mode.
MODE[6] bit selects the internal clock source if set to 0, or external if set to 1. When the external clock is
selected, the input channel pin is used as the channel clock source. The active edge of this clock is defined
by the EDPOL and EDSEL bits in the EMIOS_CCR[
n
] channel register.
When entering MCB mode, if the up counter is selected by MODE[4] = 0, the internal counter starts
counting up from its current value until the A1 match occurs. On the next system clock cycle after the A1
match, the internal counter is set to 0x00_0001 and the FLAG bit is set to '1'.
If the up/down counter is selected by setting MODE[4] = 1, the counter changes direction at the A1 match
and counts down until it reaches 0x00_0001. After it reaches 0x00_0001, it counts up again. Register B1
is set to 0x00_0001 on entering MCB mode cannot be changed while this mode is selected. B1 is used to
generate a match to set the internal counter in up-count direction if up/down mode is selected.
The MCB mode counts between 0x00_0001 and the value in the A1 register. Only values greater than
0x00_0001 are allowed to be written to the A1 register. Loading values other than those leads to
unpredictable results. The counter cycle period is equal to A1 value in up counter mode. If in up/down
counter mode the period is defined by the expression: (2 × A1) – 2.
shows the counter cycle for several A1 values. Register A1 is loaded with the value in A2 at
the cycle boundary. Any value written to the A2 register within cycle (
n
) is updated to A1 at the next cycle
0xFFFFFF
0x000303
0x000000
EMIOS_CCNTR[n]
Time
A1 Value
1
0x000303
0x000303
0x000200
0x000200
0xxxxxxx
Notes: 1. EMIOS_CADR[n] = A1
0x000200
0x000200
FLAG Pin/Register
A2 = A1 according to OU[n] bit
MODE[4] = 1
Write
to A2
A1 Match
Write
to A2
B1 Match
(= 0)
B1 Match
(= 0)
A1 Match
Содержание PXR4030
Страница 1: ...PXR40 Microcontroller Reference Manual Devices Supported PXR4030 PXR4040 PXR40RM Rev 1 06 2011...
Страница 30: ...PXR40 Microcontroller Reference Manual Rev 1 Freescale Semiconductor xxx...
Страница 40: ...PXR40 Microcontroller Reference Manual Rev 1 xl Freescale Semiconductor...
Страница 66: ...Memory Map PXR40 Microcontroller Reference Manual Rev 1 2 4 Freescale Semiconductor...
Страница 120: ...Signal Descriptions 3 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 158: ...Power Management Controller PMC 5 26 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 182: ...Frequency Modulated Phase Locked Loop FMPLL 6 24 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 278: ...System Integration Unit SIU 7 96 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 280: ...System Information Module PXR40 Microcontroller Reference Manual Rev 1 8 2 Freescale Semiconductor...
Страница 300: ...Boot Assist Module BAM 9 20 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 346: ...Interrupts and Interrupt Controller INTC 10 46 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 352: ...General Purpose Static RAM SRAM 11 6 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 432: ...Core e200z7 Overview PXR40 Microcontroller Reference Manual Rev 1 13 44 Freescale Semiconductor...
Страница 460: ...Peripheral Bridge PBRIDGE 15 16 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 478: ...Memory Protection Unit MPU 16 18 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 496: ...Error Correction Status Module ECSM 17 18 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 524: ...Periodic Interrupt Timer PIT_RTI 20 12 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 740: ...FlexRay Communication Controller FLEXRAY 22 156 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 860: ...FlexCAN Module 24 50 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 928: ...Deserial Serial Peripheral Interface DSPI 25 68 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 982: ...Enhanced Serial Communication Interface eSCI 26 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 1114: ...Enhanced Queued Analog to Digital Converter EQADC 27 132 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 1167: ...Decimation Filter Freescale Semiconductor 28 53 PXR40 Microcontroller Reference Manual Rev 1...
Страница 1168: ...Decimation Filter 28 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 1262: ...Enhanced Time Processing Unit eTPU2 29 94 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 1399: ...Nexus Development Interface NDI Freescale Semiconductor 31 83 PXR40 Microcontroller Reference Manual Rev 1...
Страница 1400: ...Nexus Development Interface NDI 31 84 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...