wm8400 Wolfson Microelectronics plc, wm8400 Datasheet - Page 102

no-image

wm8400

Manufacturer Part Number
wm8400
Description
Wolfson Audioplustm Hi-fi Audio Codec And Power Management Unit For Mobile Multimedia
Manufacturer
Wolfson Microelectronics plc
Datasheet
WM8400
w
BUTTON CONTROL
The WM8400 GPIO supports button control detection with full status readback for up to eight inputs
(or seven inputs and one IRQ output). The GPIO and GPI signals are inputs to the CODEC Interrupt
function, with selectable enable, de-bounce and polarity control as described in Table 63 and Table
64. The associated interrupt bits are latched once set and can be polled at any time or used as
inputs to the IRQ output. See “CODEC Interrupt Event Output” for more details of the CODEC
Interrupt event handling.
The interrupt bits are latched once set; they are reset by writing a logic ‘1’ to the GPIO_STATUS
register bits in Register R18 (12h). De-bouncing is provided in order to avoid false event triggers.
Note that TOCLK must be enabled when this input de-bouncing is required. De-bouncing may be
disabled in order to allow the device to respond to wake-up events while the processor is disabled
and is unable to provide a clock for de-bouncing.
To enable button control and accessory detection, the following register settings are required:
Programmable pull-up and pull-down resistors are available on GPIO1 to GPIO6. These should be
set according to the external circuit configuration. Note that pull-up and pull-down resistors are not
available on the GPI7 and GPI8 input pins. Note that the analogue input paths to GPI7 and GPI8
must be disabled as described above when using these as digital inputs.
In this application, one or more of the GPIO pins may be configured as an Interrupt event if desired.
This is controlled by the GPIOn_IRQ_ENA bits described in Table 63. The GPIO Pin status fields
contained in the GPIO CTRL 1 Register (R18) may be read at any time or else in response to an
Interrupt event. See Table 68 for more details of the Interrupt function.
An example configuration of the button control GPIO function is illustrated in Figure 46.
Figure 46 Example of Button Control Using GPIO Pins
ALRCGPIO1 = 1 (only required if using GPIO1)
MCLK_SRC = 0 (only required if using GPIO2)
AIF_SEL = 0 (only required if using GPIO3, GPIO4 or GPIO5)
ALRCGPIO6 = 0 (only required if using GPIO6)
LMN3 = 0, LLI3LO = 0 and RLI3LO = 0 (only required if using GPI7)
RMN3 = 0, RRI3LO = 0 and LRI3RO = 0 (only required if using GPI8)
AIF_TRIS = 0
GPIOn_SEL = 0000 for each required GPIO button input
PP, April 2009, Rev 3.0
Pre-Production
102

Related parts for wm8400