TAC5212: TAC5212 with SAMA754G

Part Number: TAC5212

Tool/software:

Hello

I am interfacing TAC5212 with SAMA7G54 MPU. I will use SPI ror configuration and TDM for audio IN/OUT. See the attached picture. I have few questions here. 

1.) Can you check if my TAC5212 SCH is ok in terms of caps and SPI comm.

2) Do i need pullups or pulldowns on any of config/TDM lines

3.) I am using PPC from your web page. As i understand the PPC generates configuration files/settings that are then downloaded into TAC5212. On windows this is done through USB and devkit. How can i use same config file in my embedded system that runs yocto Linux. The idea is that i will get config file from PPC in windows, i will transfer file to my system running SAMA7G54. What is the way to upload this config file to TAC5212 from SAMA7G54. Note i use SPI.

4.) Once i am in yocto Linux is there a way to update the settings of TAC5212. Mainly i want to be to update the filtering part of codec, not number of IN/OUT lines ect.

5.) I see you have driver for TAC5212. On forum i saw support for debian ... does it work for yocto Linux. I am aware that yocto linux has alsa module ... however yocto is embedded system as opposed to ubuntu .. so i am just wondering.

  • Hi,

    Make sure your SPI connections are connected to the right pins, it was not super specific in your schematic, so here is a reminder of which pins are which:

    One more note is that there is just GPIO1 and 2, not 0, so your GPIO connections are unclear in your labelling. But otherwise the schematic looks good. Pulling up ADDR puts the device in SPI mode. TDM does not need pull ups or downs, and SPI does not really need pull ups or downs either. If this is the only device on the SPI bus you will not need any pull ups/downs.

    PPC generates I2C scripts, which are just register settings. So, you could write yourself a converter script to take in these I2C writes and convert them to SPI writes. It depends on how you are able to write SPI with your MCU so I can't give super specific advice here but I can explain how the PPC register writes are formatted:

    "w a0 00 03" <- this means write to device with the address "a0", register 0x00, and the value of register 0x00 is 0x03. This would be the page changing register so now after this write the device will be writing to page 3.

    "w a0 33 5c" <- write to device a0 on register 0x33, the value 0x5c which is 01011100.

    Adjusting the filtering can be done with register writes. I am not sure if the drivers would support filter adjustments, even if you did get the drivers onto your yocto system. Typically the drivers are used to connect to the different inputs or outputs and to adjust the volume through register writes and to route the I2S/TDM data to the device through the ALSA system. I believe the drivers would work on yocto, you would just need to add it to your kernel. You can also use the chip without the driver if you are able to control the ASI and register writes yourself.

    Let me know if you need more help.

    Best,
    Mir

  • Hi

    As i understand PICO means Peripheral In Controller Out ... similar to MOSI, while POCI is Peripheral Out and Controller In similar to MISO. On my design it is connected like that PICO<==>MOSI, POCI<==> MISO.

    Regarding GPIO, the SCH level port are labeled as GPIO1 and GPIO2, but pin labels on top U10 are GPIO0 and GPIO1. Hope that clears it up.

    I plan to use 2 TAC5212 where CLK, PICO, POCI are shared while CSZ are not. Can you confirm if i still need or dont need pullups on share lines?

    Regarding config from PPC. This is bit more clear now. Following up on your example for I2C

    "w a0 00 03"

    in SPI mode that would mean i dont need "a0" since CSZ takes care of addressing the intended TAC5212. After that come 2 8-bit words where "00" is the register address and "03" is data to be written to the register. That means that my Master (SAMA7G54) must be able to handle 16bit words over SPI as per 7.5.1.2 SPI Control Interface ... is that correct?

     

    Regarding the filtering ... maybe i was not clear enough. I am referring to sec 8.2 in the datasheet "Programable Coefficient Registers" and sec 3.3.2.6.1-3 in "SLAU902A - TAx5x12EVM-K Evaluation Module". To me those look like some voice filtering and mixing functionalities of TAC5212. I was just asking if these can be adjusted in real time?

    Thank you

  • Hi,

    You can put pull up resistors of ~4.7k-10k on the CSZ lines to ensure they stay high when inactive but you should not need any on the shared lines. 

    About SPI data - yes, you would just need the address and the register value, each is 8 bits. The address is actually 7 bits but the last bit is read or write bit which replaces the "w" or "r" of an I2C command. It would be 16 bits at a time, with the option for more since you can write registers consecutively without re-sending the address.

    About the filters, yes you could adjust the filters while the device is running but you may get a pop, I would recommend putting the device in sleep mode or turning off any outputs before you change those registers. I just meant those filter registers are not implemented in the driver so you would need to write to the registers yourself.

    Best,
    Mir