Rev. 1.10
54
November 04, 2019
Rev. 1.10
55
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
Pin-shared Function Selection Registers
The limited number of supplied pins in a package can impose restrictions on the amount of functions
a certain device can contain. However by allowing the same pins to share several different functions
and providing a means of function selection, a wide range of different functions can be incorporated
into even relatively small package sizes. The device includes Port “x” Output Function Selection
register “n”, labeled as PxSn, and Input Function Selection register, labeled as IFS, which can select
the desired functions of the multi-function pin-shared pins.
The most important point to note is to make sure that the desired pin-shared function is properly
selected and also deselected. For most pin-shared functions, to select the desired pin-shared function,
the pin-shared function should first be correctly selected using the corresponding pin-shared control
register. After that the corresponding peripheral functional setting should be configured and then
the peripheral function can be enabled. However, a special point must be noted for some digital
input pins, such as INT0, CTCK, etc., which share the same pin-shared control configuration with
their corresponding general purpose I/O functions when setting the relevant pin-shared control bit
fields. To select these pin functions, in addition to the necessary pin-shared control and peripheral
functional setup aforementioned, they must also be setup as input by setting the corresponding bit
in the I/O port control register. To correctly deselect the pin-shared function, the peripheral function
should first be disabled and then the corresponding pin-shared function control register can be
modified to select other pin-shared functions.
Register
Name
Bit
7
6
5
4
3
2
1
0
PAS0
PAS07
PAS06
—
—
PAS03
PAS02
—
—
PAS1
PAS17
PAS16
PAS15
PAS14
PAS13
PAS12
PAS11
PAS10
PBS0
PBS07
PBS06
PBS05
PBS04
PBS03
PBS02
PBS01
PBS00
PBS1
PBS17
PBS16
PBS15
PBS14
PBS13
PBS12
PBS11
PBS10
PCS0
PCS07
PCS06
PCS05
PCS04
PCS03
PCS02
PCS01
PCS00
PCS1
—
—
PCS15
PCS14
PCS13
PCS12
PCS11
PCS10
IFS
—
—
—
—
—
IFS2
IFS1
IFS0
Pin-shared Function Selection Register List
• PAS0 Register
Bit
7
6
5
4
3
2
1
0
Name
PAS07
PAS06
—
—
PAS03
PAS02
—
—
R/W
R/W
R/W
—
—
R/W
R/W
—
—
POR
0
0
—
—
0
0
—
—
Bit 7~6
PAS07~PAS06
: PA3 Pin-Shared function selection
00: PA3/CTCK/INT0
01: CTP
10: SDO/TX
11: PA3/CTCK/INT0
Bit 5~4
Unimplemented, read as “0”
Bit 3~2
PAS03~PAS02
: PA1 Pin-Shared function selection
00: PA1
01: OPA2P
10: PA1
11: PA1
Bit 1~0
Unimplemented, read as “0”