NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

MCSDK OMAPL138 User Guide Chapter Developing

From Texas Instruments Wiki
Jump to: navigation, search




Ti hz 2c pos rgb jpg.jpg


MCSDKUGDEVELOPING NT.jpg
MCSDK User Guide for OMAP-L138:

Developing with the MCSDK

Last updated: 11/07/2013

MCASP Sample App customisation[edit]

The MCASP audio sample application can be customised for a variety of applications. The following example is an illustration of the changes required for supporting 16/24/32 bit I2S data from the AIC1306 The data structures to be modified are as follows:
In Aic31.c

/* -------- constants -------- */
const Aic31_Params Aic31_PARAMS = {
    ICodec_CodecType_AIC31,         /* acType                 */
    ICodec_ControlBusType_I2C,      /* acControlBusType       */
    "NONE",                         /* acCtrlBusName          */
    ICodec_OpMode_MASTER,           /* acOpMode               */
    ICodec_DataType_I2S,            /* acSerialDataType       */
    (Uint32)ICodec_SlotWidth_24,    /* acSlotWidth  ICodec_SlotWidth_16 for 16 bit/ICodec_SlotWidth_32 for 32 bit          */
    ICodec_DataPath_TXRX,           /* acDataPath             */
    0,                              /* isRxTxClockIndependent */
};

In audioSample_io.c

Mcasp_HwSetupData mcaspRcvSetup = {
        /* .rmask    = */ 0xffffFFff, /* All the data bits are to be used     */
        /* .rfmt     = */ 0x000180b0, /* 0x00018070 for 16, 0x000180b0 for 24, 0x000180f0 for 32 */
                                       * 1 bit delay from framsync
                                       * MSB first
                                       * No extra bit padding
                                       * Padding bit (ignore)
                                       * slot Size is 24
                                       * Reads from DMA port
                                       * NO rotation
                                       */
        /* .afsrctl  = */ 0x00000111, /* burst mode,
                                       * Frame sync is frame
                                       * Rising edge is start of frame
                                       * externally generated frame sync
                                       */
        /* .rtdm     = */ 0x00000003, /* slot 1 and 2 is active (I2S)               */
        /* .rintctl  = */ 0x00000003, /* sync error and overrun error         */
        /* .rstat    = */ 0x000001FF, /* reset any existing status bits       */
        /* .revtctl  = */ 0x00000000, /* DMA request is enabled or disabled   */
        {
             /* .aclkrctl  = */ 0x00000000,
             /* .ahclkrctl = */ 0x00000000,
             /* .rclkchk   = */ 0x00000000
        }
} ;

Mcasp_HwSetupData mcaspXmtSetup = {
        /* .xmask    = */ 0xffffFFff, /* All the data bits are to be used     */
        /* .xfmt     = */ 0x000180b6, /* 0x00018074 for 16, 0x000180b6 for 24, 0x000180f0 for 32 */
                                       * 1 bit delay from framsync
                                       * MSB first
                                       * No extra bit padding
                                       * Padding bit (ignore)
                                       * slot Size is 24
                                       * Reads from DMA port
                                       * 24 bit rotation
                                       */
        /* .afsxctl  = */ 0x00000111, /* burst mode,
                                       * Frame sync is frame
                                       * Rising edge is start of frame
                                       * externally generated frame sync
                                       */
        /* .xtdm     = */ 0x00000003, /* slot 1 and 2 is active (I2S)               */
        /* .xintctl  = */ 0x00000007, /* sync error,overrun error,clK error   */
        /* .xstat    = */ 0x000001FF, /* reset any existing status bits       */
        /* .xevtctl  = */ 0x00000000, /* DMA request is enabled or disabled   */
        {
             /* .aclkxctl  = */ 0x00000080,
             /* .ahclkxctl = */ 0x00000000,
             /* .xclkchk   = */ 0x00000000
        },

};

Mcasp_ChanParams  mcasp_chanparam[Audio_NUM_CHANS]=
{
    {
        0x0001,                    /* number of serialisers      */
        {Mcasp_SerializerNum_14, }, /* serialiser index           */
        &mcaspRcvSetup,
        TRUE,
        Mcasp_OpMode_TDM,          /* Mode (TDM/DIT)             */
        Mcasp_WordLength_24, /* Mcasp_WordLength_16 for 16 bit/Mcasp_WordLength_32 for 32 bit */
        NULL,
        0,
        NULL,
        GblErr,
        2,                        /* number of TDM channels      */
        Mcasp_BufferFormat_1SER_MULTISLOT_INTERLEAVED,
        TRUE,
        TRUE
    },
    {
        0x0001,                   /* number of serialisers       */
        {Mcasp_SerializerNum_13,},
        &mcaspXmtSetup,
        TRUE,
        Mcasp_OpMode_TDM,
        Mcasp_WordLength_24,    /* Mcasp_WordLength_16 for 16 bit/Mcasp_WordLength_32 for 32 bit */
        NULL,
        0,
        NULL,
        GblErr,
        2,                        /* number of TDM channels      */
        Mcasp_BufferFormat_1SER_MULTISLOT_INTERLEAVED,
        TRUE,
        TRUE
    }
};
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK OMAPL138 User Guide Chapter Developing here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK OMAPL138 User Guide Chapter Developing here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article MCSDK OMAPL138 User Guide Chapter Developing here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article MCSDK OMAPL138 User Guide Chapter Developing here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article MCSDK OMAPL138 User Guide Chapter Developing here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK OMAPL138 User Guide Chapter Developing here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK OMAPL138 User Guide Chapter Developing here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article MCSDK OMAPL138 User Guide Chapter Developing here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article MCSDK OMAPL138 User Guide Chapter Developing here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity