Table 37-6. CMP channel decoding in functional mode and trigger mode (continued)
Mode
RRE
PSEL[
2:0]
MSEL[
2:0]
INPSE
L[1:0]
INNSE
L[1:0]
FXMP
FXMX
CH[2:0
]
CHNx
INP
INN
CMP
Behavior
x
x
1
1
0
0~7
0~7
Channel
fixed by
FXMXCH[
2:0]
Channel
sweep
(CHN
x
)
Channel 0~7
can be swept
with a fixed
channel
(0~7)
x
x
1
1
1
0~7
0~7
Channel
sweep
(CHN
x
)
Channel
fixed by
FXMXCH[
2:0]
Channel 0~7
can be swept
with a fixed
channel
(0~7)
1. "x" means "do not care".
2. PSEL should not be set the same as MSEL.
3. Channel in the sweep side should not be the same as the fixed side.
37.14 Usage Guide
37.14.1 Zero Crossing Detection
A zero-crossing is a point where the sign of a signal’s mathematical function changes
(e.g. from positive to negative), represented by a crossing of the axis (zero value) in the
graph of the signal function. It is a commonly used in electronics application especially
for systems which send digital data over AC circuits.
When in some cases, the “Zero point” could be other voltage than actual 0 V. This “Zero
point” would be used to judge whether the indicated voltage level is reached. In this
situation, the internal DAC could generate the reference voltage level for “Zero point” to
make the comparison with the other input channel of CMP module, and then output the
result of logic “0” and “1”.
To enable the internal DAC and set it as the comparator’s input of minus side, the code
could be as follow:
/* Set internal DAC as minus input. */
CMPx_C1 &= ~CMP_C1_ INNSEL_MASK;
/* Set input channel 3 as plus input. */
CMPx_C1 = (CMPx_C1 & ~(CMP_C1_ INPSEL_MASK | CMP_C1_PSEL_MASK))
| CMP_C1_INPSEL(1) | CMP_C1_PSEL(3);
Then, the CMP output interrupts with their flags would be used to indicate the event of
Zero Crossing Detection.
Usage Guide
Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018
816
NXP Semiconductors
Содержание Kinetis KE1xZ256
Страница 2: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 2 NXP Semiconductors...
Страница 56: ...SysTick Clock Configuration Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 56 NXP Semiconductors...
Страница 62: ...Interrupt channel assignments Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 62 NXP Semiconductors...
Страница 124: ...Application information Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 124 NXP Semiconductors...
Страница 130: ...Initialization application information Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 130 NXP Semiconductors...
Страница 178: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 178 NXP Semiconductors...
Страница 356: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 356 NXP Semiconductors...
Страница 368: ...Module clocks Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 368 NXP Semiconductors...
Страница 410: ...Interrupts Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 410 NXP Semiconductors...
Страница 562: ...Power supply supervisor Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 562 NXP Semiconductors...
Страница 592: ...General security features Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 592 NXP Semiconductors...
Страница 604: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 604 NXP Semiconductors...
Страница 622: ...Application Information Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 622 NXP Semiconductors...
Страница 634: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 634 NXP Semiconductors...
Страница 674: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 674 NXP Semiconductors...
Страница 690: ...Module Signal Description Tables Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 690 NXP Semiconductors...
Страница 712: ...Functional description Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 712 NXP Semiconductors...
Страница 820: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 820 NXP Semiconductors...
Страница 1030: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1030 NXP Semiconductors...
Страница 1052: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1052 NXP Semiconductors...
Страница 1066: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1066 NXP Semiconductors...
Страница 1268: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1268 NXP Semiconductors...
Страница 1314: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1314 NXP Semiconductors...
Страница 1316: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1316 NXP Semiconductors...