PDK API Guide for J721E
|
channel Parameters to initialize channel Object
This structure stores user supplied parameters
Data Fields | |
uint16_t | noOfSerRequested |
uint32_t | indexOfSersRequested [16u] |
Mcasp_HwSetupData * | mcaspSetup |
uint16_t | isDmaDriven |
Mcasp_OpMode | channelMode |
uint16_t | wordWidth |
void * | userLoopJobBuffer |
uint16_t | userLoopJobLength |
void * | edmaHandle |
Mcasp_GblCallback | gblCbk |
uint32_t | noOfChannels |
Mcasp_BufferFormat | dataFormat |
uint16_t | enableHwFifo |
uint16_t | hwFifoEventDMARatio |
uint16_t | isDataPacked |
Mcasp_WordBitsSelect | wordBitsSelect |
uint16_t Mcasp_ChanParams::noOfSerRequested |
Serializer requested by channel. Channel can ask for both.
uint32_t Mcasp_ChanParams::indexOfSersRequested[16u] |
Multi Serializer numbers requested by channel
Mcasp_HwSetupData* Mcasp_ChanParams::mcaspSetup |
Setup information for xmt/rcv sections of the McASP
uint16_t Mcasp_ChanParams::isDmaDriven |
This parameters determines whether channel operates in DMA mode * All DMA parameters would be read only if this is TRUE
Mcasp_OpMode Mcasp_ChanParams::channelMode |
channel operation mode TDM or DIT mode
uint16_t Mcasp_ChanParams::wordWidth |
The parameter informs the driver what is the width word * (not slot) and this help driver indirectly to decided no. of * bytes to be transfered into each serialer for each slot- This is * very important parameter - in case of invalid value default * value of 32 will be assumed by the driver
void* Mcasp_ChanParams::userLoopJobBuffer |
Buffer to be transferred when the loop job is running.it should * be noted that this buffer size should be n*userLoopjobLength * where n is the no of serialisers configured in the direction of * the channel we are creating
uint16_t Mcasp_ChanParams::userLoopJobLength |
Number of bytes of the userloopjob buffer for each serialiser * Please note that this is no. of bytes and this should be * pre-calcuated properly for word width of slot - Please refer the * wordWidth of this structure
void* Mcasp_ChanParams::edmaHandle |
Handle to the EDMA Driver
Mcasp_GblCallback Mcasp_ChanParams::gblCbk |
callback required when global error occurs - * must be callable directly from the ISR context
uint32_t Mcasp_ChanParams::noOfChannels |
No of channels of data to be transmitted after the frame sync * This input is valid only for TDM in DSP mode mode of * communication E.g.–For Stereo data the value is 2 and for 6 * channel dac taking all channel data through one serialiser the * value of this member will be 6 Note: But for same 6ch dac taking * stereo data though 3 seperate serialiser value should be 2
Mcasp_BufferFormat Mcasp_ChanParams::dataFormat |
Format of the application supplied buffer
uint16_t Mcasp_ChanParams::enableHwFifo |
Option to enable the Hardware FIFO
uint16_t Mcasp_ChanParams::hwFifoEventDMARatio |
This represents the ratio WNUMEVT/WNUMDMA of the MCAPS FIFOCTL register * In other words, this represents the DMA event(to/from Host) throttle factor i.e a DMA event will be sent to Host (EDMA controller) only if 'hwFifoEventDMARatio' events reach the McASP FIFO by the peripheral. This way the number of the DMA events to/from the Host (EDMA controller) is reduced leading to reduced host overheads due to a DMA transfer. For example, if hwFifoEventDMARatio=4, a DMA read/write event is sent to the Host only when 4 such events reach the FIFO from the peripheral.
uint16_t Mcasp_ChanParams::isDataPacked |
flag to indicate if the buffer data needs to be packed,i.e the EDMA needs to be programmed for the exact slotwidth or a rounded width of 32,16, or 8 Bit
Mcasp_WordBitsSelect Mcasp_ChanParams::wordBitsSelect |
Option to indicate the word alignment (MSB/LSB) if word size < slot size. Mcasp_WordBitsSelect_LSB = Select the Least significant 'word' sized bits in the slot bits Mcasp_WordBitsSelect_MSB = Select the Most significant 'word' sized bits in the slot