McASP Reference Guide
McASP Reference Guide
McASP Reference Guide
Reference Guide
Preface ............................................................................................................................... 9
1 Overview ................................................................................................................. 11
1.1 Features .................................................................................................................... 12
1.2 Protocols Supported ...................................................................................................... 12
1.3 System Level Connections ............................................................................................... 13
1.4 Considerations When Using a McASP .................................................................................. 15
1.4.1 Clocks .............................................................................................................. 15
1.4.2 Data Pins .......................................................................................................... 15
1.4.3 Data Format ....................................................................................................... 15
1.4.4 Data Transfers .................................................................................................... 16
1.5 Definition of Terms ........................................................................................................ 16
1.6 TDM Format................................................................................................................. 18
1.6.1 TDM Format ....................................................................................................... 18
1.6.2 Inter-Integrated Sound (I2S) Format ........................................................................... 19
1.7 S/PDIF Coding Format .................................................................................................... 20
1.7.1 Biphase-Mark Code (BMC) ...................................................................................... 20
1.7.2 Subframe Format ................................................................................................. 21
1.7.3 Frame Format ..................................................................................................... 22
2 Architecture ............................................................................................................. 23
2.1 Overview .................................................................................................................... 24
2.2 Clock and Frame Sync Generators ..................................................................................... 24
2.2.1 Transmit Clock .................................................................................................... 26
2.2.2 Receive Clock ..................................................................................................... 27
2.2.3 Frame Sync Generator .......................................................................................... 28
2.2.4 Clocking Examples ............................................................................................... 29
2.3 Serializers .................................................................................................................. 29
2.4 Format Unit ................................................................................................................. 29
2.5 State Machine .............................................................................................................. 31
2.6 TDM Sequencer ........................................................................................................... 31
2.7 Clock Check Circuit ....................................................................................................... 31
2.8 Pin Function Control ....................................................................................................... 32
2.8.1 McASP Pin Control-Transmit and Receive .................................................................... 32
2.8.2 GPIO Pin Control ................................................................................................. 32
3 Operation ................................................................................................................ 35
3.1 Setup and Initialization .................................................................................................... 36
3.1.1 Transmit/Receive Section Initialization ........................................................................ 36
3.1.2 Separate Transmit and Receive Initialization .................................................................. 37
3.1.3 Importance of Reading Back GBLCTL ......................................................................... 38
3.1.4 Synchronous Transmit and Receive Operation (ASYNC = 0) .............................................. 38
3.1.5 Asynchronous Transmit and Receive Operation (ASYNC = 1) ............................................ 38
4 Registers ................................................................................................................. 67
4.1 Registers .................................................................................................................... 67
4.2 Peripheral Identification Register (PID).................................................................................. 70
4.3 Power Down and Emulation Management Register (PWRDEMU) ................................................. 71
4.4 Pin Function Register (PFUNC) .......................................................................................... 72
4.5 Pin Direction Register (PDIR) ............................................................................................ 74
4.6 Pin Data Output Register (PDOUT)...................................................................................... 76
4.7 Pin Data Input Register (PDIN) ........................................................................................... 78
4.8 Pin Data Set Register (PDSET) .......................................................................................... 80
4.9 Pin Data Clear Register (PDCLR)........................................................................................ 82
4.10 Global Control Register (GBLCTL)....................................................................................... 84
4.11 Audio Mute Control Register (AMUTE) .................................................................................. 86
4.12 Digital Loopback Control Register (DLBCTL) .......................................................................... 88
4.13 Digital Mode Control Register (DITCTL) ................................................................................ 89
4.14 Receiver Global Control Register (RGBLCTL) ......................................................................... 90
4.15 Receive Format Unit Bit Mask Register (RMASK) ..................................................................... 91
4.16 Receive Bit Stream Format Register (RFMT) .......................................................................... 92
4.17 Receive Frame Sync Control Register (AFSRCTL) ................................................................... 94
4.18 Receive Clock Control Register (ACLKRCTL) ......................................................................... 95
4.19 Receive High-Frequency Clock Control Register (AHCLKRCTL) ................................................... 96
List of Figures
1-1 McASP to Parallel 2-Channel DACs .................................................................................... 13
1-2 McASP to 6-Channel DAC and 2-Channel DAC ....................................................................... 14
1-3 McASP to Digital Amplifier ................................................................................................ 14
1-4 McASP as Digital Audio Encoder ....................................................................................... 14
1-5 McASP as 16 Channel Digital Processor .............................................................................. 15
1-6 Definition of Bit, Word, and Slot .......................................................................................... 16
1-7 Bit Order and Word Alignment Within a Slot Examples ............................................................... 17
1-8 Definition of Frame and Frame Sync Width ............................................................................ 18
1-9 TDM Format–6 Channel TDM Example ................................................................................. 19
1-10 TDM Format Bit Delays from Frame Sync .............................................................................. 19
1-11 Inter-Integrated Sound (I2S) Format ..................................................................................... 20
1-12 Biphase-Mark Code (BMC) ............................................................................................... 20
1-13 S/PDIF Subframe Format ................................................................................................. 21
1-14 S/PDIF Frame Format ..................................................................................................... 22
2-1 McASP Block Diagram .................................................................................................... 25
2-2 Transmit Clock Generator Block Diagram .............................................................................. 26
2-3 Receive Clock Generator Block Diagram ............................................................................... 27
2-4 Frame Sync Generator Block Diagram ................................................................................. 28
2-5 Individual Serializer and Connections Within McASP ................................................................ 29
2-6 Receive Format Unit ...................................................................................................... 30
2-7 Transmit Format Unit ...................................................................................................... 30
2-8 McASP I/O Pin Control Block Diagram ................................................................................. 33
2-9 McASP I/O Pin to Control Register Mapping ........................................................................... 33
3-1 Burst Frame Sync Mode................................................................................................... 39
3-2 Transmit DMA Event (AXEVT) Generation in TDM Time Slots ..................................................... 41
3-3 DSP Service Time Upon Transmit DMA Event (AXEVT) ............................................................. 47
3-4 DSP Service Time Upon Receive DMA Event (AREVT) .............................................................. 48
3-5 DMA Events in an Audio Example–Two Events (Scenario 1) ........................................................ 50
3-6 DMA Events in an Audio Example–Four Events (Scenario 2) ....................................................... 51
3-7 DMA Events in an Audio Example ...................................................................................... 52
3-8 Data Flow Through Transmit Format Unit, Illustrated ................................................................. 54
3-9 Data Flow Through Receive Format Unit, Illustrated .................................................................. 56
3-10 Audio Mute (AMUTE) Block Diagram ................................................................................... 58
3-11 Transmit Clock Failure Detection Circuit Block Diagram ............................................................. 62
3-12 Receive Clock Failure Detection Circuit Block Diagram .............................................................. 63
3-13 Serializers in Loopback Mode ........................................................................................... 64
4-1 Peripheral Identification Register (PID) [Offset 0h] .................................................................... 70
4-2 Power Down and Emulation Management Register (PWRDEMU) [Offset 4h] ..................................... 71
4-3 Pin Function Register (PFUNC) [Offset 10h] ........................................................................... 72
4-4 Pin Direction Register (PDIR) [Offset 14h] .............................................................................. 74
4-5 Pin Data Output Register (PDOUT) [Offset 18h] ....................................................................... 76
4-6 Pin Data Input Register (PDIN) [Offset 1Ch] ........................................................................... 78
4-7 Pin Data Set Register (PDSET) [Offset 1Ch] ........................................................................... 80
4-8 Pin Data Clear Register (PDCLR) [Offset 20h] ......................................................................... 82
4-9 Global Control Register (GBLCTL) [Offset 44h] ........................................................................ 84
4-10 Audio Mute Control Register (AMUTE) [Offset 48h] ................................................................... 86
4-11 Digital Loopback Control Register (DLBCTL) [Offset 4Ch] ........................................................... 88
4-12 Digital Mode Control Register (DITCTL) [Offset 50h] ................................................................. 89
4-13 Receiver Global Control Register (RGBLCTL) [Offset 60h] .......................................................... 90
4-14 Receive Format Unit Bit Mask Register (RMASK) [Offset 64h] ...................................................... 91
4-15 Receive Bit Stream Format Register (RFMT) [Offset 68h] ........................................................... 92
4-16 Receive Frame Sync Control Register (AFSRCTL) [Offset 6Ch] .................................................... 94
List of Tables
1-1 Biphase-Mark Encoder .................................................................................................... 21
1-2 Preamble Codes ............................................................................................................ 21
3-1 Channel Status and User Data for Each DIT Block ................................................................... 45
3-2 Transmit Bitstream Data Alignment ...................................................................................... 53
3-3 Receive Bitstream Data Alignment....................................................................................... 55
4-1 McASP Registers Accessed Through Configuration Bus ............................................................. 67
4-2 McASP Registers Accessed Through Data Port ....................................................................... 69
4-3 Peripheral Identification Register (PID) Field Descriptions ........................................................... 70
4-4 Power Down and Emulation Management Register (PWRDEMU) Field Descriptions ............................ 71
4-5 Pin Function Register (PFUNC) Field Descriptions .................................................................... 73
4-6 Pin Direction Register (PDIR) Field Descriptions ...................................................................... 75
4-7 Pin Data Output Register (PDOUT) Field Descriptions ............................................................... 77
4-8 Pin Data Input Register (PDIN) Field Descriptions .................................................................... 79
4-9 Pin Data Set Register (PDSET) Field Descriptions .................................................................... 81
4-10 Pin Data Clear Register (PDCLR) Field Descriptions ................................................................. 83
4-11 Global Control Register (GBLCTL) Field Descriptions ................................................................ 84
4-12 Audio Mute Control Register (AMUTE) Field Descriptions ........................................................... 86
4-13 Digital Loopback Control Register (DLBCTL) Field Descriptions .................................................... 88
4-14 Digital Mode Control Register (DITCTL) Field Descriptions .......................................................... 89
4-15 Receiver Global Control Register (RGBLCTL) Field Descriptions ................................................... 90
4-16 Receive Format Unit Bit Mask Register (RMASK) Field Descriptions .............................................. 91
4-17 Receive Bit Stream Format Register (RFMT) Field Descriptions .................................................... 92
4-18 Receive Frame Sync Control Register (AFSRCTL) Field Descriptions ............................................. 94
4-19 Receive Clock Control Register (ACLKRCTL) Field Descriptions ................................................... 95
4-20 Receive High-Frequency Clock Control Register (AHCLKRCTL) Field Descriptions ............................. 96
4-21 Receive TDM Time Slot Register (RTDM) Field Descriptions........................................................ 97
4-22 Receiver Interrupt Control Register (RINTCTL) Field Descriptions .................................................. 98
4-23 Receiver Status Register (RSTAT) Field Descriptions ................................................................ 99
4-24 Current Receive TDM Time Slot Registers (RSLOT) Field Descriptions .......................................... 101
4-25 Receive Clock Check Control Register (RCLKCHK) Field Descriptions .......................................... 102
4-26 Receiver DMA Event Control Register (REVTCTL) Field Descriptions............................................ 103
4-27 Transmitter Global Control Register (XGBLCTL) Field Descriptions .............................................. 104
4-28 Transmit Format Unit Bit Mask Register (XMASK) Field Descriptions ............................................ 105
4-29 Transmit Bit Stream Format Register (XFMT) Field Descriptions .................................................. 106
4-30 Transmit Frame Sync Control Register (AFSXCTL) Field Descriptions ........................................... 108
4-31 Transmit Clock Control Register (ACLKXCTL) Field Descriptions ................................................. 109
4-32 Transmit High-Frequency Clock Control Register (AHCLKXCTL) Field Descriptions ........................... 110
4-33 Transmit TDM Time Slot Register (XTDM) Field Descriptions ..................................................... 111
4-34 Transmitter Interrupt Control Register (XINTCTL) Field Descriptions ............................................. 112
4-35 Transmitter Status Register (XSTAT) Field Descriptions ............................................................ 113
4-36 Current Transmit TDM Time Slot Register (XSLOT) Field Descriptions .......................................... 115
4-37 Transmit Clock Check Control Register (XCLKCHK) Field Descriptions .......................................... 116
4-38 Transmitter DMA Event Control Register (XEVTCTL) Field Descriptions ......................................... 117
4-39 Serializer Control Registers (SRCTLn) Field Descriptions .......................................................... 118
B-1 Bits With Restrictions on When They May be Changed ............................................................. 127
C-1 Document Revision History ............................................................................................. 129
SPRU190 — TMS320C6000 DSP Peripherals Overview Reference Guide. Provides an overview and
briefly describes the peripherals available on the TMS320C6000 family of digital signal processors
(DSPs).
SPRU197 — TMS320C6000 Technical Brief. Provides an introduction to the TMS320C62x and
TMS320C67x digital signal processors (DSPs) of the TMS320C6000 DSP family. Describes the
CPU architecture, peripherals, development tools and third-party support for the C62x and C67x
DSPs.
SPRU395 — TMS320C64x Technical Overview. Provides an introduction to the TMS320C64x digital
signal processors (DSPs) of the TMS320C6000 DSP family.
SPRU198 — TMS320C6000 Programmer's Guide. Reference for programming the TMS320C6000
digital signal processors (DSPs). Before you use this manual, you should install your code
generation and debugging tools. Includes a brief description of the C6000 DSP architecture and
code development flow, includes C code examples and discusses optimization methods for the C
code, describes the structure of assembly code and includes examples and discusses optimizations
for the assembly code, and describes programming considerations for the C64x DSP.
SPRU301 — TMS320C6000 Code Composer Studio Tutorial. This tutorial introduces you to some of
the key features of Code Composer Studio. Code Composer Studio extends the capabilities of the
Code Composer Integrated Development Environment (IDE) to include full awareness of the DSP
target by the host and real-time analysis tools. This tutorial assumes that you have Code Composer
Studio, which includes the TMS320C6000 code generation tools along with the APIs and plug-ins
for both DSP/BIOS and RTDX. This manual also assumes that you have installed a target board in
your PC containing the DSP device.
SPRU273 — TMS320C6x Peripheral Support Library Programmer's Reference. Describes the
TMS320C6000 digital signal processor (DSP) peripheral support library of functions and macros.
The C6000 DSP peripheral support library is a collection of macros and functions for programming
the C6000 DSP registers and peripherals using the C programming language. This document
serves as a reference for the C programmer in creating code for the C6000 DSP.
SPRU401 — TMS320C6000 Chip Support Library API Reference Guide. Describes the TMS320C6000
chip support library (CSL) that is a set of application programming interfaces (APIs) used to
configure and control all on-chip peripherals. CSL is intended to make it easier for developers by
eliminating much of the tedious work usually needed to get algorithms up and running in a real
system.
Trademarks
TMS320C6000, C6000 are trademarks of Texas Instruments.
Overview
This chapter provides an overview of the multichannel audio serial port (McASP) in the digital signal
processors (DSPs) of the TMS320C6000™ DSP family. Included are the features of the McASP, protocols
the McASP supports, and definitions of terms used within this document.
The multichannel audio serial port (McASP) functions as a general-purpose audio serial port optimized for
the needs of multichannel audio applications. The McASP is useful for time-division multiplexed (TDM)
stream, Inter-Integrated Sound (I2S) protocols, and intercomponent digital audio interface transmission
(DIT).
The McASP consists of transmit and receive sections that may operate synchronized, or completely
independently with separate master clocks, bit clocks, and frame syncs, and using different transmit
modes with different bit-stream formats. The McASP module also includes up to 16 serializers that can be
individually enabled to either transmit or receive. In addition, all of the McASP pins can be configured as
general-purpose input/output (GPIO) pins.
1.1 Features
Features of the McASP include:
• Two independent clock generator modules for transmit and receive
– Clocking flexibility allows the McASP to receive and transmit at different rates. For example, the
McASP can receive data at 48 kHz but output up-sampled data at 96 kHz or 192 kHz.
• Independent transmit and receive modules, each includes:
– Programmable clock and frame sync generator
– TDM streams from 2 to 32, and 384 time slots
– Support for time slot sizes of 8, 12, 16, 20, 24, 28, and 32 bits
– Data formatter for bit manipulation
• Individually assignable serial data pins (up to 16 pins)
• Glueless connection to audio analog-to-digital converters (ADC), digital-to-analog converters (DAC),
codec, digital audio interface receiver (DIR), and S/PDIF transmit physical layer components
• Wide variety of I2S and similar bit-stream format
• Integrated digital audio interface transmitter (DIT) supports:
– S/PDIF, IEC60958-1, AES-3 formats
– Up to 16 transmit pins
– Enhanced channel status/user data RAM
• 384-slot TDM with external digital audio interface receiver (DIR) device
– For DIR reception, an external DIR receiver integrated circuit should be used with I2S output format
and connected to the McASP receive section.
• Extensive error checking and recovery
– Transmit underruns and receiver overruns due to the system not meeting real-time requirements
– Early or late frame sync in TDM mode
– Out-of-range high-frequency master clock for both transmit and receive
– External error signal coming into the AMUTEIN input
– DMA error due to incorrect programming
DVD
player
2-ch Amp
DAC
Stereo I2S
2-ch Amp
DAC
DVD
player
Coaxial/
optical
2-ch Amp
DAC
DVD
player
Stereo I2S PWM Digital
Coaxial/ generator amp
optical
PWM Digital
generator amp
LS, RS
2-ch ADC
2-ch ADC
2-ch ADC
2-ch ADC
C6000 DSP
2-ch ADC 8 S/PDIF
encoded
RX DIT TX outputs
2-ch ADC
2-ch ADC
2-ch ADC
2-ch ADC
1.4.1 Clocks
For each receive and transmit section:
• External or internal generated bit clock and high frequency clock?
• If internally generated, what is the bit clock speed and the high frequency clock speed?
• Clock polarity?
• External or internal generated frame sync?
• If internally generated, what is frame sync speed?
• Frame sync polarity?
• Frame sync width?
• Transmit and receive sync or asynchronous?
• Rotate?
• Mask?
Bit A bit is the smallest entity in the serial data stream. The beginning and end of each bit is marked by an edge of the
serial clock. The duration of a bit is a serial clock period. A 1 is represented by a logic high on the AXR[n] pin for the
entire duration of the bit. A 0 is represented by a logic low on the AXR[n] pin for the entire duration of the bit.
Word A word is a group of bits that make up the data being transferred between the DSP and the external device.
Figure 1-6 shows an 8-bit word.
Slot A slot consists of the bits that make up the word, and may consist of additional bits used to pad the word to a
convenient number of bits for the interface between the DSP and the external device. In Figure 1-6, the audio data
consists of only 8 bits of useful data (8-bit word), but it is padded with 4 zeros (12-bit slot) to satisfy the desired
protocol in interfacing to an external device. Within a slot, the bits may be shifted in/out of the McASP on the AXR[n]
pin either MSB or LSB first. When the word size is smaller than the slot size, the word may be aligned to the left
(beginning) of the slot or to the right (end) of the slot. The additional bits in the slot not belonging to the word may be
padded with 0, 1, or with one of the bits (the MSB or the LSB typically) from the data word. These options are shown
in Figure 1-7.
ACLK
AXR[n] b7 b6 b5 b4 b3 b2 b1 b0 P P P P
bit
word
slot
Figure 1-7. Bit Order and Word Alignment Within a Slot Examples
Time
Bit 0 1 2 3 4 5 6 7 8 9 10 11
1 0 0 0 0 1 1 1 0 0 0 0 (a) 87h as 8-bit word, 12-bit slot,
left align, MSB first, pad zeros
0 1 2 3 4 5 6 7 8 9 10 11
0 0 0 0 1 0 0 0 0 1 1 1 (b) 87h as 8-bit word, 12-bit slot,
right align, MSB first, pad zeros
0 1 2 3 4 5 6 7 8 9 10 11
1 1 1 0 0 0 0 1 0 0 0 0 (c) 87h as 8-bit word, 12-bit slot,
left align, LSB first, pad zeros
0 1 2 3 4 5 6 7 8 9 10 11
0 0 0 0 1 1 1 0 0 0 0 1 (d) 87h as 8-bit word, 12-bit slot,
right align, LSB first, pad zeros
0 1 2 3 4 5 6 7 8 9 10 11
1 0 0 0 0 1 1 1 1 1 1 1 (e) 87h as 8-bit word, 12-bit slot,
left align, MSB first, pad with bit 7
0 1 2 3 4 5 6 7 8 9 10 11
1 1 1 1 1 0 0 0 0 1 1 1 (f) 87h as 8-bit word, 12-bit slot,
right align, MSB first, pad with bit 4
0 1 2 3 4 5 6 7 8 9 10 11
1 1 1 0 0 0 0 1 1 1 1 1 (g) 87h as 8-bit word, 12-bit slot,
left align, LSB first, pad with bit 7
0 1 2 3 4 5 6 7 8 9 10 11
1 1 1 1 1 1 1 0 0 0 0 1 (h) 87h as 8-bit word, 12-bit slot,
right align, LSB first, pad with bit 4
0 1 2 3 4 5 6 7 8 9 10 11
1 1 1 0 0 0 0 0 0 0 0 0 (i) 07h as 8-bit word, 12-bit slot,
left align, LSB first, pad with bit 7
0 1 2 3 4 5 6 7 8 9 10 11
0 0 0 0 0 1 1 0 0 0 0 1 (j) 86h as 8-bit word, 12-bit slot,
right align, LSB first, pad with bit 4
8-bit word
12-bit slot
The third basic element of a synchronous serial interface is the frame synchronization signal, also referred
to as frame sync in this document.
Frame A frame contains one or multiple slots, as determined by the desired protocol. Figure 1-8 shows an example frame
of data and the frame definitions. Figure 1-8 does not specify whether the frame sync (FS) is for transmit (AFSX) or
receive (AFSR) because the definitions of terms apply to both receive and transmit interfaces. In operation, the
transmitter uses AFSX and the receiver uses AFSR. Optionally, the receiver can use AFSX as the frame sync when
the transmitter and receiver of the McASP are configured to operate synchronously.
This section only shows the generic definition of the frame sync. See Section 1.6, Section 1.7, and
Section 3.2.1 for details on the frame sync formats required for the different transfer modes and protocols
(burst mode, TDM mode and I2S format, DIT mode and S/PDIF format).
FS
Slot
Frame
(1) In this example, there are two slots in a frame, and FS duration of slot length is shown.
CLK
FS(A)
AXR[n] Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 Slot 0 Slot 1 Slot 2 Slot 3
TDM frame
A FS duration of slot is shown. FS duration of single bit is also supported.
Frame
sync(A)
Frame sync:
(B) Slot 0 Slot 1
(0 bit delay)
Frame sync:
(B) Slot 0 Slot 1
(1 bit delay)
In a typical audio system, one frame of data is transferred during each data converter sample period fs. To
support multiple channels, the choices are to either include more time slots per frame (thus operating with
a higher bit clock rate), or to use additional data pins to transfer the same number of channels (thus
operating with a slower bit clock rate).
For example, a particular six channel DAC may be designed to transfer over a single serial data pin
AXR[n] as shown in Figure 1-9. In this case the serial clock must run fast enough to transfer a total of
6 channels within each frame period. Alternatively, a similar six channel DAC may be designed to use
three serial data pins AXR[0,1,2], transferring two channels of data on each pin during each sample period
(Figure 1-11). In the latter case, if the sample period remains the same, the serial clock can run three
times slower than the former case. The McASP is flexible enough to support either type of DAC.
CLK
FS
1 0 1 1 0 0 1 0 1 1 0
Biphase
At pin mark signal
(at pin AXR[n])
1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1
Cell
Validity flag
User data
Channel status
Parity bit
(1)
Historically, preamble codes are referred to as B, M, W. For use in professional applications, preambles are referred to as Z, X,
Y, respectively.
(2)
The preamble is not BMC encoded. Each logical state is synchronized to the serial clock. These 8 logical states make up time
slots (cells) 0 to 3 in the S/PDIF stream.
Subframe 1
Subframe 2
Frame 191 Frame 1
Frame 0
Architecture
This chapter discusses the architecture of the functional units of the McASP.
2.1 Overview
Figure 2-1 shows the major blocks of the McASP. The McASP has independent receive/transmit clock
generators and frame sync generators, error-checking logic, and up to 16 serial data pins. Refer to the
device-specific data manual for the number of data pins available on your device.
All the McASP pins on the device may be individually programmed as general-purpose I/O (GPIO) if they
are not used for serial port functions.
The McASP includes the following pins:
• Serializers
– Data pins AXR[n]: Up to sixteen per McASP
• Transmit clock generator:
– AHCLKX: McASP transmit high-frequency master clock
– ACLKX: McASP transmit bit clock
• Transmit Frame Sync Generator
– AFSX: McASP transmit frame sync or left/right clock (LRCLK)
• Receive clock generator:
– AHCLKR: McASP receive high-frequency master clock
– ACLKR: McASP receive bit clock
• Receive Frame Sync Generator
– AFSR: McASP receive frame sync or left/right clock (LRCLK)
• Mute in/out:
– AMUTEIN: McASP mute input (from external device)
– AMUTE: McASP mute output
– Data pins AXR[n]
32 Transmit 32
format unit Serializer 0 AXR0
AXR1
Configuration bus (CFG)
32 Receive 32
Serializer 1
format unit
Data port (DAT)
Control Serializer n
AXRn(A)
0 0
XCLK
ACLKX 1 1
pin
CLKXP
(ACLKXCTL.7)
(polarity)
CLKXM
(internal/external)
(ACLKXCTL.5)
0 0 Divider
/1... /32
AHCLKX 1 1 CLKXDIV
pin (ACLKXCTL[4−0])
HCLKXP
(AHCLKXCTL.14)
HCLKXM
(AHCLKXCTL.15)
Divider
/1... /4096
HCLKXDIV AUXCLK
(AHLKXCTL[11−0])
Divider
AHCLKR /1... /4096 AUXCLK
pin HCLKRDIV
(AHCLKRCTL[11−0])
Divider
1 0
/1... /32
CLKRDIV
0 1
(ACLKRCTL[4−0])
HCLKRM HCLKRP
(internal/external) (polarity)
(AHCLKRCTL.15) (AHCLKRCTL.14)
1 1
1
ACLKR 0 0 RCLK
pin 0
CLKRM ASYNC
(internal/external) (ACLKXCTL.6)
(ACLKRCTL.5) XCLK
CLKRP (from Figure 2−2)
(polarity)
(ACLKRCTL.7)
FSXP
(AFSXCTL.0) FSXP
(AFSXCTL.0)
0
1 0 Internal
1 frame
0 1 sync
AFSX
pin FSXM
FSRP (internal/
(AFSRCTL.0) external)
(AFSXCTL.1)
0 0 0 Internal
1 frame
1 1 1 sync
0
AFSR FSRP
pin FSRM (AFSRCTL.0)
(internal/external)
(AFSRCTL.1)
ASYNC
(ACLKXCTL.6)
2.3 Serializers
The serializers take care of shifting serial data in and out of the McASP. Each serializer consists of a shift
register (XRSR), a data buffer (XRBUF), a control register (SRCTL), and logic to support the data
alignment options of the McASP. For each serializer, there is a dedicated serial data pin (AXR[n]) and a
dedicated control register (SRCTL[n]). The control register allows the serializer to be configured as a
transmitter, receiver, or as inactive. When configured as a transmitter the serializer shifts out data to the
serial data pin AXR[n]. When configured as a receiver, the serializer shifts in data from the AXR[n] pin.
The serializer is clocked from the transmit/receive section clock (ACLKX/ACLKR) if configured to
transmit/receive respectively.
All serializers that are configured to transmit operate in lock-step. Similarly, all serializers that are
configured to receive also operate in lock-step. This means that at most there are two zones per McASP,
one for transmit and one for receive.
Figure 2-5 shows the block diagram of the serializer and its interface to other units within the McASP.
32 32
Transmit Pin
XRBUF XRSR
format unit
32 control AXR[n] Pin
Control function
Receive
SRCTL Serializer
format unit
For receive, data is shifted in through the AXR[n] pin to the shift register XRSR. Once the entire slot of
data is collected in the XRSR, the data is copied to the data buffer XRBUF. The data is now ready to be
read by the DSP through the RBUF register, which is an alias of the XRBUF for receive. When the DSP
reads from the RBUF, the McASP passes the data from RBUF through the receive format unit and returns
the formatted data to the DSP.
For transmit, the DSP services the McASP by writing data into the XBUF register, which is an alias of the
XRBUF for transmit. The data automatically passes through the transmit format unit before actually
reaching the XRBUF register in the serializer. The data is then copied from XRBUF to XRSR, and shifted
out from the AXR[n] synchronously to the serial clock.
In DIT mode, in addition to the data, the serializer shifts out other DIT-specific information accordingly
(preamble, user data, etc.).
The serializer configuration is controlled by SRCTL[n].
Since all transmitters share the same data formatting unit, the McASP only supports one transmit format
at a time. For example, the McASP will not transmit in "I2S format" on serializer 0, while transmitting "Left
Justified" on serializer 1. Likewise, the receiver section of the McASP only supports one data format at a
time, and this format applies to all receiving serializers. However, the McASP can transmit in one format
while receiving in a completely different format.
This formatting unit consists of three stages:
• Bit mask and pad (masks off bits, performs sign extension)
• Rotate right (aligns data within word)
• Bit reversal (selects between MSB first or LSB first)
Figure 2-6 shows a block diagram of the receive formatting unit, and Figure 2-7 shows the transmit
formatting unit. Note that the order in which data flows through the three stages is different between the
transmit and receive formatting units.
32
32
32
32
32
32
Parallel load
to XRBUF[n]
Clear if write 1
AMUTE
Set if write 1
PDIN[n]
PDCLR[n]:
Writing 1 clears PDOUT[n] to 0
Writing 0 has no effect
PSET[n]:
Writing 1 sets PDOUT[n] to 1
Writing 0 has no effect
23 16
Reserved
R-0
15 14 13 12 11 10 9 8
AXR15(A) AXR14(A) AXR13(A) AXR12(A) AXR11(A) AXR10(A) AXR9(A) AXR8(A)
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
AXR7 AXR6 AXR5 AXR4 AXR3 AXR2 AXR1 AXR0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Because the PDIN register always reflects the state at the pin, you can read the PDIN register to obtain
the pin input state. To explicitly set the pin as a general-purpose input pin, you can set the registers as
follows:
• PDIR[n] = 0 (input)
• PFUNC[n] = 1 (GPIO function)
All pins default as inputs. To initialize a pin as output, you should follow this sequence:
1. PDIR[n] = 0 (default as input)
2. PFUNC[n] = 1 (GPIO function)
3. PDOUT[n] = desired output value
4. PDIR[n] = 1 (change to output after desired value is configured in PDOUT[n])
If the pin is already configured as a general-purpose output pin driving a 0, and you want to change the
output from 0 to 1, the recommended method is to use the PDSET register instead of the PDOUT
register. This is because writing to the PDSET register only affects pin(s) in concern. To change a pin
from 0 to 1:
• Set PDSET[n]. This sets the respective PDOUT[n].
If the pin is already configured as a general-purpose output pin driving a 1, and you want to change the
output from 1 to 0, the recommended method is to use the PDCLR register instead of the PDOUT
register. This is because writing to the PDCLR register only affects pin(s) in concern. To change a pin
from 1 to 0:
• Set PDCLR[n]. This clears the respective PDOUT[n].
Operation
Frame
sync
Frame sync:
(0 bit delay) Slot 0 Slot 1
Frame sync:
(1 bit delay) Slot 0 Slot 1
The control registers must be configured as follows for the burst transfer mode. The burst mode specific
bit fields are in bold face:
• PFUNC: The clock, frame, data pins must be configured for McASP function.
• PDIR: The clock, frame, data pins must be configured to the direction desired.
• PDOUT, PDIN, PDSET, PDCLR: Not applicable. Leave at default.
• GBLCTL: Follow the initialization sequence in Section 3.1.1 to configure this register.
• AMUTE: Not applicable. Leave at default.
• DLBCTL: If loopback mode is desired, configure this register according to Section 3.7, otherwise leave
this register at default.
• DITCTL: DITEN must be left at default 0 to select non-DIT mode. Leave the register at default.
• RMASK/XMASK: Mask desired bits according to Section 2.4 and Section 3.4.
• RFMT/XFMT: Program all fields according to data format desired. See Section 3.4.
• AFSRCTL/AFSXCTL: Clear RMOD/XMOD bits to 0 to indicate burst mode. Clear FRWID/FXWID bits
to 0 for single bit frame sync duration. Configure other fields as desired.
• ACLKRCTL/ACLKXCTL: Program all fields according to bit clock desired. See Section 2.2.
• AHCLKRCTL/AHCLKXCTL: Program all fields according to high-frequency clock desired. See
Section 2.2.
• RTDM/XTDM: Program RTDMS0/XTDMS0 to 1 to indicate one active slot only. Leave other fields at
default.
• RINTCTL/XINTCTL: Program all fields according to interrupts desired.
• RCLKCHK/XCLKCHK: Not applicable. Leave at default.
• SRCTLn: Program SRMOD to inactive/transmitter/receiver as desired. DISMOD is not applicable and
should be left at default.
• DITCSRA[n], DITCSRB[n], DITUDRA[n], DITUDRB[n]: Not applicable. Leave at default.
Figure 3-2. Transmit DMA Event (AXEVT) Generation in TDM Time Slots
EDMA event EDMA event EDMA event EDMA event EDMA event
for slot 0 for slot 1 for slot N − 1 for slot N for slot N + 1
EDMA event
for slot N + 2
Initialization
period(A) EDMA event EDMA event
for slot 2 for slot M
Initialization
period(A)
Active slot
Inactive slot
3.2.2.2 Special 384 Slot TDM Mode for Connection to External DIR
The McASP receiver also supports a 384 time slot TDM mode (DIR mode), to support S/PDIF, AES-3,
IEC-60958 receiver ICs whose natural block (block corresponds to McASP frame) size is 384 samples.
The advantage to using the 384 time slot TDM mode is that interrupts may be generated synchronous to
the S/PDIF, AES-3, IEC-60958, such as the last slot interrupt.
The receive TDM time slot register (RTDM) should be programmed to all 1s during reception of a DIR
block. Other TDM functionalities (for example, inactive slots) are not supported (only the slot counter
counts the 384 subframes in a block).
To receive data in the DIR mode, the following pins are typically needed:
• ACLKR - receive bit clock.
• AFSR - receive frame sync (or commonly called left/right clock). In this mode, AFSR should be
connected to a DIR which outputs a start of block signal, instead of LRCLK.
• One or more serial data pins, AXR[n], whose serializers have been configured to receive.
For this special DIR mode, the control registers can be configured just as for TDM mode, except set
RMOD in AFSRCTL to 384 to receive 384 time slots.
Table 3-1. Channel Status and User Data for Each DIT Block
Frame Subframe Preamble Channel Status defined in: User Data defined in:
Defined by DITCSRA0, DITCSRB0, DITUDRA0, DITUDRB0
0 1 (L) B DITCSRA0[0] DITUDRA0[0]
0 2 (R) W DITCSRB0[0] DITUDRB0[0]
1 1 (L) M DITCSRA0[1] DITUDRA0[1]
1 2 (R) W DITCSRB0[1] DITUDRB0[1]
2 1 (L) M DITCSRA0[2] DITUDRA0[2]
2 2 (R) W DITCSRB0[2] DITUDRB0[2]
… … … … …
31 1 (L) M DITCSRA0[31] DITUDRA0[31]
31 2 (R) W DITCSRB0[31] DITUDRB0[31]
Defined by DITCSRA1, DITCSRB1, DITUDRA1, DITUDRB1
32 1 (L) M DITCSRA1[0] DITUDRA1[0]
32 2 (R) W DITCSRB1[0] DITUDRB1[0]
… … … … …
63 1 (L) M DITCSRA1[31] DITUDRA1[31]
63 2 (R) W DITCSRB1[31] DITUDRB1[31]
Defined by DITCSRA2, DITCSRB2, DITUDRA2, DITUDRB2
64 1 (L) M DITCSRA2[0] DITUDRA2[0]
64 2 (R) W DITCSRB2[0] DITUDRB2[0]
… … … … …
95 1 (L) M DITCSRA2[31] DITUDRA2[31]
95 2 (R) W DITCSRB2[31] DITUDRB2[31]
Defined by DITCSRA3, DITCSRB3, DITUDRA3, DITUDRB3
96 1 (L) M DITCSRA3[0] DITUDRA3[0]
96 2 (R) W DITCSRB3[0] DITUDRB3[0]
… … … … …
127 1 (L) M DITCSRA3[31] DITUDRA3[31]
127 2 (R) W DITCSRB3[31] DITUDRB3[31]
Defined by DITCSRA4, DITCSRB4, DITUDRA4, DITUDRB4
128 1 (L) M DITCSRA4[0] DITUDRA4[0]
128 2 (R) W DITCSRB4[0] DITUDRB4[0]
… … … … …
159 1 (L) M DITCSRA4[31] DITUDRA4[31]
159 2 (R) W DITCSRB4[31] DITUDRB4[31]
Defined by DITCSRA5, DITCSRB5, DITUDRA5, DITUDRB5
160 1 (L) M DITCSRA5[0] DITUDRA5[0]
160 2 (R) W DITCSRB5[0] DITUDRB5[0]
… … … … …
191 1 (L) M DITCSRA5[31] DITUDRA5[31]
191 2 (R) W DITCSRB5[31] DITUDRB5[31]
Figure 3-3. DSP Service Time Upon Transmit DMA Event (AXEVT)
Time slot
N ACLKX cycles (N=number of bits in slot)
ACLKX
AXEVT
A Refer to the device-specific data manual for the McASP system clock source. This is not the same as AUXCLK. For
example, the C6713 DSP uses SYSCLK2 as the McASP system clock source.
Example 3-1. DSP Service Time Calculation for Transmit DMA Event (AXEVT)
The following is an example to show how to calculate DSP Service Time. Assume the following setup:
• Device: C6713 DSP at 300 MHZ
• McASP transmits in I2S format at 192 kHz frame rate. Assume slot size is 32 bit
With the above setup, we obtain the following parameters corresponding to Figure 3-3:
• Calculation of McASP system clock cycle:
– C6713 DSP uses SYSCLK2 as the McASP system clock. It runs at 150 MHZ (half of device
frequency)
– Therefore, McASP system clock cycle = 1/150 MHZ = 6.7 ns
• Calculation of ACLKX clock cycle:
– This example has two 32-bit slots per frame, for a total of 64 bits per frame
– ACLKX clock cycle is (1/192 kHz)/64 = 81.4 ns
• Time Slot between AXEVT events:
– For I2S format, McASP generates two AXEVT events per 192 kHz frame
– Therefore, Time Slot between AXEVT events is (1/192 kHz)/2 = 2604 ns
• AXEVT Latency
= 5 McASP system clocks
= 6.7 ns × 5 = 33.5 ns
• Setup Time
= 3 McASP system clocks + 4 ACLKX cycles
= (6.7 ns × 3) + (81.4 ns × 4)
= 345.7 ns
• DSP Service Time
= Time Slot - AXEVT Latency - Setup Time
= 2604 ns - 33.5 ns - 345.7 ns
= 2225 ns
Figure 3-4. DSP Service Time Upon Receive DMA Event (AREVT)
Time slot
N ACLKR cycles (N=number of bits in slot)
McASP latches McASP latches
last bit of Word A last bit of Word B
ACLKR
AREVT
A Refer to the device-specific data manual for the McASP system clock source. This is not the same as AUXCLK. For
example, the C6713 DSP uses SYSCLK2 as the McASP system clock source.
CAUTION
To perform internal transfers through the data port, clear XBUSEL/RBUSEL bit
to 0 in the respective XFMT/RFMT registers. Failure to do so will result in
software malfunction.
Typically, you will access the McASP XRBUF registers through the data port. To access through the data
port, simply have the CPU or DMA access the XRBUF through its data port location. Refer to the
device-specific data manual for the exact memory address. Through the data port, the DMA/CPU can
service all the serializers through a single address. The McASP automatically cycles through the
appropriate serializers.
For transmit operations through the data port, the DMA/CPU should write to the same XBUF data port
address to service all of the active transmit serializers. In addition, the DMA/CPU should write to the XBUF
for all active transmit serializers in incremental (although not necessarily consecutive) order. For example,
if serializers 0, 4, 5, and 7 are set up as active transmitters, the DMA/CPU should write to the XBUF data
port address four times with data for serializers 0, 4, 5, and 7 upon each transmit data ready event. This
exact servicing order must be followed so that data appears in the appropriate serializers.
Similarly, for receive operations through the data port, the DMA/CPU should read from the same RBUF
data port address to service all of the active receive serializers. In addition, reads from the active receive
serializers through the data port return data in incremental (although not necessarily consecutive) order.
For example, if serializers 1, 2, 3, and 6 are set up as active receivers, the DMA/CPU should read from
the RBUF data port address four times to obtain data for serializers 1, 2, 3, and 6 in this exact order, upon
each receive data ready event.
When transmitting, the DMA/CPU must write data to each serializer configured as "active" and "transmit"
within each time slot. Failure to do so results in a buffer underrun condition (Section 3.6.2). Similarly, when
receiving, data must be read from each serializer configured as "active" and "receive" within each time
slot. Failure to do results in a buffer overrun condition (Section 3.6.3).
To perform internal transfers through the data port, clear XBUSEL/RBUSEL bit to 0 in the respective
XFMT/RFMT registers.
CAUTION
To perform internal transfers through the configuration bus, set
XBUSEL/RBUSEL bit to 1 in the respective XFMT/RFMT registers. Failure to
do so will result in software malfunction.
In this method, the DMA/CPU accesses the XRBUF registers through the configuration bus address. The
exact XRBUF register address for any particular serializer is determined by adding the offset for that
particular serializer to the base address for the particular McASP (found in the device-specific data
manual). XRBUF for the serializers configured as transmitters is given the name XBUFn. For example, the
XRBUF associated with transmit serializer 2 is named XBUF2. Similarly, XRBUF for the serializers
configured as receivers is given the name RBUFn.
Accessing the XRBUF registers through the data port is different because the CPU/DMA only needs to
access one single address. When accessing through the configuration bus, the CPU/DMA must provide
the exact XBUFn or RBUFn address for each access.
When transmitting, DMA/CPU must write data to each serializer configured as "active" and "transmit"
within each time slot. Failure to do so results in a buffer underrun condition (Section 3.6.2). Similarly when
receiving, data must be read from each serializer configured as "active" and "receive" within each time
slot. Failure to do results in a buffer overrun condition (Section 3.6.3).
To perform internal transfers through the configuration bus, set XBUSEL/RBUSEL bit to 1 in the
respective XFMT/RFMT registers.
Note: Check the device-specific data manual to see if AXEVTO/AREVTO and AXEVTE/AREVTE
are supported. These are optional.
Figure 3-5 and Figure 3-6 show an example audio system with six audio channels (LF, RF, LS, RS, C,
and LFE) transmitted from three AXR[n] pins on the McASP. Figure 3-5 and Figure 3-6 show when events
AXEVT, AXEVTO, and AXEVTE are triggered. Figure 3-5 and Figure 3-6 also apply for the receive audio
channels and show when events AREVT, AREVTO, and AREVTE are triggered.
CLK
FS
CLK
FS
You can either use the DMA to service the McASP upon events AXEVT and AREVT (Figure 3-5) or upon
events AXEVTO, AREVTO, AXEVTE, and AREVTE (Figure 3-6).
In scenario 1 (Figure 3-5), a DMA event AXEVT/AREVT is triggered on each time slot. In the example,
AXEVT is triggered for each of the transmit audio channel time slot (Time slot for channels LF, LS, and C;
and time slot for channels RF, RS, LFE). Similarly, AREVT is triggered for each of the receive audio
channel time slot. Scenario 1 allows for the use of a single DMA to transmit all audio channels, and a
single DMA to receive all audio channels.
In scenario 2 (Figure 3-6), two alternating DMA events are triggered for each time slot. In the example,
AXEVTE (even) is triggered for the time slot for the even audio channels (LF, LS, C) and AXEVTO (odd)
is triggered for the time slot for the odd audio channels (RF, RS, LFE). AXEVTO and AXEVTE alternate in
time. The same is true in the receive direction with the use of AREVTO and AREVTE. This scenario
allows for the use of two DMA channels (odd and even) to transmit all audio channels, and two DMA
channels to receive all audio channels.
Appendix B shows example EDMA implementations of scenario 1 and scenario 2.
Here are some guidelines on using the different DMA events:
• Either use AXEVT, or the combination of AXEVTO and AXEVTE, to service the McASP. Never use all
three at the same time. Similarly for receive, either use AREVT, or the combination of AREVTO and
AREVTE.
• The McASP generates transmit DMA events independently from receive DMA events; therefore,
separate schemes can be used for transmit and receive DMA. For example, scenario 1 could be used
for the transmit data (AXEVT) and scenario 2 could be used for the receive data (AREVTO, AREVTE),
and conversely.
Note the difference between DMA event generation and the CPU interrupt generation. DMA events are
generated automatically upon data ready; whereas CPU interrupt generation needs to be enabled in the
XINTCTL/RINTCTL register.
In Figure 3-6, scenario 2, each transmit DMA request is for data in the next time slot, while each receive
DMA request is for data in the previous time slot. For example, Figure 3-7 shows a circled AXEVTE event
for an even time slot transmit DMA request. The transmitter always requests a DMA transfer for data it will
need to transmit during the next time slot. So, in this example, the circled event AXEVTE is a request for
data for samples LF2, LS2, and C2.
On the other hand, the circled AREVTE event is an even time slot receive DMA request. The receiver
always requests a DMA transfer for data it received during the previous time slot. In this example, the
circled event AREVTE is a request for samples LF1, LS1, and C1.
CLK
FS 0 1 0 1 0
AXEVTE
Transmit AXEVTO AXEVTO AXEVTE AXEVTO
AREVTE
Receive AREVTO AREVTO AREVTE AREVTO
3.4 Formatter
(1)
WORD = Word size rounded up to the nearest multiple of 4; SLOT = slot size; % = modulo operator
(2)
To transmit in I2S format, use MSB first, left aligned, and also select XDATDLY = 01 (1 bit delay)
Data flow
XROT = 0 XROT = WORD
M, M-1, ... L P ... P M, M-1, ... L P ... P
XRVRS = 1 (reverse) XRVRS = 1 (reverse)
P ... P L, ... M-1, M P ... P L, ...M-1, M
Data flow
XROT = SLOT - WORD XROT = SLOT
P...P M, M-1, ... L P...P P...P M, M-1, ... L P...P
XRVRS = 1 (reverse) XRVRS = 1 (reverse)
P...P L, ... M-1, M, P...P P...P L, ...M-1, M, P...P
Data flow
Data flow
(1)
WORD = Word size rounded up to the nearest multiple of 4; SLOT = slot size; % = modulo operator
(2)
To transmit in I2S format, select MSB first, left aligned, and also select RDATDLY = 01 (1 bit delay)
Data flow
RRVRS = 1 (reverse) RRVRS = 1 (reverse)
P...P L, ... M-1, M, P...P P...P L, ... M-1, M, P...P
Data flow
RRVRS = 1 (reverse) RRVRS = 1 (reverse)
L, M-1, ... M P ... P L, M-1, ... M P ... P
Data flow
Data flow
3.5 Interrupts
1
AMUTEIN
pin 0
AMUTEIN pin
allows chaining of
errors detected INEN (AMUTE.3)
by external device ROVRN (AMUTE.5)
(DIR) with
ROVRN (RSTAT.0)
internally detected
errors XUNDRN (AMUTE.6)
XUNDRN (XSTAT.0)
RSYNCERR (AMUTE.7)
RSYNCERR (RSTAT.1)
XSYNCERR (AMUTE.8)
OR
XSYNCERR (XSTAT.1)
RCKFAIL (AMUTE.9)
RCKFAIL (RSTAT.2)
XCKFAIL (AMUTE.10)
XCKFAIL (XSTAT.2)
RDMAERR (AMUTE.11)
RDMAERR (RSTAT.7)
XDMAERR (AMUTE.12)
XDMAERR (XSTAT.7)
2. Late: A late unexpected frame sync occurs when there is a gap or delay between the last bit of the
previous frame and the first bit of the next frame. When a late unexpected frame sync occurs (as soon
as the gap is detected):
• Error interrupt flag is set (XSYNCERR, if an unexpected transmit frame sync occurs; RSYNCERR,
if an unexpected receive frame sync occurs).
• Resynchronization occurs upon the arrival of the next frame sync.
Late frame sync is detected the same way in both burst mode and TDM mode; however, in burst mode,
late frame sync is not meaningful and its interrupt enable should not be set.
In order for the transmit clock failure check circuit to operate correctly, the high-frequency serial clock
divider must be taken out of reset regardless if AHCLKX is internally generated or externally sourced.
Clear
McASP Prescale 8−bit
system /1 to counter
clock(A) /256
Count
8
4
XCLKCHK[3−0] Load
XPS XCLKCHK[31−24]
XCNT
8
XCLKCHK[15−8] 8 True
XCNT<XMIN?
XMIN
Set XSTAT.2 Interrupt
OR mute
XCKFAIL
XCLKCHK[23−16] 8 True
Counter>XMAX?
XMAX Switch to internal
AND AHCLKX1
8 reset McASP
transmitter,
XCLKCHK.7 enter underrun
XCKFAILSW (D15 mode only)
send BMC 0’s
when clock is bad
external
A Refer to device data manual for the McASP system clock source. This is not the same as AUXCLK.
Clear
McASP Prescale 8−bit
system /1 to counter
clock(A) /256
Count
8
4
RCLKCHK[3−0] Load
RPS RCLKCHK[31−24]
RCNT
8
RCLKCHK[15−8] 8 True
RCNT<RMIN?
RMIN
Set RSTAT.2 Interrupt
OR mute
RCKFAIL
RCLKCHK[23−16] 8 True
Counter>RMAX?
RMAX
A Refer to device data manual for the McASP system clock source. This is not the same as AUXCLK.
Registers
4.1 Registers
Control registers for the McASP are summarized in Table 4-1. The control registers are accessed through
the configuration bus of the device. The receive buffer registers (RBUF) and transmit buffer registers
(XBUF) can also be accessed through the data port of the device, as listed in Table 4-2. See the
device-specific data manual for the memory address of these registers.
15 8 7 0
CLASS REV
R-01h R-x(B)
A If writing to this field, always write the default value for future device compatibility.
B See the device-specific data manual for the default value of this field.
Figure 4-2. Power Down and Emulation Management Register (PWRDEMU) [Offset 4h]
31 16
Reserved(A)
R-0
15 1 0
Reserved(A) FREE
R-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-4. Power Down and Emulation Management Register (PWRDEMU) Field Descriptions
Bit Field Value Description
31-1 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
0 FREE Free-running mode enable bit. This bit determines the state of the serial port clock during emulation
halt.
0 Reserved.
1 Free-running mode is enabled. Peripheral ignores the emulation suspend signal and continues to
function as normal. During emulation suspend, DMA requests continue to be generated and are
serviced by the DMA. Error conditions are flagged as usual.
CAUTION
Writing to Reserved Bits
Writing a value other than 0 to reserved bits in this register may cause improper
device operation. This includes bits that are not implemented on a particular
DSP.
23 16
Reserved(A)
R-0
15 14 13 12 11 10 9 8
AXR15(B) AXR14(B) AXR13(B) AXR12(B) AXR11(B) AXR10(B) AXR9(B) AXR8(B)
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
AXR7 AXR6 AXR5 AXR4 AXR3 AXR2 AXR1 AXR0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
B On DA6x DSP only; reserved on C6713 DSP.
CAUTION
Writing to Reserved Bits
Writing a value other than 0 to reserved bits in this register may cause improper
device operation. This includes bits that are not implemented on a particular
DSP.
23 16
Reserved(A)
R-0
15 14 13 12 11 10 9 8
(B) (B) (B) (B) (B) (B) (B)
AXR15 AXR14 AXR13 AXR12 AXR11 AXR10 AXR9 AXR8(B)
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
AXR7 AXR6 AXR5 AXR4 AXR3 AXR2 AXR1 AXR0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
B On DA6x DSP only; reserved on C6713 DSP.
CAUTION
Writing to Reserved Bits
Writing a value other than 0 to reserved bits in this register may cause improper
device operation. This includes bits that are not implemented on a particular
DSP.
23 16
Reserved(A)
R-0
15 14 13 12 11 10 9 8
(B) (B) (B) (B) (B) (B) (B)
AXR15 AXR14 AXR13 AXR12 AXR11 AXR10 AXR9 AXR8(B)
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
AXR7 AXR6 AXR5 AXR4 AXR3 AXR2 AXR1 AXR0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
B On DA6x DSP only; reserved on C6713 DSP.
CAUTION
Writing to Reserved Bits
Writing a value other than 0 to reserved bits in this register may cause improper
device operation. This includes bits that are not implemented on a particular
DSP.
23 16
Reserved(A)
R-0
15 14 13 12 11 10 9 8
(B) (B) (B) (B) (B) (B) (B)
AXR15 AXR14 AXR13 AXR12 AXR11 AXR10 AXR9 AXR8(B)
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
AXR7 AXR6 AXR5 AXR4 AXR3 AXR2 AXR1 AXR0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
B On DA6x DSP only; reserved on C6713 DSP.
CAUTION
Writing to Reserved Bits
Writing a value other than 0 to reserved bits in this register may cause improper
device operation. This includes bits that are not implemented on a particular
DSP.
23 16
Reserved(A)
R-0
15 14 13 12 11 10 9 8
(B) (B) (B) (B) (B) (B) (B)
AXR15 AXR14 AXR13 AXR12 AXR11 AXR10 AXR9 AXR8(B)
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
AXR7 AXR6 AXR5 AXR4 AXR3 AXR2 AXR1 AXR0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
B On DA6x DSP only; reserved on C6713 DSP.
CAUTION
Writing to Reserved Bits
Writing a value other than 0 to reserved bits in this register may cause improper
device operation. This includes bits that are not implemented on a particular
DSP.
23 16
Reserved(A)
R-0
15 14 13 12 11 10 9 8
(B) (B) (B) (B) (B) (B) (B)
AXR15 AXR14 AXR13 AXR12 AXR11 AXR10 AXR9 AXR8(B)
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
AXR7 AXR6 AXR5 AXR4 AXR3 AXR2 AXR1 AXR0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
B On DA6x DSP only; reserved on C6713 DSP.
15 13 12 11 10 9 8
Reserved(A) XFRST XSMRST XSRCLR XHCLKRST XCLKRST
R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 5 4 3 2 1 0
(A)
Reserved RFRST RSMRST RSRCLR RHCLKRST RCLKRST
R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
15 13 12 11 10 9 8
(A)
Reserved XDMAERR RDMAERR XCKFAIL RCKFAIL XSYNCERR
R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
RSYNCERR XUNDRN ROVRN INSTAT INEN INPOL MUTEN
R/W-0 R/W-0 R/W-0 R-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-12. Audio Mute Control Register (AMUTE) Field Descriptions (continued)
Bit Field Value Description
6 XUNDRN If transmit underrun error (XUNDRN), drive AMUTE active enable bit.
0 Drive is disabled. Detection of transmit underrun error is ignored by AMUTE.
1 Drive is enabled (active). Upon detection of transmit underrun error, AMUTE is active and is driven
according to MUTEN bit.
5 ROVRN If receiver overrun error (ROVRN), drive AMUTE active enable bit.
0 Drive is disabled. Detection of receiver overrun error is ignored by AMUTE.
1 Drive is enabled (active). Upon detection of receiver overrun error, AMUTE is active and is driven
according to MUTEN bit.
4 INSTAT Determines drive on AXR[n] pin when PFUNC[n] and PDIR[n] bits are set to 1.
0 AMUTEIN pin is inactive.
1 AMUTEIN pin is active. Audio mute in error is detected.
3 INEN Drive AMUTE active when AMUTEIN error is active (INSTAT = 1).
0 Drive is disabled. AMUTEIN is ignored by AMUTE.
1 Drive is enabled (active). INSTAT = 1 drives AMUTE active.
2 INPOL Audio mute in (AMUTEIN) polarity select bit.
0 Polarity is active high. A high on AMUTEIN sets INSTAT to 1.
1 Polarity is active low. A low on AMUTEIN sets INSTAT to 1.
1-0 MUTEN 0-3h AMUTE pin enable bit (unless overridden by GPIO registers).
0 AMUTE pin is disabled, pin goes to tri-state condition.
1h AMUTE pin is driven high if error is detected.
2h AMUTE pin is driven low if error is detected.
3h Reserved
15 4 3 2 1 0
Reserved(A) MODE ORD DLBEN
R-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
15 4 3 2 1 0
Reserved(A) VB VA Rsvd(A) DITEN
R-0 R/W-0 R/W-0 R-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
15 13 12 11 10 9 8
Reserved(A) XFRST XSMRST XSRCLR XHCLKRST XCLKRST
R-0 R-0 R-0 R-0 R-0 R-0
7 5 4 3 2 1 0
Reserved(A) RFRST RSMRST RSRCLR RHCLKRST RCLKRST
R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-15. Receiver Global Control Register (RGBLCTL) Field Descriptions (continued)
Bit Field Value Description
0 RCLKRST Receive clock divider reset enable bit. A write to this bit affects the RCLKRST bit of GBLCTL.
0 Receive clock divider is held in reset.
1 Receive clock divider is running.
Figure 4-14. Receive Format Unit Bit Mask Register (RMASK) [Offset 64h]
31 30 29 28 27 26 25 24
RMASK31 RMASK30 RMASK29 RMASK28 RMASK27 RMASK26 RMASK25 RMASK24
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
23 22 21 20 19 18 17 16
RMASK23 RMASK22 RMASK21 RMASK20 RMASK19 RMASK18 RMASK17 RMASK16
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
15 14 13 12 11 10 9 8
RMASK15 RMASK14 RMASK13 RMASK12 RMASK11 RMASK10 RMASK9 RMASK8
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
RMASK7 RMASK6 RMASK5 RMASK4 RMASK3 RMASK2 RMASK1 RMASK0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Table 4-16. Receive Format Unit Bit Mask Register (RMASK) Field Descriptions
Bit Field Value Description
31-0 RMASK[31-0] Receive data mask enable bit.
0 Corresponding bit of receive data (after passing through reverse and rotate units) is masked out
and then padded with the selected bit pad value (RPAD and RPBIT bits in RFMT).
1 Corresponding bit of receive data (after passing through reverse and rotate units) is returned to
CPU or DMA.
Figure 4-15. Receive Bit Stream Format Register (RFMT) [Offset 68h]
31 18 17 16
Reserved(A) RDATDLY
R-0 R/W-0
15 14 13 12 8 7 4 3 2 0
RRVRS RPAD RPBIT RSSZ RBUSEL RROT
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-17. Receive Bit Stream Format Register (RFMT) Field Descriptions
Bit Field Value Description
31-18 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
17-16 RDATDLY 0-3h Receive bit delay.
0 0-bit delay. The first receive data bit, AXR[n], occurs in same ACLKR cycle as the receive frame sync
(AFSR).
1h 1-bit delay. The first receive data bit, AXR[n], occurs one ACLKR cycle after the receive frame sync
(AFSR).
2h 2-bit delay. The first receive data bit, AXR[n], occurs two ACLKR cycles after the receive frame sync
(AFSR).
3h Reserved.
15 RRVRS Receive serial bitstream order.
0 Bitstream is LSB first. No bit reversal is performed in receive format bit reverse unit.
1 Bitstream is MSB first. Bit reversal is performed in receive format bit reverse unit.
14-13 RPAD 0-3h Pad value for extra bits in slot not belonging to the word. This field only applies to bits when RMASK[n]
= 0.
0 Pad extra bits with 0.
1h Pad extra bits with 1.
2h Pad extra bits with one of the bits from the word as specified by RPBIT bits.
3h Reserved.
12-8 RPBIT 0-1Fh RPBIT value determines which bit (as read by the CPU or DMA from RBUF[n]) is used to pad the extra
bits. This field only applies when RPAD = 2h.
0 Pad with bit 0 value.
1h-1Fh Pad with bit 1 to bit 31 value.
Table 4-17. Receive Bit Stream Format Register (RFMT) Field Descriptions (continued)
Bit Field Value Description
7-4 RSSZ 0-Fh Receive slot size.
0-2h Reserved
3h Slot size is 8 bits.
4h Reserved
5h Slot size is 12 bits.
6h Reserved
7h Slot size is 16 bits.
8h Reserved
9h Slot size is 20 bits.
Ah Reserved
Bh Slot size is 24 bits
Ch Reserved
Dh Slot size is 28 bits.
Eh Reserved
Fh Slot size is 32 bits.
3 RBUSEL Selects whether reads from serializer buffer XRBUF[n] originate from the configuration bus (CFG) or the
data (DAT) port.
0 Reads from XRBUF[n] originate on data port. Reads from XRBUF[n] on configuration bus are ignored.
1 Reads from XRBUF[n] originate on configuration bus. Reads from XRBUF[n] on data port are ignored.
2-0 RROT 0-7h Right-rotation value for receive rotate right format unit.
0 Rotate right by 0 (no rotation).
1h Rotate right by 4 bit positions.
2h Rotate right by 8 bit positions.
3h Rotate right by 12 bit positions.
4h Rotate right by 16 bit positions.
5h Rotate right by 20 bit positions.
6h Rotate right by 24 bit positions.
7h Rotate right by 28 bit positions.
Figure 4-16. Receive Frame Sync Control Register (AFSRCTL) [Offset 6Ch]
31 16
Reserved(A)
R-0
15 7 6 5 4 3 2 1 0
RMOD Reserved(A) FRWID Reserved(A) FSRM FSRP
R/W-0 R-0 R/W-0 R-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-18. Receive Frame Sync Control Register (AFSRCTL) Field Descriptions
Bit Field Value Description
31-16 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
15-7 RMOD 0-1FFh Receive frame sync mode select bits.
0 Burst mode
1h Reserved
2h-20h 2-slot TDM (I2S mode) to 32-slot TDM
21h-17Fh Reserved
180h 384-slot TDM (external DIR IC inputting 384-slot DIR frames to McASP over I2S interface)
181h-1FFh Reserved
6-5 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
4 FRWID Receive frame sync width select bit indicates the width of the receive frame sync (AFSR) during its
active period.
0 Single bit
1 Single word
3-2 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
1 FSRM Receive frame sync generation select bit.
0 Externally-generated receive frame sync
1 Internally-generated receive frame sync
0 FSRP Receive frame sync polarity select bit.
0 A rising edge on receive frame sync (AFSR) indicates the beginning of a frame.
1 A falling edge on receive frame sync (AFSR) indicates the beginning of a frame.
15 8 7 6 5 4 0
Reserved(A) CLKRP Rsvd(A) CLKRM CLKRDIV
R-0 R/W-0 R-0 R/W-1 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Figure 4-18. Receive High-Frequency Clock Control Register (AHCLKRCTL) [Offset 74h]
31 16
Reserved(A)
R-0
15 14 13 12 11 0
(A)
HCLKRM HCLKRP Reserved HCLKRDIV
R/W-1 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-20. Receive High-Frequency Clock Control Register (AHCLKRCTL) Field Descriptions
Bit Field Value Description
31-16 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
15 HCLKRM Receive high-frequency clock source bit.
0 External receive high-frequency clock source from AHCLKR pin.
1 Internal receive high-frequency clock source from output of programmable high clock divider.
14 HCLKRP Receive bitstream high-frequency clock polarity select bit.
0 Rising edge. AHCLKR is not inverted before programmable bit clock divider. In the special case
where the receive bit clock (ACLKR) is internally generated and the programmable bit clock divider
is set to divide-by-1 (CLKRDIV = 0 in ACLKRCTL), AHCLKR is directly passed through to the
ACLKR pin.
1 Falling edge. AHCLKR is inverted before programmable bit clock divider. In the special case
where the receive bit clock (ACLKR) is internally generated and the programmable bit clock divider
is set to divide-by-1 (CLKRDIV = 0 in ACLKRCTL), AHCLKR is directly passed through to the
ACLKR pin.
13-12 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
11-0 HCLKRDIV 0-FFFh Receive high-frequency clock divide ratio bits determine the divide-down ratio from AUXCLK to
AHCLKR.
0 Divide-by-1
1h Divide-by-2
2h-FFFh Divide-by-3 to divide-by-4096
Figure 4-19. Receive TDM Time Slot Register (RTDM) [Offset 78h]
31 30 29 28 27 26 25 24
RTDMS31 RTDMS30 RTDMS29 RTDMS28 RTDMS27 RTDMS26 RTDMS25 RTDMS24
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
23 22 21 20 19 18 17 16
RTDMS23 RTDMS22 RTDMS21 RTDMS20 RTDMS19 RTDMS18 RTDMS17 RTDMS16
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
15 14 13 12 11 10 9 8
RTDMS15 RTDMS14 RTDMS13 RTDMS12 RTDMS11 RTDMS10 RTDMS9 RTDMS8
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
RTDMS7 RTDMS6 RTDMS5 RTDMS4 RTDMS3 RTDMS2 RTDMS1 RTDMS0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Table 4-21. Receive TDM Time Slot Register (RTDM) Field Descriptions
Bit Field Value Description
31-0 RTDMS[31-0] Receiver mode during TDM time slot n.
0 Receive TDM time slot n is inactive. The receive serializer does not shift in data during this slot.
1 Receive TDM time slot n is active. The receive serializer shifts in data during this slot.
7 6 5 4 3 2 1 0
RSTAFRM Reserved(A) RDATA RLAST RDMAERR RCKFAIL RSYNCERR ROVRN
R/W-0 R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
7 6 5 4 3 2 1 0
RDMAERR RSTAFRM RDATA RLAST RTDMSLOT RCKFAIL RSYNCERR ROVRN
R/W1C-0 R/W1C-0 R/W1C-0 R/W1C-0 R-0 R/W1C-0 R/W1C-0 R/W1C-0
LEGEND: R/W = Read/Write; R = Read only; W1C = bit is cleared by writing a 1, writing a 0 has no effect; -n = value after reset
A If writing to this field, always write the default value for future device compatibility.
Figure 4-22. Current Receive TDM Time Slot Registers (RSLOT) [Offset 84h]
31 16
Reserved(A)
R-0
15 10 9 0
Reserved(A) RSLOTCNT
R-0 R-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-24. Current Receive TDM Time Slot Registers (RSLOT) Field Descriptions
Bit Field Value Description
31-10 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
9-0 RSLOTCNT 0-17Fh Current receive time slot count. Legal values: 0 to 383.
TDM function is not supported for > 32 time slots. However, TDM time slot counter may count to 383
when used to receive a DIR block (transferred over TDM format).
Figure 4-23. Receive Clock Check Control Register (RCLKCHK) [Offset 88h]
31 24 23 16
RCNT RMAX
R-0 R/W-0
15 8 7 4 3 0
RMIN Reserved(A) RPS
R/W-0 R-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-25. Receive Clock Check Control Register (RCLKCHK) Field Descriptions
Bit Field Value Description
31-24 RCNT 0-FFh Receive clock count value (from previous measurement). The clock circuit continually counts the
number of DSP system clocks for every 32 receive high-frequency master clock (AHCLKR) signals, and
stores the count in RCNT until the next measurement is taken.
23-16 RMAX 0-FFh Receive clock maximum boundary. This 8-bit unsigned value sets the maximum allowed boundary for
the clock check counter after 32 receive high-frequency master clock (AHCLKR) signals have been
received. If the current counter value is greater than RMAX after counting 32 AHCLKR signals,
RCKFAIL in RSTAT is set. The comparison is performed using unsigned arithmetic.
15-8 RMIN 0-FFh Receive clock minimum boundary. This 8-bit unsigned value sets the minimum allowed boundary for the
clock check counter after 32 receive high-frequency master clock (AHCLKR) signals have been
received. If RCNT is less than RMIN after counting 32 AHCLKR signals, RCKFAIL in RSTAT is set. The
comparison is performed using unsigned arithmetic.
7-4 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
3-0 RPS 0-Fh Receive clock check prescaler value.
0 McASP system clock divided by 1
1h McASP system clock divided by 2
2h McASP system clock divided by 4
3h McASP system clock divided by 8
4h McASP system clock divided by 16
5h McASP system clock divided by 32
6h McASP system clock divided by 64
7h McASP system clock divided by 128
8h McASP system clock divided by 256
9h-Fh Reserved
CAUTION
DSP specific registers
Accessing REVTCTL not implemented on a specific DSP may cause improper
device operation.
Figure 4-24. Receiver DMA Event Control Register (REVTCTL) [Offset 8Ch]
31 16
(A)
Reserved
R-0
15 1 0
Reserved(A) RDATDMA
R-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-26. Receiver DMA Event Control Register (REVTCTL) Field Descriptions
Bit Field Value Description
31-1 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
0 RDATDMA Receive data DMA request enable bit. If writing to this field, always write the default value of 0.
0 Receive data DMA request is enabled.
1 Reserved.
15 13 12 11 10 9 8
Reserved(A) XFRST XSMRST XSRCLR XHCLKRST XCLKRST
R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 5 4 3 2 1 0
Reserved(A) RFRST RSMRST RSRCLR RHCLKRST RCLKRST
R-0 R-0 R-0 R-0 R-0 R-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-27. Transmitter Global Control Register (XGBLCTL) Field Descriptions (continued)
Bit Field Value Description
1 RHCLKRST x Receive high-frequency clock divider reset enable bit. A read of this bit returns the RHCLKRST bit value
of GBLCTL. Writes have no effect.
0 RCLKRST x Receive clock divider reset enable bit. A read of this bit returns the RCLKRST bit value of GBLCTL.
Writes have no effect.
Figure 4-26. Transmit Format Unit Bit Mask Register (XMASK) [Offset A4h]
31 30 29 28 27 26 25 24
XMASK31 XMASK30 XMASK29 XMASK28 XMASK27 XMASK26 XMASK25 XMASK24
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
23 22 21 20 19 18 17 16
XMASK23 XMASK22 XMASK21 XMASK20 XMASK19 XMASK18 XMASK17 XMASK16
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
15 14 13 12 11 10 9 8
XMASK15 XMASK14 XMASK13 XMASK12 XMASK11 XMASK10 XMASK9 XMASK8
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
XMASK7 XMASK6 XMASK5 XMASK4 XMASK3 XMASK2 XMASK1 XMASK0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Table 4-28. Transmit Format Unit Bit Mask Register (XMASK) Field Descriptions
Bit Field Value Description
31-0 XMASK[31-0] Transmit data mask enable bit.
0 Corresponding bit of transmit data (before passing through reverse and rotate units) is masked out
and then padded with the selected bit pad value (XPAD and XPBIT bits in XFMT), which is
transmitted out the McASP in place of the original bit.
1 Corresponding bit of transmit data (before passing through reverse and rotate units) is transmitted
out the McASP.
Figure 4-27. Transmit Bit Stream Format Register (XFMT) [Offset A4h]
31 18 17 16
Reserved(A) XDATDLY
R-0 R/W-0
15 14 13 12 8 7 4 3 2 0
XRVRS XPAD XPBIT XSSZ XBUSEL XROT
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-29. Transmit Bit Stream Format Register (XFMT) Field Descriptions
Bit Field Value Description
31-18 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
17-16 XDATDLY 0-3h Transmit sync bit delay.
0 0-bit delay. The first transmit data bit, AXR[n], occurs in same ACLKX cycle as the transmit frame sync
(AFSX).
1h 1-bit delay. The first transmit data bit, AXR[n], occurs one ACLKX cycle after the transmit frame sync
(AFSX).
2h 2-bit delay. The first transmit data bit, AXR[n], occurs two ACLKX cycles after the transmit frame sync
(AFSX).
3h Reserved.
15 XRVRS Transmit serial bitstream order.
0 Bitstream is LSB first. No bit reversal is performed in transmit format bit reverse unit.
1 Bitstream is MSB first. Bit reversal is performed in transmit format bit reverse unit.
14-13 XPAD 0-3h Pad value for extra bits in slot not belonging to word defined by XMASK. This field only applies to bits
when XMASK[n] = 0.
0 Pad extra bits with 0.
1h Pad extra bits with 1.
2h Pad extra bits with one of the bits from the word as specified by XPBIT bits.
3h Reserved
12-8 XPBIT 0-1Fh XPBIT value determines which bit (as written by the CPU or DMA to XBUF[n]) is used to pad the extra
bits before shifting. This field only applies when XPAD = 2h.
0 Pad with bit 0 value.
1-1Fh Pad with bit 1 to bit 31 value.
Table 4-29. Transmit Bit Stream Format Register (XFMT) Field Descriptions (continued)
Bit Field Value Description
7-4 XSSZ 0-Fh Transmit slot size.
0-2h Reserved
3h Slot size is 8 bits.
4h Reserved
5h Slot size is 12 bits.
6h Reserved.
7h Slot size is 16 bits.
8h Reserved.
9h Slot size is 20 bits.
Ah Reserved.
Bh Slot size is 24 bits.
Ch Reserved.
Dh Slot size is 28 bits.
Eh Reserved.
Fh Slot size is 32 bits.
3 XBUSEL Selects whether writes to serializer buffer XRBUF[n] originate from the configuration bus (CFG) or the
data (DAT) port.
0 Writes to XRBUF[n] originate from the data port. Writes to XRBUF[n] from the configuration bus are
ignored with no effect to the McASP.
1 Writes to XRBUF[n] originate from the configuration bus. Writes to XRBUF[n] from the data port are
ignored with no effect to the McASP.
2-0 XROT 0-7h Right-rotation value for transmit rotate right format unit.
0 Rotate right by 0 (no rotation).
1h Rotate right by 4 bit positions.
2h Rotate right by 8 bit positions.
3h Rotate right by 12 bit positions.
4h Rotate right by 16 bit positions.
5h Rotate right by 20 bit positions.
6h Rotate right by 24 bit positions.
7h Rotate right by 28 bit positions.
Figure 4-28. Transmit Frame Sync Control Register (AFSXCTL) [Offset ACh]
31 16
Reserved(A)
R-0
15 7 6 5 4 3 2 1 0
XMOD Reserved(A) FXWID Reserved(A) FSXM FSXP
R/W-0 R-0 R/W-0 R-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-30. Transmit Frame Sync Control Register (AFSXCTL) Field Descriptions
Bit Field Value Description
31-16 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
15-7 XMOD 0-1FFh Transmit frame sync mode select bits.
0 Burst mode
1h Reserved
2h-20h 2-slot TDM (I2S mode) to 32-slot TDM
21h-17Fh Reserved
180h 384-slot DIT mode
181h-1FFh Reserved
6-5 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
4 FXWID Transmit frame sync width select bit indicates the width of the transmit frame sync (AFSX) during
its active period.
0 Single bit
1 Single word
3-2 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
1 FSXM Transmit frame sync generation select bit.
0 Externally-generated transmit frame sync
1 Internally-generated transmit frame sync
0 FSXP Transmit frame sync polarity select bit.
0 A rising edge on transmit frame sync (AFSX) indicates the beginning of a frame.
1 A falling edge on transmit frame sync (AFSX) indicates the beginning of a frame.
15 8 7 6 5 4 0
Reserved(A) CLKXP ASYNC CLKXM CLKXDIV
R-0 R/W-0 R/W-1 R/W-1 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Figure 4-30. Transmit High-Frequency Clock Control Register (AHCLKXCTL) [Offset B4h]
31 16
Reserved(A)
R-0
15 14 13 12 11 0
(A)
HCLKXM HCLKXP Reserved HCLKXDIV
R/W-1 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-32. Transmit High-Frequency Clock Control Register (AHCLKXCTL) Field Descriptions
Bit Field Value Description
31-16 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
15 HCLKXM Transmit high-frequency clock source bit.
0 External transmit high-frequency clock source from AHCLKX pin.
1 Internal transmit high-frequency clock source from output of programmable high clock divider.
14 HCLKXP Transmit bitstream high-frequency clock polarity select bit.
0 Rising edge. AHCLKX is not inverted before programmable bit clock divider. In the special case
where the transmit bit clock (ACLKX) is internally generated and the programmable bit clock
divider is set to divide-by-1 (CLKXDIV = 0 in ACLKXCTL), AHCLKX is directly passed through to
the ACLKX pin.
1 Falling edge. AHCLKX is inverted before programmable bit clock divider. In the special case where
the transmit bit clock (ACLKX) is internally generated and the programmable bit clock divider is set
to divide-by-1 (CLKXDIV = 0 in ACLKXCTL), AHCLKX is directly passed through to the ACLKX
pin.
13-12 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field
has no effect. If writing to this field, always write the default value for future device compatibility.
11-0 HCLKXDIV 0-FFFh Transmit high-frequency clock divide ratio bits determine the divide-down ratio from AUXCLK to
AHCLKX.
0 Divide-by-1
1h Divide-by-2
2h-FFFh Divide-by-3 to divide-by-4096
Figure 4-31. Transmit TDM Time Slot Register (XTDM) [Offset B8h]
31 30 29 28 27 26 25 24
XTDMS31 XTDMS30 XTDMS29 XTDMS28 XTDMS27 XTDMS26 XTDMS25 XTDMS24
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
23 22 21 20 19 18 17 16
XTDMS23 XTDMS22 XTDMS21 XTDMS20 XTDMS19 XTDMS18 XTDMS17 XTDMS16
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
15 14 13 12 11 10 9 8
XTDMS15 XTDMS14 XTDMS13 XTDMS12 XTDMS11 XTDMS10 XTDMS9 XTDMS8
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
XTDMS7 XTDMS6 XTDMS5 XTDMS4 XTDMS3 XTDMS2 XTDMS1 XTDMS0
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Table 4-33. Transmit TDM Time Slot Register (XTDM) Field Descriptions
Bit Field Value Description
31-0 XTDMS[31-0] Transmitter mode during TDM time slot n.
0 Transmit TDM time slot n is inactive. The transmit serializer does not shift out data during this slot.
1 Transmit TDM time slot n is active. The transmit serializer shifts out data during this slot according to
the serializer control register (SRCTL).
7 6 5 4 3 2 1 0
XSTAFRM Reserved(A) XDATA XLAST XDMAERR XCKFAIL XSYNCERR XUNDRN
R/W-0 R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
7 6 5 4 3 2 1 0
XDMAERR XSTAFRM XDATA XLAST XTDMSLOT XCKFAIL XSYNCERR XUNDRN
R/W1C-0 R/W1C-0 R/W1C-0 R/W1C-0 R-0 R/W1C-0 R/W1C-0 R/W1C-0
LEGEND: R/W = Read/Write; R = Read only; W1C = bit is cleared by writing a 1, writing a 0 has no effect; -n = value after reset
A If writing to this field, always write the default value for future device compatibility.
Figure 4-34. Current Transmit TDM Time Slot Register (XSLOT) [Offset C4h]
31 16
Reserved(A)
R-0
15 10 9 0
Reserved(A) XSLOTCNT
R-0 R-17Fh
A If writing to this field, always write the default value for future device compatibility.
Table 4-36. Current Transmit TDM Time Slot Register (XSLOT) Field Descriptions
Bit Field Value Description
31-10 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
9-0 XSLOTCNT 0-17Fh Current transmit time slot count. Legal values: 0 to 383.
During reset, this counter value is 383 so the next count value, which is used to encode the first DIT
group of data, will be 0 and encodes the B preamble.
TDM function is not supported for >32 time slots. However, TDM time slot counter may count to 383
when used to transmit a DIT block.
Figure 4-35. Transmit Clock Check Control Register (XCLKCHK) [Offset C8h]
31 24 23 16
XCNT XMAX
R-0 R/W-0
15 8 7 6 4 3 0
XMIN XCKFAILSW Reserved(A) XPS
R/W-0 R/W-0 R-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-37. Transmit Clock Check Control Register (XCLKCHK) Field Descriptions
Bit Field Value Description
31-24 XCNT 0 Transmit clock count value (from previous measurement). The clock circuit continually counts the
number of DSP system clocks for every 32 transmit high-frequency master clock (AHCLKX) signals,
and stores the count in XCNT until the next measurement is taken.
23-16 XMAX 0-FFh Transmit clock maximum boundary. This 8-bit unsigned value sets the maximum allowed boundary for
the clock check counter after 32 transmit high-frequency master clock (AHCLKX) signals have been
received. If the current counter value is greater than XMAX after counting 32 AHCLKX signals,
XCKFAIL in XSTAT is set. The comparison is performed using unsigned arithmetic.
15-8 XMIN 0-FFh Transmit clock minimum boundary. This 8-bit unsigned value sets the minimum allowed boundary for
the clock check counter after 32 transmit high-frequency master clock (AHCLKX) signals have been
received. If XCNT is less than XMIN after counting 32 AHCLKX signals, XCKFAIL in XSTAT is set. The
comparison is performed using unsigned arithmetic.
7 XCKFAILSW Transmit clock failure detect autoswitch enable bit.
0 Transmit clock failure detect autoswitch is disabled.
1 Transmit clock failure detect autoswitch is enabled.
6-4 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
3-0 XPS 0-Fh Transmit clock check prescaler value.
0 McASP system clock divided by 1
1h McASP system clock divided by 2
2h McASP system clock divided by 4
3h McASP system clock divided by 8
4h McASP system clock divided by 16
5h McASP system clock divided by 32
6h McASP system clock divided by 64
7h McASP system clock divided by 128
8h McASP system clock divided by 256
9h-Fh Reserved
CAUTION
DSP specific registers
Accessing XEVTCTL not implemented on a specific DSP may cause improper
device operation.
Figure 4-36. Transmitter DMA Event Control Register (XEVTCTL) [Offset CCh]
31 16
Reserved(A)
R-0
15 1 0
Reserved(A) XDATDMA
R-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Table 4-38. Transmitter DMA Event Control Register (XEVTCTL) Field Descriptions
Bit Field Value Description
31-1 Reserved 0 Reserved. The reserved bit location always returns the default value. A value written to this field has no
effect. If writing to this field, always write the default value for future device compatibility.
0 XDATDMA Transmit data DMA request enable bit. If writing to this field, always write the default value of 0.
0 Transmit data DMA request is enabled.
1 Reserved.
CAUTION
DSP specific registers
Accessing SRCTLn not implemented on a specific DSP may cause improper
device operation.
15 6 5 4 3 2 1 0
Reserved(A) RRDY XRDY DISMOD SRMOD
R-0 R-0 R-0 R/W-0 R/W-0
A If writing to this field, always write the default value for future device compatibility.
Figure 4-38. DIT Left Channel Status Registers (DITCSRA0-DITCSRA5) [Offset 100h-114h]
31 16
DITCSRAn
R/W-0
15 0
DITCSRAn
R/W-0
Figure 4-39. DIT Right Channel Status Registers (DITCSRB0-DITCSRB5) [Offset 118h-12Ch]
31 16
DITCSRBn
R/W-0
15 0
DITCSRBn
R/W-0
Figure 4-40. DIT Left Channel User Data Registers (DITUDRA0-DITUDRA5) [Offset 130h-144h]
31 16
DITUDRAn
R/W-0
15 0
DITUDRAn
R/W-0
Figure 4-41. DIT Right Channel User Data Registers (DITUDRB0-DITUDRB5) [Offset 148h-15Ch]
31 16
DITUDRBn
R/W-0
15 0
DITUDRBn
R/W-0
CAUTION
DSP specific registers
Accessing XBUF registers not implemented on a specific DSP may cause
improper device operation.
15 0
XBUFn
R/W-0
CAUTION
DSP specific registers
Accessing XBUF registers not implemented on a specific DSP may cause
improper device operation.
15 0
RBUFn
R/W-0
EDMA Examples
This appendix shows example EDMA implementations to service the McASP. See Section 3.3.5 for a
general description of McASP servicing.
Array[0, ]
LF1 RF1 LF2 RF2
ELEIDX
Figure A-2. Two Alternating EDMA Events Triggered for Each Time Slot
FRMIDX
Array[4, ] C1 C2 C3 C4
(a)
Channel Triggered by AXEVTE0
FRMIDX
Array[1, ]
RF1 RF2 RF3 RF4
ELEIDX
(b)
Channel Triggered by AXEVTO0
Some bit fields (see Table B-1) have restrictions on when they may be changed. These restrictions take
the form of certain registers that must be asserted in GBLCTL. Once these registers have been asserted,
the user may then, and only then, change the desired bit field.
Revision History
Table C-1 lists the changes made since the previous version of this document.