![Texas Instruments AM1808 Technical Reference Manual Download Page 1103](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_10945581103.webp)
1103
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Multichannel Audio Serial Port (McASP)
24.0.21.1.1.4 Data Transfers
•
Internal: DMA or CPU?
•
External: TDM or burst?
•
Bus: peripheral configuration bus or DMA bus?
24.0.21.1.2 Transmit/Receive Section Initialization
You must follow the following steps to properly configure the McASP. If external clocks are used, they
should be present prior to the following initialization steps.
1. Reset McASP to default values by setting GBLCTL = 0.
2. Configure McASP Audio FIFO. Recall that the Write FIFO and Read FIFO are enabled/disabled
independently.
(a) Write FIFO:
•
If the Write FIFO will not be enabled, verify that WFIFOCTL.WENA is cleared to 0 (the default
value).
•
If the Write FIFO will be enabled, configure WFIFOCTL. Note that WFIFOCTL.WENA should
not be set to 1 (enabled) until the other bitfields in this register are configured.
(b) Read FIFO:
•
If the Read FIFO will not be enabled, verify that RFIFOCTL.RENA is cleared to 0 (the default
value).
•
If the Read FIFO will be enabled, configure RFIFOCTL. Note that RFIFOCTL.RENA should not
be set to 1 (enabled) until the other bitfields in this register are configured.
3. Configure all McASP registers except GBLCTL in the following order:
(a) Receive registers: RMASK, RFMT, AFSRCTL, ACLKRCTL, AHCLKRCTL, RTDM, RINTCTL,
RCLKCHK. If external clocks AHCLKR and/or ACLKR are used, they must be running already for
proper synchronization of the GBLCTL register.
(b) Transmit registers: XMASK, XFMT, AFSXCTL, ACLKXCTL, AHCLKXCTL, XTDM, XINTCTL,
XCLKCHK. If external clocks AHCLKX and/or ACLKX are used, they must be running already for
proper synchronization of the GBLCTL register.
(c) Serializer registers: SRCTL[n].
(d) Global registers: Registers PFUNC, PDIR, DITCTL, DLBCTL, AMUTE. Note that PDIR should only
be programmed after the clocks and frames are set up in the steps above. This is because the
moment a clock pin is configured as an output in PDIR, the clock pin starts toggling at the rate
defined in the corresponding clock control register. Therefore you must ensure that the clock control
register is configured appropriately before you set the pin to be an output. A similar argument
applies to the frame sync pins.
(e) DIT registers: For DIT mode operation, set up registers DITCSRA[n], DITCSRB[n], DITUDRA[n],
and DITUDRB[n].
4. Start the respective high-frequency serial clocks AHCLKX and/or AHCLKR. This step is necessary
even if external high-frequency serial clocks are used:
(a) Take the respective internal high-frequency serial clock divider(s) out of reset by setting the
RHCLKRST bit for the receiver and/or the XHCLKRST bit for the transmitter in GBLCTL. All other
bits in GBLCTL should be held at 0.
(b) Read back from GBLCTL to ensure the bit(s) to which you wrote are successfully latched in
GBLCTL before you proceed.