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.

  • Resolved

CC8520: I2C Master Control of Audio Codec

Expert 1180 points

Replies: 19

Views: 502

Part Number: CC8520

Hi,

I am trying to add a feature to my design that allows an external microphone to become the audio source when it's plugged in, and an internal microphone will be the audio source otherwise.

The way I want to implement this is to wire each microphone to a different input on my audio codec (TLV320ADC3101).  Then when some detection circuit identifies the external mic has been plugged in, an I2C command would be sent to the codec to program the registers to switch the input source.

I currently have the codec under control of the CC8520 (I2C Master), so the ADC3101 is just sent some "State Configuration Sequences" to turn it on.  I don't know how the CC8520 could command it to switch from "ON, Mic input A" to "ON, Mic input B".

The CC8520 is in EHIF mode under control of a microprocessor.  Is my only option to make the TLV320ADC3101 a slave of the microprocessor?  Or does the CC8520 have some way to do this?

Thanks,

Arthur

  • In reply to M-W:

    M-W,

    Please let me review a strategy with you and see if I understand

    1) Our CPU tells the CC85xx to go to SR-SWITCH mode. Now the CC85xx is sourcing clocks to the Codec, but the CC85xx isn't trying to transmit audio.
    2) Our CPU sends the I2C configuration sequence to the codec.
    3) Our CPU tells the CC85xx to switch to ACTIVE mode. Now we're ready to send valid audio over the air.

    With this flow, there is no GPIO signalling required, the CPU just gets to decide when it's ready to move the CC85xx to the next state.

    How do we move between the states in section 3.5.3 via EHIF commands?

    Thanks,
    Arthur
  • In reply to M-W:

    I had to ask a follow up question so had to mark this post as "not resolved"
  • In reply to Arthur Thompson27:

    Hi Arthur,

    As far as I know, there is no EHIF command to force these modes, these are simply internal states the device move between depending on other factors.

    Best regards,

    M-W

  • In reply to M-W:

    M-W,

    Is OFF to SR-SWITCH the only sequence for which we should have the CC85xx use a GPIO to signal to the CPU that it's time to configure the audio codec?

    Thanks,
    Arthur
  • In reply to Arthur Thompson27:

    Hi Arthur,

    I believe this should be enough, if you force the device in and out of low-power mode when you need to perform the switch it should be enough.

    Best regards,

    M-W

  • In reply to M-W:

    Hello M-W,

    Can you define for me how the CC8520 exercises its Audio device reset control pin?  I'm seeing it reset not only when the board first boots up, but also when the slave connects to the Master's network.  I'm seeing glitchy behavior.  We have I2C control of the codec wired to the CPU, but the codec reset line is wired to a Audio device reset control GIO on the CC8520.

    Thanks,

    Arthur

  • In reply to Arthur Thompson27:

    Hi Arthur,

    The reset pin is controlled by the configuration script so you should be able to see how this is exercised by looking over the configuration sequences you use. In the "Audio Device Customization", press the "Set all seq. to default" button to load the default configuration defined for the CODEC, you should be able to identify the pin here.

    Best regards,

    M-W

  • In reply to M-W:

    I don't understand why the pin resets when the Slave connects to a network.  What "States" are we transitioning through when the device goes from disconnected to joining a network?  Most of my states have no sequence except OFF to SR-SWITCH and SR-SWITCH to OFF

  • In reply to Arthur Thompson27:

    Hi Arthur,

    As you say, reset should only toggle during the OFF to SR-SWITCH and SR-SWITCH to OFF states. I tested this myself running the DK example and I do not see the reset pin toggling during connections but only during an actual device reset. On your hardware, is the reset pin connected to something else as well that could impact it? 

    Best regards,

    M-W

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.