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.

AM3358: McASP BCLK and FSYNC continuous output

Part Number: AM3358
Other Parts Discussed in Thread: TAS2555

Hi,

I am interfacing AM3358 with Silicon Labs FXS/FXO chip Si32178. Si32178 needs BCLK and FSYNC from AM3358 to generate its internal clocks.

On AM3358, I am using an external clock of 4.096MHz on AHCLKX to generate internal BCLK 512KHz and FSYNC of 8KHz. I can see these clocks only when I send "aplay" command for 8 bit, 8KHz audio (which is also my desired audio format).

How can I have AM3358 send BCLK and FSYNC all the time, as soon as power turns on?

Thank you,

Samer

  • Hello Samer,

    Based on my internal discussions, the McASP is turned off when it is not used. When we boot the device, we do not have any settings to configure the McASP so it can not be turned on. If you are trying to launch your application upon boot, I recommend you to please refer to online documentations on systemd services.

    Regards,
    Krunal

  • Hi Krunal,

    I am not sending audio all the time, so yes MCASP is turned off, but I just want ACLK and FSYNC to be on in MCASP and use AXR pins for Tx and Rx only when audio is transmitted.

    I want MCASP to send 512KHz BCLK and 8KHz FSYNC all the time. And when audio aplay or arecord is executed, only then use Tx and Rx pins.

    In this block diagram from AM335x TRM, maybe I can only turn on Transmit TDM sequencer to generate ACLKX and AFSX?

     

     Since I know my BCLK and FSYNC frequencies maybe I can just put those values in davinci-mcasp.c to generate those frequencies?

    If this is not possible, is there any other option to approach this problem?

    Thank you,

    Samer

  • Hello Samer,

    Could you please share more information about your use-case?

    Regards,
    Krunal

  • Hi Krunal,

    My application is to interface FXS/FXO using SiLabs Si32178 with AM3358 on a custom board. So its pretty much a VOIP phone, which can connect to an analog phone line using FXS/FXO ports. In VOIP, the audio in my case will always be 8 bit 8000Hz. 

    SiLabs Si32178 has PCM and SPI interface to connect to a microprocessor. I have SPI and PCM/TDM device tree setup which you can see in my previous posts:

    https://e2e.ti.com/support/processors/f/791/t/862363#pi320966=1

    https://e2e.ti.com/support/processors/f/791/t/842530

     

    Si32178 needs BCLK and FSYNC to generate its internal clocks, and without a constant BCLK and FSYNC coming from the microprocessor it can not function. Even SPI on Si32178 will not work without BCLK and FSYNC.

    Currently with my setup I can see Si32178 as an audio Capture and Playback device on AM3358 and when I play an 8 bit, 8000Hz audio, I can see my desired BCLK and FSYNC going to Si32178 but as soon as audio is stopped, BCLK and FSYNC clocks go away.

    So I need a constant BCLK and FSYNC output from AM3358 all the time even when no audio is being played or recorded. Is it possible?

    Here is block diagram of Si32178:

    In the block diagram, BCLK is referred as PCLK.

    Hope I was able to make things clear.

    Thank you,

    Samer

  • Hello Samer,

    Thank you for sharing information about your use-case. Based on my internal discussion, the McASP in Linux will only generate clocks when a user launches an application(arecord/aplay/gstreamer). Are there any other devices on your board that are capable of being clock masters? On TI EVMs, we usually configure the McASP as a slave. 

    Regards,
    Krunal

  • Hi Krunal,

    Appreciate your response.

    Krunal Bhargav34 said:

    Are there any other devices on your board that are capable of being clock masters? 

    What other devices can be clock masters? I can add other devices into my design since my custom board is in prototype phase.

    I am using external oscillator of 4.096 MHz as MCLK through which AM3358 generates BCLK and FSYNC. 

    Krunal Bhargav34 said:

     On TI EVMs, we usually configure the McASP as a slave. 

    In Beaglebone black, NXP TDA19988 is used as slave and McASP is master.

    What can be the solution to this problem?

    Thank you,

    Samer   

  • Hello Samer,

    With regards to the BBB, you are correct about McASP being the master and I was thinking about the AM57x/AM437x GPEVM. Have you referred to the following devices for clock generation: TAS2555 and AIC3104.

    Regards,
    Krunal 

  • Hi Krunal,

    How can I connect TAS2555 or AIC3104 with Si32178? Can you please explain.

    Thank you,

    Samer

  • Hi, Samer,

    Could you start a new e2e thread asking for the TAS2555 or AIC3104 connection? Our team can support your question regarding this topic.

    I will close this thread for now, but we will be glad to help you in a different E2E post.

    Thank you.

    Best regards,
    Luis Fernando Rodríguez S.