|
void | PDM_TransferInstallEDMATCDMemory (pdm_edma_handle_t *handle, void *tcdAddr, size_t tcdNum) |
| Install EDMA descriptor memory. More...
|
|
void | PDM_TransferCreateHandleEDMA (PDM_Type *base, pdm_edma_handle_t *handle, pdm_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle) |
| Initializes the PDM Rx eDMA handle. More...
|
|
void | PDM_TransferSetMultiChannelInterleaveType (pdm_edma_handle_t *handle, pdm_edma_multi_channel_interleave_t multiChannelInterleaveType) |
| Initializes the multi PDM channel interleave type. More...
|
|
void | PDM_TransferSetChannelConfigEDMA (PDM_Type *base, pdm_edma_handle_t *handle, uint32_t channel, const pdm_channel_config_t *config) |
| Configures the PDM channel. More...
|
|
status_t | PDM_TransferReceiveEDMA (PDM_Type *base, pdm_edma_handle_t *handle, pdm_edma_transfer_t *xfer) |
| Performs a non-blocking PDM receive using eDMA. More...
|
|
void | PDM_TransferTerminateReceiveEDMA (PDM_Type *base, pdm_edma_handle_t *handle) |
| Terminate all PDM receive. More...
|
|
void | PDM_TransferAbortReceiveEDMA (PDM_Type *base, pdm_edma_handle_t *handle) |
| Aborts a PDM receive using eDMA. More...
|
|
status_t | PDM_TransferGetReceiveCountEDMA (PDM_Type *base, pdm_edma_handle_t *handle, size_t *count) |
| Gets byte count received by PDM. More...
|
|
- Note
- This interface returns immediately after the transfer initiates. Call the PDM_GetReceiveRemainingBytes to poll the transfer status and check whether the PDM transfer is finished.
- Scatter gather case: This functio support dynamic scatter gather and staic scatter gather, a. for the dynamic scatter gather case: Application should call PDM_TransferReceiveEDMA function continuously to make sure new receive request is submit before the previous one finish. b. for the static scatter gather case: Application should use the link transfer feature and make sure a loop link transfer is provided, such as:
* {
* {
* .dataSize = BUFFER_SIZE,
* .linkTransfer = &pdmXfer[1],
* },
*
* {
* .
data = &s_buffer[BUFFER_SIZE],
* .dataSize = BUFFER_SIZE,
* .linkTransfer = &pdmXfer[0]
* },
* };
*
- Multi channel case: This function support receive multi pdm channel data, for example, if two channel is requested, The output data will be formatted as below if handle->interleaveType =
kPDM_EDMAMultiChannelInterleavePerChannelSample :
|CHANNEL0 | CHANNEL1 | CHANNEL0 | CHANNEL1 | CHANNEL0 | CHANNEL 1 | ....|
The output data will be formatted as below if handle->interleaveType = kPDM_EDMAMultiChannelInterleavePerChannelBlock
:
|CHANNEL3 | CHANNEL3 | CHANNEL3 | .... | CHANNEL4 | CHANNEL 4 | CHANNEL4 |....| CHANNEL5 | CHANNEL 5 | CHANNEL5
|....|
Note: the dataSize of xfer is the total data size, while application using kPDM_EDMAMultiChannelInterleavePerChannelBlock, the buffer size for each PDM channel is channelSize = dataSize / channelNums, then there are limitation for this feature,
- 3 DMIC array: the dataSize shall be 4 * (channelSize) The addtional buffer is mandantory for edma modulo feature.
- The kPDM_EDMAMultiChannelInterleavePerChannelBlock feature support below dmic array only, 2 DMIC array: CHANNEL3, CHANNEL4 3 DMIC array: CHANNEL3, CHANNEL4, CHANNEL5 4 DMIC array: CHANNEL3, CHANNEL4, CHANNEL5, CHANNEL6 Any other combinations is not support, that is to SAY, THE FEATURE SUPPORT RECEIVE START FROM CHANNEL3 ONLY AND 4 MAXIMUM DMIC CHANNELS.
- Parameters
-
base | PDM base pointer |
handle | PDM eDMA handle pointer. |
xfer | Pointer to DMA transfer structure. |
- Return values
-
kStatus_Success | Start a PDM eDMA receive successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_RxBusy | PDM is busy receiving data. |