Ameba-D User Manual
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
48
Table 6-5 Use audio pins as GPIO
Pin Name
Operations
PA[0] ~ PA[4], PB[28] ~ PB[31]
Enable audio LDO
Modify audio LDO voltage setting (0x4800_0344[7:1])
PA[5], PA[6]
Enable audio LDO
Modify audio LDO voltage setting (0x4800_0344[7:1])
Mute audio LINE IN
Note
: For A-Cut, the maximum AVCC can only reach to 3.064V. For B-Cut, this issue is fixed and AVCC can reach to 3.3V. The method to
configure audio LDO voltage is illustrated in Table 6-6.
Table 6-6 Audio LDO voltage setting
0x4800_0344[7:1]
AVCC
A-Cut
B-Cut
0x20
2.8V
-
0x00
3.064V
-
0x2A
-
2.8V
0x00
-
3.3V
As PA[5] and PA[6] are sharing with audio LINE IN, there exists a 30kohm pull-down resistor to GND in effect. When used as GPIO, you need to
disable the pull-down by mute audio LINE IN. The method to realize mute control is listed in Table 6-7.
Table 6-7 Mute configuration
Mute Control
Register Configuration
Mute MIC IN
Sets Audio Codec Register 0x03 bit[4], bit[6] to enable MIC IN mute by setting register 0x40010000 to
0x08500301
Mute LINE IN
Sets Audio Codec Register 0x03 bit[5], bit[7] to enable LINE IN mute by setting register 0x40010000 to
0x08A00301
Mute MIC IN and LINE IN
Sets Audio Codec Register 0x03 bit[7:4] to enable MIC IN and LINE IN mute by setting register
0x40010000 to 0x08F00301
For the QFN88 Story Machine package, in the case of both audio and SD function are used, PA[5], PA[6]are used as SD_WP/SD_CD. As the AVCC
is 2.8V, to detect the card’s inserted/removed/protected state effectively, it is suggested to add 4.7kohm pull-up resistor to AVCC.
6.3
Pin Multiplexing Function
The PAD_BIT_FUNCTION_ID field in the PADCTRL register can be set to GPIO (typically value 000) or a special function.
For pins set to GPIO, the GPIO IP registers determine whether the pin is configured as an input or an output.
For any special function, the pin direction is controlled automatically depending on the function.
The microcontroller I/O pins are connected to onboard peripherals/modules through a multiplexer that allows only one peripheral’s function
connected to an I/O pin at a time. In this way, there can be no conflict between peripherals sharing the same I/O pin.
Each I/O pin has a multiplexer with up to 32 alternate function inputs (AF0 to AF31) that can be configured through the PADCTRL register.
Realtek confidential files
SZ99iot
2019-05-15 10:08:03