Texas Instruments CC2650DK Benutzerhandbuch

Seite von 1570
Clock Configuration
On the I2S serial interface, data and WCLK is sampled and clocked out on opposite edges of BCLK. The
[PRCM:I2SCLKCTL: SMPL_ON_POSEDGE] register sets if the sampling or the clocking of WCLK and
data should be done on the positive or negative edge of BCLK. Sample edge and phase mode used by
the I2S module is set using the [I2S:AIFFMTCFG] register.
The clock signals MCLK, BCLK, and WCLK must be enabled using the [PRCM:I2SCLKCTL:EN] register. If
these signals are not enabled, they will be static low.
22.5.1 WCLK, BCLK, and MCLK Division Ratio
The frequency of the three clock signals in the I2S module can be set individually to a ratio of the
MCUCLK by using the clock division registers [PRCM:I2SMCLKDIV:MDIV], PRCM:I2SBCLKDIV:BDIV],
and [PRCM:I2SWCLKDIV:WDIV].
To obtain the clock frequency for MCLK and BCLK, the [PRCM:I2SBCLKDIV:MDIV] and
[PRCM:I2SWCLKDIV:BDIV] registers are used directly as the denominators to divide the MCUCLK as:
MCLK = MCUCLK / MDIV[Hz]
BCLK = MCUCLK / BDIV[Hz]
The division ratio for WCLK is calculated differently depending both on the [PRCM:I2SWCLKDIV:WDIV]
register and the phase mode that has been selected in the [PRCM:I2SCLKCTL:WCLK_PHASE] register
as:
Single phase: [PRCM:I2SCLKCTL:WCLK_PHASE] = 0 WCLK is high one BCLK period and low
WDIV[9:0] (unsigned, [1 to 1023]) BCLK periods.
WCLK = MCUCLK / (BDIV × (WDIV[9:0] + 1)) [Hz]
(10)
Dual phase: [PRCM:I2SCLKCTL:WCLK_PHASE] = 1. Each phase on WCLK (50% duty cycle) is
WDIV[9:0] (unsigned, [1 to 1023]) BCLK periods.
WCLK = MCUCLK / (BDIV × (2 × WDIV[9:0]))
(11)
User defined: [PRCM:I2SCLKCTL:WCLK_PHASE] = 2. WCLK is high WDIV[7:0] (unsigned, [1 to
255]) BCLK periods and low WDIV[15:8] (unsigned, [1 to 255]) BCLK periods.
WCLK = MCUCLK / (BDIV × (WDIV[7:0] + WDIV[15:8]))
(12)
22.6 Serial Interface Formats
The interface supports the dual-phase formats I2S, LJF, and RJF, which support one or two audio
channels per ADx pin. The I2S module also supports the single-phase format, DSP, which supports up to
eight audio channels per ADx pin.
22.6.1 I2S
I2S is a dual-phase format with a 50% WCLK duty cycle and MSB of each sample word aligned with the
edge of WCLK + one BCLK period. This is configured by setting [I2S:AIFFMTCFG:DUAL_PHASE] = 1
and [I2S:AIFFMTCFG:DATA_DELAY] = 1. For any given sample, the LEFT channel is transferred first
when WCLK is low, and the RIGHT channel is transferred second when WCLK is high. Because the
polarity of WCLK is reversed for the I2S format, [I2S:AIFWCLKSRC:WCLK_INV] = 1.
Data is sampled on the rising edge of BCLK and updated on the falling edge of BCLK. Hence [I2S:
AIFFMTCFG:SMPL_EDGE] = 1. The I2S format is unique in the sense that CC26xx is able to auto-detect
the number of BCLK periods per WCLK period, and, therefore supports any BCLK rate after configuration
along with variable sample resolution:
If the sample resolution is higher than the number of bits per WCLK period, the samples are truncated.
If the sample resolution is lower than the number of bits per WCLK period, the samples are zero-
padded.
When sample words are back-to-back, LSB of the previous sample will be output in the DATA DELAY
cycle.
1414
Integrated Interchip Sound (I2S) Module
SWCU117A – February 2015 – Revised March 2015
Copyright © 2015, Texas Instruments Incorporated