PIO functionalities

PIOs have a different behaviour if GPIO control is enabled or disabled in the parameter GPIO_CONFIG.

GPIO control enabled

By default, GPIO control is enabled. It allows the module to work autonomously without the need of a host processor as in a wireless speaker for example. The table below lists the functionalities that are attributed to the PIOs. Please note that when in Multipoint, PIO controls will take effect on the active link.

Command Mode General PIO Bluetooth Commands

GPIO 1

UART Equivalent

Description

VREGEN single

DISCOVERABLE ON

Audio Agent will become discoverable.

VREGEN long

if VREG_ROLE=0 nothing

if VREG_ROLE=1 POWER ON/OFF

Depends on the configuration of VREG_ROLE.

PIO_0 single

VOLUME UP

Increases volume of the current link (HFP or A2DP).

PIO_1 single

VOLUME DOWN

Decreases volume of the current link (HFP and A2DP).

PIO_2 single [#f2]_

MUSIC PLAY/PAUSE or CALL ANSWER/END

Starts playing music or stop playing music for A2DP Source and Sink. If there is an incoming HFP call it will answer the call. During an ongoing call it will end the call.

PIO_2 long [#f2]_

CALL

If HFP is enabled, it will initiate a CALL (last number redial).

PIO_4 single

MUSIC BACKWARD

Sends AVRCP instruction BACKWARD

PIO_5 single

MUSIC FORWARD

Sends AVRCP instruction FORWARD (Next track)

Note: ‘single’ is defined as any press and release that happens within 50ms. ‘long’ is defined as holding the PIO high for 1000ms. A repeated ‘long’ press will be detected if the PIO is held high for multiples of 1000ms.

Audio Enable PIO

On non-MFI builds, PIO_3 will go high during a call (active SCO) or when streaming music (A2DP). This can be used for example as an audio enable to an amplifier. This feature is not configurable.

GPIO control disabled

If PIO control is disabled PIO_0, PIO_4 and PIO_5 are used as the table below:

PIO control and indication

PIO

Type

Description

PIO_0

Output

High if Audio Agent is connected (at least one profile opened, BLE or Classic). Low if Audio Agent is not connected.

PIO_4

Output

Refers to PIO_4 config in GPIO_CONFIG.

PIO_5

Input

On a rising edge, BLE, IAP or SPP connection enter Data mode On a falling edge, exit Data mode

Restoring the default configuration

If the module boots up with PIO_0 high, the factory default configurations are restored. This allows reverting to a known and working configuration state if severe problems are encountered. It is the equivalent of using the RESTORE command.

Capacitive touch sensors

This features can be enabled or disabled with the parameter ENABLE_CAPSENSE (OFF by default). If enabled, CAPSENSE notifications are received to indicate when a change (press or release) occurs on any of the 6 pads.

Class 1 device

If CLASS_1 is enabled, PIO_0 and PIO_1 are used to control an external power amplifier (PA). The functionalities for theses PIOs are then disabled. PIO_4 can be used instead of PIO_0 to restore the default configuration.

Note that some PSKEYs need to be updated in this case. Contact IoT747 for more informations.

1

Refer to Module Datasheet for location of PIO on the module pinout.