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.

RTOS/EVMK2G: EXAMPLE EVMK2G

Part Number: EVMK2G
Other Parts Discussed in Thread: AUDK2G, PCM1865

Tool/software: TI-RTOS


Hello

We hope you're all doing very well. 

We have the K2GEVM daughter card with the K2G audio card (beta) and the CCS v8.1 software with ti-processor-sdk-rtos-k2g-evm-05.01.00.11.

Normally we follow the instructions in the example:

http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/Examples_and_Demonstrations.html#k2g-audio-dc-addon

The example K2G AUDIO DC AddOn works well, but my doubts are:

1.-Where do you assign the channels where the audio will come from?

2.-How can I change the sampling frequency?

3.-How could we make a convolution between 2 signals?

Note: What do you recommend us to take? In order to make our own projects in an efficient way using the hardware we have.

BEST REGARDS.

GEORGE

  • George,

    The configuration of which serializers are used for transmit and receive is configured using the mcasp_cfg.c file in the audk2g analog loopback example. Each serializer bring in 2 channel data in (LR) format. Based on on MCASP driver mode, the data from multiple channel may be interleaved so it is important to set the right format as described here:
    software-dl.ti.com/.../Device_Drivers.html

    Changing Sampling frequency is determined by who is the clock master if MCASP is the master then it drives the sampling clock to the ADC if it is the slave then it gets an external clock. Check the audio daughter card schematic and notice the device mode for the ADC. In case of audk2g, the mcasp is the master to the PCM1865 ADC . When mcasp drives the clock, the following setting configures the clock:
    /* .aclkxctl = */ 0X000000A7,
    /* .ahclkxctl = */ 0x0000C000,
    /* .xclkchk = */ 0x00000000

    Check the Technical reference manual for these register and clock settings. Check my discussion with Justyn here:
    e2e.ti.com/.../562633

    Another way to understand the clocking is to download the clock spreadsheet from here and go to mcasp tab, to get a good visual representation of the MCASP clocking. The only difference between omaplxx device and k2g mcasp implementation is that K2g has an independent Audio OSCilator clock input. The transmit and receive side of MCASP are in sync mode so the same transmit bit clock is used for the recieve side but you can operate transmit and receive independently in async mode. In that case the clock dividers will be different.

    Convolution is a software operation so once you have the two signal captures in a memory buffer then it is just a matter of coding up a for loop to implement the convolution operation. You probably will find an optimized implementation of this in out DSP library (DSPLIB).

    Regards,
    Rahul