Datasheet
ADAU1381
Rev. B | Page 79 of 84
Register 16582 to Register 16586 (0x40C6 to 0x40CA),
GPIO Pin Control
Bits[3:0], GPIO Pin Function
The GPIO pin control register sets the functionality of each
GPIO pin as depicted in Table 68. GPIO0 to GPIO3 use the
same pins as the serial port and must be enabled in Register
16628 (0x40F4), serial data/GPIO pin configuration. Pin 7 is
a dedicated GPIO.
The GPIO pin can be set directly by the sound engine and therefore
should be set as 1011 or 1100 (outputs set by the sound engine).
In order for GPIO0 through GPIO3 to be used, they should be
configured as 1001 or 1010 (outputs set by the I
2
C/SPI port).
There are five GPIO pin value registers that allow the input/output
data value of the GPIO pin to be written to or read directly from
the control port. The corresponding addresses are listed in Table 69.
Each value register contains four bytes and can store only one of
two values: logic high or logic low. Logic high is stored as 0x00,
0x80, 0x00, 0x00. Logic low is stored as 0x00, 0x00, 0x00, 0x00.
Table 67. GPIO Pin Control Register
Address
Decimal Hex Register Bits Description Default
16582 0x40C6 GPIO pin control [7:4] Reserved
[3:0] Dedicated GPIO (Pin 7) function (see Table 68) 1100
16583 0x40C7 GPIO0 control [7:4] Reserved
[3:0] GPIO0 pin function (see Table 68) 1100
16584 0x40C8 GPIO1 control [7:4] Reserved
[3:0] GPIO1 pin function (see Table 68) 1100
16585 0x40C9 GPIO2 control [7:4] Reserved
[3:0] GPIO2 pin function (see Table 68) 1100
16586 0x40CA GPIO3 control [7:4] Reserved
[3:0] GPIO3 pin function (see Table 68) 1100
Table 68. GPIO Pin Functions
GPIO Bits[3:0] GPIO Pin Function
0000 Input without debounce
0001 Input with debounce (0.3 ms)
0010 Input with debounce (0.6 ms)
0011 Input with debounce (0.9 ms)
0100 Input with debounce (5 ms)
0101 Input with debounce (10 ms)
0110 Input with debounce (20 ms)
0111 Input with debounce (40 ms)
1000 Input controlled by I
2
C/SPI port
1001 Output set by I
2
C/SPI port with pull-up
1010 Output set by I
2
C/SPI port without pull-up
1011 Output set by engine with pull-up
1100 Output set by engine without pull-up
1101 Reserved
1110 Output CRC error (sticky)
1111 Output watchdog error (sticky)
Register 1000 to Register 1004 (0x03E8 to 0x03EC), GPIO Pin Value
Table 69. Addresses of GPIO Pin Value Registers
Address
Decimal Hex
Register
1000 0x03E8 GPIO pin value, GPIO
1001 0x03E9 GPIO pin value, GPIO0
1002 0x03EA GPIO pin value, GPIO1
1003 0x03EB GPIO pin value, GPIO2
1004 0x03EC GPIO pin value, GPIO3