Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1310: Using CC1310 I2S module with TI TAS5760M amplifier

Part Number: CC1310
Other Parts Discussed in Thread: TAS5760M, , TAS5766M, CC2642R, CC1312R

Hello.

I am expanding a custom CC1310 project that now needs the capability of producing sound. For this task I selected the TI TAS5760M because it meets my basic requirements: I2S interface for 44.1kHz 16bits mono audio and 40W in continuous mono operation with a 4 ohms speaker. I bought a TAS5760xx EVM and a PurePath Console Motherboard (PPCMB) to test it with the CC1310 LaunchPad.

After reading more carefully the CC1310 I2S driver interface documentation and the TAS5760M datasheet I noticed one possible problem related to the MCLK needed by the amplifier and the one supplied by the CC1310.

The CC1310 driver has the MCLKDivider parameter where the MCLK is set. The documentation says: "Select the frequency divider for MCLK signal. Final value of MCLK is 48MHz/MCLKDivider. Value must be selected between 2 and 1024."

The TAS5760M clocks rate table is the following:

So there is no way to set a MCLKDivider to set the MCLK into a correct value for a 44.1kHz audio. Actually, no other audio frequency can get a correct MCLK value with the CC1310 driver.

I supposed that two I2S capable devices were enough to work with each other, but after discovering this and after reading some related posts in the forums I realized that this is not true. CC1310 clock frequency is not a valid multiple for generating I2S MCLK for audio devices. I have read about it as a non-audio related clock.

Could you please answer next questions?

1. Am I wrong and I can really use CC1310 with TAS5760M directly using the I2S interface? How can I get the needed MCLK value?

2. If not directly, is there any "easy" way to get them work together? Adding a PLL to the system to generate the needed MCLK? Any TI IC solution?

3. I have discovered the TAS5766M. I don't need any of the PurePath characteristics and it has a little bit less power than the TAS5760M, but it has the possibility of a 3-wire I2S operation mode that I think is compatible with the CC1310 I2S interface as in this mode the TAS5766M doesn't need the MCLK (SCLK in this device) and only needs WCLK (LRCLK) and SCLK (BCLK) clocks, as it includes an internal PLL for generating the MCLK. Could you confirm that I can use TAS5766M directly with CC1310 I2S driver?

Regards,

