1105
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Multichannel Audio Serial Port (McASP)
10. Release frame sync generators from reset. Note that it is necessary to release the internal frame sync
generators from reset, even if an external frame sync is being used, because the frame sync error
detection logic is built into the frame sync generator.
(a) Take the respective frame sync generator(s) out of reset by setting the RFRST bit for the receiver,
and/or the XFRST bit for the transmitter in GBLCTL. All other bits in GBLCTL should be left at the
previous state.
(b) Read back from GBLCTL to ensure the bit(s) to which you wrote are successfully latched in
GBLCTL before you proceed.
11. Upon the first frame sync signal, McASP transfers begin. The McASP synchronizes to an edge on the
frame sync pin, not the level on the frame sync pin. This makes it easy to release the state machine
and frame sync generators from reset.
(a) For example, if you configure the McASP for a rising edge transmit frame sync, then you do not
need to wait for a low level on the frame sync pin before releasing the McASP transmitter state
machine and frame sync generators from reset.
24.0.21.1.3 Separate Transmit and Receive Initialization
In many cases, it is desirable to separately initialize the McASP transmitter and receiver. For example, you
may delay the initialization of the transmitter until the type of data coming in on the receiver is recognized.
Or a change in the incoming data stream on the receiver may necessitate a reinitialization of the
transmitter.
In this case, you may still follow the sequence outlined in
, but use it for each section
(transmit, receive) individually. The GBLCTL register is aliased to RGBLCTL and XGBLCTL to facilitate
separate initialization of transmit and receive sections.
Also, make sure that the initialization or reinitialization sequence follows the guidelines in
Restrictions on When They May be Changed
.
24.0.21.1.4 Importance of Reading Back GBLCTL
In
, steps 4b, 5b, 7c, 9b, and 10b state that GBLCTL should be read back until the bits
that were written are successfully latched. This is important, because the transmitter and receiver state
machines run off of the respective bit clocks, which are typically about tens to hundreds of times slower
than the CPU's internal bus clock. Therefore, it takes many cycles between when the CPU writes to
GBLCTL (or RGBLCTL and XGBLCTL), and when the McASP actually recognizes the write operation. If
you skip this step, then the McASP may never see the reset bits in the global control registers get
asserted and deasserted; resulting in an uninitialized McASP.
Therefore, the logic in McASP has been implemented such that once the CPU writes GBLCTL, RGBLCTL,
or XGBLCTL, the resulting write is not visible by reading back GBLCTL until the McASP has recognized
the change. This typically requires two bit clocks plus two CPU bus clocks to occur.
Also, if the bit clocks can be completely stopped, any software that polls GBLCTL should be implemented
with a time-out. If GBLCTL does not have a time-out, and the bit clock stops, the changes written to
GBLCTL will not be reflected until the bit clock restarts.
Finally, please note that while RGBLCTL and XGBLCTL allow separate changing of the receive and
transmit halves of GBLCTL, they also immediately reflect the updated value (useful for debug purposes).
Only GBLCTL can be used for the read back step.
24.0.21.1.5 Synchronous Transmit and Receive Operation (ASYNC = 0)
When ASYNC = 0 in ACLKXCTL, the transmit and receive sections operate synchronously from the
transmit section clock and transmit frame sync signals (
). The receive section may have a
different (but compatible in terms of slot size) data format. Note that when ASYNC = 0, XCLK is
automatically inverted to produce RCLK (note the inversion on the ASYNC multiplexer as shown in
).