![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the SINC Filter module of MCUXpresso SDK devices. The SINC module is a digital filter that converts an external ADC sigma-delta modulator bitstream to a data stream. One SINC module contains 4 channel4 with dedicated modulator clocks, bitstreams, and triggers. Based on features of SINC module, this driver are divided into following function groups:
Functions in this group are used to initialize or de-initialize SINC module, users can use SINC module by only invoking SINC_Init() with correct configuration.
Functions in this group are used to enable/disable SINC master or reset SINC module.
Functions in this group are used to control SINC internal clocks.
Functions in this group can be used to set specific channel in the high level method. For example, if only want to set all options(input, protection, FIFO and so on) of channel0, invoking SINC_SetChannelConfig() with the second parameter as kSINC_Channel0.
Functions in this group can be used to set specific channel's result related options.
Functions in this group can be used to set specific channel's conversion related options.
Functions in this group can be used to set specific channel's protection related options.
Functions in this group can be used to set specific channel's debug options.
Functions in this group are used to enable/disable SINC module interrupts.
Data Structures | |
struct | sinc_channel_input_option_t |
The structure of channel input options, including input bit settings and input clock settings. More... | |
struct | sinc_channel_conv_option_t |
The structure of channel conversion options, including CIC filter settings, HPF settings, shift settings, bias settings and so on. More... | |
struct | sinc_channel_protection_option_t |
The structure of channel protection options, including limit check settings, short-circuit settings, clock-absence settings, and zero-crossing settings. More... | |
struct | sinc_channel_config_t |
The structure of channel configurations, including channel input option, channel conversion options, channel protection options, and so on. More... | |
struct | sinc_config_t |
The structure of sinc configurations, including clock settings anc channels' settings. More... | |
Driver version | |
#define | FSL_SINC_DRIVER_VERSION (MAKE_VERSION(2, 1, 4)) |
lower_component_name driver version 2.1.4. More... | |
SINC Generic Functional Control APIs | |
void | SINC_Init (SINC_Type *base, const sinc_config_t *config) |
Initialize selected SINC instance, including clock options and channel options. More... | |
void | SINC_Deinit (SINC_Type *base) |
De-initialize selected SINC instance. More... | |
void | SINC_GetDefaultConfig (sinc_config_t *config) |
Get default configuration. More... | |
SINC Generic Low Level Control APIs | |
static void | SINC_EnableMaster (SINC_Type *base, bool enable) |
Enable/disable all function blocks enabled in their respective registers. More... | |
static void | SINC_DoSoftwareReset (SINC_Type *base) |
Reset all function blocks(except for the clock blocks), interrupt statuses. More... | |
static void | SINC_DisableDozeMode (SINC_Type *base, bool disable) |
Disable/enable SINC module when the chip enters Doze or Stop mode. More... | |
Clock Control APIs | |
static bool | SINC_CheckModulatorClockReady (SINC_Type *base, uint32_t modClkMasks) |
Check whether selected modulator clocks are ready. More... | |
static void | SINC_DisableModulatorClockOutput (SINC_Type *base, uint32_t modClkMasks, bool disable) |
Disable/enable modulator clocks' output. More... | |
static void | SINC_SetClkPrescale (SINC_Type *base, sinc_clock_prescale_t clkPrescale) |
Set the clock divider ratio for the modulator clock. More... | |
static void | SINC_SetModulatorClockDivider (SINC_Type *base, uint32_t modClkDivider) |
Set modulator clock divider value. More... | |
Channel Functional Control APIs | |
void | SINC_SetChannelConfig (SINC_Type *base, sinc_channel_id_t chId, sinc_channel_config_t *chConfig) |
Set channel configurations, including input options, conversion options and protection options. More... | |
void | SINC_SetChannelInputOption (SINC_Type *base, sinc_channel_id_t chId, sinc_channel_input_option_t *chInputOption) |
Set channel input options, including input bit format, input bit source, input bit delay, input clock source, input clock edge. More... | |
void | SINC_SetChannelConversionOption (SINC_Type *base, sinc_channel_id_t chId, sinc_channel_conv_option_t *chConvOption) |
Set channel conversion options, including conversion mode, trigger source, and primary filter settings. More... | |
void | SINC_SetChannelProtectionOption (SINC_Type *base, sinc_channel_id_t chId, sinc_channel_protection_option_t *chProtection) |
Set channel protection options, including limit check, short-circuit detector, clock-absence detector, and zero-crossing detector. More... | |
Channel Result/FIFO Low Level Control APIs | |
static uint32_t | SINC_ReadChannelResultData (SINC_Type *base, sinc_channel_id_t chId) |
Read selected channel's result data. More... | |
static void | SINC_EnableChannelFIFO (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable FIFO transfers for the primary filter. More... | |
static void | SINC_SetChannelFifoWatermark (SINC_Type *base, sinc_channel_id_t chId, uint8_t fifoWaterMark) |
Set the FIFO watermark. More... | |
static void | SINC_EnableChannel (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable selected channel. More... | |
static void | SINC_EnableChannelPrimaryDma (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable selected channel's primary DMA transfers when the channel's FIFO exceeds its watermark. More... | |
static void | SINC_SetChannelResultDataFormat (SINC_Type *base, sinc_channel_id_t chId, sinc_result_data_format_t dataFormat) |
Set selected channel's result data format. More... | |
static uint8_t | SINC_GetChannelFifoCount (SINC_Type *base, sinc_channel_id_t chId) |
Get the number of remaining data entries in the FIFO. More... | |
static bool | SINC_CheckChannelResultDataReady (SINC_Type *base, sinc_channel_id_t chId) |
Check whether the data in selected channel's result data register is stable when FIFO is disabled. More... | |
static bool | SINC_CheckChannelFifoEmpty (SINC_Type *base, sinc_channel_id_t chId) |
Check whether selected channel's FIFO is empty. More... | |
Channel Conversion Low Level Control APIs | |
static void | SINC_AffirmChannelSoftwareTrigger (SINC_Type *base, uint32_t chMask) |
Trigger selected channel's conversion. More... | |
static void | SINC_NegateChannelSoftwareTrigger (SINC_Type *base, uint32_t chMask) |
Negate the trigger of selected channel. More... | |
static void | SINC_SetChannelConversionMode (SINC_Type *base, sinc_channel_id_t chId, sinc_conv_mode_t mode) |
Set selected channel's conversion mode. More... | |
static void | SINC_SetChannelTriggerSource (SINC_Type *base, sinc_channel_id_t chId, sinc_conv_trigger_source_t triggerSource) |
Set selected channel's trigger source. More... | |
static void | SINC_SetChannelMultipurposeData (SINC_Type *base, sinc_channel_id_t chId, uint32_t data) |
Set multipurpose data to selected channel. More... | |
static void | SINC_SetChannelPfOrder (SINC_Type *base, sinc_channel_id_t chId, sinc_primary_filter_order_t pfOrder) |
Set selected channel's PF order. More... | |
static void | SINC_SetChannelPfOsr (SINC_Type *base, sinc_channel_id_t chId, uint16_t pfOsr) |
Set selected channel's PF over sample rate. More... | |
static void | SINC_SetChannelPfHpfAlphaCoeff (SINC_Type *base, sinc_channel_id_t chId, sin_primary_filter_hpf_alpha_coeff_t pfHpfAlphaCoeff) |
set selected channel's HPF DC remover Alpha coefficient. More... | |
static void | SINC_SetChannelPfShiftConfig (SINC_Type *base, sinc_channel_id_t chId, sinc_primary_filter_shift_direction_t pfShiftDirection, uint8_t pfShiftBitsNum) |
Set the value that shifts the PF data for the correct 24-bit precision. More... | |
static void | SINC_SetChannelPfBiasConfig (SINC_Type *base, sinc_channel_id_t chId, sinc_primary_filter_bias_sign_t pfBiasSign, uint32_t pfBiasValue) |
Set the bias offset for the selected channel's PF. More... | |
static void | SINC_EnableChannelPrimaryFilter (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable selected channel's primary filter. More... | |
static bool | SINC_CheckChannelParallelSerialDataReady (SINC_Type *base, sinc_channel_id_t chId) |
Check whether selected channel's multipurpose data is ready to write parallel or serial data. More... | |
static bool | SINC_CheckChannelPrimaryCICSaturation (SINC_Type *base, sinc_channel_id_t chId) |
Check whether primary CIC filter saturation occurred. More... | |
static bool | SINC_CheckChannelHPFSaturation (SINC_Type *base, sinc_channel_id_t chId) |
Check whether HPF saturation occurred. More... | |
static bool | SINC_CheckChannelShiftSaturation (SINC_Type *base, sinc_channel_id_t chId) |
Check whether Shift saturation occurred. More... | |
static bool | SINC_CheckChannelBiasSaturation (SINC_Type *base, sinc_channel_id_t chId) |
Check whether bias saturation occurred. More... | |
uint8_t | SINC_GetChannelConversionCount (SINC_Type *base, sinc_channel_id_t chId) |
Get selected channel's number of conversions. More... | |
static bool | SINC_CheckChannelConvProgress (SINC_Type *base, sinc_channel_id_t chId) |
Check whether the selected channel is in conversion. More... | |
static bool | SINC_CheckChannelReadyForConv (SINC_Type *base, sinc_channel_id_t chId) |
Check whether the selected channel is ready for conversion. More... | |
Channel Protection Low Level Control APIs | |
static void | SINC_SetChannelLowLimitThreshold (SINC_Type *base, sinc_channel_id_t chId, uint32_t lowLimitThreshold) |
Set selected channel's low-limit threshold value. More... | |
static void | SINC_SetChannelHighLimitThreshold (SINC_Type *base, sinc_channel_id_t chId, uint32_t highLimitThreshold) |
Set selected channel's high-limit threshold value. More... | |
static void | SINC_SetChannelLimitDetectorMode (SINC_Type *base, sinc_channel_id_t chId, sinc_limit_detector_mode_t mode) |
Set selected channel's limit detector mode. More... | |
static void | SINC_EnableChannelHighLimitBreakSignal (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable selected channel's high limit break signal. More... | |
static void | SINC_EnableChannelWindowLimitBreakSignal (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable selected channel's window limit break signal. More... | |
static void | SINC_EnableChannelLowLimitBreakSignal (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable selected channel's low limit break signal. More... | |
static void | SINC_SetChannelScdOperateMode (SINC_Type *base, sinc_channel_id_t chId, sinc_scd_operate_mode_t opMode) |
Set selected channel's short-circuit detector operate mode. More... | |
static void | SINC_SetChannelScdLimitThreshold (SINC_Type *base, sinc_channel_id_t chId, uint8_t u8ScdLimitThreshold) |
Set selected channel's Scd limit threshold. More... | |
static void | SINC_SetChannelScdOption (SINC_Type *base, sinc_channel_id_t chId, sinc_scd_option_t option) |
Set selected channel's SDC option. More... | |
static void | SINC_EnableChannelScdBreakSignal (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable the automatic assertion of the BREAK_SCD signal when SINC detects an SCD event on the selected channel. More... | |
static void | SINC_SetChannelCadLimitThreshold (SINC_Type *base, sinc_channel_id_t chId, sinc_cad_threshold_t cadLimitThreshold) |
Set the threshold value for the CAD counter. More... | |
static void | SINC_EnableChannelCadBreakSignal (SINC_Type *base, sinc_channel_id_t chId, bool enable) |
Enable/disable the automatic assertion of the BREAK_CAD signal when SINC detects a CAD event on the assoicated channel. More... | |
static void | SINC_SetChannelZcdOperateMode (SINC_Type *base, sinc_channel_id_t chId, sinc_zero_cross_operate_mode_t opMode) |
Set selected channel's zero-crossing detector operate mode. More... | |
Channel Debug Low Level Control APIs | |
static void | SINC_SetChannelPulseTriggerMux (SINC_Type *base, sinc_channel_id_t chId, sinc_pulse_trigger_mux_t pulseTrigMux) |
Set selected channel's pulse trigger mux. More... | |
static void | SINC_SetChannelDebugOutput (SINC_Type *base, sinc_channel_id_t chId, sinc_debug_output_t debugOutput) |
Set selected channel's debug output. More... | |
static void | SINC_LatchChannelDebugProceduce (SINC_Type *base, sinc_channel_id_t chId) |
Start selected channel's debug data latch proceduce. More... | |
static bool | SINC_CheckChannelDebugDataValid (SINC_Type *base, sinc_channel_id_t chId) |
Check if the selected channel's debug data is valid. More... | |
static uint32_t | SINC_GetChannelDebugData (SINC_Type *base, sinc_channel_id_t chId) |
Return selected channel's the debug data that requested by SINC_SetChannelDebugOutput(). More... | |
Interrupt Control APIs | |
static void | SINC_EnableInterrupts (SINC_Type *base, uint64_t interruptMasks) |
Enable the mask of interrupts, such as channel data ready interrupt, channel limit detect interrupt and so on. More... | |
static void | SINC_DisableInterrupts (SINC_Type *base, uint64_t interruptMasks) |
Enable the mask of interrupts, such as channel data ready interrupt, channel limit detect interrupt and so on. More... | |
static uint64_t | SINC_GetInterruptStatus (SINC_Type *base) |
Get interrupt status flags. More... | |
static void | SINC_ClearInterruptStatus (SINC_Type *base, uint64_t statusMasks) |
Clear selected mask of interrupt status flags. More... | |
struct sinc_channel_input_option_t |
Data Fields | |
sinc_inputBit_format_t | inputBitFormat |
Specify input bit format, please refer to sinc_inputBit_format_t. More... | |
sinc_inputBit_source_t | inputBitSource |
Specify input bit source, please refer to sinc_inputBit_source_t. More... | |
sinc_inputBit_delay_t | inputBitDelay |
Specify input bit delay, please refer to sinc_inputBit_delay_t. More... | |
sinc_inputClk_source_t | inputClkSource |
Specify input clock source, please refer to sinc_inputClk_source_t. More... | |
sinc_inputClk_edge_t | inputClkEdge |
Specify input clock edge, please refer to sinc_inputClk_edge_t. More... | |
sinc_inputBit_format_t sinc_channel_input_option_t::inputBitFormat |
sinc_inputBit_source_t sinc_channel_input_option_t::inputBitSource |
sinc_inputBit_delay_t sinc_channel_input_option_t::inputBitDelay |
sinc_inputClk_source_t sinc_channel_input_option_t::inputClkSource |
sinc_inputClk_edge_t sinc_channel_input_option_t::inputClkEdge |
struct sinc_channel_conv_option_t |
Data Fields | |
sinc_conv_mode_t | convMode |
Specify conversion mode, please refer to sinc_conv_mode_t. More... | |
sinc_conv_trigger_source_t | convTriggerSource |
Specify conversion trigger source, please refer to sinc_conv_trigger_source_t. More... | |
bool | enableChPrimaryFilter |
Enable/disable channel's primary filter. More... | |
sinc_primary_filter_order_t | pfOrder |
Specify the order of primary filter, please refer to sinc_primary_filter_order_t. More... | |
uint16_t | u16pfOverSampleRatio |
Control primary filter's OSR, the minimum permissible value is 3, low value produce unpredictable result, the maximum permissible value depend on PF order and the desired data format, if PF order is third order and data format is signed, the maximum OSR value is 1289, if PF order is third order and data format is unsigned, the maximum OSR value is 1624, otherwise the maximum OSR value is 2047. More... | |
sin_primary_filter_hpf_alpha_coeff_t | pfHpfAlphaCoeff |
Specify HPF's alpha coeff, please refer to sin_primary_filter_hpf_alpha_coeff_t. More... | |
sinc_primary_filter_shift_direction_t | pfShiftDirection |
Select shift direction, right or left. More... | |
uint8_t | u8pfShiftBitsNum |
Specify the number of bits to shift the data, ranges from 0 to 15. More... | |
sinc_primary_filter_bias_sign_t | pfBiasSign |
Select bias sign, please refer to sinc_primary_filter_bias_sign_t. More... | |
uint32_t | u32pfBiasValue |
Range from 0 to 0x7FFFFFUL. More... | |
sinc_conv_mode_t sinc_channel_conv_option_t::convMode |
sinc_conv_trigger_source_t sinc_channel_conv_option_t::convTriggerSource |
bool sinc_channel_conv_option_t::enableChPrimaryFilter |
sinc_primary_filter_order_t sinc_channel_conv_option_t::pfOrder |
uint16_t sinc_channel_conv_option_t::u16pfOverSampleRatio |
Please note that the OSR for equation is u16pfOverSampleRatio + 1
sin_primary_filter_hpf_alpha_coeff_t sinc_channel_conv_option_t::pfHpfAlphaCoeff |
sinc_primary_filter_shift_direction_t sinc_channel_conv_option_t::pfShiftDirection |
uint8_t sinc_channel_conv_option_t::u8pfShiftBitsNum |
sinc_primary_filter_bias_sign_t sinc_channel_conv_option_t::pfBiasSign |
uint32_t sinc_channel_conv_option_t::u32pfBiasValue |
struct sinc_channel_protection_option_t |
Data Fields | |
sinc_limit_detector_mode_t | limitDetectorMode |
Specify limit detector mode, please refer to sinc_limit_detector_mode_t. More... | |
bool | bEnableLmtBreakSignal |
Enable/disable limit break signal, the details of break signal is depended on detector mode. More... | |
uint32_t | u32LowLimitThreshold |
Specify the low-limit threshold value, range from 0 to 0xFFFFFFUL. More... | |
uint32_t | u32HighLimitThreshold |
Specify the high-limit threshold value, range from 0 to 0xFFFFFFUL. More... | |
sinc_scd_operate_mode_t | scdOperateMode |
Enable/disable scd, and set SCD operate timming. More... | |
uint8_t | u8ScdLimitThreshold |
Range from 2 to 255, 0 and 1 are prohibited. More... | |
sinc_scd_option_t | scdOption |
Specify SCD options, please refer to sinc_scd_option_t. More... | |
bool | bEnableScdBreakSignal |
Enable/disable SCD break signal. More... | |
sinc_cad_threshold_t | cadLimitThreshold |
Specify the threshold value for the CAD counter. More... | |
bool | bEnableCadBreakSignal |
Enable/disable CAD break signal. More... | |
sinc_zero_cross_operate_mode_t | zcdOperateMode |
Specify zero cross detector operate mode. More... | |
sinc_limit_detector_mode_t sinc_channel_protection_option_t::limitDetectorMode |
bool sinc_channel_protection_option_t::bEnableLmtBreakSignal |
uint32_t sinc_channel_protection_option_t::u32LowLimitThreshold |
uint32_t sinc_channel_protection_option_t::u32HighLimitThreshold |
sinc_scd_operate_mode_t sinc_channel_protection_option_t::scdOperateMode |
uint8_t sinc_channel_protection_option_t::u8ScdLimitThreshold |
sinc_scd_option_t sinc_channel_protection_option_t::scdOption |
bool sinc_channel_protection_option_t::bEnableScdBreakSignal |
sinc_cad_threshold_t sinc_channel_protection_option_t::cadLimitThreshold |
bool sinc_channel_protection_option_t::bEnableCadBreakSignal |
sinc_zero_cross_operate_mode_t sinc_channel_protection_option_t::zcdOperateMode |
struct sinc_channel_config_t |
Data Fields | |
bool | bEnableChannel |
Enable/disable channel. More... | |
bool | bEnableFifo |
Enable/disable channel's FIFO. More... | |
uint8_t | u8FifoWaterMark |
Specify the fifo watermark, range from 0 to 15. More... | |
bool | bEnablePrimaryDma |
Used to enable/disable primary DMA. More... | |
sinc_result_data_format_t | dataFormat |
Set channel's result data format, please refer to sinc_result_data_format_t. More... | |
sinc_channel_input_option_t * | chInputOption |
The pointer to sinc_channel_input_option_t that contains channel input options. More... | |
sinc_channel_conv_option_t * | chConvOption |
The pointer to sinc_channel_conv_option_t that contains channel conversion options. More... | |
sinc_channel_protection_option_t * | chProtectionOption |
The pointer to @ref sinc_channel_protection_option_t that contains channel protection options. More... | |
bool sinc_channel_config_t::bEnableChannel |
bool sinc_channel_config_t::bEnableFifo |
uint8_t sinc_channel_config_t::u8FifoWaterMark |
bool sinc_channel_config_t::bEnablePrimaryDma |
sinc_result_data_format_t sinc_channel_config_t::dataFormat |
sinc_channel_input_option_t* sinc_channel_config_t::chInputOption |
sinc_channel_conv_option_t* sinc_channel_config_t::chConvOption |
sinc_channel_protection_option_t* sinc_channel_config_t::chProtectionOption |
struct sinc_config_t |
Data Fields | |
sinc_clock_prescale_t | clockPreDivider |
Specify modulator clock pre divider, please refer to sinc_clock_prescale_t. More... | |
uint32_t | modClkDivider |
Range from 2 to 256, 0 and 1 are prohibited, to obtain a 50% duty cycle in the MCLK output, write an even value to. | |
bool | disableModClk0Output |
Disable/enable modulator clock0 output. More... | |
bool | disableModClk1Output |
Disable/enable modulator clock1 output. More... | |
bool | disableModClk2Output |
Disable/enable modulator clock2 output. More... | |
sinc_channel_config_t * | channelsConfigArray [SINC_CHANNEL_COUNT] |
The array that contains 4 elements, and the type of each element is sinc_channel_config_t *, channelsConfigArray[0] corresponding to channel0, channelsConfigArray[1] corresponding to channel1, channelsConfigArray[2] corresponding to channel2, channelsConfigArray[3] corresponding to channel3, if some channels are not used, the corresponding elements should be set as NULL. More... | |
bool | disableDozeMode |
Disable/enable SINC module when the chip enters Doze or stop mode. More... | |
bool | enableMaster |
Enable/disable all function blocks of SINC module. More... | |
sinc_clock_prescale_t sinc_config_t::clockPreDivider |
bool sinc_config_t::disableModClk0Output |
bool sinc_config_t::disableModClk1Output |
bool sinc_config_t::disableModClk2Output |
sinc_channel_config_t* sinc_config_t::channelsConfigArray[SINC_CHANNEL_COUNT] |
bool sinc_config_t::disableDozeMode |
bool sinc_config_t::enableMaster |
#define FSL_SINC_DRIVER_VERSION (MAKE_VERSION(2, 1, 4)) |
enum sinc_channel_id_t |
enum sinc_inputClk_edge_t |
enum sinc_conv_mode_t |
enum sinc_scd_option_t |
enum sinc_cad_threshold_t |
enum sinc_debug_output_t |
void SINC_Init | ( | SINC_Type * | base, |
const sinc_config_t * | config | ||
) |
base | SINC peripheral base address. |
config | The pointer to sinc_config_t structure. |
void SINC_Deinit | ( | SINC_Type * | base | ) |
base | SINC peripheral base address. |
void SINC_GetDefaultConfig | ( | sinc_config_t * | config | ) |
config | The pointer to sinc_config_t structure, must not be NULL. |
|
inlinestatic |
base | SINC peripheral base address. |
enable | Used to enable/disable all function blocks:
|
|
inlinestatic |
base | SINC peripheral base address. |
|
inlinestatic |
base | SINC peripheral base address. |
disable | Used to control if module functional when the chip enters Doze and Stop mode:
|
|
inlinestatic |
base | SINC peripheral base address. |
modClkMasks | The mask of modulator clocks, please refer to _sinc_modulator_clock. |
true | The input mask of modulator clocks are ready. |
false | The input mask of modulator clocks are not ready. |
|
inlinestatic |
base | SINC peripheral base address. |
modClkMasks | The mask of modulator clocks, please refer to _sinc_modulator_clock. |
disable | Used to enable/disable clock output:
|
|
inlinestatic |
base | SINC peripheral base address. |
clkPrescale | Clock prescale value, please refer to sinc_clock_prescale_t. |
|
inlinestatic |
base | SINC peripheral base address. |
modClkDivider | Range from 2 to 256, 0 and 1 are prohibited, to obtain a 50% duty cycle in the MCLK output, write an even value to modClkDivider . |
void SINC_SetChannelConfig | ( | SINC_Type * | base, |
sinc_channel_id_t | chId, | ||
sinc_channel_config_t * | chConfig | ||
) |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
chConfig | Pointer to sinc_channel_config_t structure, must not be NULL. |
void SINC_SetChannelInputOption | ( | SINC_Type * | base, |
sinc_channel_id_t | chId, | ||
sinc_channel_input_option_t * | chInputOption | ||
) |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
chInputOption | Pointer to sinc_channel_input_option_t structure, must not be NULL. |
void SINC_SetChannelConversionOption | ( | SINC_Type * | base, |
sinc_channel_id_t | chId, | ||
sinc_channel_conv_option_t * | chConvOption | ||
) |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
chConvOption | Pointer to sinc_channel_conv_option_t structure, must not be NULL. |
void SINC_SetChannelProtectionOption | ( | SINC_Type * | base, |
sinc_channel_id_t | chId, | ||
sinc_channel_protection_option_t * | chProtection | ||
) |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
chProtection | Pointer to sinc_channel_protection_option_t, must not be NULL. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable/disable channl FIFO:
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
fifoWaterMark | Specify the fifo watermark, range from 0 to 15. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable/disable selected channel:
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable/disable primary DMA :
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
dataFormat | Specify the result data format, please refer to sinc_result_data_format_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, refer to sinc_channel_id_t for details. |
true | Data in selected channel's result data regiter is stable. |
false | Data in selected channel's result data register is not stable. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | The id of sinc channel to check. |
true | Selected channel's FIFO is empty. |
false | Selected channel's FIFO is not empty. |
|
inlinestatic |
base | SINC peripheral base address. |
chMask | The mask of channels to trigger. |
|
inlinestatic |
base | SINC peripheral base address. |
chMask | The mask of channels. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
mode | The conversion mode to set, please refer to sinc_conv_mode_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
triggerSource | Trigger source to set, please refer to sinc_conv_trigger_source_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
data | Multipurpose data to set. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
pfOrder | Primary filter order to set, please refer to sinc_primary_filter_order_t |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
pfOsr | Control the channel's PF OSR, the minimum permissible value is 3, low value produce unpredictable result, the maximum permissible value depend on PF order and the desired data format. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
pfHpfAlphaCoeff | Specify the HPF alpha coefficient or disable HPF as described in sin_primary_filter_hpf_alpha_coeff_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
pfShiftDirection | Specify the PF shift direction, including right and left. |
pfShiftBitsNum | Specify the PF shift value, range from 0 to 15. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
pfBiasSign | Specify the bias sign, please refer to sinc_primary_filter_bias_sign_t for details. |
pfBiasValue | The bias value to subtracted from the output of PF shift block, range from 0 to 0x7FFFFFUL. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable primary filter:
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, refer to sinc_channel_id_t for details. |
true | Selected channel's multipurpose data is ready to write parallel or serial data. |
false | Selected channel's multipurpose data is not ready to write parallel or serial data. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, refer to sinc_channel_id_t for details. |
true | Selected channel's primary CIC filter saturation occurred. |
false | Selected channel's primary CIC filter saturation did not occurred. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, refer to sinc_channel_id_t for details. |
true | Selected channel's HPF saturation occurred. |
false | Selected channel's HPF saturation did not occurred. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, refer to sinc_channel_id_t for details. |
true | Selected channel's shift saturation occurred. |
false | Selected channel's shift saturation did not occurred. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, refer to sinc_channel_id_t for details. |
true | Selected channel's bias saturation occurred. |
false | Selected channel's bias saturation did not occurred. |
uint8_t SINC_GetChannelConversionCount | ( | SINC_Type * | base, |
sinc_channel_id_t | chId | ||
) |
base | SINC peripheral base address. |
chId | Selected channel id, refer to sinc_channel_id_t for details. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | The id of sinc channel to check. |
false | Selected channel conversion not in progress. |
true | Selected channel conversion in progress. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | The id of sinc channel to check. |
true | Selected channel is ready for conversion. |
false | Selected channel is not ready for conversion. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
lowLimitThreshold | Specify the low-limit threshold value, range from 0 to 0xFFFFFFUL. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
highLimitThreshold | Specify the high-limit threshold value, range from 0 to 0xFFFFFFUL. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
mode | Specify the mode of limit detector, please refer to sinc_limit_detector_mode_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable/disable high limit break signal:
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable/disable window limit break signal:
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable/disable low limit break signal:
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
opMode | Specify the operate mode to set, please refer to sinc_scd_operate_mode_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
u8ScdLimitThreshold | Specify the threshold value for the SCD counter, range from 2 to 255. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
option | Specify which repeating bit value increments the SCD counter. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable/disable SCD break signal:
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
cadLimitThreshold | Specify the threshold value for the CAD counter, please refer to sinc_cad_threshold_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
enable | Used to enable/disble CAD break signal:
|
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
opMode | Specify the operate mode, please refer to sinc_zero_cross_operate_mode_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
pulseTrigMux | Used to selected the signal for pulse-trigger output. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
debugOutput | Used to select debug output, please refer to sinc_debug_output_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
true | Data is valid. |
false | Data is invalid. |
|
inlinestatic |
base | SINC peripheral base address. |
chId | Selected channel id, please refer to sinc_channel_id_t. |
|
inlinestatic |
base | SINC peripheral base address. |
interruptMasks | Mask of interrupts to enable, should be the OR'ed value of sinc_interrupt_enable_t. |
|
inlinestatic |
base | SINC peripheral base address. |
interruptMasks | Mask of interrupts to disable, should be the OR'ed value of sinc_interrupt_enable_t. |
|
inlinestatic |
base | SINC peripheral base address. |
|
inlinestatic |
base | SINC peripheral base address. |
statusMasks | The mask of interrupt status flags to clear, should be the OR'ed value of sinc_interrupt_status_t. |