The Multi Channel Audio Seiral Peripheral (MCASP) driver is a generic, full-duplex driver that transmits and receives data using the MCASP interface. This is specially designed to transmit and receive the digital audio data.
Features Supported
- Blocking Polled mode operation
- Transmit and Receive in TDM mode
- Internal Loopback mode
SysConfig Features
- Note
- It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
There is a limited support for the SysConfig currently for Mcasp driver.
- Only the insatnce used can be selected currently.
- Note: Until register configurations are supported through SysConfig, user needs to use hardcoded McASP register configurations defined in <mcasp_loopback\am273x-evm\c66ss0_nortos\ti-c6000\generated\ti_drivers_config.c> For e.g. changing slot count, clock dividers, etc, this structure has to be modified manually by referring the register descriptions in the device TRM.
Features NOT Supported
- Interrupt/DMA mode
- Transmit in DIT mode
Usage Overview
API Sequence
To use the MCASP driver to send data over the MCASP interface, the application calls the following APIs:
Example Usage
Include the below file to access the APIs
Instance Open Example
gMcaspHandle =
MCASP_open(CONFIG_MCASP0, &mcaspParams);
Instance Close Example
Loopback Transfer Example
uint8_t mcaspTxBuffer[APP_MCASP_MSGSIZE];
uint8_t mcaspRxBuffer[APP_MCASP_MSGSIZE];
loopTxn.
txBuf = (
void*) &mcaspTxBuffer[0];
loopTxn.
rxBuf = (
void*) &mcaspRxBuffer[0];
loopTxn.
count = APP_MCASP_MSGSIZE/4;
API
APIs for MCASP