Juan Pablo Novo

  • Another important question arise while reading the section "22.5.1 WCLK, BCLK, and MCLK Division Ratio" from the "Chapter 22. Inter-IC Sound (I2S) Module" of the Technical Reference Manual of the CC1310:

    4. If both MCLK and BCLK are set through a divider of the MCUCLK:

    MCLK = MCUCLK / MDIV [Hz]
    BCLK = MCUCLK / BDIV [Hz]

    How is it possible than in the I2S driver MCLK is set with only one parameter: MCLKDivider and the SCK (BCLK) is set with 3 parameters: the parameter samplingFrequency ("I2S sampling frequency configuration in samples/second" as explained in the driver documentation), the parameter bitsPerWord ("Bits per sample (Word length)") and the parameter phaseType?

    According to the I2S driver documentation it seems it can set directly to SCK (BCLK) any possible frequency without taking account the MCUCLK. For example:

    samplingFrequency = 44100

    bitsPerWord = 16

    phaseType = I2S_PHASE_TYPE_DUAL

    resulting in a SCK (BCLK) = 44100 x 16 x 2 = 1,411,200

    With this data, how can the driver set a valid BDIV for the CC1310 I2S module if the BCLK (SCK) = MCUCLK / BDIV [Hz] and the MCUCLK is 48MHz?

    I think I must be missing something because if the BCLK of the CC1310 I2S module can't be set to any valid audio clock frequency and only to frequencies related to the MCUCLK it can't be used with any digital audio amplifier... neither the TAS5766M. Is it not possible to connect an audio amplifier to the CC1310? What would be the point of I2S for the CC1310 then? Passing sound only between MCU's? Which MCU is then able to deliver the sound to an amplifier at the end of the chain?

    Regards,

    Juan Pablo Novo

  • Hi Juan Pablo,

    1 and 2- Unfortunately, the devices you have chosen are not the perfect match. If you want to stick to the choices you have made, you could consider

    • changing the sampling frequency
    • accepting non-perfect clock frequencies (i.e. what is happening if you set up the system to use the closest clocks you can get?)
    • use an external PLL to generate the SCK, WCLK and MCLK clocks (I am not an expert of those components and I suggest you to use TI website to select the one fitting best your application http://www.ti.com/clocks-timing/generators/products.html?pqs=paqs&familyid=350#sort=p1130;asc ).
      If it was not clear, you can manage to get the I2S module of the CC1310 device to act as a slave device

    3- Yes, the TAS5766M seems to be easier to interface.

    4- The I2S driver is a software abstraction of the I2S module (made of silicon). Users generally don't want to calculate by themselves the clock dividers to use and prefer only specify the number of channels, the sampling frequency, the data length, the data padding... As MCLK generation is considered as an advanced feature, we directly offer the possibility to select the clock divider. Even TI absolutely does not recommend this, you have access to the technical reference manual and you are free to set up the I2S module as you want.
    That being said, no matter which sampling frequency you select through the I2S driver, only an integer value can be physically used to divide the 48MHz clock.
    Keep in mind that 99% of the audio applications does not require a sharp clock frequency. Having a clock inaccuracy of several percents is not perceptible by human hear. If you absolutely need a sharp clock frequency than set the I2S module in slave mode.

    I hope this will help,

  • Thank you, Clement!

    I am a newbie in the audio world and all your help and advices are welcome.

    May you clarify some of your answers?

    1-2.

    a. Changing the sampling frequency: Is it possible? I mean, TAS5760M and TAS5766M specifies in the datasheet the available sample rate for them and I thought I must stick to them. I don't have any restriction about the sample rate for my audio so I could record the sound in any rate and make it divisor of the 48MHz of the MCUCLK. If TAS5760M accepts that non-standard audio sample rate it would be the solution to the problem. May you confirm this or should I make this question into the audio forum?

    b. Accepting non-perfect clock frequencies: I haven't really tested anything yet. I was studying all the documentation to understand every aspect before programming. I thought that using non-perfect clocks will make arise clock errors in the TAS5760M and produce unrecognisable sound. I will try this and see what happens.

    c. Using external PLL and CC1310 I2S module as a slave: I knew it is possible to do this, but will the CC1310 I2S module accept SCK, WCLK and MCLK that are not divisors of the 48MHz MCUCLK? Will it work?

    3. Although TAS5766M is easier to interface as it has only 2 clocks to provide, we have the same problem the TAS5760M has. The SCK of the CC1310 I2S module will be divisor of the 48MHz MCUCLK so the TAS5766M will not be provided with a standard audio clock so I don't know if TAS5766M will work with this in 3-wire configuration (same problem as in 1-2.a.) The TAS5766M has the capability of being a clock master and generate LRCLK and BCLK clocks from a non-standard SCLK (MCK). But I don't understand how the CC1310 I2S module can be a master to generate de non-standard MCK and a slave to accept the LRCLK and BCLK from the TAS5766M...

    Regards,

    Juan Pablo Novo

  • Hi Juan Pablo,

    a- The idea was to decrease the sampling frequency used and target (for example) 16 kHz. In that case you will manage have a bit more flexibility to fix the clock frequencies (you will still won't be able to reach the exact clock value).

    b- Good! FYI, I have seen some voice recognition algorithms running on CC2642R... the algorithms were done for 16kHz sharp but were working smoothly with our non-perfect clocks :) [edit: the I2S module used on CC1310 is the same as the one used on CC2642R]

    c- Absolutely! As long as the WCLK and SCLK clocks are as expected by the I2S module (i.e. the number of SCK cycles in each WCLK cycle is correct) it will work. Note: in slave mode the MCLK signal is not required (if you connect a signal to the MCLK pin of the CC1310, it is basically not routed).

    3- You are right, the I2S module does not allow to generate the MCLK clock and be at the same time an I2S slave. However you can use one of the CC1310 timers to generate the MCLK clock.

    A few more remarks more or less related to your project:
    - When it comes to Audio streaming + RF transmission, a problems such as compression, encapsulation, losses come into the picture. To help customers solving these issues, we have an Audio Plugin running for CC13x2 (and CC26x2).
    - I think high quality audio streaming is ambitious on CC1310 due to the Cortex M3 and the small RAM and Flash sizes. Maybe CC1312R1 would be a better pick

    Best regards,

  • Hi, Clément.

    Thank you very much for the cue to the CC1312R! It could be a great update if I can't do the job with the CC1310. Initially I think my task is not so demanding, as it isn't audio streaming. The CC1310 only has to receive small RF commands and then play through I2S to an amplifier the demanded uncompressed PCM audio recorded previously in a NAND Flash memory accessed via SPI.

    With all the information provided by you I think I have several things to try with the TAS5760M and if they don't work with TAS5766M.

    I think the easiest way would be using non-standard audio sample rates, but I need to know if TAS5760M, TAS5766M or other amplifier model that meets my output power needs would accept these non-standard sample rates.

    Please, could you confirm that or should I better make this question into the audio forum?

    Regards,

    Juan Pablo Novo

  • Hi,

    I think a few tests with the non-standard audio will be nice (I mean, if you are running at 16.xkHz instead of 16.0kHz, this is not the same think as running at a completely random frequency).

    As you mentioned, try to open a new thread in the audio forum. If you don't mind can you post a link to this new thread here? Thanks!

    To finish, please mark this thread as resolved :)

    Kind regards,

  • Thank you again, Clément. I will do that.

    Best regards,

    Juan Pablo Novo