12#include "fsl_common.h"
25#define FSL_PDM_DRIVER_VERSION (MAKE_VERSION(2, 8, 0))
29#define PDM_XFER_QUEUE_SIZE (4U)
35#if (defined(FSL_FEATURE_PDM_HAS_STATUS_LOW_FREQ) && (FSL_FEATURE_PDM_HAS_STATUS_LOW_FREQ == 1U))
43#if !(defined(FSL_FEATURE_PDM_HAS_NO_HWVAD) && FSL_FEATURE_PDM_HAS_NO_HWVAD)
60#
if !(defined(FSL_FEATURE_PDM_HAS_NO_FIR_RDY) && FSL_FEATURE_PDM_HAS_NO_FIR_RDY)
63#
if (defined(FSL_FEATURE_PDM_HAS_STATUS_LOW_FREQ) && (FSL_FEATURE_PDM_HAS_STATUS_LOW_FREQ == 1U))
64 kPDM_StatusFrequencyLow = PDM_STAT_LOWFREQF_MASK,
70#if !defined(FSL_FEATURE_PDM_CHANNEL_NUM) || (FSL_FEATURE_PDM_CHANNEL_NUM == 8U)
85#if !defined(FSL_FEATURE_PDM_CHANNEL_NUM) || (FSL_FEATURE_PDM_CHANNEL_NUM == 8U)
105#if !defined(FSL_FEATURE_PDM_CHANNEL_NUM) || (FSL_FEATURE_PDM_CHANNEL_NUM == 8U)
116#if !defined(FSL_FEATURE_PDM_CHANNEL_NUM) || (FSL_FEATURE_PDM_CHANNEL_NUM == 8U)
124#if defined(FSL_FEATURE_PDM_HAS_RANGE_CTRL) && FSL_FEATURE_PDM_HAS_RANGE_CTRL
126enum _pdm_range_status
128 kPDM_RangeStatusUnderFlowCh0 = PDM_RANGE_STAT_RANGEUNF0_MASK,
129 kPDM_RangeStatusUnderFlowCh1 = PDM_RANGE_STAT_RANGEUNF1_MASK,
130 kPDM_RangeStatusUnderFlowCh2 = PDM_RANGE_STAT_RANGEUNF2_MASK,
131 kPDM_RangeStatusUnderFlowCh3 = PDM_RANGE_STAT_RANGEUNF3_MASK,
132#if !defined(FSL_FEATURE_PDM_CHANNEL_NUM) || (FSL_FEATURE_PDM_CHANNEL_NUM == 8U)
133 kPDM_RangeStatusUnderFlowCh4 = PDM_RANGE_STAT_RANGEUNF4_MASK,
134 kPDM_RangeStatusUnderFlowCh5 = PDM_RANGE_STAT_RANGEUNF5_MASK,
135 kPDM_RangeStatusUnderFlowCh6 = PDM_RANGE_STAT_RANGEUNF6_MASK,
136 kPDM_RangeStatusUnderFlowCh7 = PDM_RANGE_STAT_RANGEUNF7_MASK,
138 kPDM_RangeStatusOverFlowCh0 = PDM_RANGE_STAT_RANGEOVF0_MASK,
139 kPDM_RangeStatusOverFlowCh1 = PDM_RANGE_STAT_RANGEOVF1_MASK,
140 kPDM_RangeStatusOverFlowCh2 = PDM_RANGE_STAT_RANGEOVF2_MASK,
141 kPDM_RangeStatusOverFlowCh3 = PDM_RANGE_STAT_RANGEOVF3_MASK,
142#if !defined(FSL_FEATURE_PDM_CHANNEL_NUM) || (FSL_FEATURE_PDM_CHANNEL_NUM == 8U)
143 kPDM_RangeStatusOverFlowCh4 = PDM_RANGE_STAT_RANGEOVF4_MASK,
144 kPDM_RangeStatusOverFlowCh5 = PDM_RANGE_STAT_RANGEOVF5_MASK,
145 kPDM_RangeStatusOverFlowCh6 = PDM_RANGE_STAT_RANGEOVF6_MASK,
146 kPDM_RangeStatusOverFlowCh7 = PDM_RANGE_STAT_RANGEOVF7_MASK,
157#if !defined(FSL_FEATURE_PDM_CHANNEL_NUM) || (FSL_FEATURE_PDM_CHANNEL_NUM == 8U)
167#if !defined(FSL_FEATURE_PDM_CHANNEL_NUM) || (FSL_FEATURE_PDM_CHANNEL_NUM == 8U)
176#if (defined(FSL_FEATURE_PDM_HAS_DC_OUT_CTRL) && (FSL_FEATURE_PDM_HAS_DC_OUT_CTRL))
180 kPDM_DcRemoverCutOff20Hz = 0U,
181 kPDM_DcRemoverCutOff13Hz = 1U,
182 kPDM_DcRemoverCutOff40Hz = 2U,
240#if defined(FSL_FEATURE_PDM_FIFO_WIDTH) && (FSL_FEATURE_PDM_FIFO_WIDTH != 2U)
241 kPDM_DataWwidth24 = 3U,
242 kPDM_DataWwidth32 = 4U,
251#if (defined(FSL_FEATURE_PDM_HAS_DC_OUT_CTRL) && (FSL_FEATURE_PDM_HAS_DC_OUT_CTRL))
255#if !(defined(FSL_FEATURE_PDM_DC_CTRL_VALUE_FIXED) && (FSL_FEATURE_PDM_DC_CTRL_VALUE_FIXED))
272#if !(defined(FSL_FEATURE_PDM_HAS_NO_HWVAD) && FSL_FEATURE_PDM_HAS_NO_HWVAD)
360#if !(defined(FSL_FEATURE_PDM_HAS_NO_HWVAD) && FSL_FEATURE_PDM_HAS_NO_HWVAD)
393#if defined(__cplusplus)
433static inline void PDM_Reset(
PDM_Type *base)
435 base->CTRL_1 |= PDM_CTRL_1_SRES_MASK;
444static inline void PDM_Enable(
PDM_Type *base,
bool enable)
448 base->CTRL_1 |= PDM_CTRL_1_PDMIEN_MASK;
452 base->CTRL_1 &= ~PDM_CTRL_1_PDMIEN_MASK;
463static inline void PDM_EnableDoze(
PDM_Type *base,
bool enable)
467 base->CTRL_1 |= PDM_CTRL_1_DOZEN_MASK;
471 base->CTRL_1 &= ~PDM_CTRL_1_DOZEN_MASK;
481static inline void PDM_EnableDebugMode(
PDM_Type *base,
bool enable)
485 base->CTRL_1 |= PDM_CTRL_1_DBG_MASK;
489 base->CTRL_1 &= ~PDM_CTRL_1_DBG_MASK;
500static inline void PDM_EnableInDebugMode(
PDM_Type *base,
bool enable)
504 base->CTRL_1 |= PDM_CTRL_1_DBGE_MASK;
508 base->CTRL_1 &= ~PDM_CTRL_1_DBGE_MASK;
518static inline void PDM_EnterLowLeakageMode(
PDM_Type *base,
bool enable)
522 base->CTRL_1 |= PDM_CTRL_1_MDIS_MASK;
526 base->CTRL_1 &= ~PDM_CTRL_1_MDIS_MASK;
537static inline void PDM_EnableChannel(
PDM_Type *base, uint8_t channel,
bool enable)
541 base->CTRL_1 |= (1UL << channel);
545 base->CTRL_1 &= ~(1UL << channel);
606static inline uint32_t PDM_GetStatus(
PDM_Type *base)
617static inline uint32_t PDM_GetFifoStatus(
PDM_Type *base)
619 return base->FIFO_STAT;
622#if defined(FSL_FEATURE_PDM_HAS_RANGE_CTRL) && FSL_FEATURE_PDM_HAS_RANGE_CTRL
629static inline uint32_t PDM_GetRangeStatus(
PDM_Type *base)
631 return base->RANGE_STAT;
640static inline uint32_t PDM_GetOutputStatus(
PDM_Type *base)
642 return base->OUT_STAT;
653static inline void PDM_ClearStatus(
PDM_Type *base, uint32_t mask)
664static inline void PDM_ClearFIFOStatus(
PDM_Type *base, uint32_t mask)
666 base->FIFO_STAT = mask;
669#if defined(FSL_FEATURE_PDM_HAS_RANGE_CTRL) && FSL_FEATURE_PDM_HAS_RANGE_CTRL
676static inline void PDM_ClearRangeStatus(
PDM_Type *base, uint32_t mask)
678 base->RANGE_STAT = mask;
687static inline void PDM_ClearOutputStatus(
PDM_Type *base, uint32_t mask)
689 base->OUT_STAT = mask;
720static inline void PDM_DisableInterrupts(
PDM_Type *base, uint32_t mask)
722 base->CTRL_1 &= ~mask;
738static inline void PDM_EnableDMA(
PDM_Type *base,
bool enable)
742 base->CTRL_1 = (base->CTRL_1 & (~PDM_CTRL_1_DISEL_MASK)) |
PDM_CTRL_1_DISEL(0x1U);
746 base->CTRL_1 &= ~PDM_CTRL_1_DISEL_MASK;
759static inline uint32_t PDM_GetDataRegisterAddress(
PDM_Type *base, uint32_t channel)
761 return (uint32_t)(&(base->DATACH)[channel]);
770#if defined(FSL_FEATURE_PDM_FIFO_WIDTH) && (FSL_FEATURE_PDM_FIFO_WIDTH == 2U)
778static inline int16_t PDM_ReadData(
PDM_Type *base, uint32_t channel)
780 return (int16_t)(base->DATACH[channel]);
792void PDM_ReadNonBlocking(
PDM_Type *base, uint32_t startChannel, uint32_t channelNums, int16_t *buffer,
size_t size);
807 PDM_Type *base, uint32_t startChannel, uint32_t channelNums,
void *buffer,
size_t size, uint32_t dataWidth);
809#if defined(FSL_FEATURE_PDM_FIFO_WIDTH) && (FSL_FEATURE_PDM_FIFO_WIDTH == 4U)
817static inline uint32_t PDM_ReadData(
PDM_Type *base, uint32_t channel)
819 return base->DATACH[channel];
833#if !(defined(FSL_FEATURE_PDM_HAS_NO_HWVAD) && FSL_FEATURE_PDM_HAS_NO_HWVAD)
855static inline void PDM_ForceHwvadOutputDisable(
PDM_Type *base,
bool enable)
859 base->VAD0_CTRL_2 &= ~PDM_VAD0_CTRL_2_VADFOUTDIS_MASK;
863 base->VAD0_CTRL_2 |= PDM_VAD0_CTRL_2_VADFOUTDIS_MASK;
873static inline void PDM_ResetHwvad(
PDM_Type *base)
875 base->VAD0_CTRL_1 |= PDM_VAD0_CTRL_1_VADRST_MASK;
883static inline void PDM_EnableHwvad(
PDM_Type *base,
bool enable)
887 base->VAD0_CTRL_1 |= PDM_VAD0_CTRL_1_VADEN_MASK;
891 base->VAD0_CTRL_1 &= ~PDM_VAD0_CTRL_1_VADEN_MASK;
904static inline void PDM_EnableHwvadInterrupts(
PDM_Type *base, uint32_t mask)
906 base->VAD0_CTRL_1 |= mask;
918static inline void PDM_DisableHwvadInterrupts(
PDM_Type *base, uint32_t mask)
920 base->VAD0_CTRL_1 &= ~mask;
929static inline void PDM_ClearHwvadInterruptStatusFlags(
PDM_Type *base, uint32_t mask)
931 base->VAD0_STAT = mask;
940static inline uint32_t PDM_GetHwvadInterruptStatusFlags(
PDM_Type *base)
942 return base->VAD0_STAT & (PDM_VAD0_STAT_VADIF_MASK | PDM_VAD0_STAT_VADINSATF_MASK);
951static inline uint32_t PDM_GetHwvadInitialFlag(
PDM_Type *base)
953 return base->VAD0_STAT & PDM_VAD0_STAT_VADINITF_MASK;
956#if !(defined(FSL_FEATURE_PDM_HAS_NO_VADEF) && (FSL_FEATURE_PDM_HAS_NO_VADEF))
963static inline uint32_t PDM_GetHwvadVoiceDetectedFlag(
PDM_Type *base)
965 return base->VAD0_STAT & PDM_VAD0_STAT_VADEF_MASK;
975static inline void PDM_EnableHwvadSignalFilter(
PDM_Type *base,
bool enable)
979 base->VAD0_SCONFIG |= PDM_VAD0_SCONFIG_VADSFILEN_MASK;
983 base->VAD0_SCONFIG &= ~PDM_VAD0_SCONFIG_VADSFILEN_MASK;
1010static inline void PDM_EnableHwvadZeroCrossDetector(
PDM_Type *base,
bool enable)
1014 base->VAD0_ZCD |= PDM_VAD0_ZCD_VADZCDEN_MASK;
1018 base->VAD0_ZCD &= ~PDM_VAD0_ZCD_VADZCDEN_MASK;
1036static inline uint16_t PDM_GetNoiseData(
PDM_Type *base)
1038 return (uint16_t)base->VAD0_NDATA;
1049 base->VAD0_CTRL_1 = (base->VAD0_CTRL_1 & (~PDM_VAD0_CTRL_1_VADST10_MASK)) | (uint32_t)status;
1086 uint32_t signalGain);
1122 uint32_t signalGain);
1207#if defined(__cplusplus)
#define PDM_CTRL_1_DISEL(x)
Definition: MIMXRT1166_cm4.h:65658
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:47
@ kStatusGroup_PDM
Definition: fsl_common.h:144
void PDM_SetHwvadNoiseFilterConfig(PDM_Type *base, const pdm_hwvad_noise_filter_t *config)
Configure voice activity detector noise filter.
Definition: fsl_pdm.c:842
#define PDM_XFER_QUEUE_SIZE
PDM XFER QUEUE SIZE.
Definition: fsl_pdm.h:29
_pdm_hwvad_zcd_result
PDM voice activity detector zero cross detector result.
Definition: fsl_pdm.h:330
struct _pdm_hwvad_config pdm_hwvad_config_t
PDM voice activity detector user configuration structure.
status_t PDM_SetSampleRateConfig(PDM_Type *base, uint32_t sourceClock_HZ, uint32_t sampleRate_HZ)
PDM set sample rate.
Definition: fsl_pdm.c:217
void PDM_TransferHandleIRQ(PDM_Type *base, pdm_handle_t *handle)
Tx interrupt handler.
Definition: fsl_pdm.c:598
_pdm_hwvad_int_status
The PDM hwvad interrupt status flag.
Definition: fsl_pdm.h:282
void PDM_SetHwvadZeroCrossDetectorConfig(PDM_Type *base, const pdm_hwvad_zero_cross_detector_t *config)
Configure voice activity detector zero cross detector.
Definition: fsl_pdm.c:859
void(* pdm_hwvad_callback_t)(status_t status, void *userData)
PDM HWVAD callback prototype.
Definition: fsl_pdm.h:362
_pdm_df_output_gain
PDM decimation filter output gain.
Definition: fsl_pdm.h:218
_pdm_dc_remover
PDM DC remover configurations.
Definition: fsl_pdm.h:188
void PDM_EnableInterrupts(PDM_Type *base, uint32_t mask)
Enables the PDM interrupt requests.
Definition: fsl_pdm.c:378
void PDM_SetHwvadConfig(PDM_Type *base, const pdm_hwvad_config_t *config)
Configure voice activity detector.
Definition: fsl_pdm.c:800
enum _pdm_df_output_gain pdm_df_output_gain_t
PDM decimation filter output gain.
enum _pdm_hwvad_zcd_result pdm_hwvad_zcd_result_t
PDM voice activity detector zero cross detector result.
void PDM_SetChannelGain(PDM_Type *base, uint32_t channel, pdm_df_output_gain_t gain)
Set the PDM channel gain.
Definition: fsl_pdm.c:435
void PDM_EnableHwvadInterruptCallback(PDM_Type *base, pdm_hwvad_callback_t vadCallback, void *userData, bool enable)
Enable/Disable hwvad callback.
Definition: fsl_pdm.c:884
void PDM_SetHwvadSignalFilterConfig(PDM_Type *base, bool enableMaxBlock, uint32_t signalGain)
Configure voice activity detector signal filter.
Definition: fsl_pdm.c:826
struct _pdm_transfer pdm_transfer_t
PDM SDMA transfer structure.
_pdm_data_width
PDM data width.
Definition: fsl_pdm.h:239
_pdm_hwvad_filter_status
HWVAD internal filter status.
Definition: fsl_pdm.h:298
void(* pdm_transfer_callback_t)(PDM_Type *base, pdm_handle_t *handle, status_t status, void *userData)
PDM transfer callback prototype.
Definition: fsl_pdm.h:358
enum _pdm_df_quality_mode pdm_df_quality_mode_t
PDM decimation filter quality mode.
status_t PDM_SetSampleRate(PDM_Type *base, uint32_t enableChannelMask, pdm_df_quality_mode_t qualityMode, uint8_t osr, uint32_t clkDiv)
PDM set sample rate.
Definition: fsl_pdm.c:261
void PDM_Init(PDM_Type *base, const pdm_config_t *config)
Initializes the PDM peripheral.
Definition: fsl_pdm.c:313
void PDM_TransferCreateHandle(PDM_Type *base, pdm_handle_t *handle, pdm_transfer_callback_t callback, void *userData)
Initializes the PDM handle.
Definition: fsl_pdm.c:504
status_t PDM_TransferReceiveNonBlocking(PDM_Type *base, pdm_handle_t *handle, pdm_transfer_t *xfer)
Performs an interrupt non-blocking receive transfer on PDM.
Definition: fsl_pdm.c:542
struct _pdm_config pdm_config_t
PDM user configuration structure.
_pdm_output_status
The PDM output status.
Definition: fsl_pdm.h:152
_pdm_hwvad_hpf_config
High pass filter configure cut-off frequency.
Definition: fsl_pdm.h:289
uint32_t PDM_GetInstance(PDM_Type *base)
Get the instance number for PDM.
Definition: fsl_pdm.c:66
enum _pdm_hwvad_filter_status pdm_hwvad_filter_status_t
HWVAD internal filter status.
_pdm_interrupt_enable
The PDM interrupt enable flag.
Definition: fsl_pdm.h:51
enum _pdm_hwvad_hpf_config pdm_hwvad_hpf_config_t
High pass filter configure cut-off frequency.
void PDM_TransferAbortReceive(PDM_Type *base, pdm_handle_t *handle)
Aborts the current IRQ receive.
Definition: fsl_pdm.c:578
enum _pdm_dc_remover pdm_dc_remover_t
PDM DC remover configurations.
void PDM_SetHwvadInEnergyBasedMode(PDM_Type *base, const pdm_hwvad_config_t *hwvadConfig, const pdm_hwvad_noise_filter_t *noiseConfig, const pdm_hwvad_zero_cross_detector_t *zcdConfig, uint32_t signalGain)
Definition: fsl_pdm.c:771
status_t PDM_TransferSetChannelConfig(PDM_Type *base, pdm_handle_t *handle, uint32_t channel, const pdm_channel_config_t *config, uint32_t format)
PDM set channel transfer config.
Definition: fsl_pdm.c:469
_pdm_hwvad_interrupt_enable
PDM voice activity detector interrupt type.
Definition: fsl_pdm.h:275
_pdm_channel_enable_mask
PDM channel enable mask.
Definition: fsl_pdm.h:80
struct _pdm_hwvad_noise_filter pdm_hwvad_noise_filter_t
PDM voice activity detector noise filter user configuration structure.
_pdm_fifo_status
The PDM fifo status.
Definition: fsl_pdm.h:100
_pdm_df_quality_mode
PDM decimation filter quality mode.
Definition: fsl_pdm.h:198
void PDM_Deinit(PDM_Type *base)
De-initializes the PDM peripheral.
Definition: fsl_pdm.c:356
_pdm_qulaity_mode_k_factor
PDM quality mode K factor.
Definition: fsl_pdm.h:209
void PDM_ReadFifo(PDM_Type *base, uint32_t startChannel, uint32_t channelNums, void *buffer, size_t size, uint32_t dataWidth)
PDM read fifo.
Definition: fsl_pdm.c:95
_pdm_internal_status
The PDM status.
Definition: fsl_pdm.h:58
void PDM_SetChannelConfig(PDM_Type *base, uint32_t channel, const pdm_channel_config_t *config)
PDM one channel configurations.
Definition: fsl_pdm.c:398
struct _pdm_hwvad_notification pdm_hwvad_notification_t
PDM HWVAD notification structure.
void PDM_SetHwvadInEnvelopeBasedMode(PDM_Type *base, const pdm_hwvad_config_t *hwvadConfig, const pdm_hwvad_noise_filter_t *noiseConfig, const pdm_hwvad_zero_cross_detector_t *zcdConfig, uint32_t signalGain)
set HWVAD in envelope based mode . Recommand configurations,
Definition: fsl_pdm.c:705
struct _pdm_channel_config pdm_channel_config_t
PDM channel configurations.
struct _pdm_hwvad_zero_cross_detector pdm_hwvad_zero_cross_detector_t
PDM voice activity detector zero cross detector configuration structure.
@ kPDM_HwvadResultOREnergyBasedDetection
Definition: fsl_pdm.h:331
@ kPDM_HwvadResultANDEnergyBasedDetection
Definition: fsl_pdm.h:333
@ kPDM_HwvadStatusInputSaturation
Definition: fsl_pdm.h:283
@ kPDM_HwvadStatusVoiceDetectFlag
Definition: fsl_pdm.h:284
@ kPDM_DfOutputGain15
Definition: fsl_pdm.h:234
@ kPDM_DfOutputGain11
Definition: fsl_pdm.h:230
@ kPDM_DfOutputGain9
Definition: fsl_pdm.h:228
@ kPDM_DfOutputGain0
Definition: fsl_pdm.h:219
@ kPDM_DfOutputGain13
Definition: fsl_pdm.h:232
@ kPDM_DfOutputGain3
Definition: fsl_pdm.h:222
@ kPDM_DfOutputGain10
Definition: fsl_pdm.h:229
@ kPDM_DfOutputGain5
Definition: fsl_pdm.h:224
@ kPDM_DfOutputGain1
Definition: fsl_pdm.h:220
@ kPDM_DfOutputGain2
Definition: fsl_pdm.h:221
@ kPDM_DfOutputGain12
Definition: fsl_pdm.h:231
@ kPDM_DfOutputGain8
Definition: fsl_pdm.h:227
@ kPDM_DfOutputGain14
Definition: fsl_pdm.h:233
@ kPDM_DfOutputGain6
Definition: fsl_pdm.h:225
@ kPDM_DfOutputGain7
Definition: fsl_pdm.h:226
@ kPDM_DfOutputGain4
Definition: fsl_pdm.h:223
@ kPDM_DcRemoverBypass
Definition: fsl_pdm.h:192
@ kPDM_DcRemoverCutOff21Hz
Definition: fsl_pdm.h:189
@ kPDM_DcRemoverCutOff152Hz
Definition: fsl_pdm.h:191
@ kPDM_DcRemoverCutOff83Hz
Definition: fsl_pdm.h:190
@ kPDM_DataWdith16
Definition: fsl_pdm.h:244
@ kPDM_HwvadInternalFilterNormalOperation
Definition: fsl_pdm.h:299
@ kPDM_HwvadInternalFilterInitial
Definition: fsl_pdm.h:300
@ kPDM_OutputStatusUnderFlowCh5
Definition: fsl_pdm.h:159
@ kPDM_OutputStatusUnderFlowCh6
Definition: fsl_pdm.h:160
@ kPDM_OutputStatusUnderFlowCh7
Definition: fsl_pdm.h:161
@ kPDM_OutputStatusOverFlowCh1
Definition: fsl_pdm.h:164
@ kPDM_OutputStatusUnderFlowCh0
Definition: fsl_pdm.h:153
@ kPDM_OutputStatusOverFlowCh7
Definition: fsl_pdm.h:171
@ kPDM_OutputStatusUnderFlowCh3
Definition: fsl_pdm.h:156
@ kPDM_OutputStatusOverFlowCh0
Definition: fsl_pdm.h:163
@ kPDM_OutputStatusOverFlowCh6
Definition: fsl_pdm.h:170
@ kPDM_OutputStatusOverFlowCh2
Definition: fsl_pdm.h:165
@ kPDM_OutputStatusUnderFlowCh2
Definition: fsl_pdm.h:155
@ kPDM_OutputStatusOverFlowCh5
Definition: fsl_pdm.h:169
@ kPDM_OutputStatusOverFlowCh4
Definition: fsl_pdm.h:168
@ kPDM_OutputStatusOverFlowCh3
Definition: fsl_pdm.h:166
@ kPDM_OutputStatusUnderFlowCh1
Definition: fsl_pdm.h:154
@ kPDM_OutputStatusUnderFlowCh4
Definition: fsl_pdm.h:158
@ kPDM_HwvadHpfCutOffFreq1750Hz
Definition: fsl_pdm.h:291
@ kPDM_HwvadHpfBypassed
Definition: fsl_pdm.h:290
@ kPDM_HwvadHpfCutOffFreq102Hz
Definition: fsl_pdm.h:293
@ kPDM_HwvadHpfCutOffFreq215Hz
Definition: fsl_pdm.h:292
@ kPDM_ErrorInterruptEnable
Definition: fsl_pdm.h:52
@ kPDM_FIFOInterruptEnable
Definition: fsl_pdm.h:53
@ kPDM_HwvadInterruptEnable
Definition: fsl_pdm.h:277
@ kPDM_HwvadErrorInterruptEnable
Definition: fsl_pdm.h:276
@ kPDM_EnableChannel4
Definition: fsl_pdm.h:86
@ kPDM_EnableChannel6
Definition: fsl_pdm.h:88
@ kPDM_EnableChannel3
Definition: fsl_pdm.h:84
@ kPDM_EnableChannel5
Definition: fsl_pdm.h:87
@ kPDM_EnableChannel7
Definition: fsl_pdm.h:89
@ kPDM_EnableChannel1
Definition: fsl_pdm.h:82
@ kPDM_EnableChannel2
Definition: fsl_pdm.h:83
@ kPDM_EnableChannel0
Definition: fsl_pdm.h:81
@ kStatus_PDM_Busy
Definition: fsl_pdm.h:34
@ kStatus_PDM_QueueFull
Definition: fsl_pdm.h:39
@ kStatus_PDM_HWVAD_Error
Definition: fsl_pdm.h:45
@ kStatus_PDM_FIFO_ERROR
Definition: fsl_pdm.h:38
@ kStatus_PDM_HWVAD_VoiceDetected
Definition: fsl_pdm.h:44
@ kStatus_PDM_Idle
Definition: fsl_pdm.h:40
@ kStatus_PDM_ChannelConfig_Failed
Definition: fsl_pdm.h:42
@ kStatus_PDM_Output_ERROR
Definition: fsl_pdm.h:41
@ kPDM_FifoStatusOverflowCh0
Definition: fsl_pdm.h:112
@ kPDM_FifoStatusUnderflowCh4
Definition: fsl_pdm.h:106
@ kPDM_FifoStatusUnderflowCh0
Definition: fsl_pdm.h:101
@ kPDM_FifoStatusOverflowCh5
Definition: fsl_pdm.h:118
@ kPDM_FifoStatusOverflowCh4
Definition: fsl_pdm.h:117
@ kPDM_FifoStatusOverflowCh6
Definition: fsl_pdm.h:119
@ kPDM_FifoStatusOverflowCh1
Definition: fsl_pdm.h:113
@ kPDM_FifoStatusUnderflowCh6
Definition: fsl_pdm.h:108
@ kPDM_FifoStatusUnderflowCh7
Definition: fsl_pdm.h:109
@ kPDM_FifoStatusUnderflowCh2
Definition: fsl_pdm.h:103
@ kPDM_FifoStatusOverflowCh2
Definition: fsl_pdm.h:114
@ kPDM_FifoStatusOverflowCh7
Definition: fsl_pdm.h:120
@ kPDM_FifoStatusOverflowCh3
Definition: fsl_pdm.h:115
@ kPDM_FifoStatusUnderflowCh3
Definition: fsl_pdm.h:104
@ kPDM_FifoStatusUnderflowCh1
Definition: fsl_pdm.h:102
@ kPDM_FifoStatusUnderflowCh5
Definition: fsl_pdm.h:107
@ kPDM_QualityModeVeryLow0
Definition: fsl_pdm.h:202
@ kPDM_QualityModeVeryLow1
Definition: fsl_pdm.h:203
@ kPDM_QualityModeMedium
Definition: fsl_pdm.h:199
@ kPDM_QualityModeHigh
Definition: fsl_pdm.h:200
@ kPDM_QualityModeVeryLow2
Definition: fsl_pdm.h:204
@ kPDM_QualityModeLow
Definition: fsl_pdm.h:201
@ kPDM_QualityModeLowKFactor
Definition: fsl_pdm.h:212
@ kPDM_QualityModeHighKFactor
Definition: fsl_pdm.h:210
@ kPDM_QualityModeMediumKFactor
Definition: fsl_pdm.h:211
@ kPDM_QualityModeVeryLow2KFactor
Definition: fsl_pdm.h:213
@ kPDM_StatusCh4FifoDataAvaliable
Definition: fsl_pdm.h:71
@ kPDM_StatusFIRFilterReady
Definition: fsl_pdm.h:61
@ kPDM_StatusCh0FifoDataAvaliable
Definition: fsl_pdm.h:66
@ kPDM_StatusCh3FifoDataAvaliable
Definition: fsl_pdm.h:69
@ kPDM_StatusDfBusyFlag
Definition: fsl_pdm.h:59
@ kPDM_StatusCh1FifoDataAvaliable
Definition: fsl_pdm.h:67
@ kPDM_StatusCh2FifoDataAvaliable
Definition: fsl_pdm.h:68
@ kPDM_StatusCh6FifoDataAvaliable
Definition: fsl_pdm.h:73
@ kPDM_StatusCh7FifoDataAvaliable
Definition: fsl_pdm.h:74
@ kPDM_StatusCh5FifoDataAvaliable
Definition: fsl_pdm.h:72
Definition: MIMXRT1166_cm4.h:65557
PDM channel configurations.
Definition: fsl_pdm.h:250
pdm_dc_remover_t cutOffFreq
Definition: fsl_pdm.h:256
pdm_df_output_gain_t gain
Definition: fsl_pdm.h:259
PDM user configuration structure.
Definition: fsl_pdm.h:264
pdm_df_quality_mode_t qualityMode
Definition: fsl_pdm.h:268
uint8_t fifoWatermark
Definition: fsl_pdm.h:267
uint8_t cicOverSampleRate
Definition: fsl_pdm.h:269
bool enableDoze
Definition: fsl_pdm.h:266
PDM handle structure.
Definition: fsl_pdm.h:373
volatile uint8_t queueDriver
Definition: fsl_pdm.h:381
size_t transferSize[PDM_XFER_QUEUE_SIZE]
Definition: fsl_pdm.h:379
pdm_transfer_callback_t callback
Definition: fsl_pdm.h:375
void * userData
Definition: fsl_pdm.h:376
uint32_t format
Definition: fsl_pdm.h:383
pdm_transfer_t pdmQueue[PDM_XFER_QUEUE_SIZE]
Definition: fsl_pdm.h:378
uint8_t startChannel
Definition: fsl_pdm.h:385
uint32_t state
Definition: fsl_pdm.h:374
volatile uint8_t queueUser
Definition: fsl_pdm.h:380
uint8_t watermark
Definition: fsl_pdm.h:384
uint8_t channelNums
Definition: fsl_pdm.h:386
PDM voice activity detector user configuration structure.
Definition: fsl_pdm.h:305
bool enablePreFilter
Definition: fsl_pdm.h:314
pdm_hwvad_hpf_config_t cutOffFreq
Definition: fsl_pdm.h:312
uint8_t channel
Definition: fsl_pdm.h:306
uint8_t cicOverSampleRate
Definition: fsl_pdm.h:308
bool enableFrameEnergy
Definition: fsl_pdm.h:313
uint8_t inputGain
Definition: fsl_pdm.h:310
uint8_t initializeTime
Definition: fsl_pdm.h:307
uint32_t frameTime
Definition: fsl_pdm.h:311
PDM voice activity detector noise filter user configuration structure.
Definition: fsl_pdm.h:319
bool enableNoiseMin
Definition: fsl_pdm.h:321
bool enableNoiseDecimation
Definition: fsl_pdm.h:322
bool enableAutoNoiseFilter
Definition: fsl_pdm.h:320
bool enableNoiseDetectOR
Definition: fsl_pdm.h:323
uint32_t noiseFilterAdjustment
Definition: fsl_pdm.h:324
uint32_t noiseGain
Definition: fsl_pdm.h:325
PDM HWVAD notification structure.
Definition: fsl_pdm.h:365
PDM voice activity detector zero cross detector configuration structure.
Definition: fsl_pdm.h:339
bool enableAutoThreshold
Definition: fsl_pdm.h:340
uint32_t adjustmentThreshold
Definition: fsl_pdm.h:343
pdm_hwvad_zcd_result_t zcdAnd
Definition: fsl_pdm.h:341
uint32_t threshold
Definition: fsl_pdm.h:342
PDM SDMA transfer structure.
Definition: fsl_pdm.h:349
volatile uint8_t * data
Definition: fsl_pdm.h:350
volatile size_t dataSize
Definition: fsl_pdm.h:351
Definition: deflate.c:114
unsigned size
Definition: tte.h:1