![]() |
Kinetis SDK v.2.0 API Reference Manual
Rev. 0
NXP Semiconductors
|
Files | |
| file | fsl_dmic.h |
Data Structures | |
| struct | dmic_channel_config_t |
| DMIC Channel configuration structure. More... | |
Typedefs | |
| typedef void(* | dmic_callback_t )(void) |
| DMIC Callback function. More... | |
| typedef void(* | dmic_hwvad_callback_t )(void) |
| HWVAD Callback function. More... | |
DMIC version | |
| #define | FSL_DMIC_DRIVER_VERSION (MAKE_VERSION(2, 1, 1)) |
| DMIC driver version 2.1.1. More... | |
Initialization and deinitialization | |
| uint32_t | DMIC_GetInstance (DMIC_Type *base) |
| Get the DMIC instance from peripheral base address. More... | |
| void | DMIC_Init (DMIC_Type *base) |
| Turns DMIC Clock on. More... | |
| void | DMIC_DeInit (DMIC_Type *base) |
| Turns DMIC Clock off. More... | |
| void | DMIC_ConfigIO (DMIC_Type *base, dmic_io_t config) |
| Configure DMIC io. More... | |
| static void | DMIC_SetIOCFG (DMIC_Type *base, uint32_t sel) |
| Stereo PDM select. More... | |
| void | DMIC_SetOperationMode (DMIC_Type *base, operation_mode_t mode) |
| Set DMIC operating mode. More... | |
| void | DMIC_Use2fs (DMIC_Type *base, bool use2fs) |
| Configure Clock scaling. More... | |
Channel configuration | |
| void | DMIC_CfgChannelDc (DMIC_Type *base, dmic_channel_t channel, dc_removal_t dc_cut_level, uint32_t post_dc_gain_reduce, bool saturate16bit) |
| Configure DMIC channel. More... | |
| void | DMIC_ConfigChannel (DMIC_Type *base, dmic_channel_t channel, stereo_side_t side, dmic_channel_config_t *channel_config) |
| Configure DMIC channel. More... | |
| void | DMIC_EnableChannnel (DMIC_Type *base, uint32_t channelmask) |
| Enable a particualr channel. More... | |
| void | DMIC_FifoChannel (DMIC_Type *base, uint32_t channel, uint32_t trig_level, uint32_t enable, uint32_t resetn) |
| Configure fifo settings for DMIC channel. More... | |
| static void | DMIC_EnableChannelInterrupt (DMIC_Type *base, dmic_channel_t channel, bool enable) |
| Enable a particualr channel interrupt request. More... | |
| static void | DMIC_EnableChannelDma (DMIC_Type *base, dmic_channel_t channel, bool enable) |
| Enable a particualr channel dma request. More... | |
| static void | DMIC_EnableChannelFifo (DMIC_Type *base, dmic_channel_t channel, bool enable) |
| Enable a particualr channel fifo. More... | |
| static void | DMIC_DoFifoReset (DMIC_Type *base, dmic_channel_t channel) |
| Channel fifo reset. More... | |
| static uint32_t | DMIC_FifoGetStatus (DMIC_Type *base, uint32_t channel) |
| Get FIFO status. More... | |
| static void | DMIC_FifoClearStatus (DMIC_Type *base, uint32_t channel, uint32_t mask) |
| Clear FIFO status. More... | |
| static uint32_t | DMIC_FifoGetData (DMIC_Type *base, uint32_t channel) |
| Get FIFO data. More... | |
| static uint32_t | DMIC_FifoGetAddress (DMIC_Type *base, uint32_t channel) |
| Get FIFO address. More... | |
Register callback. | |
| void | DMIC_EnableIntCallback (DMIC_Type *base, dmic_callback_t cb) |
| Enable callback. More... | |
| void | DMIC_DisableIntCallback (DMIC_Type *base, dmic_callback_t cb) |
| Disable callback. More... | |
HWVAD | |
| static void | DMIC_SetGainNoiseEstHwvad (DMIC_Type *base, uint32_t value) |
| Sets the gain value for the noise estimator. More... | |
| static void | DMIC_SetGainSignalEstHwvad (DMIC_Type *base, uint32_t value) |
| Sets the gain value for the signal estimator. More... | |
| static void | DMIC_SetFilterCtrlHwvad (DMIC_Type *base, uint32_t value) |
| Sets the hwvad filter cutoff frequency parameter. More... | |
| static void | DMIC_SetInputGainHwvad (DMIC_Type *base, uint32_t value) |
| Sets the input gain of hwvad. More... | |
| static void | DMIC_CtrlClrIntrHwvad (DMIC_Type *base, bool st10) |
| Clears hwvad internal interrupt flag. More... | |
| static void | DMIC_FilterResetHwvad (DMIC_Type *base, bool rstt) |
| Resets hwvad filters. More... | |
| static uint16_t | DMIC_GetNoiseEnvlpEst (DMIC_Type *base) |
| Gets the value from output of the filter z7. More... | |
| void | DMIC_HwvadEnableIntCallback (DMIC_Type *base, dmic_hwvad_callback_t vadcb) |
| Enable hwvad callback. More... | |
| void | DMIC_HwvadDisableIntCallback (DMIC_Type *base, dmic_hwvad_callback_t vadcb) |
| Disable callback. More... | |
| struct dmic_channel_config_t |
Data Fields | |
| pdm_div_t | divhfclk |
| DMIC Clock pre-divider values. | |
| uint32_t | osr |
| oversampling rate(CIC decimation rate) for PCM | |
| int32_t | gainshft |
| 4FS PCM data gain control | |
| compensation_t | preac2coef |
| Pre-emphasis Filter coefficient value for 2FS. | |
| compensation_t | preac4coef |
| Pre-emphasis Filter coefficient value for 4FS. | |
| dc_removal_t | dc_cut_level |
| DMIC DC filter control values. More... | |
| uint32_t | post_dc_gain_reduce |
| Fine gain adjustment in the form of a number of bits to downshift. | |
| dmic_phy_sample_rate_t | sample_rate |
| DMIC and decimator sample rates. | |
| bool | saturate16bit |
| Selects 16-bit saturation. More... | |
| dc_removal_t dmic_channel_config_t::dc_cut_level |
| bool dmic_channel_config_t::saturate16bit |
0 means results roll over if out range and do not saturate. 1 means if the result overflows, it saturates at 0xFFFF for positive overflow and 0x8000 for negative overflow.
| #define FSL_DMIC_DRIVER_VERSION (MAKE_VERSION(2, 1, 1)) |
| typedef void(* dmic_callback_t)(void) |
| typedef void(* dmic_hwvad_callback_t)(void) |
| enum _dmic_status |
| enum operation_mode_t |
| enum stereo_side_t |
| enum pdm_div_t |
| enum compensation_t |
| enum dc_removal_t |
| enum dmic_io_t |
| enum dmic_channel_t |
| enum _dmic_channel_mask |
| uint32_t DMIC_GetInstance | ( | DMIC_Type * | base | ) |
| base | DMIC peripheral base address. |
| void DMIC_Init | ( | DMIC_Type * | base | ) |
| base | : DMIC base |
| void DMIC_DeInit | ( | DMIC_Type * | base | ) |
| base | : DMIC base |
| void DMIC_ConfigIO | ( | DMIC_Type * | base, |
| dmic_io_t | config | ||
| ) |
| base | : The base address of DMIC interface |
| config | : DMIC io configuration |
|
inlinestatic |
| base | : The base address of DMIC interface |
| sel | : Reference dmic_io_t, can be a single or combination value of dmic_io_t. |
| void DMIC_SetOperationMode | ( | DMIC_Type * | base, |
| operation_mode_t | mode | ||
| ) |
| base | : The base address of DMIC interface |
| mode | : DMIC mode |
| void DMIC_Use2fs | ( | DMIC_Type * | base, |
| bool | use2fs | ||
| ) |
| base | : The base address of DMIC interface |
| use2fs | : clock scaling |
| void DMIC_CfgChannelDc | ( | DMIC_Type * | base, |
| dmic_channel_t | channel, | ||
| dc_removal_t | dc_cut_level, | ||
| uint32_t | post_dc_gain_reduce, | ||
| bool | saturate16bit | ||
| ) |
| base | : The base address of DMIC interface |
| channel | : DMIC channel |
| dc_cut_level | : dc_removal_t, Cut off Frequency |
| post_dc_gain_reduce | : Fine gain adjustment in the form of a number of bits to downshift. |
| saturate16bit | : If selects 16-bit saturation. |
| void DMIC_ConfigChannel | ( | DMIC_Type * | base, |
| dmic_channel_t | channel, | ||
| stereo_side_t | side, | ||
| dmic_channel_config_t * | channel_config | ||
| ) |
| base | : The base address of DMIC interface |
| channel | : DMIC channel |
| side | : stereo_side_t, choice of left or right |
| channel_config | : Channel configuration |
| void DMIC_EnableChannnel | ( | DMIC_Type * | base, |
| uint32_t | channelmask | ||
| ) |
| base | : The base address of DMIC interface |
| channelmask,reference | _dmic_channel_mask |
| void DMIC_FifoChannel | ( | DMIC_Type * | base, |
| uint32_t | channel, | ||
| uint32_t | trig_level, | ||
| uint32_t | enable, | ||
| uint32_t | resetn | ||
| ) |
| base | : The base address of DMIC interface |
| channel | : DMIC channel |
| trig_level | : FIFO trigger level |
| enable | : FIFO level |
| resetn | : FIFO reset |
|
inlinestatic |
| base | : The base address of DMIC interface |
| channel | : Channel selection |
|
inlinestatic |
| base | : The base address of DMIC interface |
| channel | : Channel selection |
| enable | : true is enable, false is disable |
|
inlinestatic |
| base | : The base address of DMIC interface |
| channel | : Channel selection |
| enable | : true is enable, false is disable |
|
inlinestatic |
| base | : The base address of DMIC interface |
| channel | : Channel selection |
|
inlinestatic |
| base | : The base address of DMIC interface |
| channel | : DMIC channel |
|
inlinestatic |
| base | : The base address of DMIC interface |
| channel | : DMIC channel |
| mask | : Bits to be cleared |
|
inlinestatic |
| base | : The base address of DMIC interface |
| channel | : DMIC channel |
|
inlinestatic |
| base | : The base address of DMIC interface |
| channel | : DMIC channel |
| void DMIC_EnableIntCallback | ( | DMIC_Type * | base, |
| dmic_callback_t | cb | ||
| ) |
This function enables the interrupt for the selected DMIC peripheral. The callback function is not enabled until this function is called.
| base | Base address of the DMIC peripheral. |
| cb | callback Pointer to store callback function. |
| None. |
| void DMIC_DisableIntCallback | ( | DMIC_Type * | base, |
| dmic_callback_t | cb | ||
| ) |
This function disables the interrupt for the selected DMIC peripheral.
| base | Base address of the DMIC peripheral. |
| cb | callback Pointer to store callback function.. |
| None. |
|
inlinestatic |
| base | DMIC base pointer |
| value | gain value for the noise estimator. |
| None. |
|
inlinestatic |
| base | DMIC base pointer |
| value | gain value for the signal estimator. |
| None. |
|
inlinestatic |
| base | DMIC base pointer |
| value | cut off frequency value. |
| None. |
|
inlinestatic |
| base | DMIC base pointer |
| value | input gain value for hwvad. |
| None. |
|
inlinestatic |
| base | DMIC base pointer |
| st10 | bit value. |
| None. |
|
inlinestatic |
| base | DMIC base pointer |
| rstt | Reset bit value. |
| None. |
|
inlinestatic |
| base | DMIC base pointer |
| output | of filter z7. |
| void DMIC_HwvadEnableIntCallback | ( | DMIC_Type * | base, |
| dmic_hwvad_callback_t | vadcb | ||
| ) |
This function enables the hwvad interrupt for the selected DMIC peripheral. The callback function is not enabled until this function is called.
| base | Base address of the DMIC peripheral. |
| vadcb | callback Pointer to store callback function. |
| None. |
| void DMIC_HwvadDisableIntCallback | ( | DMIC_Type * | base, |
| dmic_hwvad_callback_t | vadcb | ||
| ) |
This function disables the hwvad interrupt for the selected DMIC peripheral.
| base | Base address of the DMIC peripheral. |
| vadcb | callback Pointer to store callback function.. |
| None. |