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.

SK-AM62: McASP0 ACLKX and FSX clocks outputs are not seen

Part Number: SK-AM62
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi ,

    I am using an AM62x EVM. 

   McASP2 is connected to ADC and DAC. McASP2 is currently connected to external clock input through AUDIO_EXT_REFCLK1. The McASP2 ACLKX and McASP2 FSX are seen on the pins and working well. 

   I would like to use McASP0 also. Basically use the same external clock through AUDIO_EXT_REFCLK1 for McASP0_ACLKX and McASP0_FSX. But i am not able to see the clocks coming out. 

   I have attached the sysconfig file for the same application.  Is there anything else that we need to take care to route two McASP clocks?

   Can you please give some inputs from your side ?

Thanks

Deepa

  sysconfig_to_ti.zip

  • Hi Deepa,
    Apoligies for delay,
    I went through the sysconfig you sent. In the CONFIG_MCASP_1, I can see that you have selected the option to skip driver open. So, are you calling MCASP_open() inside your application then? The intention behind that option is to let the application enable the external clock before starting the mcasp instance. If you enable that option, then you must ensure that you are calling MCASP_open() inside the application to start the mcasp peripheral.

    Thanks,
    Shreyansh

  • Hi Shreyansh,

         No problem. Thanks for your reply. 

    The skip driver open option is selected. And MCASP_open() for both mcasps are called inside the application.

    I have modified the existing Multichannel playback example to test this.

    I have done some debugging and what i find is that, the Mcasp open fails for the McASP0. The status is being checked at the end of McASP open and it is not _SUCCESS and therefore the McASP is closed. 

     I am not able to view the value of local variable "status" in McASP_open(). I thought maybe the variable is being optimized out. So i turned the optimization level to OFF, still not able to see. So I am not sure which code is causing the status to change. Any option to view the local variables?

    I have done only 2 modifications. One is  in syscfg file and mcasp_playback. Please find the files attached.

    Thank you

    Deepamcasp0_config.zip

       

  • Hi Deepa,
    In this sysconfig, you are setting different High Clock Parent for both instance. For CONFIG_MCASP0, you are utilising AUDIO_EXT_REFCLK1 while for CONFIG_MCASP1, you are utilising AUDIO_EXT_REFCLK0. On our E1 evm, the external clock is currently enabled for only AUDIO_EXT_REFCLK1. Just switch the clock for CONFIG_MCASP1 to AUDIO_EXT_REFCLK1, your mcasp should start working.

    Thanks,
    Shreyansh

  • Hi Shreyansh,

    I had been testing with AUDIO_EXT_REFCLK1, which did not work and I was trying the AUDIO_EXT_REFCLK0, and I seem to have sent that syscfg. 

     Sorry about the confusion.

    I have attached the syscfg with AUDIO_EXT_REFCLK1 which also I have tested and it doesn't still produce clock.

    Anyway it is new information that AUDIO_EXT_REFCLK0 is not routed.

    Is there any special recommendation to use the clocks for both instances of McASP?

    Not sure what is missing here. 

    Are you able to see the clocks getting generated for MCASP0 in the same scenario, where McASP2 is also being used?

    Can you please check what else is missing. All the configuration looks correct.

    I am looking for the clocks at R172 and R173.

    Thanks

    Deepa

  • Hi Shreyansh,

       Can you please share a working example, with both McASP2 and McASP0 enabled, maybe an existing example code could be modified?

    Thanks

    Deepa

  • Hi Shreyansh,

      I am not able to see the value of status variables in the expression window to see where the variable is failing. I have kept the optimization to be OFF. The status value is displaying to be some random value in RED and not changing.

  • Are you on debug or release build?

  • Can you confirm the final status?
    Your CONFIG_MCASP0 is opening fine but CONFIG_MCASP1 is resulting in error?

    I didn't face any issue with setting up same clock for both instances. Unfortunately, I am out of office until Tuesday, so I won't be able to send you a working example. Can you try stepping through code, setting breakpoints and see where it is failing.
    Also, can you run the attached example on a53 core and see if you still get clock failure?
    mcasp_a53ss0-0_freertos.zip
    Thanks,
    Shreyansh

  • Hi Shreyansh,

       I went back to the application code and left behind the example code.  I was able to get the clks out!

       In ti_drivers_open_close.c , the mcasp instances are being opened.  I thought that's the only place where the instances are opened. When you asked if the instances are opened in the application, I thought you meant this file. But, the actual mcasp application is the one opening the mcasps, after the external clocks are enabled. I had to go and add for mcasp0  and then i was able to see the clocks. Now I understand your original suggestion! 

    But now, I am not able to get the FSs out. The FS lines are going high, but i don't see the proper signals. 

    Anything we need to take care for the Frame syncs?

    Thanks for supporting!

    Deepa

  • With the application code I am on release build. 

  • With release build, you won't be able to debug symbols. We don't recommend debugging on release build. 

    I haven't tested the FSYNC pin though but it should work. Is the mcasp running? Are loopjob buffers enabled?

  • Hi Shreyansh,

        I could get the clocks and fs enabled in example code (I had to make MCasp0 as  CONFIG_MCASP0 and Mcasp2 as CONFIG_MCASP1 ). So wen went back to the audio application code, I can the clocks are enabled, but I dont see the FS. 

    Why would FS not be enabled while clock is enabled?

  • Hi Deepa,
    Sorry for delay in responding. Did you make any progress? Can you share your audio application sysconfig?

    Thanks,
    Shreyansh

  • Hi Shreyansh,

      Right now, since we are able to get the clk and fs with the example code, I  haven't got back to the application code to reproduce the same. Since it is working in the example code, I think it will work on the application code too. 

    Thanks

    Deepa

  • Thanks for your help.

  • Got it. Feel free to reach out again if it doesn't work. Closing this thread.

    Thanks,
    Shreyansh