755
Chapter 36 Input Capture
7.Q&A
7. Q&A
7.1 What are the varieties of active edge polarity for external input, and how do I select
them?
The active edge polarity varieties consist of rising, falling, and both, for a total of 3, and are set using the
external input active edge selection bit (ICS01.EG[01:00]) and (ICS01:EG[11:10]), (ICS23.EG[01:00]) and
(ICS23:EG[11:10]), (ICS45.EG[01:00]) and (ICS45:EG[11:10]), (ICS67.EG[01:00]) and (ICS67:EG[11:10]).
7.2 What about setting the external input pins (ICU0-7)?
Use the port function register and extra port function bits (PFR14.x/EPFR14.x).
Remark: When setting the Extra port function register EPFR14.x to “1” the corresponding input capture macro
is internally connected to the corresponding LIN-USART macro for LIN Sync Field measurement. Hence, with
this setting the corresponding ICU channel is not available as external input.
7.3 What about interrupt-related registers?
Input capture interrupt vector and input capture interrupt level settings
The relationship between input capture number, interrupt level, and vector is explained in the following table.
For more information on interrupt level and interrupt vectors, see “Chapter 24 Interrupt Control (Page
No.311)”.
Operation
External input active edge polarity bit
(EG[01:00]), (EG[11:10])
To select rising edge Select “00”
To select falling edge Select “10”
To select both edges Select “11”
Operation Port function (PFR14.x) Extra Port function (EPFR14.x)
To set it to the external input pins (ICU0) Set PFR14.0 to “1” Set EPFR14.0 to “0”
To set it to the external input pins (ICU1) Set PFR14.1 to “1” Set EPFR14.1 to “0”
To set it to the external input pins (ICU2) Set PFR14.2 to “1” Set EPFR14.2 to “0”
To set it to the external input pins (ICU3) Set PFR14.3 to “1” Set EPFR14.3 to “0”
To set it to the external input pins (ICU4) Set PFR14.4 to “1” Set EPFR14.4 to “0”
To set it to the external input pins (ICU5) Set PFR14.5 to “1” Set EPFR14.5 to “0”
To set it to the external input pins (ICU6) Set PFR14.6 to “1” Set EPFR14.6 to “0”
To set it to the external input pins (ICU7) Set PFR14.7 to “1” Set EPFR14.7 to “0”
Number Interrupt vector (Default) Interrupt level setting bit (ICR[4:0])
Input Capture 0
#92
Address: 0FFE8Ch
Interrupt level register (ICR38)
Address: 0466h
Input Capture 1
#93
Address: 0FFE88h
Input Capture 2
#94
Address: 0FFE84h
Interrupt level register (ICR39)
Address: 0467h
Input Capture 3
#95
Address: 0FFE80h
Input Capture 4
#96
Address: 0FFE7Ch
Interrupt level register (ICR40)
Address: 0468h
Input Capture 5
#97
Address: 0FFE78h