PDIR[n]
PFUNC[n]
0
1
Disable path for
McASP serializer, set to 1 when:
a. Configured as transmitter
b. During inactive TDM slot
c. DISMODE bit in SRCTLn
McASP serializer
data out [n]
AXRn
AHCLKR
ACLKR
AFSR
AHCLKX
ACLKX
AFSX
AMUTE
McASP I/O pins:
is 3-state
Functional Description
22.3.9.6 Pin Function Control
All McASP pins except AMUTEIN are bidirectional input/output pins. In addition, these bidirectional pins
function either as McASP or general-purpose I/O (GPIO) pins. The following registers control the pin
functions:
•
Pin function register (PFUNC): selects pin to function as McASP or GPIO.
•
Pin direction register (PDIR): selects pin to be input or output.
•
Pin data input register (PDIN): shows data input at the pin.
•
Pin data output register (PDOUT): data to be output at the pin if the pin is configured as GPIO output
(PFUNC[n] = 1 and PDIR[n] = 1). Not applicable when the pin is configured as McASP pin
(PFUNC[n] = 0).
•
Pin data set register (PDSET): alias of PDOUT. Writing a 1 to PDSET[n] sets the respective PDOUT[n]
to 1. Writing a 0 has no effect. Applicable only when the pin is configured as GPIO output
(PFUNC[n] = 1 and PDIR[n] = 1).
•
Pin data clear register (PDCLR): alias of PDOUT. Writing a 1 to PDCLR[n] clears the respective
PDOUT[n] to 0. Writing a 0 has no effect. Applicable only when the pin is configured as GPIO output
(PFUNC[n] = 1 and PDIR[n] = 1).
See the register descriptions in
for details on the mapping of each McASP pin to the register
bits.
shows the pin control block diagram.
Figure 22-25. McASP I/O Pin Control Block Diagram
22.3.9.6.1 McASP Pin Control-Transmit and Receive
You must correctly set the McASP GPIO registers PFUNC and PDIR, even when McASP pins are used
for their serial port (non-GPIO) function.
Serial port functions include:
•
Clock pins (ACLKX, ACLKR, AHCLKX, AHCLKR, AFSX, AFSR) used as clock inputs and outputs.
•
Serializer data pins (AXRn) used to transmit or receive.
•
AMUTE used as a mute output signal.
When using these pins in their serial port function, you must clear PFUNC[n] to 0 for each pin.
Also, certain outputs require PDIR[n] = 1, such as clock pins used as clock outputs, serializer data pins
used to transmit, and AMUTE used as mute output.
Clock inputs and serializers configured to receive must have PDIR[n] = 0.
PFUNC and PDIR do not control the AMUTEIN signal, it is usually tied to a device level interrupt pin
(consult device datasheet). If used as a mute input, this pin needs to be configured as an input in the
appropriate peripheral.
3798
Multichannel Audio Serial Port (McASP)
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated