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.

TLV320AIC3101EVM-K: How to interface TLV320AIC3101 EVM with External Micro controller

Part Number: TLV320AIC3101EVM-K
Other Parts Discussed in Thread: TLV320AIC3101

Hi,

I am using TLV320AIC3101 EVM Board with the I2C Address of 0x18 and trying to interface with STM32F413ZH Micro-Controller. Facing issue on while Master sends target device address for write request that function is returning HAL_ERROR.

But STM32F413ZH is having internal Audio Codec of I2C Address 0x34. If I give this address to I2c API it is returning HAL_OK. Anyone can help me to resolve this ? and if you have any C code for TLV320AIC3101 let me know. And below I have mentioned code where I am getting Error.

/**************************************************************************************

#define TLV320_ADDR  0x18

FMPI2C_HandleTypeDef hfmpi2c1;

HAL_StatusTypeDef status = HAL_OK;

status = HAL_FMPI2C_Mem_Write(&hfmpi2c1,TLV320_ADDR, register, 1, &data, 1, 1000) ;

if(status  != HAL_OK)

{

FMPI2Cx_Error(fmpi2c_handler, Addr);

}

return status;                   //HAL_OK

****************************************************************************************/

Regards,

Adrush Rawal

  • Adrush, 

    We are not really familiar with STM products around here so I can't really comment on that.  I've seen some instances where the I2C address must be given in 8 bit format preshifted (for the read/write bit)  and in that instance the address would transform from 0x18 to 0x30.  but that doesn't appear to explain what you are seeing.

    The AIC3101EVM  has an IOVDD that should ideally be common with the microcontroller, also make sure you have a solid ground connection between processor board and EVM. 

    can you scope the I2C writes to see if they are looking right?

    best regards,

    -Steve Wilson

  • Hi Steve Wilson,

       I tried to change the address to 0x30 as you suggested but there was no change in the performance.I check my board connections all are correct.I want to know here whether any programming sequence is required to follow to make the codec up and running.

    Regards

    Adrush.

        

  • Adrush, 

    Reset should be high of course,  but that is it,  this is a pretty simple codec. 

    Have you scoped the I2C lines to see that your commands are being sent properly?

    best regards,

    -Steve Wilson

  • Hi Adrush,

    Have you worked out this issue yet?  Were you able to confirm the I2C communication with the TLV320AIC3101?

  • Hi Tom Hendrick,

    yes its completed, problem is power is not sufficient for audio codec so we connected external power supply to the audio codec then it is writing register value. 

    And I am passing the sine wave to the codec all clocks and data in is proper but not able to get the data out in the CRO. is there any code for TLV320AIC3101 initialization let me know. 

    regards,

    Adrush

  • Great news!  Thank you for letting us know.

    The only software we have at the moment is located under the Design & development tab of the TLV320AIC3101 product folder.