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.

AM5728: McASP receive clock failure

Part Number: AM5728
Other Parts Discussed in Thread: TIDEP-0088

Hi,

I am presently working on interfacing Circular Microphone Board ( CMB ) with AM572x processor, I am using McASP7 channel of Sitara AM572x.

In my case CMB is the master and hence McASP7 acts as the slave, CMB is giving Frame Sync, Bit Clock and data signals to the McASP7 receiver. Once I configure the McASP7 and observe the "MCASP_RXSTAT" I am getting to see that "RCKFAIL" bit is being set.  Hence, I found for the below attached document and found the following steps.

www.ti.com/.../spruer1b.pdf

a. Configure receive clock failure detect logic (RMIN, RMAX, RPS) in the receive clock check control
register (RCLKCHK).
b. Clear receive clock failure flag (RCKFAIL) in the receive status register (RSTAT).
c. Wait until first measurement is taken (> 32 AHCLKR clock periods).
d. Verify no clock failure is detected.
e. Repeat steps b–d until clock is running and is no longer issuing clock failure errors.
f. After the receive clock is measured and falls within the acceptable range, the following may be
enabled:
i. receive clock failure interrupt enable bit (RCKFAIL) in the receiver interrupt control register
(RINTCTL)
ii. mute option (RCKFAIL) in the mute control register (AMUTE)

How to achieve to wait until first measurement is taken (> 32 AHCLKR clock periods)?

I also went through  the below post, but I am clueless.

e2e.ti.com/.../147276

Also, can anyone please send me the exact configuration steps and the registers which I am supposed to write on to receive the data from the CMB.

I used K2G interface code with CMB as reference but still I am unable to read audio data.

Also, what is the maximum data rate which McASP receive can support.

I am first time working on Audio, please guide me on me issues.

Thanks and Regards,

Janardan M

  • The RTOS team have been notified. They will respond here.
  • Hi Janardan,

    Can you verify that the CMB BCLK is active before you attempt to initialize the McASP?

    There is a note in the TRM that states "Before performing McASP global initialization, If external clock ACLKR is used, it must be running already for proper synchronization of the MCASP_GBLCTL register."

    I believe the K2G software also uses the CMB as the clock master. The PCM186x codec initialization and McASP initialization should have been transferable to AM57x.

    I don't believe you need to enable the AHCLKR (high speed receive clock) when using the ACLKR from the CODEC. But if you must wait > 32 AHCLKR clock periods, then perhaps try enabling AHCLKR to see if that resolves the issue.

    Can you confirm that the pin mux is allowing the ACLKR pin to reach the McASP peripheral? That would be one reason why RCKFAIL might get set.

    The exact configuration steps and the registers which I am supposed to write on to receive the data from the CMB will be available in the K2G_bfprojects of the Processor SDK RTOS. Processor SDK RTOS contains full source code and a set of makefiles.
    The location of the audioAnalogLoopbackTest project is in PDK\ti\addon\cmb\test folder where PDK is the directory where Process SDK RTOS Platform or Processor Development Kit (PDK) is installed. The K2G_bf_rt and the K2G_bfprojects are located in the Processor SDK under the demos folder.

    The maximum BCLK rate which McASP receive can support is documented in the datasheet.
    For McASP7, the min Cycle time of ACLKR/X is 20ns (50MHz BCLK frequency).
    From that, you can divide by the bits per word and words per frame to get data rate in terms of samples per second. For example 50MHz / 16-bits per word = 3.125MS/s

    Some helpful links:

    TIDEP-0088
    www.ti.com/.../TIDEP-0088 - Audio Pre-Processing System Reference Design for Voice-Based Applications Using the 66AK2Gx SoC

    TIDEP-0088 accompanying app note
    www.ti.com/.../tiducr7a.pdf

    TIDUBQ2A - 66AK2Gx DSP + Arm® Processor Audio Processing Reference Design
    (McASP applies to AM57x)
    www.ti.com/.../tidubq2a.pdf

    Hope this helps,
    Mark