MIMXRT2663#
ACMP: Analog Comparator Driver#
-
void ACMP_Init(CMP_Type *base, const acmp_config_t *config)#
Initializes the ACMP.
The default configuration can be got by calling ACMP_GetDefaultConfig().
- Parameters:
base – ACMP peripheral base address.
config – Pointer to ACMP configuration structure.
-
void ACMP_Deinit(CMP_Type *base)#
Deinitializes the ACMP.
- Parameters:
base – ACMP peripheral base address.
-
void ACMP_GetDefaultConfig(acmp_config_t *config)#
Gets the default configuration for ACMP.
This function initializes the user configuration structure to default value. The default value are:
Example:
config->enableHighSpeed = false; config->enableInvertOutput = false; config->useUnfilteredOutput = false; config->enablePinOut = false; config->enableHysteresisBothDirections = false; config->hysteresisMode = kACMP_hysteresisMode0;
- Parameters:
config – Pointer to ACMP configuration structure.
-
void ACMP_Enable(CMP_Type *base, bool enable)#
Enables or disables the ACMP.
- Parameters:
base – ACMP peripheral base address.
enable – True to enable the ACMP.
-
void ACMP_EnableLinkToDAC(CMP_Type *base, bool enable)#
Enables the link from CMP to DAC enable.
When this bit is set, the DAC enable/disable is controlled by the bit CMP_C0[EN] instead of CMP_C1[DACEN].
- Parameters:
base – ACMP peripheral base address.
enable – Enable the feature or not.
-
void ACMP_SetChannelConfig(CMP_Type *base, const acmp_channel_config_t *config)#
Sets the channel configuration.
Note that the plus/minus mux’s setting is only valid when the positive/negative port’s input isn’t from DAC but from channel mux.
Example:
acmp_channel_config_t configStruct = {0}; configStruct.positivePortInput = kACMP_PortInputFromDAC; configStruct.negativePortInput = kACMP_PortInputFromMux; configStruct.minusMuxInput = 1U; ACMP_SetChannelConfig(CMP0, &configStruct);
- Parameters:
base – ACMP peripheral base address.
config – Pointer to channel configuration structure.
-
void ACMP_EnableDMA(CMP_Type *base, bool enable)#
Enables or disables DMA.
- Parameters:
base – ACMP peripheral base address.
enable – True to enable DMA.
-
void ACMP_SetFilterConfig(CMP_Type *base, const acmp_filter_config_t *config)#
Configures the filter.
The filter can be enabled when the filter count is bigger than 1, the filter period is greater than 0 and the sample clock is from divided bus clock or the filter is bigger than 1 and the sample clock is from external clock. Detailed usage can be got from the reference manual.
Example:
acmp_filter_config_t configStruct = {0}; configStruct.filterCount = 5U; configStruct.filterPeriod = 200U; configStruct.enableSample = false; ACMP_SetFilterConfig(CMP0, &configStruct);
- Parameters:
base – ACMP peripheral base address.
config – Pointer to filter configuration structure.
-
void ACMP_SetDACConfig(CMP_Type *base, const acmp_dac_config_t *config)#
Configures the internal DAC.
Example:
acmp_dac_config_t configStruct = {0}; configStruct.referenceVoltageSource = kACMP_VrefSourceVin1; configStruct.DACValue = 20U; configStruct.enableOutput = false; configStruct.workMode = kACMP_DACWorkLowSpeedMode; ACMP_SetDACConfig(CMP0, &configStruct);
- Parameters:
base – ACMP peripheral base address.
config – Pointer to DAC configuration structure. “NULL” is for disabling the feature.
-
void ACMP_EnableInterrupts(CMP_Type *base, uint32_t mask)#
Enables interrupts.
- Parameters:
base – ACMP peripheral base address.
mask – Interrupts mask. See “_acmp_interrupt_enable”.
-
void ACMP_DisableInterrupts(CMP_Type *base, uint32_t mask)#
Disables interrupts.
- Parameters:
base – ACMP peripheral base address.
mask – Interrupts mask. See “_acmp_interrupt_enable”.
-
uint32_t ACMP_GetStatusFlags(CMP_Type *base)#
Gets status flags.
- Parameters:
base – ACMP peripheral base address.
- Returns:
Status flags asserted mask. See “_acmp_status_flags”.
-
void ACMP_ClearStatusFlags(CMP_Type *base, uint32_t mask)#
Clears status flags.
- Parameters:
base – ACMP peripheral base address.
mask – Status flags mask. See “_acmp_status_flags”.
-
void ACMP_SetDiscreteModeConfig(CMP_Type *base, const acmp_discrete_mode_config_t *config)#
Configure the discrete mode.
Configure the discrete mode when supporting 3V domain with 1.8V core.
- Parameters:
base – ACMP peripheral base address.
config – Pointer to configuration structure. See “acmp_discrete_mode_config_t”.
-
void ACMP_GetDefaultDiscreteModeConfig(acmp_discrete_mode_config_t *config)#
Get the default configuration for discrete mode setting.
- Parameters:
config – Pointer to configuration structure to be restored with the setting values.
-
FSL_ACMP_DRIVER_VERSION#
ACMP driver version 2.5.0.
-
enum _acmp_interrupt_enable#
Interrupt enable/disable mask.
Values:
-
enumerator kACMP_OutputRisingInterruptEnable#
Enable the interrupt when comparator outputs rising.
-
enumerator kACMP_OutputFallingInterruptEnable#
Enable the interrupt when comparator outputs falling.
-
enumerator kACMP_OutputRisingInterruptEnable#
-
enum _acmp_status_flags#
Status flag mask.
Values:
-
enumerator kACMP_OutputRisingEventFlag#
Rising-edge on compare output has occurred.
-
enumerator kACMP_OutputFallingEventFlag#
Falling-edge on compare output has occurred.
-
enumerator kACMP_OutputAssertEventFlag#
Return the current value of the analog comparator output.
-
enumerator kACMP_OutputRisingEventFlag#
-
enum _acmp_offset_mode#
Comparator hard block offset control.
If OFFSET level is 1, then there is no hysteresis in the case of positive port input crossing negative port input in the positive direction (or negative port input crossing positive port input in the negative direction). Hysteresis still exists for positive port input crossing negative port input in the falling direction. If OFFSET level is 0, then the hysteresis selected by acmp_hysteresis_mode_t is valid for both directions.
Values:
-
enumerator kACMP_OffsetLevel0#
The comparator hard block output has level 0 offset internally.
-
enumerator kACMP_OffsetLevel1#
The comparator hard block output has level 1 offset internally.
-
enumerator kACMP_OffsetLevel0#
-
enum _acmp_hysteresis_mode#
Comparator hard block hysteresis control.
See chip data sheet to get the actual hysteresis value with each level.
Values:
-
enumerator kACMP_HysteresisLevel0#
Offset is level 0 and Hysteresis is level 0.
-
enumerator kACMP_HysteresisLevel1#
Offset is level 0 and Hysteresis is level 1.
-
enumerator kACMP_HysteresisLevel2#
Offset is level 0 and Hysteresis is level 2.
-
enumerator kACMP_HysteresisLevel3#
Offset is level 0 and Hysteresis is level 3.
-
enumerator kACMP_HysteresisLevel0#
-
enum _acmp_reference_voltage_source#
CMP Voltage Reference source.
Values:
-
enumerator kACMP_VrefSourceVin1#
Vin1 is selected as resistor ladder network supply reference Vin.
-
enumerator kACMP_VrefSourceVin2#
Vin2 is selected as resistor ladder network supply reference Vin.
-
enumerator kACMP_VrefSourceVin1#
-
enum _acmp_port_input#
Port input source.
Values:
-
enumerator kACMP_PortInputFromDAC#
Port input from the 8-bit DAC output.
-
enumerator kACMP_PortInputFromMux#
Port input from the analog 8-1 mux.
-
enumerator kACMP_PortInputFromDAC#
-
enum _acmp_dac_work_mode#
Internal DAC’s work mode.
Values:
-
enumerator kACMP_DACWorkLowSpeedMode#
DAC is selected to work in low speed and low power mode.
-
enumerator kACMP_DACWorkHighSpeedMode#
DAC is selected to work in high speed high power mode.
-
enumerator kACMP_DACWorkLowSpeedMode#
-
typedef enum _acmp_offset_mode acmp_offset_mode_t#
Comparator hard block offset control.
If OFFSET level is 1, then there is no hysteresis in the case of positive port input crossing negative port input in the positive direction (or negative port input crossing positive port input in the negative direction). Hysteresis still exists for positive port input crossing negative port input in the falling direction. If OFFSET level is 0, then the hysteresis selected by acmp_hysteresis_mode_t is valid for both directions.
-
typedef enum _acmp_hysteresis_mode acmp_hysteresis_mode_t#
Comparator hard block hysteresis control.
See chip data sheet to get the actual hysteresis value with each level.
-
typedef enum _acmp_reference_voltage_source acmp_reference_voltage_source_t#
CMP Voltage Reference source.
-
typedef enum _acmp_port_input acmp_port_input_t#
Port input source.
-
typedef enum _acmp_dac_work_mode acmp_dac_work_mode_t#
Internal DAC’s work mode.
-
typedef struct _acmp_config acmp_config_t#
Configuration for ACMP.
-
typedef struct _acmp_channel_config acmp_channel_config_t#
Configuration for channel.
The comparator’s port can be input from channel mux or DAC. If port input is from channel mux, detailed channel number for the mux should be configured.
-
typedef struct _acmp_filter_config acmp_filter_config_t#
Configuration for filter.
-
typedef struct _acmp_dac_config acmp_dac_config_t#
Configuration for DAC.
-
typedef struct _acmp_discrete_mode_config acmp_discrete_mode_config_t#
Configuration for discrete mode.
-
CMP_C0_CFx_MASK#
The mask of status flags cleared by writing 1.
-
struct _acmp_config#
- #include <fsl_acmp.h>
Configuration for ACMP.
Public Members
-
acmp_offset_mode_t offsetMode#
Offset mode.
-
acmp_hysteresis_mode_t hysteresisMode#
Hysteresis mode.
-
bool enableHighSpeed#
Enable High Speed (HS) comparison mode.
-
bool enableInvertOutput#
Enable inverted comparator output.
-
bool useUnfilteredOutput#
Set compare output(COUT) to equal COUTA(true) or COUT(false).
-
bool enablePinOut#
The comparator output is available on the associated pin.
-
acmp_offset_mode_t offsetMode#
-
struct _acmp_channel_config#
- #include <fsl_acmp.h>
Configuration for channel.
The comparator’s port can be input from channel mux or DAC. If port input is from channel mux, detailed channel number for the mux should be configured.
Public Members
-
acmp_port_input_t positivePortInput#
Input source of the comparator’s positive port.
-
uint32_t plusMuxInput#
Plus mux input channel(0~7).
-
acmp_port_input_t negativePortInput#
Input source of the comparator’s negative port.
-
uint32_t minusMuxInput#
Minus mux input channel(0~7).
-
acmp_port_input_t positivePortInput#
-
struct _acmp_filter_config#
- #include <fsl_acmp.h>
Configuration for filter.
-
struct _acmp_dac_config#
- #include <fsl_acmp.h>
Configuration for DAC.
Public Members
-
acmp_reference_voltage_source_t referenceVoltageSource#
Supply voltage reference source.
-
uint32_t DACValue#
Value for DAC Output Voltage. Available range is 0-255.
-
bool enableOutput#
Enable the DAC output.
-
acmp_reference_voltage_source_t referenceVoltageSource#
-
struct _acmp_discrete_mode_config#
- #include <fsl_acmp.h>
Configuration for discrete mode.
ASRC: Asynchronous sample rate converter#
ASRC Driver#
-
uint32_t ASRC_GetInstance(ASRC_Type *base)#
Get instance number of the ASRC peripheral.
- Parameters:
base – ASRC base pointer.
-
void ASRC_Init(ASRC_Type *base, uint32_t asrcPeripheralClock_Hz)#
brief Initializes the asrc peripheral.
This API gates the asrc clock. The asrc module can’t operate unless ASRC_Init is called to enable the clock.
param base asrc base pointer. param asrcPeripheralClock_Hz peripheral clock of ASRC.
-
void ASRC_Deinit(ASRC_Type *base)#
De-initializes the ASRC peripheral.
This API gates the ASRC clock and disable ASRC module. The ASRC module can’t operate unless ASRC_Init
- Parameters:
base – ASRC base pointer.
-
void ASRC_SoftwareReset(ASRC_Type *base)#
Do software reset .
This software reset bit is self-clear bit, it will generate a software reset signal inside ASRC. After 9 cycles of the ASRC processing clock, this reset process will stop and this bit will cleared automatically.
- Parameters:
base – ASRC base pointer
-
status_t ASRC_SetChannelPairConfig(ASRC_Type *base, asrc_channel_pair_t channelPair, asrc_channel_pair_config_t *config, uint32_t inputSampleRate, uint32_t outputSampleRate)#
ASRC configure channel pair.
- Parameters:
base – ASRC base pointer.
channelPair – index of channel pair, reference _asrc_channel_pair.
config – ASRC channel pair configuration pointer.
inputSampleRate – input audio data sample rate.
outputSampleRate – output audio data sample rate.
-
uint32_t ASRC_GetOutSamplesSize(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t inSampleRate, uint32_t outSampleRate, uint32_t inSamplesize)#
Get output sample buffer size.
Note
This API is depends on the ASRC output configuration, should be called after the ASRC_SetChannelPairConfig.
- Parameters:
base – asrc base pointer.
channelPair – ASRC channel pair number.
inSampleRate – input sample rate.
outSampleRate – output sample rate.
inSamplesize – input sampleS size.
- Return values:
output – buffer size in byte.
-
uint32_t ASRC_MapSamplesWidth(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *inWidth, uint32_t *outWidth)#
Map register sample width to real sample width.
Note
This API is depends on the ASRC configuration, should be called after the ASRC_SetChannelPairConfig.
- Parameters:
base – asrc base pointer.
channelPair – asrc channel pair index.
inWidth – ASRC channel pair number.
outWidth – input sample rate.
- Return values:
input – sample mask value.
-
uint32_t ASRC_GetRemainFifoSamples(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *buffer, uint32_t outSampleWidth, uint32_t remainSamples)#
Get left samples in fifo.
- Parameters:
base – asrc base pointer.
channelPair – ASRC channel pair number.
buffer – input sample numbers.
outSampleWidth – output sample width.
remainSamples – output sample rate.
- Return values:
remain – samples number.
-
static inline void ASRC_ModuleEnable(ASRC_Type *base, bool enable)#
ASRC module enable.
- Parameters:
base – ASRC base pointer.
enable – true is enable, false is disable
-
static inline void ASRC_ChannelPairEnable(ASRC_Type *base, asrc_channel_pair_t channelPair, bool enable)#
ASRC enable channel pair.
- Parameters:
base – ASRC base pointer.
channelPair – channel pair mask value, reference _asrc_channel_pair_mask.
enable – true is enable, false is disable.
-
static inline void ASRC_EnableInterrupt(ASRC_Type *base, uint32_t mask)#
ASRC interrupt enable This function enable the ASRC interrupt with the provided mask.
- Parameters:
base – ASRC peripheral base address.
mask – The interrupts to enable. Logical OR of _asrc_interrupt_mask.
-
static inline void ASRC_DisableInterrupt(ASRC_Type *base, uint32_t mask)#
ASRC interrupt disable This function disable the ASRC interrupt with the provided mask.
- Parameters:
base – ASRC peripheral base address.
mask – The interrupts to disable. Logical OR of _asrc_interrupt_mask.
-
static inline uint32_t ASRC_GetStatus(ASRC_Type *base)#
Gets the ASRC status flag state.
- Parameters:
base – ASRC base pointer
- Returns:
ASRC Tx status flag value. Use the Status Mask to get the status value needed.
-
static inline bool ASRC_GetChannelPairInitialStatus(ASRC_Type *base, asrc_channel_pair_t channel)#
Gets the ASRC channel pair initialization state.
- Parameters:
base – ASRC base pointer
channel – ASRC channel pair.
- Returns:
ASRC Tx status flag value. Use the Status Mask to get the status value needed.
-
static inline uint32_t ASRC_GetChannelPairFifoStatus(ASRC_Type *base, asrc_channel_pair_t channelPair)#
Gets the ASRC channel A fifo a status flag state.
- Parameters:
base – ASRC base pointer
channelPair – ASRC channel pair.
- Returns:
ASRC channel pair a fifo status flag value. Use the Status Mask to get the status value needed.
-
static inline void ASRC_ChannelPairWriteData(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t data)#
Writes data into ASRC channel pair FIFO. Note: ASRC fifo width is 24bit.
- Parameters:
base – ASRC base pointer.
channelPair – ASRC channel pair.
data – Data needs to be written.
-
static inline uint32_t ASRC_ChannelPairReadData(ASRC_Type *base, asrc_channel_pair_t channelPair)#
Read data from ASRC channel pair FIFO. Note: ASRC fifo width is 24bit.
- Parameters:
base – ASRC base pointer.
channelPair – ASRC channel pair.
- Return values:
value – read from fifo.
-
static inline uint32_t ASRC_GetInputDataRegisterAddress(ASRC_Type *base, asrc_channel_pair_t channelPair)#
Get input data fifo address. Note: ASRC fifo width is 24bit.
- Parameters:
base – ASRC base pointer.
channelPair – ASRC channel pair.
-
static inline uint32_t ASRC_GetOutputDataRegisterAddress(ASRC_Type *base, asrc_channel_pair_t channelPair)#
Get output data fifo address. Note: ASRC fifo width is 24bit.
- Parameters:
base – ASRC base pointer.
channelPair – ASRC channel pair.
-
status_t ASRC_SetIdealRatioConfig(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t inputSampleRate, uint32_t outputSampleRate)#
ASRC configure ideal ratio. The ideal ratio should be used when input clock source is not avalible.
- Parameters:
base – ASRC base pointer.
channelPair – ASRC channel pair.
inputSampleRate – input audio data sample rate.
outputSampleRate – output audio data sample rate.
-
status_t ASRC_TransferSetChannelPairConfig(ASRC_Type *base, asrc_handle_t *handle, asrc_channel_pair_config_t *config, uint32_t inputSampleRate, uint32_t outputSampleRate)#
ASRC configure channel pair.
- Parameters:
base – ASRC base pointer.
handle – ASRC transactional handle pointer.
config – ASRC channel pair configuration pointer.
inputSampleRate – input audio data sample rate.
outputSampleRate – output audio data sample rate.
-
void ASRC_TransferCreateHandle(ASRC_Type *base, asrc_handle_t *handle, asrc_channel_pair_t channelPair, asrc_transfer_callback_t inCallback, asrc_transfer_callback_t outCallback, void *userData)#
Initializes the ASRC handle.
This function initializes the handle for the ASRC transactional APIs. Call this function once to get the handle initialized.
- Parameters:
base – ASRC base pointer
handle – ASRC handle pointer.
channelPair – ASRC channel pair.
inCallback – Pointer to the user callback function.
outCallback – Pointer to the user callback function.
userData – User parameter passed to the callback function
-
status_t ASRC_TransferNonBlocking(ASRC_Type *base, asrc_handle_t *handle, asrc_transfer_t *xfer)#
Performs an interrupt non-blocking convert on asrc.
Note
This API returns immediately after the transfer initiates, application should check the wait and check the callback status.
- Parameters:
base – asrc base pointer.
handle – Pointer to the asrc_handle_t structure which stores the transfer state.
xfer – Pointer to the ASRC_transfer_t structure.
- Return values:
kStatus_Success – Successfully started the data receive.
kStatus_ASRCBusy – Previous receive still not finished.
-
status_t ASRC_TransferBlocking(ASRC_Type *base, asrc_channel_pair_t channelPair, asrc_transfer_t *xfer)#
Performs an blocking convert on asrc.
Note
This API returns immediately after the convert finished.
- Parameters:
base – asrc base pointer.
channelPair – channel pair index.
xfer – Pointer to the ASRC_transfer_t structure.
- Return values:
kStatus_Success – Successfully started the data receive.
-
status_t ASRC_TransferGetConvertedCount(ASRC_Type *base, asrc_handle_t *handle, size_t *count)#
Get converted byte count.
- Parameters:
base – ASRC base pointer.
handle – Pointer to the asrc_handle_t structure which stores the transfer state.
count – Bytes count sent.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_ASRCIdle – There is not a non-blocking transaction currently in progress.
-
void ASRC_TransferAbortConvert(ASRC_Type *base, asrc_handle_t *handle)#
Aborts the current convert.
Note
This API can be called any time when an interrupt non-blocking transfer initiates to abort the transfer early.
- Parameters:
base – ASRC base pointer.
handle – Pointer to the asrc_handle_t structure which stores the transfer state.
-
void ASRC_TransferTerminateConvert(ASRC_Type *base, asrc_handle_t *handle)#
Terminate all ASRC convert.
This function will clear all transfer slots buffered in the asrc queue. If users only want to abort the current transfer slot, please call ASRC_TransferAbortConvert.
- Parameters:
base – ASRC base pointer.
handle – ASRC eDMA handle pointer.
-
void ASRC_TransferHandleIRQ(ASRC_Type *base, asrc_handle_t *handle)#
ASRC convert interrupt handler.
- Parameters:
base – ASRC base pointer.
handle – Pointer to the asrc_handle_t structure.
-
FSL_ASRC_DRIVER_VERSION#
Version 2.1.5
ASRC return status .
Values:
-
enumerator kStatus_ASRCIdle#
ASRC is idle.
-
enumerator kStatus_ASRCInIdle#
ASRC in is idle.
-
enumerator kStatus_ASRCOutIdle#
ASRC out is idle.
-
enumerator kStatus_ASRCBusy#
ASRC is busy.
-
enumerator kStatus_ASRCInvalidArgument#
ASRC invalid argument.
-
enumerator kStatus_ASRCClockConfigureFailed#
ASRC clock configure failed
-
enumerator kStatus_ASRCChannelPairConfigureFailed#
ASRC clock configure failed
-
enumerator kStatus_ASRCConvertError#
ASRC clock configure failed
-
enumerator kStatus_ASRCNotSupport#
ASRC not support
-
enumerator kStatus_ASRCQueueFull#
ASRC queue is full
-
enumerator kStatus_ASRCOutQueueIdle#
ASRC out queue is idle
-
enumerator kStatus_ASRCInQueueIdle#
ASRC in queue is idle
-
enumerator kStatus_ASRCIdle#
-
enum _asrc_channel_pair#
ASRC channel pair mask.
Values:
-
enumerator kASRC_ChannelPairA#
channel pair A value
-
enumerator kASRC_ChannelPairB#
channel pair B value
-
enumerator kASRC_ChannelPairC#
channel pair C value
-
enumerator kASRC_ChannelPairA#
ASRC support sample rate .
Values:
-
enumerator kASRC_SampleRate_8000HZ#
asrc sample rate 8KHZ
-
enumerator kASRC_SampleRate_11025HZ#
asrc sample rate 11.025KHZ
-
enumerator kASRC_SampleRate_12000HZ#
asrc sample rate 12KHZ
-
enumerator kASRC_SampleRate_16000HZ#
asrc sample rate 16KHZ
-
enumerator kASRC_SampleRate_22050HZ#
asrc sample rate 22.05KHZ
-
enumerator kASRC_SampleRate_24000HZ#
asrc sample rate 24KHZ
-
enumerator kASRC_SampleRate_30000HZ#
asrc sample rate 30KHZ
-
enumerator kASRC_SampleRate_32000HZ#
asrc sample rate 32KHZ
-
enumerator kASRC_SampleRate_44100HZ#
asrc sample rate 44.1KHZ
-
enumerator kASRC_SampleRate_48000HZ#
asrc sample rate 48KHZ
-
enumerator kASRC_SampleRate_64000HZ#
asrc sample rate 64KHZ
-
enumerator kASRC_SampleRate_88200HZ#
asrc sample rate 88.2KHZ
-
enumerator kASRC_SampleRate_96000HZ#
asrc sample rate 96KHZ
-
enumerator kASRC_SampleRate_128000HZ#
asrc sample rate 128KHZ
-
enumerator kASRC_SampleRate_176400HZ#
asrc sample rate 176.4KHZ
-
enumerator kASRC_SampleRate_192000HZ#
asrc sample rate 192KHZ
-
enumerator kASRC_SampleRate_8000HZ#
The ASRC interrupt enable flag .
Values:
-
enumerator kASRC_FPInWaitStateInterruptEnable#
FP in wait state mask
-
enumerator kASRC_OverLoadInterruptMask#
overload interrupt mask
-
enumerator kASRC_DataOutputCInterruptMask#
data output c interrupt mask
-
enumerator kASRC_DataOutputBInterruptMask#
data output b interrupt mask
-
enumerator kASRC_DataOutputAInterruptMask#
data output a interrupt mask
-
enumerator kASRC_DataInputCInterruptMask#
data input c interrupt mask
-
enumerator kASRC_DataInputBInterruptMask#
data input b interrupt mask
-
enumerator kASRC_DataInputAInterruptMask#
data input a interrupt mask
-
enumerator kASRC_FPInWaitStateInterruptEnable#
The ASRC interrupt status .
Values:
-
enumerator kASRC_StatusDSLCounterReady#
DSL counter
-
enumerator kASRC_StatusTaskQueueOverLoad#
task queue overload
-
enumerator kASRC_StatusPairCOutputOverLoad#
pair c output overload
-
enumerator kASRC_StatusPairBOutputOverLoad#
pair b output overload
-
enumerator kASRC_StatusPairAOutputOverLoad#
pair a output overload
-
enumerator kASRC_StatusPairCInputOverLoad#
pair c input overload
-
enumerator kASRC_StatusPairBInputOverLoad#
pair b input overload
-
enumerator kASRC_StatusPairAInputOverLoad#
pair a input overload
-
enumerator kASRC_StatusPairCOutputOverflow#
pair c output overflow
-
enumerator kASRC_StatusPairBOutputOverflow#
pair b output overflow
-
enumerator kASRC_StatusPairAOutputOverflow#
pair a output overflow
-
enumerator kASRC_StatusPairCInputUnderflow#
pair c input underflow
-
enumerator kASRC_StatusPairBInputUnderflow#
pair b input under flow
-
enumerator kASRC_StatusPairAInputUnderflow#
pair a input underflow
-
enumerator kASRC_StatusFPInWaitState#
FP in wait state
-
enumerator kASRC_StatusOverloadError#
overload error
-
enumerator kASRC_StatusInputError#
input error status
-
enumerator kASRC_StatusOutputError#
output error status
-
enumerator kASRC_StatusPairCOutputReady#
pair c output ready
-
enumerator kASRC_StatusPairBOutputReady#
pair b output ready
-
enumerator kASRC_StatusPairAOutputReady#
pair a output ready
-
enumerator kASRC_StatusPairCInputReady#
pair c input ready
-
enumerator kASRC_StatusPairBInputReady#
pair b input ready
-
enumerator kASRC_StatusPairAInputReady#
pair a input ready
-
enumerator kASRC_StatusPairAInterrupt#
pair A interrupt
-
enumerator kASRC_StatusPairBInterrupt#
pair B interrupt
-
enumerator kASRC_StatusPairCInterrupt#
pair C interrupt
-
enumerator kASRC_StatusDSLCounterReady#
ASRC channel pair status .
Values:
-
enumerator kASRC_OutputFifoNearFull#
channel pair output fifo near full
-
enumerator kASRC_InputFifoNearEmpty#
channel pair input fifo near empty
-
enumerator kASRC_OutputFifoNearFull#
-
enum _asrc_ratio#
ASRC ideal ratio.
Values:
-
enumerator kASRC_RatioNotUsed#
ideal ratio not used
-
enumerator kASRC_RatioUseInternalMeasured#
ideal ratio use internal measure ratio, can be used for real time streaming audio
-
enumerator kASRC_RatioUseIdealRatio#
ideal ratio use manual configure ratio, can be used for the non-real time streaming audio
-
enumerator kASRC_RatioNotUsed#
-
enum _asrc_audio_channel#
Number of channels in audio data.
Values:
-
enumerator kASRC_ChannelsNumber1#
channel number is 1
-
enumerator kASRC_ChannelsNumber2#
channel number is 2
-
enumerator kASRC_ChannelsNumber3#
channel number is 3
-
enumerator kASRC_ChannelsNumber4#
channel number is 4
-
enumerator kASRC_ChannelsNumber5#
channel number is 5
-
enumerator kASRC_ChannelsNumber6#
channel number is 6
-
enumerator kASRC_ChannelsNumber7#
channel number is 7
-
enumerator kASRC_ChannelsNumber8#
channel number is 8
-
enumerator kASRC_ChannelsNumber9#
channel number is 9
-
enumerator kASRC_ChannelsNumber10#
channel number is 10
-
enumerator kASRC_ChannelsNumber1#
-
enum _asrc_data_width#
data width
Values:
-
enumerator kASRC_DataWidth24Bit#
data width 24bit
-
enumerator kASRC_DataWidth16Bit#
data width 16bit
-
enumerator kASRC_DataWidth8Bit#
data width 8bit
-
enumerator kASRC_DataWidth24Bit#
-
enum _asrc_data_align#
data alignment
Values:
-
enumerator kASRC_DataAlignMSB#
data alignment MSB
-
enumerator kASRC_DataAlignLSB#
data alignment LSB
-
enumerator kASRC_DataAlignMSB#
-
enum _asrc_sign_extension#
sign extension
Values:
-
enumerator kASRC_NoSignExtension#
no sign extension
-
enumerator kASRC_SignExtension#
sign extension
-
enumerator kASRC_NoSignExtension#
-
typedef enum _asrc_channel_pair asrc_channel_pair_t#
ASRC channel pair mask.
-
typedef enum _asrc_ratio asrc_ratio_t#
ASRC ideal ratio.
-
typedef enum _asrc_audio_channel asrc_audio_channel_t#
Number of channels in audio data.
-
typedef enum _asrc_data_width asrc_data_width_t#
data width
-
typedef enum _asrc_data_align asrc_data_align_t#
data alignment
-
typedef enum _asrc_sign_extension asrc_sign_extension_t#
sign extension
-
typedef struct _asrc_channel_pair_config asrc_channel_pair_config_t#
asrc channel pair configuation
-
typedef struct _asrc_transfer asrc_transfer_t#
SAI transfer structure.
-
typedef struct _asrc_handle asrc_handle_t#
asrc handler
-
typedef void (*asrc_transfer_callback_t)(ASRC_Type *base, asrc_handle_t *handle, status_t status, void *userData)#
ASRC transfer callback prototype.
-
typedef struct _asrc_in_handle asrc_in_handle_t#
asrc in handler
-
typedef struct _asrc_out_handle asrc_out_handle_t#
output handler
-
ASRC_XFER_QUEUE_SIZE#
ASRC transfer queue size, user can refine it according to use case.
-
FSL_ASRC_CHANNEL_PAIR_COUNT#
ASRC channel pair count.
-
FSL_ASRC_CHANNEL_PAIR_FIFO_DEPTH#
ASRC FIFO depth.
-
ASRC_ASRCTR_AT_MASK(index)#
ASRC register access macro.
-
ASRC_ASRCTR_RATIO_MASK(index)#
-
ASRC_ASRCTR_RATIO(ratio, index)#
-
ASRC_ASRIER_INPUT_INTERRUPT_MASK(index)#
-
ASRC_ASRIER_OUTPUTPUT_INTERRUPT_MASK(index)#
-
ASRC_ASRCNCR_CHANNEL_COUNTER_MASK(index)#
-
ASRC_ASRCNCR_CHANNEL_COUNTER(counter, index)#
-
ASRC_ASRCFG_PRE_MODE_MASK(index)#
-
ASRC_ASRCFG_PRE_MODE(mode, index)#
-
ASRC_ASRCFG_POST_MODE_MASK(index)#
-
ASRC_ASRCFG_POST_MODE(mode, index)#
-
ASRC_ASRCFG_INIT_DONE_MASK(index)#
-
ASRC_ASRCSR_INPUT_CLOCK_SOURCE_MASK(index)#
-
ASRC_ASRCSR_INPUT_CLOCK_SOURCE(source, index)#
-
ASRC_ASRCSR_OUTPUT_CLOCK_SOURCE_MASK(index)#
-
ASRC_ASRCSR_OUTPUT_CLOCK_SOURCE(source, index)#
-
ASRC_ASRCDR_INPUT_PRESCALER_MASK(index)#
-
ASRC_ASRCDR_INPUT_PRESCALER(prescaler, index)#
-
ASRC_ASRCDR_INPUT_DIVIDER_MASK(index)#
-
ASRC_ASRCDR_INPUT_DIVIDER(divider, index)#
-
ASRC_ASRCDR_OUTPUT_PRESCALER_MASK(index)#
-
ASRC_ASRCDR_OUTPUT_PRESCALER(prescaler, index)#
-
ASRC_ASRCDR_OUTPUT_DIVIDER_MASK(index)#
-
ASRC_ASRCDR_OUTPUT_DIVIDER(divider, index)#
-
ASCR_ASRCDR_OUTPUT_CLOCK_DIVIDER_PRESCALER(value, index)#
-
ASCR_ASRCDR_INPUT_CLOCK_DIVIDER_PRESCALER(value, index)#
-
ASRC_IDEAL_RATIO_HIGH(base, index)#
-
ASRC_IDEAL_RATIO_LOW(base, index)#
-
ASRC_ASRMCR(base, index)#
-
ASRC_ASRMCR1(base, index)#
-
ASRC_ASRDI(base, index)#
-
ASRC_ASRDO(base, index)#
-
ASRC_ASRDI_ADDR(base, index)#
-
ASRC_ASRDO_ADDR(base, index)#
-
ASRC_ASRFST_ADDR(base, index)#
-
ASRC_GET_CHANNEL_COUNTER(base, index)#
-
struct _asrc_channel_pair_config#
- #include <fsl_asrc.h>
asrc channel pair configuation
Public Members
-
asrc_audio_channel_t audioDataChannels#
audio data channel numbers
-
asrc_clock_source_t inClockSource#
input clock source, reference the clock source definition in SOC header file
-
uint32_t inSourceClock_Hz#
input source clock frequency
-
asrc_clock_source_t outClockSource#
output clock source, reference the clock source definition in SOC header file
-
uint32_t outSourceClock_Hz#
output source clock frequency
-
asrc_ratio_t sampleRateRatio#
sample rate ratio type
-
asrc_data_width_t inDataWidth#
input data width
-
asrc_data_align_t inDataAlign#
input data alignment
-
asrc_data_width_t outDataWidth#
output data width
-
asrc_data_align_t outDataAlign#
output data alignment
-
asrc_sign_extension_t outSignExtension#
output extension
-
uint8_t outFifoThreshold#
output fifo threshold
-
uint8_t inFifoThreshold#
input fifo threshold
-
bool bufStallWhenFifoEmptyFull#
stall Pair A conversion in case of Buffer near empty full condition
-
asrc_audio_channel_t audioDataChannels#
-
struct _asrc_transfer#
- #include <fsl_asrc.h>
SAI transfer structure.
-
struct _asrc_in_handle#
- #include <fsl_asrc.h>
asrc in handler
Public Members
-
asrc_transfer_callback_t callback#
Callback function called at convert complete
-
uint32_t sampleWidth#
data width
-
uint32_t sampleMask#
data mask
-
uint32_t fifoThreshold#
fifo threshold
-
uint8_t *asrcQueue[(4U)]#
Transfer queue storing queued transfer
-
size_t transferSamples[(4U)]#
Data bytes need to convert
-
volatile uint8_t queueUser#
Index for user to queue transfer
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
asrc_transfer_callback_t callback#
-
struct _asrc_out_handle#
- #include <fsl_asrc.h>
output handler
Public Members
-
asrc_transfer_callback_t callback#
Callback function called at convert complete
-
uint32_t sampleWidth#
data width
-
uint32_t fifoThreshold#
fifo threshold
-
uint8_t *asrcQueue[(4U)]#
Transfer queue storing queued transfer
-
size_t transferSamples[(4U)]#
Data bytes need to convert
-
volatile uint8_t queueUser#
Index for user to queue transfer
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
asrc_transfer_callback_t callback#
-
struct _asrc_handle#
- #include <fsl_asrc.h>
ASRC handle structure.
Public Members
-
ASRC_Type *base#
base address
-
uint32_t state#
Transfer status
-
void *userData#
Callback parameter passed to callback function
-
asrc_audio_channel_t audioDataChannels#
audio channel number
-
asrc_channel_pair_t channelPair#
channel pair mask
-
asrc_in_handle_t in#
asrc input handler
-
asrc_out_handle_t out#
asrc output handler
-
ASRC_Type *base#
ASRC EDMA Driver#
-
void ASRC_TransferInCreateHandleEDMA(ASRC_Type *base, asrc_edma_handle_t *handle, asrc_channel_pair_t channelPair, asrc_edma_callback_t callback, edma_handle_t *inDmaHandle, const asrc_p2p_edma_config_t *periphConfig, void *userData)#
Initializes the ASRC IN eDMA handle.
This function initializes the ASRC DMA handle, which can be used for other ASRC transactional APIs. Usually, for a specified ASRC channel pair, call this API once to get the initialized handle.
- Parameters:
base – ASRC base pointer.
channelPair – ASRC channel pair
handle – ASRC eDMA handle pointer.
callback – Pointer to user callback function.
inDmaHandle – DMA handler for ASRC in.
periphConfig – peripheral configuration.
userData – User parameter passed to the callback function.
-
void ASRC_TransferOutCreateHandleEDMA(ASRC_Type *base, asrc_edma_handle_t *handle, asrc_channel_pair_t channelPair, asrc_edma_callback_t callback, edma_handle_t *outDmaHandle, const asrc_p2p_edma_config_t *periphConfig, void *userData)#
Initializes the ASRC OUT eDMA handle.
This function initializes the ASRC DMA handle, which can be used for other ASRC transactional APIs. Usually, for a specified ASRC channel pair, call this API once to get the initialized handle.
- Parameters:
base – ASRC base pointer.
channelPair – ASRC channel pair
handle – ASRC eDMA handle pointer.
callback – Pointer to user callback function.
outDmaHandle – DMA handler for ASRC out.
periphConfig – peripheral configuration.
userData – User parameter passed to the callback function.
-
status_t ASRC_TransferSetChannelPairConfigEDMA(ASRC_Type *base, asrc_edma_handle_t *handle, asrc_channel_pair_config_t *asrcConfig, uint32_t inSampleRate, uint32_t outSampleRate)#
Configures the ASRC P2P channel pair.
- Parameters:
base – ASRC base pointer.
handle – ASRC eDMA handle pointer.
asrcConfig – asrc configurations.
inSampleRate – ASRC input sample rate.
outSampleRate – ASRC output sample rate.
-
uint32_t ASRC_GetOutSamplesSizeEDMA(ASRC_Type *base, asrc_edma_handle_t *handle, uint32_t inSampleRate, uint32_t outSampleRate, uint32_t inSamplesize)#
Get output sample buffer size can be transferred by edma.
Note
This API is depends on the ASRC output configuration, should be called after the ASRC_TransferSetChannelPairConfigEDMA.
- Parameters:
base – asrc base pointer.
handle – ASRC channel pair edma handle.
inSampleRate – input sample rate.
outSampleRate – output sample rate.
inSamplesize – input sampleS size.
- Return values:
output – buffer size in byte.
-
status_t ASRC_TransferEDMA(ASRC_Type *base, asrc_edma_handle_t *handle, asrc_transfer_t *xfer)#
Performs a non-blocking ASRC m2m convert using EDMA.
Note
This interface returns immediately after the transfer initiates.
- Parameters:
base – ASRC base pointer.
handle – ASRC eDMA handle pointer.
xfer – Pointer to the DMA transfer structure.
- Return values:
kStatus_Success – Start a ASRC eDMA send successfully.
kStatus_InvalidArgument – The input argument is invalid.
kStatus_ASRCQueueFull – ASRC EDMA driver queue is full.
-
void ASRC_TransferInAbortEDMA(ASRC_Type *base, asrc_edma_handle_t *handle)#
Aborts a ASRC IN transfer using eDMA.
This function only aborts the current transfer slots, the other transfer slots’ information still kept in the handler. If users want to terminate all transfer slots, just call ASRC_TransferTerminalP2PEDMA.
- Parameters:
base – ASRC base pointer.
handle – ASRC eDMA handle pointer.
-
void ASRC_TransferOutAbortEDMA(ASRC_Type *base, asrc_edma_handle_t *handle)#
Aborts a ASRC OUT transfer using eDMA.
This function only aborts the current transfer slots, the other transfer slots’ information still kept in the handler. If users want to terminate all transfer slots, just call ASRC_TransferTerminalP2PEDMA.
- Parameters:
base – ASRC base pointer.
handle – ASRC eDMA handle pointer.
-
void ASRC_TransferInTerminalEDMA(ASRC_Type *base, asrc_edma_handle_t *handle)#
Terminate In ASRC Convert.
This function will clear all transfer slots buffered in the asrc queue. If users only want to abort the current transfer slot, please call ASRC_TransferAbortPP2PEDMA.
- Parameters:
base – ASRC base pointer.
handle – ASRC eDMA handle pointer.
-
void ASRC_TransferOutTerminalEDMA(ASRC_Type *base, asrc_edma_handle_t *handle)#
Terminate Out ASRC Convert.
This function will clear all transfer slots buffered in the asrc queue. If users only want to abort the current transfer slot, please call ASRC_TransferAbortPP2PEDMA.
- Parameters:
base – ASRC base pointer.
handle – ASRC eDMA handle pointer.
-
FSL_ASRC_EDMA_DRIVER_VERSION#
Version 2.2.0
-
typedef struct _asrc_edma_handle asrc_edma_handle_t#
-
typedef void (*asrc_edma_callback_t)(ASRC_Type *base, asrc_edma_handle_t *handle, status_t status, void *userData)#
ASRC eDMA transfer callback function for finish and error.
-
typedef void (*asrc_start_peripheral_t)(bool start)#
ASRC trigger peripheral function pointer.
-
typedef struct _asrc_p2p_edma_config asrc_p2p_edma_config_t#
destination peripheral configuration
-
typedef struct _asrc_in_edma_handle asrc_in_edma_handle_t#
@ brief asrc in edma handler
-
typedef struct _asrc_out_edma_handle asrc_out_edma_handle_t#
@ brief asrc out edma handler
-
ASRC_XFER_IN_QUEUE_SIZE#
ASRC IN edma QUEUE size.
<
-
ASRC_XFER_OUT_QUEUE_SIZE#
-
struct _asrc_p2p_edma_config#
- #include <fsl_asrc_edma.h>
destination peripheral configuration
Public Members
-
asrc_start_peripheral_t startPeripheral#
trigger peripheral start
-
asrc_start_peripheral_t startPeripheral#
-
struct _asrc_in_edma_handle#
- #include <fsl_asrc_edma.h>
@ brief asrc in edma handler
Public Members
-
edma_handle_t *inDmaHandle#
DMA handler for ASRC in
-
uint8_t tcd[(4U + 1U) * sizeof(edma_tcd_t)]#
TCD pool for eDMA send.
-
uint32_t sampleWidth#
input data width
-
uint32_t fifoThreshold#
ASRC input fifo threshold
-
uint32_t *asrcQueue[4U]#
Transfer queue storing queued transfer.
-
size_t transferSize[4U]#
Data bytes need to transfer
-
volatile uint8_t queueUser#
Index for user to queue transfer.
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
uint32_t state#
Internal state for ASRC eDMA transfer
-
const asrc_p2p_edma_config_t *peripheralConfig#
peripheral configuration pointer
-
edma_handle_t *inDmaHandle#
-
struct _asrc_out_edma_handle#
- #include <fsl_asrc_edma.h>
@ brief asrc out edma handler
Public Members
-
edma_handle_t *outDmaHandle#
DMA handler for ASRC out
-
uint8_t tcd[(((4U) * 2U) + 1U) * sizeof(edma_tcd_t)]#
TCD pool for eDMA send.
-
uint32_t sampleWidth#
output data width
-
uint32_t fifoThreshold#
ASRC output fifo threshold
-
uint32_t *asrcQueue[((4U) * 2U)]#
Transfer queue storing queued transfer.
-
size_t transferSize[((4U) * 2U)]#
Data bytes need to transfer
-
volatile uint8_t queueUser#
Index for user to queue transfer.
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
uint32_t state#
Internal state for ASRC eDMA transfer
-
const asrc_p2p_edma_config_t *peripheralConfig#
peripheral configuration pointer
-
edma_handle_t *outDmaHandle#
-
struct _asrc_edma_handle#
- #include <fsl_asrc_edma.h>
ASRC DMA transfer handle.
Public Members
-
asrc_in_edma_handle_t in#
asrc in handler
-
asrc_out_edma_handle_t out#
asrc out handler
-
asrc_channel_pair_t channelPair#
channel pair
-
void *userData#
User callback parameter
-
asrc_edma_callback_t callback#
Callback for users while transfer finish or error occurs
-
asrc_in_edma_handle_t in#
CACHE: ARMV7-M7 CACHE Memory Controller#
-
static inline void L1CACHE_EnableICache(void)#
Enables cortex-m7 L1 instruction cache.
-
static inline void L1CACHE_DisableICache(void)#
Disables cortex-m7 L1 instruction cache.
-
static inline void L1CACHE_InvalidateICache(void)#
Invalidate cortex-m7 L1 instruction cache.
-
void L1CACHE_InvalidateICacheByRange(uint32_t address, uint32_t size_byte)#
Invalidate cortex-m7 L1 instruction cache by range.
Note
The start address and size_byte should be 32-byte(FSL_FEATURE_L1ICACHE_LINESIZE_BYTE) aligned. The startAddr here will be forced to align to L1 I-cache line size if startAddr is not aligned. For the size_byte, application should make sure the alignment or make sure the right operation order if the size_byte is not aligned.
- Parameters:
address – The start address of the memory to be invalidated.
size_byte – The memory size.
-
static inline void L1CACHE_EnableDCache(void)#
Enables cortex-m7 L1 data cache.
-
static inline void L1CACHE_DisableDCache(void)#
Disables cortex-m7 L1 data cache.
-
static inline void L1CACHE_InvalidateDCache(void)#
Invalidates cortex-m7 L1 data cache.
-
static inline void L1CACHE_CleanDCache(void)#
Cleans cortex-m7 L1 data cache.
-
static inline void L1CACHE_CleanInvalidateDCache(void)#
Cleans and Invalidates cortex-m7 L1 data cache.
-
static inline void L1CACHE_InvalidateDCacheByRange(uint32_t address, uint32_t size_byte)#
Invalidates cortex-m7 L1 data cache by range.
Note
The start address and size_byte should be 32-byte(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE) aligned. The startAddr here will be forced to align to L1 D-cache line size if startAddr is not aligned. For the size_byte, application should make sure the alignment or make sure the right operation order if the size_byte is not aligned.
- Parameters:
address – The start address of the memory to be invalidated.
size_byte – The memory size.
-
static inline void L1CACHE_CleanDCacheByRange(uint32_t address, uint32_t size_byte)#
Cleans cortex-m7 L1 data cache by range.
Note
The start address and size_byte should be 32-byte(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE) aligned. The startAddr here will be forced to align to L1 D-cache line size if startAddr is not aligned. For the size_byte, application should make sure the alignment or make sure the right operation order if the size_byte is not aligned.
- Parameters:
address – The start address of the memory to be cleaned.
size_byte – The memory size.
-
static inline void L1CACHE_CleanInvalidateDCacheByRange(uint32_t address, uint32_t size_byte)#
Cleans and Invalidates cortex-m7 L1 data cache by range.
Note
The start address and size_byte should be 32-byte(FSL_FEATURE_L1DCACHE_LINESIZE_BYTE) aligned. The startAddr here will be forced to align to L1 D-cache line size if startAddr is not aligned. For the size_byte, application should make sure the alignment or make sure the right operation order if the size_byte is not aligned.
- Parameters:
address – The start address of the memory to be clean and invalidated.
size_byte – The memory size.
-
void ICACHE_InvalidateByRange(uint32_t address, uint32_t size_byte)#
Invalidates all instruction caches by range.
Both cortex-m7 L1 cache line and L2 PL310 cache line length is 32-byte.
Note
address and size should be aligned to cache line size 32-Byte due to the cache operation unit is one cache line. The startAddr here will be forced to align to the cache line size if startAddr is not aligned. For the size_byte, application should make sure the alignment or make sure the right operation order if the size_byte is not aligned.
- Parameters:
address – The physical address.
size_byte – size of the memory to be invalidated.
-
void DCACHE_InvalidateByRange(uint32_t address, uint32_t size_byte)#
Invalidates all data caches by range.
Both cortex-m7 L1 cache line and L2 PL310 cache line length is 32-byte.
Note
address and size should be aligned to cache line size 32-Byte due to the cache operation unit is one cache line. The startAddr here will be forced to align to the cache line size if startAddr is not aligned. For the size_byte, application should make sure the alignment or make sure the right operation order if the size_byte is not aligned.
- Parameters:
address – The physical address.
size_byte – size of the memory to be invalidated.
-
void DCACHE_CleanByRange(uint32_t address, uint32_t size_byte)#
Cleans all data caches by range.
Both cortex-m7 L1 cache line and L2 PL310 cache line length is 32-byte.
Note
address and size should be aligned to cache line size 32-Byte due to the cache operation unit is one cache line. The startAddr here will be forced to align to the cache line size if startAddr is not aligned. For the size_byte, application should make sure the alignment or make sure the right operation order if the size_byte is not aligned.
- Parameters:
address – The physical address.
size_byte – size of the memory to be cleaned.
-
void DCACHE_CleanInvalidateByRange(uint32_t address, uint32_t size_byte)#
Cleans and Invalidates all data caches by range.
Both cortex-m7 L1 cache line and L2 PL310 cache line length is 32-byte.
Note
address and size should be aligned to cache line size 32-Byte due to the cache operation unit is one cache line. The startAddr here will be forced to align to the cache line size if startAddr is not aligned. For the size_byte, application should make sure the alignment or make sure the right operation order if the size_byte is not aligned.
- Parameters:
address – The physical address.
size_byte – size of the memory to be cleaned and invalidated.
-
FSL_CACHE_DRIVER_VERSION#
cache driver version 2.0.6.
CGUANA FSM resource bits#
-
CLOCK_CGUANA_FSM_LDOA#
LDOA 0.8 V
-
CLOCK_CGUANA_FSM_FRO192M#
FRO 192 MHz
-
CLOCK_CGUANA_FSM_FRO12M#
FRO 12 MHz
-
CLOCK_CGUANA_FSM_MAINPLL#
Main PLL
-
CLOCK_CGUANA_FSM_COREPLL#
Core PLL
-
CLOCK_CGUANA_FSM_SYSPLL#
System PLL
-
CLOCK_CGUANA_FSM_LDOQ#
LDOQ 0.8 V
-
CLOCK_CGUANA_FSM_SXOSC#
SXOSC crystal oscillator
-
CLOCK_CGUANA_FSM_FRO12M_WAKE#
FRO 12 MHz wake path (ON_REQ only)
Clock Driver#
-
FSL_CLOCK_DRIVER_VERSION#
CLOCK driver version 1.1.0.
-
FSL_CLOCK_FREQME_REF_SCALE#
Reference clock scaling exponent used by CLOCK_Measure*Freq().
One measurement counts target-clock edges during 2^REF_SCALE reference cycles. With the 24 MHz crystal reference this gives ~2.73 ms per measurement and 24 MHz / 2^16 = 366 Hz resolution. Valid range 0..24 (enforced at compile time); values above 24 could overflow the 31-bit result counter with a 2 GHz target and 24 MHz reference (2 GHz / 24 MHz * 2^25 > 2^31).
-
FSL_CLOCK_FREQME_TIMEOUT_LOOPS#
Bounded polling loop count for one FREQME measurement (CPU-frequency independent busy-wait bound; measurement never completes if the reference clock is dead).
-
FSL_CLOCK_USBPLL_OUT_FREQ_HZ#
-
FSL_CLOCK_USBPLL_48M_FREQ_HZ#
-
FSL_CLOCK_MIPIPLL_DIV8_FREQ_HZ#
-
FSL_CLOCK_MEDIAPLL_FREQ_HZ#
-
enum _clock_lpcg#
Clock LPCG index.
Values:
-
enumerator kCLOCK_SYSCON_START#
-
enumerator kCLOCK_SYSCON_freqme#
Clock LPCG SYSCON SS 0 syscon_freqme
-
enumerator kCLOCK_SYSCON_END#
-
enumerator kCLOCK_CMPT_START#
-
enumerator kCLOCK_CMPT_romcp#
Clock LPCG Cmpt SS index 0 cmpt_romcp
-
enumerator kCLOCK_CMPT_cm85_clkin#
Clock LPCG Cmpt SS index 1 cm85_clkin
-
enumerator kCLOCK_CMPT_cm85_dbgclk#
Clock LPCG Cmpt SS index 2 cm85_dbgclk
-
enumerator kCLOCK_CMPT_cm85_iwic#
Clock LPCG Cmpt SS index 3 cm85_iwic
-
enumerator kCLOCK_CMPT_npu_core#
Clock LPCG Cmpt SS index 4 npu_core
-
enumerator kCLOCK_CMPT_npu_mem#
Clock LPCG Cmpt SS index 5 npu_mem
-
enumerator kCLOCK_CMPT_freqme#
Clock LPCG Cmpt SS index 6 cmpt_freqme
-
enumerator kCLOCK_CMPT_modcon#
Clock LPCG Cmpt SS index 7 cmpt_modcon
-
enumerator kCLOCK_CMPT_trdc#
Clock LPCG Cmpt SS index 8 cmpt_trdc
-
enumerator kCLOCK_CMPT_sram_ctrl0#
Clock LPCG Cmpt SS index 9 cmpt_sram_ctrl0
-
enumerator kCLOCK_CMPT_sram_ctrl1#
Clock LPCG Cmpt SS index 10 cmpt_sram_ctrl1
-
enumerator kCLOCK_CMPT_sram_ctrl2#
Clock LPCG Cmpt SS index 11 cmpt_sram_ctrl2
-
enumerator kCLOCK_CMPT_nic_gpv#
Clock LPCG Cmpt SS index 12 cmpt_nic_gpv
-
enumerator kCLOCK_CMPT_llc#
Clock LPCG Cmpt SS index 13 cmpt_llc
-
enumerator kCLOCK_CMPT_END#
-
enumerator kCLOCK_MAIN_START#
-
enumerator kCLOCK_MAIN_trace_rt2660#
Clock LPCG Main SS index 0 trace_rt2660
-
enumerator kCLOCK_MAIN_tsclk#
Clock LPCG Main SS index 1 tsclk
-
enumerator kCLOCK_MAIN_tpiu_traceclkin#
Clock LPCG Main SS index 2 tpiu_traceclkin
-
enumerator kCLOCK_MAIN_swo_traceclkin#
Clock LPCG Main SS index 3 swo_traceclkin
-
enumerator kCLOCK_MAIN_xspi0#
Clock LPCG Main SS index 4 xspi0
-
enumerator kCLOCK_MAIN_xspi1#
Clock LPCG Main SS index 5 xspi1
-
enumerator kCLOCK_MAIN_edma0#
Clock LPCG Main SS index 6 edma0
-
enumerator kCLOCK_MAIN_edma1#
Clock LPCG Main SS index 7 edma1
-
enumerator kCLOCK_MAIN_freqme#
Clock LPCG Main SS index 8 freqme
-
enumerator kCLOCK_MAIN_modcon#
Clock LPCG Main SS index 9 modcon
-
enumerator kCLOCK_MAIN_hsp_crc#
Clock LPCG Main SS index 10 hsp_crc
-
enumerator kCLOCK_MAIN_hsp_dac#
Clock LPCG Main SS index 11 hsp_dac
-
enumerator kCLOCK_MAIN_hsp_adc0#
Clock LPCG Main SS index 12 hsp_adc0
-
enumerator kCLOCK_MAIN_hsp_adc1#
Clock LPCG Main SS index 13 hsp_adc1
-
enumerator kCLOCK_MAIN_hsp_evtg0#
Clock LPCG Main SS index 14 hsp_evtg0
-
enumerator kCLOCK_MAIN_hsp_evtg1#
Clock LPCG Main SS index 15 hsp_evtg1
-
enumerator kCLOCK_MAIN_hsp_evtg2#
Clock LPCG Main SS index 16 hsp_evtg2
-
enumerator kCLOCK_MAIN_hsp_evtg3#
Clock LPCG Main SS index 17 hsp_evtg3
-
enumerator kCLOCK_MAIN_hsp_xbar0#
Clock LPCG Main SS index 18 hsp_xbar0
-
enumerator kCLOCK_MAIN_hsp_xbar1#
Clock LPCG Main SS index 19 hsp_xbar1
-
enumerator kCLOCK_MAIN_hsp_xbar2#
Clock LPCG Main SS index 20 hsp_xbar2
-
enumerator kCLOCK_MAIN_sramc#
Clock LPCG Main SS index 21 sramc
-
enumerator kCLOCK_MAIN_trdc#
Clock LPCG Main SS index 22 trdc
-
enumerator kCLOCK_MAIN_hsp_lpspi0#
Clock LPCG Main SS index 23 hsp_lpspi0
-
enumerator kCLOCK_MAIN_hsp_lpspi1#
Clock LPCG Main SS index 24 hsp_lpspi1
-
enumerator kCLOCK_MAIN_hsp_lpspi2#
Clock LPCG Main SS index 25 hsp_lpspi2
-
enumerator kCLOCK_MAIN_hsp_lpspi3#
Clock LPCG Main SS index 26 hsp_lpspi3
-
enumerator kCLOCK_MAIN_hsp_lpspi4#
Clock LPCG Main SS index 27 hsp_lpspi4
-
enumerator kCLOCK_MAIN_hsp_lpi2c0#
Clock LPCG Main SS index 28 hsp_lpi2c0
-
enumerator kCLOCK_MAIN_hsp_lpi2c1#
Clock LPCG Main SS index 29 hsp_lpi2c1
-
enumerator kCLOCK_MAIN_hsp_lpuart0#
Clock LPCG Main SS index 30 hsp_lpuart0
-
enumerator kCLOCK_MAIN_hsp_lpuart1#
Clock LPCG Main SS index 31 hsp_lpuart1
-
enumerator kCLOCK_MAIN_hsp_lpuart2#
Clock LPCG Main SS index 32 hsp_lpuart2
-
enumerator kCLOCK_MAIN_hsp_lpuart3#
Clock LPCG Main SS index 33 hsp_lpuart3
-
enumerator kCLOCK_MAIN_hsp_lpuart4#
Clock LPCG Main SS index 34 hsp_lpuart4
-
enumerator kCLOCK_MAIN_hsp_lpuart5#
Clock LPCG Main SS index 35 hsp_lpuart5
-
enumerator kCLOCK_MAIN_hsp_flexpwm0#
Clock LPCG Main SS index 36 hsp_flexpwm0
-
enumerator kCLOCK_MAIN_hsp_flexpwm1#
Clock LPCG Main SS index 37 hsp_flexpwm1
-
enumerator kCLOCK_MAIN_hsp_flexpwm2#
Clock LPCG Main SS index 38 hsp_flexpwm2
-
enumerator kCLOCK_MAIN_hsp_flexpwm3#
Clock LPCG Main SS index 39 hsp_flexpwm3
-
enumerator kCLOCK_MAIN_hsp_lpit0#
Clock LPCG Main SS index 40 hsp_lpit0
-
enumerator kCLOCK_MAIN_hsp_lpit1#
Clock LPCG Main SS index 41 hsp_lpit1
-
enumerator kCLOCK_MAIN_hsp_qtpm0#
Clock LPCG Main SS index 42 hsp_qtpm0
-
enumerator kCLOCK_MAIN_hsp_qtimer0#
Clock LPCG Main SS index 43 hsp_qtimer0
-
enumerator kCLOCK_MAIN_hsp_qtimer1#
Clock LPCG Main SS index 44 hsp_qtimer1
-
enumerator kCLOCK_MAIN_hsp_qtimer2#
Clock LPCG Main SS index 45 hsp_qtimer2
-
enumerator kCLOCK_MAIN_hsp_qtimer3#
Clock LPCG Main SS index 46 hsp_qtimer3
-
enumerator kCLOCK_MAIN_hsp_can0#
Clock LPCG Main SS index 47 hsp_can0
-
enumerator kCLOCK_MAIN_hsp_can1#
Clock LPCG Main SS index 48 hsp_can1
-
enumerator kCLOCK_MAIN_hsp_can2#
Clock LPCG Main SS index 49 hsp_can2
-
enumerator kCLOCK_MAIN_hsp_qdc0#
Clock LPCG Main SS index 50 hsp_qdc0
-
enumerator kCLOCK_MAIN_hsp_qdc1#
Clock LPCG Main SS index 51 hsp_qdc1
-
enumerator kCLOCK_MAIN_hsp_qdc2#
Clock LPCG Main SS index 52 hsp_qdc2
-
enumerator kCLOCK_MAIN_hsp_qdc3#
Clock LPCG Main SS index 53 hsp_qdc3
-
enumerator kCLOCK_MAIN_hsp_rgpio0#
Clock LPCG Main SS index 54 hsp_rgpio0
-
enumerator kCLOCK_MAIN_hsp_rgpio1#
Clock LPCG Main SS index 55 hsp_rgpio1
-
enumerator kCLOCK_MAIN_hsp_rgpio2#
Clock LPCG Main SS index 56 hsp_rgpio2
-
enumerator kCLOCK_MAIN_hsp_rgpio3#
Clock LPCG Main SS index 57 hsp_rgpio3
-
enumerator kCLOCK_MAIN_hsp_rgpio4#
Clock LPCG Main SS index 58 hsp_rgpio4
-
enumerator kCLOCK_MAIN_hsp_i3c0#
Clock LPCG Main SS index 59 hsp_i3c0
-
enumerator kCLOCK_MAIN_hsp_flexio0#
Clock LPCG Main SS index 60 hsp_flexio0
-
enumerator kCLOCK_MAIN_hsp_flexio1#
Clock LPCG Main SS index 61 hsp_flexio1
-
enumerator kCLOCK_MAIN_hsp_flexio2#
Clock LPCG Main SS index 62 hsp_flexio2
-
enumerator kCLOCK_MAIN_hsp_sinc0#
Clock LPCG Main SS index 63 hsp_sinc0
-
enumerator kCLOCK_MAIN_hsp_sinc1#
Clock LPCG Main SS index 64 hsp_sinc1
-
enumerator kCLOCK_MAIN_mtr_master#
Clock LPCG Main SS index 65 mtr_master
-
enumerator kCLOCK_MAIN_iomuxc#
Clock LPCG Main SS index 66 main_iomuxc
-
enumerator kCLOCK_MAIN_hsp_trig_sync0#
Clock LPCG Main SS index 67 hsp_trig_sync0
-
enumerator kCLOCK_MAIN_hsp_trig_sync1#
Clock LPCG Main SS index 68 hsp_trig_sync1
-
enumerator kCLOCK_MAIN_hsp_stm#
Clock LPCG Main SS index 69 hsp_stm
-
enumerator kCLOCK_MAIN_hsp_nic_main_gpv#
Clock LPCG Main SS index 70 hsp_nic_main_gpv
-
enumerator kCLOCK_MAIN_prince0#
Clock LPCG Main SS index 71 main_prince0
-
enumerator kCLOCK_MAIN_prince1#
Clock LPCG Main SS index 72 main_prince1
-
enumerator kCLOCK_MAIN_cssi#
Clock LPCG Main SS index 73 main_cssi
-
enumerator kCLOCK_MAIN_mmu0#
Clock LPCG Main SS index 74 main_mmu0
-
enumerator kCLOCK_MAIN_END#
-
enumerator kCLOCK_WAKE_START#
-
enumerator kCLOCK_WAKE_syscon_pmu#
Clock LPCG Wake SS index 0 syscon_pmu
-
enumerator kCLOCK_WAKE_dap_rt2660#
Clock LPCG Wake SS index 1 dap_rt2660
-
enumerator kCLOCK_WAKE_edma#
Clock LPCG Wake SS index 2 edma
-
enumerator kCLOCK_WAKE_freqme#
Clock LPCG Wake SS index 3 freqme
-
enumerator kCLOCK_WAKE_modcon#
Clock LPCG Wake SS index 4 modcon
-
enumerator kCLOCK_WAKE_xbar0#
Clock LPCG Wake SS index 5 xbar0
-
enumerator kCLOCK_WAKE_trdc#
Clock LPCG Wake SS index 6 trdc
-
enumerator kCLOCK_WAKE_syscon_resetcon#
Clock LPCG Wake SS index 7 syscon_resetcon
-
enumerator kCLOCK_WAKE_syscon_pdcon#
Clock LPCG Wake SS index 8 syscon_pdcon
-
enumerator kCLOCK_WAKE_syscon_powercon#
Clock LPCG Wake SS index 9 syscon_powercon
-
enumerator kCLOCK_WAKE_syscon_memcon#
Clock LPCG Wake SS index 10 syscon_memcon
-
enumerator kCLOCK_WAKE_micfil#
Clock LPCG Wake SS index 11 micfil
-
enumerator kCLOCK_WAKE_lpspi#
Clock LPCG Wake SS index 12 lpspi
-
enumerator kCLOCK_WAKE_lpi2c0#
Clock LPCG Wake SS index 13 lpi2c0
-
enumerator kCLOCK_WAKE_lpi2c1#
Clock LPCG Wake SS index 14 lpi2c1
-
enumerator kCLOCK_WAKE_lpuart0#
Clock LPCG Wake SS index 15 lpuart0
-
enumerator kCLOCK_WAKE_lpuart1#
Clock LPCG Wake SS index 16 lpuart1
-
enumerator kCLOCK_WAKE_acmp0#
Clock LPCG Wake SS index 17 acmp0
-
enumerator kCLOCK_WAKE_acmp1#
Clock LPCG Wake SS index 18 acmp1
-
enumerator kCLOCK_WAKE_acmp2#
Clock LPCG Wake SS index 19 acmp2
-
enumerator kCLOCK_WAKE_acmp3#
Clock LPCG Wake SS index 20 acmp3
-
enumerator kCLOCK_WAKE_swt0#
Clock LPCG Wake SS index 21 swt0
-
enumerator kCLOCK_WAKE_swt1#
Clock LPCG Wake SS index 22 swt1
-
enumerator kCLOCK_WAKE_lptimer0#
Clock LPCG Wake SS index 23 lptimer0
-
enumerator kCLOCK_WAKE_lptimer1#
Clock LPCG Wake SS index 24 lptimer1
-
enumerator kCLOCK_WAKE_qtpm#
Clock LPCG Wake SS index 25 qtpm
-
enumerator kCLOCK_WAKE_ewm#
Clock LPCG Wake SS index 26 ewm
-
enumerator kCLOCK_WAKE_rgpio0#
Clock LPCG Wake SS index 27 rgpio0
-
enumerator kCLOCK_WAKE_i3c0#
Clock LPCG Wake SS index 28 i3c0
-
enumerator kCLOCK_WAKE_ram_ctrl#
Clock LPCG Wake SS index 29 ram_ctrl
-
enumerator kCLOCK_WAKE_iomuxc#
Clock LPCG Wake SS index 30 iomuxc
-
enumerator kCLOCK_WAKE_vbat_rtc_hp#
Clock LPCG Wake SS index 31 vbat_rtc_hp
-
enumerator kCLOCK_WAKE_trig_sync#
Clock LPCG Wake SS index 32 trig_sync
-
enumerator kCLOCK_WAKE_END#
-
enumerator kCLOCK_COMM_START#
-
enumerator kCLOCK_COMM_xspir#
Clock LPCG Comm SS index 0 xspir
-
enumerator kCLOCK_COMM_eth0#
Clock LPCG Comm SS index 1 eth0
-
enumerator kCLOCK_COMM_eth1#
Clock LPCG Comm SS index 2 eth1
-
enumerator kCLOCK_COMM_usdhc0#
Clock LPCG Comm SS index 3 usdhc0
-
enumerator kCLOCK_COMM_usdhc1#
Clock LPCG Comm SS index 4 usdhc1
-
enumerator kCLOCK_COMM_usb0#
Clock LPCG Comm SS index 5 usb0
-
enumerator kCLOCK_COMM_usb1#
Clock LPCG Comm SS index 6 usb1
-
enumerator kCLOCK_COMM_xenophy0#
Clock LPCG Comm SS index 7 xenophy0
-
enumerator kCLOCK_COMM_xenophy1#
Clock LPCG Comm SS index 8 xenophy1
-
enumerator kCLOCK_COMM_freqme#
Clock LPCG Comm SS index 9 freqme
-
enumerator kCLOCK_COMM_modcon#
Clock LPCG Comm SS index 10 modcon
-
enumerator kCLOCK_COMM_trdc#
Clock LPCG Comm SS index 11 trdc
-
enumerator kCLOCK_COMM_nic_gpv#
Clock LPCG Comm SS index 12 nic_gpv
-
enumerator kCLOCK_COMM_END#
-
enumerator kCLOCK_AUDIO_START#
-
enumerator kCLOCK_AUDIO_edma#
Clock LPCG Audio SS index 0 edma
-
enumerator kCLOCK_AUDIO_freqme#
Clock LPCG Audio SS index 1 freqme
-
enumerator kCLOCK_AUDIO_modcon#
Clock LPCG Audio SS index 2 modcon
-
enumerator kCLOCK_AUDIO_xbar0#
Clock LPCG Audio SS index 3 xbar0
-
enumerator kCLOCK_AUDIO_trdc#
Clock LPCG Audio SS index 4 trdc
-
enumerator kCLOCK_AUDIO_sai0#
Clock LPCG Audio SS index 5 sai0
-
enumerator kCLOCK_AUDIO_sai1#
Clock LPCG Audio SS index 6 sai1
-
enumerator kCLOCK_AUDIO_sai2#
Clock LPCG Audio SS index 7 sai2
-
enumerator kCLOCK_AUDIO_micfil#
Clock LPCG Audio SS index 8 micfil
-
enumerator kCLOCK_AUDIO_asrc#
Clock LPCG Audio SS index 9 asrc
-
enumerator kCLOCK_AUDIO_spdif_xcvr#
Clock LPCG Audio SS index 10 spdif_xcvr
-
enumerator kCLOCK_AUDIO_mqs#
Clock LPCG Audio SS index 11 mqs
-
enumerator kCLOCK_AUDIO_ram_ctrl#
Clock LPCG Audio SS index 12 ram_ctrl
-
enumerator kCLOCK_AUDIO_END#
-
enumerator kCLOCK_MEDIA_START#
-
enumerator kCLOCK_MEDIA_jpeg_decoder#
Clock LPCG Media SS index 0 jpeg_decoder
-
enumerator kCLOCK_MEDIA_isi#
Clock LPCG Media SS index 1 isi
-
enumerator kCLOCK_MEDIA_reformatter#
Clock LPCG Media SS index 2 reformatter
-
enumerator kCLOCK_MEDIA_csi#
Clock LPCG Media SS index 3 csi
-
enumerator kCLOCK_MEDIA_mipi_csi#
Clock LPCG Media SS index 4 mipi_csi
-
enumerator kCLOCK_MEDIA_gpu#
Clock LPCG Media SS index 5 gpu
-
enumerator kCLOCK_MEDIA_dcif#
Clock LPCG Media SS index 6 dcif
-
enumerator kCLOCK_MEDIA_mipi_dsi#
Clock LPCG Media SS index 7 mipi_dsi
-
enumerator kCLOCK_MEDIA_freqme#
Clock LPCG Media SS index 8 freqme
-
enumerator kCLOCK_MEDIA_modcon#
Clock LPCG Media SS index 9 modcon
-
enumerator kCLOCK_MEDIA_trdc#
Clock LPCG Media SS index 10 trdc
-
enumerator kCLOCK_MEDIA_nic_gpv#
Clock LPCG Media SS index 11 nic_gpv
-
enumerator kCLOCK_MEDIA_END#
-
enumerator kCLOCK_IpInvalid#
Invalid value.
-
enumerator kCLOCK_SYSCON_START#
-
enum _clock_root#
Root clock index.
Values:
-
enumerator kCLOCK_Root_CGU_START#
-
enumerator kCLOCK_Root_CGU_SXOSC_ROOTCLK#
Clock Root CGU SS index 0 SXOSC_ROOTCLK
-
enumerator kCLOCK_Root_CGU_BASE_CLK#
Clock Root CGU SS index 1 BASE_CLK
-
enumerator kCLOCK_Root_CGU_LOW_CLK#
Clock Root CGU SS index 2 LOW_CLK
-
enumerator kCLOCK_Root_CGU_MAINPLL_DIVX#
Clock Root CGU SS index 3 MAINPLL_DIVX
-
enumerator kCLOCK_Root_CGU_SYSPLL_DIVX#
Clock Root CGU SS index 4 SYSPLL_DIVX
-
enumerator kCLOCK_Root_CGU_PLL_PFDX#
Clock Root CGU SS index 5 PLL_PFDX
-
enumerator kCLOCK_Root_CGU_MEDIA_PFDX#
Clock Root CGU SS index 6 MEDIA_PFDX
-
enumerator kCLOCK_Root_CGU_MAINPFDX_ROOTCLK#
Clock Root CGU SS index 7 MAINPFDX_ROOTCLK
-
enumerator kCLOCK_Root_CGU_COMMPFDX_ROOTCLK#
Clock Root CGU SS index 8 COMMPFDX_ROOTCLK
-
enumerator kCLOCK_Root_CGU_MAINDIVX_ROOTCLK#
Clock Root CGU SS index 9 MAINDIVX_ROOTCLK
-
enumerator kCLOCK_Root_CGU_SAIMCLK_ROOTCLK#
Clock Root CGU SS index 10 SAIMCLK_ROOTCLK
-
enumerator kCLOCK_Root_CGU_SAIMCLK0_ROOTCLK#
Clock Root CGU SS index 11 SAIMCLK0_ROOTCLK
-
enumerator kCLOCK_Root_CGU_SAIMCLK1_ROOTCLK#
Clock Root CGU SS index 12 SAIMCLK1_ROOTCLK
-
enumerator kCLOCK_Root_CGU_SAIMCLK2_ROOTCLK#
Clock Root CGU SS index 13 SAIMCLK2_ROOTCLK
-
enumerator kCLOCK_Root_CGU_LP12M_CORE_ROOTCLK#
Clock Root CGU SS index 14 LP12M_CORE_ROOTCLK
-
enumerator kCLOCK_Root_CGU_LP1M_CORE_ROOTCLK#
Clock Root CGU SS index 15 LP1M_CORE_ROOTCLK
-
enumerator kCLOCK_Root_CGU_ULP32K_ROOTCLK#
Clock Root CGU SS index 16 ULP32K_ROOTCLK
-
enumerator kCLOCK_Root_CGU_FRO192M_ROOTCLK#
Clock Root CGU SS index 17 FRO192M_ROOTCLK
-
enumerator kCLOCK_Root_CGU_FRO96M_ROOTCLK#
Clock Root CGU SS index 18 FRO96M_ROOTCLK
-
enumerator kCLOCK_Root_CGU_FRO48M_ROOTCLK#
Clock Root CGU SS index 19 FRO48M_ROOTCLK
-
enumerator kCLOCK_Root_CGU_FRO24M_ROOTCLK#
Clock Root CGU SS index 20 FRO24M_ROOTCLK
-
enumerator kCLOCK_Root_CGU_SYSPLLDIV4_ROOTCLK#
Clock Root CGU SS index 21 SYSPLLDIV4_ROOTCLK
-
enumerator kCLOCK_Root_CGU_SYSPLLDIV5_ROOTCLK#
Clock Root CGU SS index 22 SYSPLLDIV5_ROOTCLK
-
enumerator kCLOCK_Root_CGU_SYSPLLDIVX_ROOTCLK#
Clock Root CGU SS index 23 SYSPLLDIVX_ROOTCLK
-
enumerator kCLOCK_Root_CGU_MAINPLLDIVX_ROOTCLK#
Clock Root CGU SS index 24 MAINPLLDIVX_ROOTCLK
-
enumerator kCLOCK_Root_CGU_MAINPLLDIV8_ROOTCLK#
Clock Root CGU SS index 25 MAINPLLDIV8_ROOTCLK
-
enumerator kCLOCK_Root_CGU_MAINPLLDIV10_ROOTCLK#
Clock Root CGU SS index 26 MAINPLLDIV10_ROOTCLK
-
enumerator kCLOCK_Root_CGU_MAINPLLDIV20_ROOTCLK#
Clock Root CGU SS index 27 MAINPLLDIV20_ROOTCLK
-
enumerator kCLOCK_Root_CGU_AUDIOPLL_ROOTCLK#
Clock Root CGU SS index 28 AUDIOPLL_ROOTCLK
-
enumerator kCLOCK_Root_CGU_VIDEOPLL_ROOTCLK#
Clock Root CGU SS index 29 VIDEOPLL_ROOTCLK
-
enumerator kCLOCK_Root_CGU_MAIN_ROOTCLK#
Clock Root CGU SS index 30 MAIN_ROOTCLK (renamed from CPU_ROOTCLK; CGU ROOT 30 feeds both CMPT ROOT 0 MAIN (after div+sndDiv) and CMPT ROOT 1 CPU (after div only) — see CLOCK_GetClockSrcFreq sndDiv special case for kCLOCK_SRC_CPU)
-
enumerator kCLOCK_Root_CGU_NPU_ROOTCLK#
Clock Root CGU SS index 31 NPU_ROOTCLK
-
enumerator kCLOCK_Root_CGU_MEDIABUS_ROOTCLK#
Clock Root CGU SS index 32 MEDIABUS_ROOTCLK
-
enumerator kCLOCK_Root_CGU_AUDIOBUS_ROOTCLK#
Clock Root CGU SS index 33 AUDIOBUS_ROOTCLK
-
enumerator kCLOCK_Root_CGU_COMMBUS_ROOTCLK#
Clock Root CGU SS index 34 COMMBUS_ROOTCLK
-
enumerator kCLOCK_Root_CGU_WAKEBUS_ROOTCLK#
Clock Root CGU SS index 35 WAKEBUS_ROOTCLK
-
enumerator kCLOCK_Root_CGU_SYSCON_PDMAIN_CLK#
Clock Root CGU SS index 36 SYSCON_PDMAIN_CLK
-
enumerator kCLOCK_Root_CGU_PERI_ROOTCLK0#
Clock Root CGU SS index 37 PERI_ROOTCLK0
-
enumerator kCLOCK_Root_CGU_PERI_ROOTCLK1#
Clock Root CGU SS index 38 PERI_ROOTCLK1
-
enumerator kCLOCK_Root_CGU_PERI_ROOTCLK2#
Clock Root CGU SS index 39 PERI_ROOTCLK2
-
enumerator kCLOCK_Root_CGU_PERI_ROOTCLK3#
Clock Root CGU SS index 40 PERI_ROOTCLK3
-
enumerator kCLOCK_Root_CGU_PERI_ROOTCLK4#
Clock Root CGU SS index 41 PERI_ROOTCLK4
-
enumerator kCLOCK_Root_CGU_PERI_ROOTCLK5#
Clock Root CGU SS index 42 PERI_ROOTCLK5
-
enumerator kCLOCK_Root_CGU_PERI_ROOTCLK6#
Clock Root CGU SS index 43 PERI_ROOTCLK6
-
enumerator kCLOCK_Root_CGU_PERI_ROOTCLK7#
Clock Root CGU SS index 44 PERI_ROOTCLK7
-
enumerator kCLOCK_Root_CGU_AUDIO_ROOTCLK#
Clock Root CGU SS index 45 AUDIO_ROOTCLK
-
enumerator kCLOCK_Root_CGU_VIDEO_ROOTCLK#
Clock Root CGU SS index 46 VIDEO_ROOTCLK
-
enumerator kCLOCK_Root_CGU_USB1_ROOTCLK#
Clock Root CGU SS index 47 USB1_ROOTCLK
-
enumerator kCLOCK_Root_CGU_ETH_ROOTCLK#
Clock Root CGU SS index 48 ETH_ROOTCLK
-
enumerator kCLOCK_Root_CGU_END#
-
enumerator kCLOCK_Root_CMPT_START#
-
enumerator kCLOCK_Root_CMPT_cmpt_clk#
Clock Root Cmpt SS index 0 cmpt_clk (MAIN_ROOTCLK)
-
enumerator kCLOCK_Root_CMPT_cpu_clk#
Clock Root Cmpt SS index 1 cpu_clk (CPU_ROOTCLK)
-
enumerator kCLOCK_Root_CMPT_npu_clk#
Clock Root Cmpt SS index 2 npu_clk (NPU_ROOTCLK)
-
enumerator kCLOCK_Root_CMPT_systick_clk0#
Clock Root Cmpt SS index 3 systick_clk0
-
enumerator kCLOCK_Root_CMPT_systick_clk1#
Clock Root Cmpt SS index 4 systick_clk1
-
enumerator kCLOCK_Root_CMPT_END#
-
enumerator kCLOCK_Root_MAIN_START#
-
enumerator kCLOCK_Root_MAIN_main_clk_divided#
Clock Root Main SS index 0 main_clk_divided
-
enumerator kCLOCK_Root_MAIN_xspi0_fclk_divided#
Clock Root Main SS index 1 xspi0_fclk_divided
-
enumerator kCLOCK_Root_MAIN_xspi1_fclk_divided#
Clock Root Main SS index 2 xspi1_fclk_divided
-
enumerator kCLOCK_Root_MAIN_i3c0_fclk#
Clock Root Main SS index 3 i3c0_fclk
-
enumerator kCLOCK_Root_MAIN_lpi2c0_fclk#
Clock Root Main SS index 4 lpi2c0_fclk
-
enumerator kCLOCK_Root_MAIN_lpi2c1_fclk#
Clock Root Main SS index 5 lpi2c1_fclk
-
enumerator kCLOCK_Root_MAIN_lpspi0_fclk#
Clock Root Main SS index 6 lpspi0_fclk
-
enumerator kCLOCK_Root_MAIN_lpspi1_fclk#
Clock Root Main SS index 7 lpspi1_fclk
-
enumerator kCLOCK_Root_MAIN_lpspi2_fclk#
Clock Root Main SS index 8 lpspi2_fclk
-
enumerator kCLOCK_Root_MAIN_lpspi3_fclk#
Clock Root Main SS index 9 lpspi3_fclk
-
enumerator kCLOCK_Root_MAIN_lpspi4_fclk#
Clock Root Main SS index 10 lpspi4_fclk
-
enumerator kCLOCK_Root_MAIN_lpuart0_fclk#
Clock Root Main SS index 11 lpuart0_fclk
-
enumerator kCLOCK_Root_MAIN_lpuart1_fclk#
Clock Root Main SS index 12 lpuart1_fclk
-
enumerator kCLOCK_Root_MAIN_lpuart2_fclk#
Clock Root Main SS index 13 lpuart2_fclk
-
enumerator kCLOCK_Root_MAIN_lpuart3_fclk#
Clock Root Main SS index 14 lpuart3_fclk
-
enumerator kCLOCK_Root_MAIN_lpuart4_fclk#
Clock Root Main SS index 15 lpuart4_fclk
-
enumerator kCLOCK_Root_MAIN_lpuart5_fclk#
Clock Root Main SS index 16 lpuart5_fclk
-
enumerator kCLOCK_Root_MAIN_flexcan0_fclk#
Clock Root Main SS index 17 flexcan0_fclk
-
enumerator kCLOCK_Root_MAIN_flexcan1_fclk#
Clock Root Main SS index 18 flexcan1_fclk
-
enumerator kCLOCK_Root_MAIN_flexcan2_fclk#
Clock Root Main SS index 19 flexcan2_fclk
-
enumerator kCLOCK_Root_MAIN_flexcan_gfclk#
Clock Root Main SS index 20 flexcan_gfclk
-
enumerator kCLOCK_Root_MAIN_qtpm0_fclk#
Clock Root Main SS index 21 TBD0
-
enumerator kCLOCK_Root_MAIN_lpit0_fclk#
Clock Root Main SS index 22 lpit0_fclk
-
enumerator kCLOCK_Root_MAIN_lpit1_fclk#
Clock Root Main SS index 23 lpit1_fclk
-
enumerator kCLOCK_Root_MAIN_adc0_fclk#
Clock Root Main SS index 24 adc0_fclk
-
enumerator kCLOCK_Root_MAIN_adc1_fclk#
Clock Root Main SS index 25 adc1_fclk
-
enumerator kCLOCK_Root_MAIN_sinc0_fclk#
Clock Root Main SS index 26 sinc0_fclk
-
enumerator kCLOCK_Root_MAIN_sinc1_fclk#
Clock Root Main SS index 27 sinc1_fclk
-
enumerator kCLOCK_Root_MAIN_flexio0_fclk#
Clock Root Main SS index 28 flexio0_fclk
-
enumerator kCLOCK_Root_MAIN_flexio1_fclk#
Clock Root Main SS index 29 flexio1_fclk
-
enumerator kCLOCK_Root_MAIN_flexio2_fclk#
Clock Root Main SS index 30 flexio2_fclk
-
enumerator kCLOCK_Root_MAIN_tpiu_clk#
Clock Root Main SS index 31 tpiu_clk
-
enumerator kCLOCK_Root_MAIN_cssi_refclk#
Clock Root Main SS index 32 cssi_refclk
-
enumerator kCLOCK_Root_MAIN_otp_clk#
Clock Root Main SS index 33 otp_clk
-
enumerator kCLOCK_Root_MAIN_clkout#
Clock Root Main SS index 34 clkout
-
enumerator kCLOCK_Root_MAIN_fro192m#
Clock Root Main SS index 35 clkout
-
enumerator kCLOCK_Root_MAIN_ulp32k#
Clock Root Main SS index 36 clkout
-
enumerator kCLOCK_Root_MAIN_END#
-
enumerator kCLOCK_Root_WAKE_START#
-
enumerator kCLOCK_Root_WAKE_wake_clk#
Clock Root Wake SS index 0 wake_clk
-
enumerator kCLOCK_Root_WAKE_wake_sxosc#
Clock Root Wake SS index 1 wake_sxosc
-
enumerator kCLOCK_Root_WAKE_wake_lp1m#
Clock Root Wake SS index 2 wake_lp1m
-
enumerator kCLOCK_Root_WAKE_wake_lp12m#
Clock Root Wake SS index 3 wake_lp12m
-
enumerator kCLOCK_Root_WAKE_wake_ulp32k#
Clock Root Wake SS index 4 wake_ulp32k
-
enumerator kCLOCK_Root_WAKE_wake_lpclk#
Clock Root Wake SS index 5 wake_lpclk
-
enumerator kCLOCK_Root_WAKE_i3c0_fclk#
Clock Root Wake SS index 6 i3c0_fclk
-
enumerator kCLOCK_Root_WAKE_lpi2c0_fclk#
Clock Root Wake SS index 7 lpi2c0_fclk
-
enumerator kCLOCK_Root_WAKE_lpi2c1_fclk#
Clock Root Wake SS index 8 lpi2c1_fclk
-
enumerator kCLOCK_Root_WAKE_lpspi0_fclk#
Clock Root Wake SS index 9 lpspi0_fclk
-
enumerator kCLOCK_Root_WAKE_lpuart0_fclk#
Clock Root Wake SS index 10 lpuart0_fclk
-
enumerator kCLOCK_Root_WAKE_lpuart1_fclk#
Clock Root Wake SS index 11 lpuart1_fclk
-
enumerator kCLOCK_Root_WAKE_dmic1_appclk#
Clock Root Wake SS index 12 dmic1_appclk
-
enumerator kCLOCK_Root_WAKE_qtpm0_fclk#
Clock Root Wake SS index 13 qtpm0_fclk
-
enumerator kCLOCK_Root_WAKE_lptmr0_fclk#
Clock Root Wake SS index 14 lptmr0_fclk
-
enumerator kCLOCK_Root_WAKE_lptmr1_fclk#
Clock Root Wake SS index 15 lptmr1_fclk
-
enumerator kCLOCK_Root_WAKE_swt0_fclk#
Clock Root Wake SS index 16 swt0_fclk
-
enumerator kCLOCK_Root_WAKE_swt1_fclk#
Clock Root Wake SS index 17 swt1_fclk
-
enumerator kCLOCK_Root_WAKE_ewm_fclk#
Clock Root Wake SS index 18 ewm_fclk
-
enumerator kCLOCK_Root_WAKE_acmp0_fclk#
Clock Root Wake SS index 19 acmp0_fclk
-
enumerator kCLOCK_Root_WAKE_acmp1_fclk#
Clock Root Wake SS index 20 acmp1_fclk
-
enumerator kCLOCK_Root_WAKE_acmp2_fclk#
Clock Root Wake SS index 21 acmp2_fclk
-
enumerator kCLOCK_Root_WAKE_acmp3_fclk#
Clock Root Wake SS index 22 acmp3_fclk
-
enumerator kCLOCK_Root_WAKE_acmp0_rrclk#
Clock Root Wake SS index 23 acmp0_rrclk
-
enumerator kCLOCK_Root_WAKE_acmp1_rrclk#
Clock Root Wake SS index 24 acmp1_rrclk
-
enumerator kCLOCK_Root_WAKE_acmp2_rrclk#
Clock Root Wake SS index 25 acmp2_rrclk
-
enumerator kCLOCK_Root_WAKE_acmp3_rrclk#
Clock Root Wake SS index 26 acmp3_rrclk
-
enumerator kCLOCK_Root_WAKE_END#
-
enumerator kCLOCK_Root_COMM_START#
-
enumerator kCLOCK_Root_COMM_comm_clk#
Clock Root Comm SS index 0 comm_clk
-
enumerator kCLOCK_Root_COMM_comm_ulp32k#
Clock Root Comm SS index 1 comm_ulp32k
-
enumerator kCLOCK_Root_COMM_usdhc0_fclk#
Clock Root Comm SS index 2 usdhc0_fclk
-
enumerator kCLOCK_Root_COMM_usdhc1_fclk#
Clock Root Comm SS index 3 usdhc1_fclk
-
enumerator kCLOCK_Root_COMM_xspir_rootclk#
Clock Root Comm SS index 4 xspir_rootclk
-
enumerator kCLOCK_Root_COMM_usb0_phyclk#
Clock Root Comm SS index 5 usb0_phyclk
-
enumerator kCLOCK_Root_COMM_usb0_fro48m#
Clock Root Comm SS index 6 usb0_fro48m
-
enumerator kCLOCK_Root_COMM_usb1_fclk#
Clock Root Comm SS index 7 usb1_fclk
-
enumerator kCLOCK_Root_COMM_usb0_wakeclk#
Clock Root Comm SS index 8 usb0_wakeclk
-
enumerator kCLOCK_Root_COMM_eth0_trxclk#
Clock Root Comm SS index 9 eth0_trxclk
-
enumerator kCLOCK_Root_COMM_eth0_timerclk#
Clock Root Comm SS index 10 eth0_timerclk
-
enumerator kCLOCK_Root_COMM_eth1_trxclk#
Clock Root Comm SS index 11 eth1_trxclk
-
enumerator kCLOCK_Root_COMM_eth1_timerclk#
Clock Root Comm SS index 12 eth1_timerclk
-
enumerator kCLOCK_Root_COMM_eth_refclk#
Clock Root Comm SS index 13 eth_refclk
-
enumerator kCLOCK_Root_COMM_xeno0_liwclk#
Clock Root Comm SS index 14 xeno0_liwclk
-
enumerator kCLOCK_Root_COMM_xeno1_liwclk#
Clock Root Comm SS index 15 xeno1_liwclk
-
enumerator kCLOCK_Root_COMM_dll_refclk#
Clock Root Comm SS index 16 dll_refclk
-
enumerator kCLOCK_Root_COMM_END#
-
enumerator kCLOCK_Root_AUDIO_START#
-
enumerator kCLOCK_Root_AUDIO_audio_clk#
Clock Root Audio SS index 0 audio_clk
-
enumerator kCLOCK_Root_AUDIO_dmic0_appclk#
Clock Root Audio SS index 1 dmic0_appclk
-
enumerator kCLOCK_Root_AUDIO_sai0_mclk0#
Clock Root Audio SS index 2 sai0_mclk0
-
enumerator kCLOCK_Root_AUDIO_sai0_mclk1#
Clock Root Audio SS index 3 sai0_mclk1
-
enumerator kCLOCK_Root_AUDIO_sai1_mclk0#
Clock Root Audio SS index 4 sai1_mclk0
-
enumerator kCLOCK_Root_AUDIO_sai1_mclk1#
Clock Root Audio SS index 5 sai1_mclk1
-
enumerator kCLOCK_Root_AUDIO_sai2_mclk0#
Clock Root Audio SS index 6 sai2_mclk0
-
enumerator kCLOCK_Root_AUDIO_sai2_mclk1#
Clock Root Audio SS index 7 sai2_mclk1
-
enumerator kCLOCK_Root_AUDIO_spdif_txclk#
Clock Root Audio SS index 8 spdif_txclk
-
enumerator kCLOCK_Root_AUDIO_spdif_cdrclk#
Clock Root Audio SS index 9 spdif_cdrclk
-
enumerator kCLOCK_Root_AUDIO_asrc_clk#
Clock Root Audio SS index 10 asrc_clk
-
enumerator kCLOCK_Root_AUDIO_END#
-
enumerator kCLOCK_Root_MEDIA_START#
-
enumerator kCLOCK_Root_MEDIA_media_clk#
Clock Root Media SS index 0 media_clk
-
enumerator kCLOCK_Root_MEDIA_mediapll_clk#
Clock Root Media SS index 1 mediapll_clk
-
enumerator kCLOCK_Root_MEDIA_mipicsi_escclk#
Clock Root Media SS index 2 mipicsi_escclk
-
enumerator kCLOCK_Root_MEDIA_mipicsi_clk#
Clock Root Media SS index 3 mipicsi_clk
-
enumerator kCLOCK_Root_MEDIA_mipidsi_escclk_divided#
Clock Root Media SS index 4 mipidsi_escclk_divided
-
enumerator kCLOCK_Root_MEDIA_mipidsi_refclk#
Clock Root Media SS index 5 mipidsi_refclk
-
enumerator kCLOCK_Root_MEDIA_mipidsi_clk#
Clock Root Media SS index 6 mipidsi_clk
-
enumerator kCLOCK_Root_MEDIA_reformat_fclk#
Clock Root Media SS index 7 reformat_fclk
-
enumerator kCLOCK_Root_MEDIA_dcpixel_fclk#
Clock Root Media SS index 8 dcpixel_fclk
-
enumerator kCLOCK_Root_MEDIA_csi_mclkout#
Clock Root Media SS index 9 csi_mclkout
-
enumerator kCLOCK_Root_MEDIA_END#
-
enumerator kCLOCK_Root_Invalid#
Sentinel: not a real root. Used by the frequency resolver to mark an empty slot in s_clockSrcRootMap.
-
enumerator kCLOCK_Root_CGU_START#
-
enum _clock_root_mux_source#
The enumerator of clock roots’ clock source mux value.
Values:
-
enumerator kCLOCK_SXOSC_ClockRoot_OSC_24M#
SXOSC mux from OSC_24M
-
enumerator kCLOCK_BASE_ClockRoot_FRO_192M#
BASE mux from FRO_192M
-
enumerator kCLOCK_BASE_ClockRoot_OSC_24M#
BASE mux from OSC_24M
-
enumerator kCLOCK_BASE_ClockRoot_LPOSC_12M_CORE#
BASE mux from LPOSC_12M_CORE
-
enumerator kCLOCK_BASE_ClockRoot_LPOSC_1M_CORE#
BASE mux from LPOSC_1M_CORE
-
enumerator kCLOCK_LOW_ClockRoot_FRO_24M#
LOW mux from FRO_24M
-
enumerator kCLOCK_LOW_ClockRoot_OSC_24M#
LOW mux from OSC_24M
-
enumerator kCLOCK_LOW_ClockRoot_LPOSC_12M_CORE#
LOW mux from LPOSC_12M_CORE
-
enumerator kCLOCK_LOW_ClockRoot_LPOSC_1M_CORE#
LOW mux from LPOSC_1M_CORE
-
enumerator kCLOCK_MAINPLL_DIVX_ClockRoot_MAINPLL_DIV4#
MAINPLL_DIVX mux from MAINPLL_DIV4
-
enumerator kCLOCK_MAINPLL_DIVX_ClockRoot_MAINPLL_DIV5#
MAINPLL_DIVX mux from MAINPLL_DIV5
-
enumerator kCLOCK_SYSPLL_DIVX_ClockRoot_SYSPLL_DIV4#
SYSPLL_DIVX mux from SYSPLL_DIV4
-
enumerator kCLOCK_SYSPLL_DIVX_ClockRoot_SYSPLL_DIV5#
SYSPLL_DIVX mux from SYSPLL_DIV5
-
enumerator kCLOCK_PLL_PFDX_ClockRoot_MAINPLL_DIVOUT1#
PLL_PFDX mux from MAINPLL_DIVOUT1
-
enumerator kCLOCK_PLL_PFDX_ClockRoot_MAINPLL_DIVOUT2#
PLL_PFDX mux from MAINPLL_DIVOUT2
-
enumerator kCLOCK_PLL_PFDX_ClockRoot_SYSPLL_DIVOUT1#
PLL_PFDX mux from SYSPLL_DIVOUT1
-
enumerator kCLOCK_PLL_PFDX_ClockRoot_SYSPLL_DIVOUT2#
PLL_PFDX mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_MEDIA_PFDX_ClockRoot_MAINPLL_DIVOUT1#
MEDIA_PFDX mux from MAINPLL_DIVOUT1
-
enumerator kCLOCK_MEDIA_PFDX_ClockRoot_MAINPLL_DIVOUT2#
MEDIA_PFDX mux from MAINPLL_DIVOUT2
-
enumerator kCLOCK_MEDIA_PFDX_ClockRoot_SYSPLL_DIVOUT1#
MEDIA_PFDX mux from SYSPLL_DIVOUT1
-
enumerator kCLOCK_MEDIA_PFDX_ClockRoot_SYSPLL_DIVOUT2#
MEDIA_PFDX mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_MAINPFDX_ClockRoot_COREPLL_OUT#
MAINPFDX mux from COREPLL_OUT
-
enumerator kCLOCK_MAINPFDX_ClockRoot_MAINPLL_DIVOUT2#
MAINPFDX mux from MAINPLL_DIVOUT2
-
enumerator kCLOCK_MAINPFDX_ClockRoot_SYSPLL_DIVOUT1#
MAINPFDX mux from SYSPLL_DIVOUT1
-
enumerator kCLOCK_MAINPFDX_ClockRoot_SYSPLL_DIVOUT2#
MAINPFDX mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_COMMPFDX_ClockRoot_COREPLL_OUT#
COMMPFDX mux from COREPLL_OUT
-
enumerator kCLOCK_COMMPFDX_ClockRoot_MAINPLL_DIVOUT2#
COMMPFDX mux from MAINPLL_DIVOUT2
-
enumerator kCLOCK_COMMPFDX_ClockRoot_SYSPLL_DIVOUT1#
COMMPFDX mux from SYSPLL_DIVOUT1
-
enumerator kCLOCK_COMMPFDX_ClockRoot_SYSPLL_DIVOUT2#
COMMPFDX mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_MAINDIVX_ClockRoot_MAINPLL_DIV4#
MAINDIVX mux from MAINPLL_DIV4
-
enumerator kCLOCK_MAINDIVX_ClockRoot_MAINPLL_DIV5#
MAINDIVX mux from MAINPLL_DIV5
-
enumerator kCLOCK_MAINDIVX_ClockRoot_SYSPLL_DIV4#
MAINDIVX mux from SYSPLL_DIV4
-
enumerator kCLOCK_MAINDIVX_ClockRoot_SYSPLL_DIV5#
MAINDIVX mux from SYSPLL_DIV5
-
enumerator kCLOCK_SAIMCLK_ClockRoot_SAI0_MCLK#
SAIMCLK mux from SAI0_MCLK
-
enumerator kCLOCK_SAIMCLK_ClockRoot_SAI1_MCLK#
SAIMCLK mux from SAI1_MCLK
-
enumerator kCLOCK_SAIMCLK_ClockRoot_SAI2_MCLK#
SAIMCLK mux from SAI2_MCLK
-
enumerator kCLOCK_SAIMCLK_ClockRoot_LPOSC_12M_CORE#
SAIMCLK mux from LPOSC_12M_CORE
-
enumerator kCLOCK_SAIMCLK0_ClockRoot_SAI0_MCLK#
SAIMCLK0 mux from SAI0_MCLK
-
enumerator kCLOCK_SAIMCLK1_ClockRoot_SAI1_MCLK#
SAIMCLK1 mux from SAI1_MCLK
-
enumerator kCLOCK_SAIMCLK2_ClockRoot_SAI2_MCLK#
SAIMCLK2 mux from SAI2_MCLK
-
enumerator kCLOCK_LP12M_CORE_ClockRoot_LPOSC_12M_CORE#
LP12M_CORE mux from LPOSC_12M_CORE
-
enumerator kCLOCK_LP1M_CORE_ClockRoot_LPOSC_1M_CORE#
LP1M_CORE mux from LPOSC_1M_CORE
-
enumerator kCLOCK_ULP32K_ClockRoot_LPOSC32K#
ULP32K mux from LPOSC32K
-
enumerator kCLOCK_FRO192M_ClockRoot_FRO_192M#
FRO192M mux from FRO_192M
-
enumerator kCLOCK_FRO96M_ClockRoot_FRO_96M#
FRO96M mux from FRO_96M
-
enumerator kCLOCK_FRO48M_ClockRoot_FRO_48M#
FRO48M mux from FRO_48M
-
enumerator kCLOCK_FRO24M_ClockRoot_FRO_24M#
FRO24M mux from FRO_24M
-
enumerator kCLOCK_SYSPLLDIV4_ClockRoot_SYSPLL_DIV4#
SYSPLLDIV4 mux from SYSPLL_DIV4
-
enumerator kCLOCK_SYSPLLDIV5_ClockRoot_SYSPLL_DIV5#
SYSPLLDIV5 mux from SYSPLL_DIV5
-
enumerator kCLOCK_SYSPLLDIVX_ClockRoot_SYSPLL_DIV4#
SYSPLLDIVX mux from SYSPLL_DIV4
-
enumerator kCLOCK_SYSPLLDIVX_ClockRoot_SYSPLL_DIV5#
SYSPLLDIVX mux from SYSPLL_DIV5
-
enumerator kCLOCK_MAINPLLDIVX_ClockRoot_MAINPLL_DIV4#
MAINPLLDIVX mux from MAINPLL_DIV4
-
enumerator kCLOCK_MAINPLLDIVX_ClockRoot_MAINPLL_DIV5#
MAINPLLDIVX mux from MAINPLL_DIV5
-
enumerator kCLOCK_MAINPLLDIV8_ClockRoot_MAINPLL_DIV8#
MAINPLLDIV8 mux from MAINPLL_DIV8
-
enumerator kCLOCK_MAINPLLDIV10_ClockRoot_MAINPLL_DIV10#
MAINPLLDIV10 mux from MAINPLL_DIV10
-
enumerator kCLOCK_MAINPLLDIV20_ClockRoot_MAINPLL_DIV20#
MAINPLLDIV20 mux from MAINPLL_DIV20
-
enumerator kCLOCK_AUDIOPLL_ClockRoot_AUDIOPLL_DIVOUT#
AUDIOPLL mux from AUDIOPLL_DIVOUT
-
enumerator kCLOCK_VIDEOPLL_ClockRoot_VIDEOPLL_DIVOUT#
VIDEOPLL mux from VIDEOPLL_DIVOUT
-
enumerator kCLOCK_CGU_MAIN_ClockRoot_BASE#
CGU MAIN mux from BASE
-
enumerator kCLOCK_CGU_MAIN_ClockRoot_COREPLL_OUT#
CGU MAIN mux from COREPLL_OUT
-
enumerator kCLOCK_CGU_MAIN_ClockRoot_MAINPLL_DIVX#
CGU MAIN mux from MAINPLL_DIVX
-
enumerator kCLOCK_CGU_MAIN_ClockRoot_PLL_PFDX#
CGU MAIN mux from PLL_PFDX
-
enumerator kCLOCK_NPU_ClockRoot_BASE#
NPU mux from BASE
-
enumerator kCLOCK_NPU_ClockRoot_COREPLL_OUT#
NPU mux from COREPLL_OUT
-
enumerator kCLOCK_NPU_ClockRoot_MAINPLL_DIVOUT1#
NPU mux from MAINPLL_DIVOUT1
-
enumerator kCLOCK_NPU_ClockRoot_PLL_PFDX#
NPU mux from PLL_PFDX
-
enumerator kCLOCK_MEDIABUS_ClockRoot_BASE#
MEDIABUS mux from BASE
-
enumerator kCLOCK_MEDIABUS_ClockRoot_COREPLL_OUT#
MEDIABUS mux from COREPLL_OUT
-
enumerator kCLOCK_MEDIABUS_ClockRoot_SYSPLL_DIVOUT2#
MEDIABUS mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_MEDIABUS_ClockRoot_PLL_PFDX#
MEDIABUS mux from PLL_PFDX
-
enumerator kCLOCK_AUDIOBUS_ClockRoot_BASE#
AUDIOBUS mux from BASE
-
enumerator kCLOCK_AUDIOBUS_ClockRoot_SYSPLL_DIVOUT2#
AUDIOBUS mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_AUDIOBUS_ClockRoot_MAINPLL_DIVX#
AUDIOBUS mux from MAINPLL_DIVX
-
enumerator kCLOCK_AUDIOBUS_ClockRoot_SYSPLL_DIVX#
AUDIOBUS mux from SYSPLL_DIVX
-
enumerator kCLOCK_COMMBUS_ClockRoot_BASE#
COMMBUS mux from BASE
-
enumerator kCLOCK_COMMBUS_ClockRoot_SYSPLL_DIVOUT2#
COMMBUS mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_COMMBUS_ClockRoot_MAINPLL_DIVX#
COMMBUS mux from MAINPLL_DIVX
-
enumerator kCLOCK_COMMBUS_ClockRoot_SYSPLL_DIVX#
COMMBUS mux from SYSPLL_DIVX
-
enumerator kCLOCK_WAKEBUS_ClockRoot_LOW#
WAKEBUS mux from LOW
-
enumerator kCLOCK_WAKEBUS_ClockRoot_FRO_192M#
WAKEBUS mux from FRO_192M
-
enumerator kCLOCK_WAKEBUS_ClockRoot_MAINPLL_DIVX#
WAKEBUS mux from MAINPLL_DIVX
-
enumerator kCLOCK_WAKEBUS_ClockRoot_SYSPLL_DIVOUT2#
WAKEBUS mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_SYSCON_PDMAIN_ClockRoot_LOW#
SYSCON_PDMAIN mux from LOW
-
enumerator kCLOCK_SYSCON_PDMAIN_ClockRoot_FRO_48M#
SYSCON_PDMAIN mux from FRO_48M
-
enumerator kCLOCK_SYSCON_PDMAIN_ClockRoot_MAINPLL_DIV10#
SYSCON_PDMAIN mux from MAINPLL_DIV10
-
enumerator kCLOCK_SYSCON_PDMAIN_ClockRoot_SYSPLL_DIV10#
SYSCON_PDMAIN mux from SYSPLL_DIV10
-
enumerator kCLOCK_PERI0_ClockRoot_BASE#
PERI0 mux from BASE
-
enumerator kCLOCK_PERI0_ClockRoot_MAINPLL_DIVOUT0#
PERI0 mux from MAINPLL_DIVOUT0
-
enumerator kCLOCK_PERI0_ClockRoot_SYSPLL_DIVOUT0#
PERI0 mux from SYSPLL_DIVOUT0
-
enumerator kCLOCK_PERI0_ClockRoot_SYSPLL_DIVOUT1#
PERI0 mux from SYSPLL_DIVOUT1
-
enumerator kCLOCK_PERI1_ClockRoot_BASE#
PERI1 mux from BASE
-
enumerator kCLOCK_PERI1_ClockRoot_MAINPLL_DIVOUT1#
PERI1 mux from MAINPLL_DIVOUT1
-
enumerator kCLOCK_PERI1_ClockRoot_SYSPLL_DIVOUT0#
PERI1 mux from SYSPLL_DIVOUT0
-
enumerator kCLOCK_PERI1_ClockRoot_SYSPLL_DIVOUT1#
PERI1 mux from SYSPLL_DIVOUT1
-
enumerator kCLOCK_PERI2_ClockRoot_BASE#
PERI2 mux from BASE
-
enumerator kCLOCK_PERI2_ClockRoot_MAINPLL_DIVOUT2#
PERI2 mux from MAINPLL_DIVOUT2
-
enumerator kCLOCK_PERI2_ClockRoot_SYSPLL_DIVOUT0#
PERI2 mux from SYSPLL_DIVOUT0
-
enumerator kCLOCK_PERI2_ClockRoot_SYSPLL_DIVOUT2#
PERI2 mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_PERI3_ClockRoot_BASE#
PERI3 mux from BASE
-
enumerator kCLOCK_PERI3_ClockRoot_MAINPLL_DIVOUT2#
PERI3 mux from MAINPLL_DIVOUT2
-
enumerator kCLOCK_PERI3_ClockRoot_MAINPLL_DIVX#
PERI3 mux from MAINPLL_DIVX
-
enumerator kCLOCK_PERI3_ClockRoot_SYSPLL_DIVOUT2#
PERI3 mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_PERI4_ClockRoot_BASE#
PERI4 mux from BASE
-
enumerator kCLOCK_PERI4_ClockRoot_MAINPLL_DIVOUT0#
PERI4 mux from MAINPLL_DIVOUT0
-
enumerator kCLOCK_PERI4_ClockRoot_MAINPLL_DIVX#
PERI4 mux from MAINPLL_DIVX
-
enumerator kCLOCK_PERI4_ClockRoot_SYSPLL_DIVOUT2#
PERI4 mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_PERI5_ClockRoot_BASE#
PERI5 mux from BASE
-
enumerator kCLOCK_PERI5_ClockRoot_MAINPLL_DIVOUT0#
PERI5 mux from MAINPLL_DIVOUT0
-
enumerator kCLOCK_PERI5_ClockRoot_MAINPLL_DIVX#
PERI5 mux from MAINPLL_DIVX
-
enumerator kCLOCK_PERI5_ClockRoot_SYSPLL_DIVOUT2#
PERI5 mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_PERI6_ClockRoot_BASE#
PERI6 mux from BASE
-
enumerator kCLOCK_PERI6_ClockRoot_MAINPLL_DIVOUT1#
PERI6 mux from MAINPLL_DIVOUT1
-
enumerator kCLOCK_PERI6_ClockRoot_MAINPLL_DIVX#
PERI6 mux from MAINPLL_DIVX
-
enumerator kCLOCK_PERI6_ClockRoot_SYSPLL_DIVOUT2#
PERI6 mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_PERI7_ClockRoot_LOW#
PERI7 mux from LOW
-
enumerator kCLOCK_PERI7_ClockRoot_FRO_192M#
PERI7 mux from FRO_192M
-
enumerator kCLOCK_PERI7_ClockRoot_MAINPLL_DIVOUT2#
PERI7 mux from MAINPLL_DIVOUT2
-
enumerator kCLOCK_PERI7_ClockRoot_SYSPLL_DIVOUT2#
PERI7 mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_AUDIO_ClockRoot_LOW#
AUDIO mux from LOW
-
enumerator kCLOCK_AUDIO_ClockRoot_AUDIOPLL_DIVOUT#
AUDIO mux from AUDIOPLL_DIVOUT
-
enumerator kCLOCK_AUDIO_ClockRoot_VIDEOPLL_DIVOUT#
AUDIO mux from VIDEOPLL_DIVOUT
-
enumerator kCLOCK_AUDIO_ClockRoot_SYSPLL_DIVOUT2#
AUDIO mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_VIDEO_ClockRoot_BASE#
VIDEO mux from BASE
-
enumerator kCLOCK_VIDEO_ClockRoot_AUDIOPLL_DIVOUT#
VIDEO mux from AUDIOPLL_DIVOUT
-
enumerator kCLOCK_VIDEO_ClockRoot_VIDEOPLL_DIVOUT#
VIDEO mux from VIDEOPLL_DIVOUT
-
enumerator kCLOCK_VIDEO_ClockRoot_MEDIA_PFDX#
VIDEO mux from MEDIA_PFDX
-
enumerator kCLOCK_USB1_ClockRoot_FRO_48M#
USB1 mux from FRO_48M
-
enumerator kCLOCK_USB1_ClockRoot_MAINPLL_DIVOUT1#
USB1 mux from MAINPLL_DIVOUT1
-
enumerator kCLOCK_USB1_ClockRoot_MAINPLL_DIVOUT2#
USB1 mux from MAINPLL_DIVOUT2
-
enumerator kCLOCK_USB1_ClockRoot_SYSPLL_DIVOUT2#
USB1 mux from SYSPLL_DIVOUT2
-
enumerator kCLOCK_ETH_ClockRoot_BASE#
ETH mux from BASE
-
enumerator kCLOCK_ETH_ClockRoot_MAINPLL_DIV8#
ETH mux from MAINPLL_DIV8
-
enumerator kCLOCK_ETH_ClockRoot_MAINPLL_DIV20#
ETH mux from MAINPLL_DIV20
-
enumerator kCLOCK_ETH_ClockRoot_SYSPLL_DIV20#
ETH mux from SYSPLL_DIV20
-
enumerator kCLOCK_CMPT_ClockRoot_MAIN#
CMPT mux from MAIN
-
enumerator kCLOCK_CPU_ClockRoot_CPU#
CPU mux from CPU
-
enumerator kCLOCK_NPU_ClockRoot_NPU#
NPU mux from NPU
-
enumerator kCLOCK_SYSTICK0_ClockRoot_LP1M_CORE#
SYSTICK0 mux from LP1M_CORE
-
enumerator kCLOCK_SYSTICK0_ClockRoot_SXOSC#
SYSTICK0 mux from SXOSC
-
enumerator kCLOCK_SYSTICK0_ClockRoot_PERI4#
SYSTICK0 mux from PERI4
-
enumerator kCLOCK_SYSTICK0_ClockRoot_MAINPLLDIV10#
SYSTICK0 mux from MAINPLLDIV10
-
enumerator kCLOCK_SYSTICK1_ClockRoot_LP1M_CORE#
SYSTICK1 mux from LP1M_CORE
-
enumerator kCLOCK_SYSTICK1_ClockRoot_SXOSC#
SYSTICK1 mux from SXOSC
-
enumerator kCLOCK_SYSTICK1_ClockRoot_PERI4#
SYSTICK1 mux from PERI4
-
enumerator kCLOCK_SYSTICK1_ClockRoot_MAINPLLDIV10#
SYSTICK1 mux from MAINPLLDIV10
-
enumerator kCLOCK_MAIN_ClockRoot_MAIN#
MAIN mux from MAIN
-
enumerator kCLOCK_MAIN_ClockRoot_TIE_LOW#
MAIN mux from TIE_LOW
-
enumerator kCLOCK_XSPI0_ClockRoot_MAIN_PERI0_DIV2#
XSPI0 mux from MAIN_PERI0_DIV2
-
enumerator kCLOCK_XSPI0_ClockRoot_MAINPFDX_DIV2#
XSPI0 mux from MAINPFDX_DIV2
-
enumerator kCLOCK_XSPI0_ClockRoot_SYSPLLDIV4#
XSPI0 mux from SYSPLLDIV4
-
enumerator kCLOCK_XSPI0_ClockRoot_SYSPLLDIV5#
XSPI0 mux from SYSPLLDIV5
-
enumerator kCLOCK_XSPI1_ClockRoot_MAIN_PERI1_DIV2#
XSPI1 mux from MAIN_PERI1_DIV2
-
enumerator kCLOCK_XSPI1_ClockRoot_MAINPFDX_DIV2#
XSPI1 mux from MAINPFDX_DIV2
-
enumerator kCLOCK_XSPI1_ClockRoot_SYSPLLDIV4#
XSPI1 mux from SYSPLLDIV4
-
enumerator kCLOCK_XSPI1_ClockRoot_SYSPLLDIV5#
XSPI1 mux from SYSPLLDIV5
-
enumerator kCLOCK_I3C0_ClockRoot_PERI3#
I3C0 mux from PERI3
-
enumerator kCLOCK_I3C0_ClockRoot_PERI4#
I3C0 mux from PERI4
-
enumerator kCLOCK_I3C0_ClockRoot_FRO192M#
I3C0 mux from FRO192M
-
enumerator kCLOCK_I3C0_ClockRoot_SXOSC#
I3C0 mux from SXOSC
-
enumerator kCLOCK_LPI2C0_ClockRoot_PERI3#
LPI2C0 mux from PERI3
-
enumerator kCLOCK_LPI2C0_ClockRoot_PERI4#
LPI2C0 mux from PERI4
-
enumerator kCLOCK_LPI2C0_ClockRoot_FRO192M#
LPI2C0 mux from FRO192M
-
enumerator kCLOCK_LPI2C0_ClockRoot_SXOSC#
LPI2C0 mux from SXOSC
-
enumerator kCLOCK_LPI2C1_ClockRoot_PERI3#
LPI2C1 mux from PERI3
-
enumerator kCLOCK_LPI2C1_ClockRoot_PERI4#
LPI2C1 mux from PERI4
-
enumerator kCLOCK_LPI2C1_ClockRoot_FRO192M#
LPI2C1 mux from FRO192M
-
enumerator kCLOCK_LPI2C1_ClockRoot_SXOSC#
LPI2C1 mux from SXOSC
-
enumerator kCLOCK_LPSPI0_ClockRoot_PERI2#
LPSPI0 mux from PERI2
-
enumerator kCLOCK_LPSPI0_ClockRoot_PERI4#
LPSPI0 mux from PERI4
-
enumerator kCLOCK_LPSPI0_ClockRoot_FRO192M#
LPSPI0 mux from FRO192M
-
enumerator kCLOCK_LPSPI0_ClockRoot_MAINDIVX#
LPSPI0 mux from MAINDIVX
-
enumerator kCLOCK_LPSPI1_ClockRoot_PERI2#
LPSPI1 mux from PERI2
-
enumerator kCLOCK_LPSPI1_ClockRoot_PERI4#
LPSPI1 mux from PERI4
-
enumerator kCLOCK_LPSPI1_ClockRoot_FRO192M#
LPSPI1 mux from FRO192M
-
enumerator kCLOCK_LPSPI1_ClockRoot_MAINDIVX#
LPSPI1 mux from MAINDIVX
-
enumerator kCLOCK_LPSPI2_ClockRoot_PERI2#
LPSPI2 mux from PERI2
-
enumerator kCLOCK_LPSPI2_ClockRoot_PERI4#
LPSPI2 mux from PERI4
-
enumerator kCLOCK_LPSPI2_ClockRoot_FRO192M#
LPSPI2 mux from FRO192M
-
enumerator kCLOCK_LPSPI2_ClockRoot_MAINDIVX#
LPSPI2 mux from MAINDIVX
-
enumerator kCLOCK_LPSPI3_ClockRoot_PERI2#
LPSPI3 mux from PERI2
-
enumerator kCLOCK_LPSPI3_ClockRoot_PERI4#
LPSPI3 mux from PERI4
-
enumerator kCLOCK_LPSPI3_ClockRoot_FRO192M#
LPSPI3 mux from FRO192M
-
enumerator kCLOCK_LPSPI3_ClockRoot_MAINDIVX#
LPSPI3 mux from MAINDIVX
-
enumerator kCLOCK_LPSPI4_ClockRoot_PERI2#
LPSPI4 mux from PERI2
-
enumerator kCLOCK_LPSPI4_ClockRoot_PERI4#
LPSPI4 mux from PERI4
-
enumerator kCLOCK_LPSPI4_ClockRoot_FRO192M#
LPSPI4 mux from FRO192M
-
enumerator kCLOCK_LPSPI4_ClockRoot_MAINDIVX#
LPSPI4 mux from MAINDIVX
-
enumerator kCLOCK_LPUART0_ClockRoot_PERI3#
LPUART0 mux from PERI3
-
enumerator kCLOCK_LPUART0_ClockRoot_PERI4#
LPUART0 mux from PERI4
-
enumerator kCLOCK_LPUART0_ClockRoot_FRO192M#
LPUART0 mux from FRO192M
-
enumerator kCLOCK_LPUART0_ClockRoot_SXOSC#
LPUART0 mux from SXOSC
-
enumerator kCLOCK_LPUART1_ClockRoot_PERI3#
LPUART1 mux from PERI3
-
enumerator kCLOCK_LPUART1_ClockRoot_PERI4#
LPUART1 mux from PERI4
-
enumerator kCLOCK_LPUART1_ClockRoot_FRO192M#
LPUART1 mux from FRO192M
-
enumerator kCLOCK_LPUART1_ClockRoot_SXOSC#
LPUART1 mux from SXOSC
-
enumerator kCLOCK_LPUART2_ClockRoot_PERI3#
LPUART2 mux from PERI3
-
enumerator kCLOCK_LPUART2_ClockRoot_PERI4#
LPUART2 mux from PERI4
-
enumerator kCLOCK_LPUART2_ClockRoot_FRO192M#
LPUART2 mux from FRO192M
-
enumerator kCLOCK_LPUART2_ClockRoot_SXOSC#
LPUART2 mux from SXOSC
-
enumerator kCLOCK_LPUART3_ClockRoot_PERI3#
LPUART3 mux from PERI3
-
enumerator kCLOCK_LPUART3_ClockRoot_PERI4#
LPUART3 mux from PERI4
-
enumerator kCLOCK_LPUART3_ClockRoot_FRO192M#
LPUART3 mux from FRO192M
-
enumerator kCLOCK_LPUART3_ClockRoot_SXOSC#
LPUART3 mux from SXOSC
-
enumerator kCLOCK_LPUART4_ClockRoot_PERI3#
LPUART4 mux from PERI3
-
enumerator kCLOCK_LPUART4_ClockRoot_PERI4#
LPUART4 mux from PERI4
-
enumerator kCLOCK_LPUART4_ClockRoot_FRO192M#
LPUART4 mux from FRO192M
-
enumerator kCLOCK_LPUART4_ClockRoot_SXOSC#
LPUART4 mux from SXOSC
-
enumerator kCLOCK_LPUART5_ClockRoot_PERI3#
LPUART5 mux from PERI3
-
enumerator kCLOCK_LPUART5_ClockRoot_PERI4#
LPUART5 mux from PERI4
-
enumerator kCLOCK_LPUART5_ClockRoot_FRO192M#
LPUART5 mux from FRO192M
-
enumerator kCLOCK_LPUART5_ClockRoot_SXOSC#
LPUART5 mux from SXOSC
-
enumerator kCLOCK_FLEXCAN0_ClockRoot_PERI1#
FLEXCAN0 mux from PERI1
-
enumerator kCLOCK_FLEXCAN0_ClockRoot_PERI4#
FLEXCAN0 mux from PERI4
-
enumerator kCLOCK_FLEXCAN0_ClockRoot_FRO192M#
FLEXCAN0 mux from FRO192M
-
enumerator kCLOCK_FLEXCAN0_ClockRoot_SXOSC#
FLEXCAN0 mux from SXOSC
-
enumerator kCLOCK_FLEXCAN1_ClockRoot_PERI1#
FLEXCAN1 mux from PERI1
-
enumerator kCLOCK_FLEXCAN1_ClockRoot_PERI4#
FLEXCAN1 mux from PERI4
-
enumerator kCLOCK_FLEXCAN1_ClockRoot_FRO192M#
FLEXCAN1 mux from FRO192M
-
enumerator kCLOCK_FLEXCAN1_ClockRoot_SXOSC#
FLEXCAN1 mux from SXOSC
-
enumerator kCLOCK_FLEXCAN2_ClockRoot_PERI1#
FLEXCAN2 mux from PERI1
-
enumerator kCLOCK_FLEXCAN2_ClockRoot_PERI4#
FLEXCAN2 mux from PERI4
-
enumerator kCLOCK_FLEXCAN2_ClockRoot_FRO192M#
FLEXCAN2 mux from FRO192M
-
enumerator kCLOCK_FLEXCAN2_ClockRoot_SXOSC#
FLEXCAN2 mux from SXOSC
-
enumerator kCLOCK_FLEXCAN_GFCLK_ClockRoot_PERI1#
FLEXCAN_GFCLK mux from PERI1
-
enumerator kCLOCK_FLEXCAN_GFCLK_ClockRoot_PERI4#
FLEXCAN_GFCLK mux from PERI4
-
enumerator kCLOCK_FLEXCAN_GFCLK_ClockRoot_FRO192M#
FLEXCAN_GFCLK mux from FRO192M
-
enumerator kCLOCK_FLEXCAN_GFCLK_ClockRoot_SXOSC#
FLEXCAN_GFCLK mux from SXOSC
-
enumerator kCLOCK_QTPM0_ClockRoot_PERI3#
QTPM0 mux from PERI3
-
enumerator kCLOCK_QTPM0_ClockRoot_PERI5#
QTPM0 mux from PERI5
-
enumerator kCLOCK_QTPM0_ClockRoot_FRO192M#
QTPM0 mux from FRO192M
-
enumerator kCLOCK_QTPM0_ClockRoot_SXOSC#
QTPM0 mux from SXOSC
-
enumerator kCLOCK_LPIT0_ClockRoot_PERI3#
LPIT0 mux from PERI3
-
enumerator kCLOCK_LPIT0_ClockRoot_PERI5#
LPIT0 mux from PERI5
-
enumerator kCLOCK_LPIT0_ClockRoot_FRO192M#
LPIT0 mux from FRO192M
-
enumerator kCLOCK_LPIT0_ClockRoot_MAINPLLDIV10#
LPIT0 mux from MAINPLLDIV10
-
enumerator kCLOCK_LPIT1_ClockRoot_PERI3#
LPIT1 mux from PERI3
-
enumerator kCLOCK_LPIT1_ClockRoot_PERI5#
LPIT1 mux from PERI5
-
enumerator kCLOCK_LPIT1_ClockRoot_FRO192M#
LPIT1 mux from FRO192M
-
enumerator kCLOCK_LPIT1_ClockRoot_MAINPLLDIV10#
LPIT1 mux from MAINPLLDIV10
-
enumerator kCLOCK_ADC0_ClockRoot_PERI3#
ADC0 mux from PERI3
-
enumerator kCLOCK_ADC0_ClockRoot_PERI5#
ADC0 mux from PERI5
-
enumerator kCLOCK_ADC0_ClockRoot_FRO192M#
ADC0 mux from FRO192M
-
enumerator kCLOCK_ADC0_ClockRoot_MAINPLLDIV10#
ADC0 mux from MAINPLLDIV10
-
enumerator kCLOCK_ADC1_ClockRoot_PERI3#
ADC1 mux from PERI3
-
enumerator kCLOCK_ADC1_ClockRoot_PERI5#
ADC1 mux from PERI5
-
enumerator kCLOCK_ADC1_ClockRoot_FRO192M#
ADC1 mux from FRO192M
-
enumerator kCLOCK_ADC1_ClockRoot_MAINPLLDIV10#
ADC1 mux from MAINPLLDIV10
-
enumerator kCLOCK_SINC0_ClockRoot_PERI3#
SINC0 mux from PERI3
-
enumerator kCLOCK_SINC0_ClockRoot_PERI5#
SINC0 mux from PERI5
-
enumerator kCLOCK_SINC0_ClockRoot_FRO192M#
SINC0 mux from FRO192M
-
enumerator kCLOCK_SINC0_ClockRoot_MAINPLLDIV10#
SINC0 mux from MAINPLLDIV10
-
enumerator kCLOCK_SINC1_ClockRoot_PERI3#
SINC1 mux from PERI3
-
enumerator kCLOCK_SINC1_ClockRoot_PERI5#
SINC1 mux from PERI5
-
enumerator kCLOCK_SINC1_ClockRoot_FRO192M#
SINC1 mux from FRO192M
-
enumerator kCLOCK_SINC1_ClockRoot_MAINPLLDIV10#
SINC1 mux from MAINPLLDIV10
-
enumerator kCLOCK_FLEXIO0_ClockRoot_PERI0#
FLEXIO0 mux from PERI0
-
enumerator kCLOCK_FLEXIO0_ClockRoot_PERI5#
FLEXIO0 mux from PERI5
-
enumerator kCLOCK_FLEXIO0_ClockRoot_FRO192M#
FLEXIO0 mux from FRO192M
-
enumerator kCLOCK_FLEXIO0_ClockRoot_MAINDIVX#
FLEXIO0 mux from MAINDIVX
-
enumerator kCLOCK_FLEXIO1_ClockRoot_PERI0#
FLEXIO1 mux from PERI0
-
enumerator kCLOCK_FLEXIO1_ClockRoot_PERI5#
FLEXIO1 mux from PERI5
-
enumerator kCLOCK_FLEXIO1_ClockRoot_FRO192M#
FLEXIO1 mux from FRO192M
-
enumerator kCLOCK_FLEXIO1_ClockRoot_MAINDIVX#
FLEXIO1 mux from MAINDIVX
-
enumerator kCLOCK_FLEXIO2_ClockRoot_PERI0#
FLEXIO2 mux from PERI0
-
enumerator kCLOCK_FLEXIO2_ClockRoot_PERI5#
FLEXIO2 mux from PERI5
-
enumerator kCLOCK_FLEXIO2_ClockRoot_FRO192M#
FLEXIO2 mux from FRO192M
-
enumerator kCLOCK_FLEXIO2_ClockRoot_MAINDIVX#
FLEXIO2 mux from MAINDIVX
-
enumerator kCLOCK_TPIU_ClockRoot_PERI3#
TPIU mux from PERI3
-
enumerator kCLOCK_TPIU_ClockRoot_SYSPLLDIV4#
TPIU mux from SYSPLLDIV4
-
enumerator kCLOCK_TPIU_ClockRoot_FRO192M#
TPIU mux from FRO192M
-
enumerator kCLOCK_TPIU_ClockRoot_MAINDIVX#
TPIU mux from MAINDIVX
-
enumerator kCLOCK_CSSI_REFCLK_ClockRoot_FRO96M#
CSSI_REFCLK mux from FRO96M
-
enumerator kCLOCK_CSSI_REFCLK_ClockRoot_MAINPLLDIV10#
CSSI_REFCLK mux from MAINPLLDIV10
-
enumerator kCLOCK_CSSI_REFCLK_ClockRoot_TIE_LOW#
CSSI_REFCLK mux from TIE_LOW
-
enumerator kCLOCK_OTP_ClockRoot_SXOSC#
OTP mux from SXOSC
-
enumerator kCLOCK_OTP_ClockRoot_MAINPLLDIV10#
OTP mux from MAINPLLDIV10
-
enumerator kCLOCK_OTP_ClockRoot_FRO192M#
OTP mux from FRO192M
-
enumerator kCLOCK_OTP_ClockRoot_FRO24M#
OTP mux from FRO24M
-
enumerator kCLOCK_MAIN_CLKOUT_ClockRoot_PERI3#
MAIN_CLKOUT mux from PERI3
-
enumerator kCLOCK_MAIN_CLKOUT_ClockRoot_PERI5#
MAIN_CLKOUT mux from PERI5
-
enumerator kCLOCK_MAIN_CLKOUT_ClockRoot_FRO192M#
MAIN_CLKOUT mux from FRO192M
-
enumerator kCLOCK_MAIN_CLKOUT_ClockRoot_MAINPLLDIV10#
MAIN_CLKOUT mux from MAINPLLDIV10
-
enumerator kCLOCK_MAIN_MAIN_FRO192M_ClockRoot_FRO192M#
MAIN_MAIN_FRO192M mux from FRO192M
-
enumerator kCLOCK_MAIN_MAIN_ULP32K_ClockRoot_ULP32K#
MAIN_MAIN_ULP32K mux from ULP32K
-
enumerator kCLOCK_WAKE_ClockRoot_WAKEBUS#
WAKE mux from WAKEBUS
-
enumerator kCLOCK_WAKE_ClockRoot_LP12M_WAKE#
WAKE mux from LP12M_WAKE
-
enumerator kCLOCK_WAKE_ClockRoot_LP2M_WAKE#
WAKE mux from LP2M_WAKE
-
enumerator kCLOCK_WAKE_SXOSC_ClockRoot_SXOSC#
WAKE_SXOSC mux from SXOSC
-
enumerator kCLOCK_WAKE_LP1M_ClockRoot_LP1M_WAKE#
WAKE_LP1M mux from LP1M_WAKE
-
enumerator kCLOCK_WAKE_LP12M_ClockRoot_LP12M_WAKE#
WAKE_LP12M mux from LP12M_WAKE
-
enumerator kCLOCK_WAKE_ULP32K_ClockRoot_ULP32K#
WAKE_ULP32K mux from ULP32K
-
enumerator kCLOCK_WAKE_LPCLK_ClockRoot_LP1M_WAKE#
WAKE_LPCLK mux from LP1M_WAKE
-
enumerator kCLOCK_WAKE_LPCLK_ClockRoot_LP12M_WAKE#
WAKE_LPCLK mux from LP12M_WAKE
-
enumerator kCLOCK_WAKE_LPCLK_ClockRoot_LP2M_WAKE#
WAKE_LPCLK mux from LP2M_WAKE
-
enumerator kCLOCK_WAKE_I3C0_ClockRoot_PERI7#
WAKE I3C0 mux from PERI7
-
enumerator kCLOCK_WAKE_I3C0_ClockRoot_FRO24M#
WAKE I3C0 mux from FRO24M
-
enumerator kCLOCK_WAKE_I3C0_ClockRoot_WAKE_LPCLK#
WAKE I3C0 mux from WAKE_LPCLK
-
enumerator kCLOCK_WAKE_I3C0_ClockRoot_SXOSC#
WAKE I3C0 mux from SXOSC
-
enumerator kCLOCK_WAKE_LPI2C0_ClockRoot_PERI7#
WAKE LPI2C0 mux from PERI7
-
enumerator kCLOCK_WAKE_LPI2C0_ClockRoot_FRO24M#
WAKE LPI2C0 mux from FRO24M
-
enumerator kCLOCK_WAKE_LPI2C0_ClockRoot_WAKE_LPCLK#
WAKE LPI2C0 mux from WAKE_LPCLK
-
enumerator kCLOCK_WAKE_LPI2C0_ClockRoot_SXOSC#
WAKE LPI2C0 mux from SXOSC
-
enumerator kCLOCK_WAKE_LPI2C1_ClockRoot_PERI7#
WAKE LPI2C1 mux from PERI7
-
enumerator kCLOCK_WAKE_LPI2C1_ClockRoot_FRO24M#
WAKE LPI2C1 mux from FRO24M
-
enumerator kCLOCK_WAKE_LPI2C1_ClockRoot_WAKE_LPCLK#
WAKE LPI2C1 mux from WAKE_LPCLK
-
enumerator kCLOCK_WAKE_LPI2C1_ClockRoot_SXOSC#
WAKE LPI2C1 mux from SXOSC
-
enumerator kCLOCK_WAKE_LPSPI0_ClockRoot_PERI7#
WAKE LPSPI0 mux from PERI7
-
enumerator kCLOCK_WAKE_LPSPI0_ClockRoot_FRO24M#
WAKE LPSPI0 mux from FRO24M
-
enumerator kCLOCK_WAKE_LPSPI0_ClockRoot_WAKE_LPCLK#
WAKE LPSPI0 mux from WAKE_LPCLK
-
enumerator kCLOCK_WAKE_LPSPI0_ClockRoot_SXOSC#
WAKE LPSPI0 mux from SXOSC
-
enumerator kCLOCK_WAKE_LPUART0_ClockRoot_PERI7#
WAKE LPUART0 mux from PERI7
-
enumerator kCLOCK_WAKE_LPUART0_ClockRoot_FRO24M#
WAKE LPUART0 mux from FRO24M
-
enumerator kCLOCK_WAKE_LPUART0_ClockRoot_WAKE_LPCLK#
WAKE LPUART0 mux from WAKE_LPCLK
-
enumerator kCLOCK_WAKE_LPUART0_ClockRoot_ULP32K#
WAKE LPUART0 mux from ULP32K
-
enumerator kCLOCK_WAKE_LPUART1_ClockRoot_PERI7#
WAKE LPUART1 mux from PERI7
-
enumerator kCLOCK_WAKE_LPUART1_ClockRoot_FRO24M#
WAKE LPUART1 mux from FRO24M
-
enumerator kCLOCK_WAKE_LPUART1_ClockRoot_WAKE_LPCLK#
WAKE LPUART1 mux from WAKE_LPCLK
-
enumerator kCLOCK_WAKE_LPUART1_ClockRoot_ULP32K#
WAKE LPUART1 mux from ULP32K
-
enumerator kCLOCK_DMIC1_APPCLK_ClockRoot_PERI7#
DMIC1_APPCLK mux from PERI7
-
enumerator kCLOCK_DMIC1_APPCLK_ClockRoot_AUDIO#
DMIC1_APPCLK mux from AUDIO
-
enumerator kCLOCK_DMIC1_APPCLK_ClockRoot_WAKE_LPCLK#
DMIC1_APPCLK mux from WAKE_LPCLK
-
enumerator kCLOCK_DMIC1_APPCLK_ClockRoot_SAIMCLK#
DMIC1_APPCLK mux from SAIMCLK
-
enumerator kCLOCK_QTPM0_ClockRoot_PERI7#
QTPM0 mux from PERI7
-
enumerator kCLOCK_QTPM0_ClockRoot_AUDIO#
QTPM0 mux from AUDIO
-
enumerator kCLOCK_QTPM0_ClockRoot_WAKE_LPCLK#
QTPM0 mux from WAKE_LPCLK
-
enumerator kCLOCK_QTPM0_ClockRoot_ULP32K#
QTPM0 mux from ULP32K
-
enumerator kCLOCK_LPTMR0_ClockRoot_ULP32K#
LPTMR0 mux from ULP32K
-
enumerator kCLOCK_LPTMR0_ClockRoot_LP1M_WAKE#
LPTMR0 mux from LP1M_WAKE
-
enumerator kCLOCK_LPTMR0_ClockRoot_WAKE_LPCLK#
LPTMR0 mux from WAKE_LPCLK
-
enumerator kCLOCK_LPTMR0_ClockRoot_SXOSC#
LPTMR0 mux from SXOSC
-
enumerator kCLOCK_LPTMR1_ClockRoot_ULP32K#
LPTMR1 mux from ULP32K
-
enumerator kCLOCK_LPTMR1_ClockRoot_LP1M_WAKE#
LPTMR1 mux from LP1M_WAKE
-
enumerator kCLOCK_LPTMR1_ClockRoot_WAKE_LPCLK#
LPTMR1 mux from WAKE_LPCLK
-
enumerator kCLOCK_LPTMR1_ClockRoot_SXOSC#
LPTMR1 mux from SXOSC
-
enumerator kCLOCK_SWT0_ClockRoot_ULP32K#
SWT0 mux from ULP32K
-
enumerator kCLOCK_SWT0_ClockRoot_LP1M_WAKE#
SWT0 mux from LP1M_WAKE
-
enumerator kCLOCK_SWT0_ClockRoot_TIE_LOW#
SWT0 mux from TIE_LOW
-
enumerator kCLOCK_SWT1_ClockRoot_ULP32K#
SWT1 mux from ULP32K
-
enumerator kCLOCK_SWT1_ClockRoot_LP1M_WAKE#
SWT1 mux from LP1M_WAKE
-
enumerator kCLOCK_SWT1_ClockRoot_TIE_LOW#
SWT1 mux from TIE_LOW
-
enumerator kCLOCK_EWM_ClockRoot_ULP32K#
EWM mux from ULP32K
-
enumerator kCLOCK_EWM_ClockRoot_LP1M_WAKE#
EWM mux from LP1M_WAKE
-
enumerator kCLOCK_EWM_ClockRoot_TIE_LOW#
EWM mux from TIE_LOW
-
enumerator kCLOCK_ACMP0_ClockRoot_PERI7#
ACMP0 mux from PERI7
-
enumerator kCLOCK_ACMP0_ClockRoot_FRO24M#
ACMP0 mux from FRO24M
-
enumerator kCLOCK_ACMP0_ClockRoot_WAKE_LPCLK#
ACMP0 mux from WAKE_LPCLK
-
enumerator kCLOCK_ACMP0_ClockRoot_SXOSC#
ACMP0 mux from SXOSC
-
enumerator kCLOCK_ACMP1_ClockRoot_PERI7#
ACMP1 mux from PERI7
-
enumerator kCLOCK_ACMP1_ClockRoot_FRO24M#
ACMP1 mux from FRO24M
-
enumerator kCLOCK_ACMP1_ClockRoot_WAKE_LPCLK#
ACMP1 mux from WAKE_LPCLK
-
enumerator kCLOCK_ACMP1_ClockRoot_SXOSC#
ACMP1 mux from SXOSC
-
enumerator kCLOCK_ACMP2_ClockRoot_PERI7#
ACMP2 mux from PERI7
-
enumerator kCLOCK_ACMP2_ClockRoot_FRO24M#
ACMP2 mux from FRO24M
-
enumerator kCLOCK_ACMP2_ClockRoot_WAKE_LPCLK#
ACMP2 mux from WAKE_LPCLK
-
enumerator kCLOCK_ACMP2_ClockRoot_SXOSC#
ACMP2 mux from SXOSC
-
enumerator kCLOCK_ACMP3_ClockRoot_PERI7#
ACMP3 mux from PERI7
-
enumerator kCLOCK_ACMP3_ClockRoot_FRO24M#
ACMP3 mux from FRO24M
-
enumerator kCLOCK_ACMP3_ClockRoot_WAKE_LPCLK#
ACMP3 mux from WAKE_LPCLK
-
enumerator kCLOCK_ACMP3_ClockRoot_SXOSC#
ACMP3 mux from SXOSC
-
enumerator kCLOCK_ACMP0_RRCLK_ClockRoot_ULP32K#
ACMP0_RRCLK mux from ULP32K
-
enumerator kCLOCK_ACMP0_RRCLK_ClockRoot_FRO24M#
ACMP0_RRCLK mux from FRO24M
-
enumerator kCLOCK_ACMP0_RRCLK_ClockRoot_WAKE_LPCLK#
ACMP0_RRCLK mux from WAKE_LPCLK
-
enumerator kCLOCK_ACMP0_RRCLK_ClockRoot_LP1M_WAKE#
ACMP0_RRCLK mux from LP1M_WAKE
-
enumerator kCLOCK_ACMP1_RRCLK_ClockRoot_ULP32K#
ACMP1_RRCLK mux from ULP32K
-
enumerator kCLOCK_ACMP1_RRCLK_ClockRoot_FRO24M#
ACMP1_RRCLK mux from FRO24M
-
enumerator kCLOCK_ACMP1_RRCLK_ClockRoot_WAKE_LPCLK#
ACMP1_RRCLK mux from WAKE_LPCLK
-
enumerator kCLOCK_ACMP1_RRCLK_ClockRoot_LP1M_WAKE#
ACMP1_RRCLK mux from LP1M_WAKE
-
enumerator kCLOCK_ACMP2_RRCLK_ClockRoot_ULP32K#
ACMP2_RRCLK mux from ULP32K
-
enumerator kCLOCK_ACMP2_RRCLK_ClockRoot_FRO24M#
ACMP2_RRCLK mux from FRO24M
-
enumerator kCLOCK_ACMP2_RRCLK_ClockRoot_WAKE_LPCLK#
ACMP2_RRCLK mux from WAKE_LPCLK
-
enumerator kCLOCK_ACMP2_RRCLK_ClockRoot_LP1M_WAKE#
ACMP2_RRCLK mux from LP1M_WAKE
-
enumerator kCLOCK_ACMP3_RRCLK_ClockRoot_ULP32K#
ACMP3_RRCLK mux from ULP32K
-
enumerator kCLOCK_ACMP3_RRCLK_ClockRoot_FRO24M#
ACMP3_RRCLK mux from FRO24M
-
enumerator kCLOCK_ACMP3_RRCLK_ClockRoot_WAKE_LPCLK#
ACMP3_RRCLK mux from WAKE_LPCLK
-
enumerator kCLOCK_ACMP3_RRCLK_ClockRoot_LP1M_WAKE#
ACMP3_RRCLK mux from LP1M_WAKE
-
enumerator kCLOCK_COMM_ClockRoot_COMMBUS#
COMM mux from COMMBUS
-
enumerator kCLOCK_COMM_ULP32K_ClockRoot_ULP32K#
COMM_ULP32K mux from ULP32K
-
enumerator kCLOCK_USDHC0_ClockRoot_COMM_PERI1_DIV2#
USDHC0 mux from COMM_PERI1_DIV2
-
enumerator kCLOCK_USDHC0_ClockRoot_COMMPFDX_DIV2#
USDHC0 mux from COMMPFDX_DIV2
-
enumerator kCLOCK_USDHC0_ClockRoot_SYSPLLDIV4#
USDHC0 mux from SYSPLLDIV4
-
enumerator kCLOCK_USDHC0_ClockRoot_SYSPLLDIV5#
USDHC0 mux from SYSPLLDIV5
-
enumerator kCLOCK_USDHC1_ClockRoot_COMM_PERI2_DIV2#
USDHC1 mux from COMM_PERI2_DIV2
-
enumerator kCLOCK_USDHC1_ClockRoot_COMMPFDX_DIV2#
USDHC1 mux from COMMPFDX_DIV2
-
enumerator kCLOCK_USDHC1_ClockRoot_SYSPLLDIV4#
USDHC1 mux from SYSPLLDIV4
-
enumerator kCLOCK_USDHC1_ClockRoot_SYSPLLDIV5#
USDHC1 mux from SYSPLLDIV5
-
enumerator kCLOCK_XSPIR_ClockRoot_PERI1#
XSPIR mux from PERI1
-
enumerator kCLOCK_XSPIR_ClockRoot_PERI2#
XSPIR mux from PERI2
-
enumerator kCLOCK_XSPIR_ClockRoot_SYSPLLDIV4#
XSPIR mux from SYSPLLDIV4
-
enumerator kCLOCK_XSPIR_ClockRoot_SYSPLLDIV5#
XSPIR mux from SYSPLLDIV5
-
enumerator kCLOCK_USB0_PHYCLK_ClockRoot_SXOSC#
USB0_PHYCLK mux from SXOSC
-
enumerator kCLOCK_USB0_FRO48M_ClockRoot_FRO48M#
USB0_FRO48M mux from FRO48M
-
enumerator kCLOCK_USB1_ClockRoot_USB1#
USB1 mux from USB1
-
enumerator kCLOCK_USB1_ClockRoot_USBPLL_OUT#
USB1 mux from USBPLL_OUT
-
enumerator kCLOCK_USB1_ClockRoot_USBPLL_48M#
USB1 mux from USBPLL_48M
-
enumerator kCLOCK_USB1_ClockRoot_FRO48M#
USB1 mux from FRO48M
-
enumerator kCLOCK_USB0_WAKECLK_ClockRoot_ULP32K#
USB0_WAKECLK mux from ULP32K
-
enumerator kCLOCK_USB0_WAKECLK_ClockRoot_LP1M_CORE#
USB0_WAKECLK mux from LP1M_CORE
-
enumerator kCLOCK_USB0_WAKECLK_ClockRoot_SXOSC#
USB0_WAKECLK mux from SXOSC
-
enumerator kCLOCK_USB0_WAKECLK_ClockRoot_TIE_LOW#
USB0_WAKECLK mux from TIE_LOW
-
enumerator kCLOCK_ETH0_TRXCLK_ClockRoot_COMMBUS#
ETH0_TRXCLK mux from COMMBUS
-
enumerator kCLOCK_ETH0_TRXCLK_ClockRoot_ETH#
ETH0_TRXCLK mux from ETH
-
enumerator kCLOCK_ETH0_TRXCLK_ClockRoot_SYSPLLDIV4#
ETH0_TRXCLK mux from SYSPLLDIV4
-
enumerator kCLOCK_ETH0_TRXCLK_ClockRoot_MAINPLLDIV8#
ETH0_TRXCLK mux from MAINPLLDIV8
-
enumerator kCLOCK_ETH0_TIMERCLK_ClockRoot_COMMBUS#
ETH0_TIMERCLK mux from COMMBUS
-
enumerator kCLOCK_ETH0_TIMERCLK_ClockRoot_ETH#
ETH0_TIMERCLK mux from ETH
-
enumerator kCLOCK_ETH0_TIMERCLK_ClockRoot_SXOSC#
ETH0_TIMERCLK mux from SXOSC
-
enumerator kCLOCK_ETH0_TIMERCLK_ClockRoot_MAINPLLDIV8#
ETH0_TIMERCLK mux from MAINPLLDIV8
-
enumerator kCLOCK_ETH1_TRXCLK_ClockRoot_COMMBUS#
ETH1_TRXCLK mux from COMMBUS
-
enumerator kCLOCK_ETH1_TRXCLK_ClockRoot_ETH#
ETH1_TRXCLK mux from ETH
-
enumerator kCLOCK_ETH1_TRXCLK_ClockRoot_SYSPLLDIV4#
ETH1_TRXCLK mux from SYSPLLDIV4
-
enumerator kCLOCK_ETH1_TRXCLK_ClockRoot_MAINPLLDIV8#
ETH1_TRXCLK mux from MAINPLLDIV8
-
enumerator kCLOCK_ETH1_TIMERCLK_ClockRoot_COMMBUS#
ETH1_TIMERCLK mux from COMMBUS
-
enumerator kCLOCK_ETH1_TIMERCLK_ClockRoot_ETH#
ETH1_TIMERCLK mux from ETH
-
enumerator kCLOCK_ETH1_TIMERCLK_ClockRoot_SXOSC#
ETH1_TIMERCLK mux from SXOSC
-
enumerator kCLOCK_ETH1_TIMERCLK_ClockRoot_MAINPLLDIV8#
ETH1_TIMERCLK mux from MAINPLLDIV8
-
enumerator kCLOCK_ETH_REFCLK_ClockRoot_COMMBUS#
ETH_REFCLK mux from COMMBUS
-
enumerator kCLOCK_ETH_REFCLK_ClockRoot_ETH#
ETH_REFCLK mux from ETH
-
enumerator kCLOCK_ETH_REFCLK_ClockRoot_SXOSC#
ETH_REFCLK mux from SXOSC
-
enumerator kCLOCK_ETH_REFCLK_ClockRoot_MAINPLLDIV8#
ETH_REFCLK mux from MAINPLLDIV8
-
enumerator kCLOCK_XENO0_LIWCLK_ClockRoot_COMMBUS#
XENO0_LIWCLK mux from COMMBUS
-
enumerator kCLOCK_XENO0_LIWCLK_ClockRoot_MAINPLLDIV10#
XENO0_LIWCLK mux from MAINPLLDIV10
-
enumerator kCLOCK_XENO0_LIWCLK_ClockRoot_SYSPLLDIV4#
XENO0_LIWCLK mux from SYSPLLDIV4
-
enumerator kCLOCK_XENO0_LIWCLK_ClockRoot_SYSPLLDIV5#
XENO0_LIWCLK mux from SYSPLLDIV5
-
enumerator kCLOCK_XENO1_LIWCLK_ClockRoot_COMMBUS#
XENO1_LIWCLK mux from COMMBUS
-
enumerator kCLOCK_XENO1_LIWCLK_ClockRoot_MAINPLLDIV10#
XENO1_LIWCLK mux from MAINPLLDIV10
-
enumerator kCLOCK_XENO1_LIWCLK_ClockRoot_SYSPLLDIV4#
XENO1_LIWCLK mux from SYSPLLDIV4
-
enumerator kCLOCK_XENO1_LIWCLK_ClockRoot_SYSPLLDIV5#
XENO1_LIWCLK mux from SYSPLLDIV5
-
enumerator kCLOCK_DLL_REFCLK_ClockRoot_MAINPLLDIV10#
DLL_REFCLK mux from MAINPLLDIV10
-
enumerator kCLOCK_AUDIO_CLK_ClockRoot_AUDIOBUS#
audio_clk mux from AUDIOBUS
-
enumerator kCLOCK_DMIC0_APPCLK_ClockRoot_PERI6#
DMIC0_APPCLK mux from PERI6
-
enumerator kCLOCK_DMIC0_APPCLK_ClockRoot_AUDIOPLL#
DMIC0_APPCLK mux from AUDIOPLL
-
enumerator kCLOCK_DMIC0_APPCLK_ClockRoot_AUDIO#
DMIC0_APPCLK mux from AUDIO
-
enumerator kCLOCK_DMIC0_APPCLK_ClockRoot_SAIMCLK#
DMIC0_APPCLK mux from SAIMCLK
-
enumerator kCLOCK_SAI0_MCLK0_ClockRoot_PERI6#
sai0_mclk0 mux from PERI6
-
enumerator kCLOCK_SAI0_MCLK0_ClockRoot_AUDIOPLL#
sai0_mclk0 mux from AUDIOPLL
-
enumerator kCLOCK_SAI0_MCLK0_ClockRoot_AUDIO#
sai0_mclk0 mux from AUDIO
-
enumerator kCLOCK_SAI0_MCLK0_ClockRoot_SAIMCLK0#
sai0_mclk0 mux from SAIMCLK0
-
enumerator kCLOCK_SAI0_MCLK1_ClockRoot_PERI6#
sai0_mclk1 mux from PERI6
-
enumerator kCLOCK_SAI0_MCLK1_ClockRoot_AUDIOPLL#
sai0_mclk1 mux from AUDIOPLL
-
enumerator kCLOCK_SAI0_MCLK1_ClockRoot_AUDIO#
sai0_mclk1 mux from AUDIO
-
enumerator kCLOCK_SAI0_MCLK1_ClockRoot_SAIMCLK#
sai0_mclk1 mux from SAIMCLK
-
enumerator kCLOCK_SAI1_MCLK0_ClockRoot_PERI6#
sai1_mclk0 mux from PERI6
-
enumerator kCLOCK_SAI1_MCLK0_ClockRoot_AUDIOPLL#
sai1_mclk0 mux from AUDIOPLL
-
enumerator kCLOCK_SAI1_MCLK0_ClockRoot_AUDIO#
sai1_mclk0 mux from AUDIO
-
enumerator kCLOCK_SAI1_MCLK0_ClockRoot_SAIMCLK1#
sai1_mclk0 mux from SAIMCLK1
-
enumerator kCLOCK_SAI1_MCLK1_ClockRoot_PERI6#
sai1_mclk1 mux from PERI6
-
enumerator kCLOCK_SAI1_MCLK1_ClockRoot_AUDIOPLL#
sai1_mclk1 mux from AUDIOPLL
-
enumerator kCLOCK_SAI1_MCLK1_ClockRoot_AUDIO#
sai1_mclk1 mux from AUDIO
-
enumerator kCLOCK_SAI1_MCLK1_ClockRoot_SAIMCLK#
sai1_mclk1 mux from SAIMCLK
-
enumerator kCLOCK_SAI2_MCLK0_ClockRoot_PERI6#
sai2_mclk0 mux from PERI6
-
enumerator kCLOCK_SAI2_MCLK0_ClockRoot_AUDIOPLL#
sai2_mclk0 mux from AUDIOPLL
-
enumerator kCLOCK_SAI2_MCLK0_ClockRoot_AUDIO#
sai2_mclk0 mux from AUDIO
-
enumerator kCLOCK_SAI2_MCLK0_ClockRoot_SAIMCLK2#
sai2_mclk0 mux from SAIMCLK2
-
enumerator kCLOCK_SAI2_MCLK1_ClockRoot_PERI6#
SAI2_MCLK1 mux from PERI6
-
enumerator kCLOCK_SAI2_MCLK1_ClockRoot_AUDIOPLL#
SAI2_MCLK1 mux from AUDIOPLL
-
enumerator kCLOCK_SAI2_MCLK1_ClockRoot_AUDIO#
SAI2_MCLK1 mux from AUDIO
-
enumerator kCLOCK_SAI2_MCLK1_ClockRoot_SAIMCLK#
SAI2_MCLK1 mux from SAIMCLK
-
enumerator kCLOCK_SPDIF_TXCLK_ClockRoot_PERI6#
SPDIF_TXCLK mux from PERI6
-
enumerator kCLOCK_SPDIF_TXCLK_ClockRoot_AUDIOPLL#
SPDIF_TXCLK mux from AUDIOPLL
-
enumerator kCLOCK_SPDIF_TXCLK_ClockRoot_AUDIO#
SPDIF_TXCLK mux from AUDIO
-
enumerator kCLOCK_SPDIF_TXCLK_ClockRoot_SAIMCLK#
SPDIF_TXCLK mux from SAIMCLK
-
enumerator kCLOCK_SPDIF_CDRCLK_ClockRoot_PERI6#
SPDIF_CDRCLK mux from PERI6
-
enumerator kCLOCK_SPDIF_CDRCLK_ClockRoot_AUDIOPLL#
SPDIF_CDRCLK mux from AUDIOPLL
-
enumerator kCLOCK_SPDIF_CDRCLK_ClockRoot_MAINPLLDIV10#
SPDIF_CDRCLK mux from MAINPLLDIV10
-
enumerator kCLOCK_SPDIF_CDRCLK_ClockRoot_AUDIOBUS#
SPDIF_CDRCLK mux from AUDIOBUS
-
enumerator kCLOCK_ASRC_ClockRoot_PERI6#
ASRC mux from PERI6
-
enumerator kCLOCK_ASRC_ClockRoot_AUDIOPLL#
ASRC mux from AUDIOPLL
-
enumerator kCLOCK_ASRC_ClockRoot_MAINPLLDIV10#
ASRC mux from MAINPLLDIV10
-
enumerator kCLOCK_ASRC_ClockRoot_AUDIOBUS#
ASRC mux from AUDIOBUS
-
enumerator kCLOCK_MEDIA_ClockRoot_MEDIABUS#
MEDIA mux from MEDIABUS
-
enumerator kCLOCK_MEDIAPLL_ClockRoot_MAINPLLDIV10#
MEDIAPLL mux from MAINPLLDIV10
-
enumerator kCLOCK_MEDIAPLL_ClockRoot_MIPIPLL_DIV8#
MEDIAPLL mux from MIPIPLL_DIV8
-
enumerator kCLOCK_MIPICSI_ESCCLK_ClockRoot_PERI5#
MIPICSI_ESCCLK mux from PERI5
-
enumerator kCLOCK_MIPICSI_ESCCLK_ClockRoot_VIDEOPLL#
MIPICSI_ESCCLK mux from VIDEOPLL
-
enumerator kCLOCK_MIPICSI_ESCCLK_ClockRoot_VIDEO#
MIPICSI_ESCCLK mux from VIDEO
-
enumerator kCLOCK_MIPICSI_ESCCLK_ClockRoot_MEDIAPLL#
MIPICSI_ESCCLK mux from MEDIAPLL
-
enumerator kCLOCK_MIPICSI_ClockRoot_PERI5#
MIPICSI mux from PERI5
-
enumerator kCLOCK_MIPICSI_ClockRoot_VIDEOPLL#
MIPICSI mux from VIDEOPLL
-
enumerator kCLOCK_MIPICSI_ClockRoot_VIDEO#
MIPICSI mux from VIDEO
-
enumerator kCLOCK_MIPICSI_ClockRoot_MEDIAPLL#
MIPICSI mux from MEDIAPLL
-
enumerator kCLOCK_MIPIDSI_ESCCLK_ClockRoot_PERI5#
MIPIDSI_ESCCLK mux from PERI5
-
enumerator kCLOCK_MIPIDSI_ESCCLK_ClockRoot_VIDEOPLL#
MIPIDSI_ESCCLK mux from VIDEOPLL
-
enumerator kCLOCK_MIPIDSI_ESCCLK_ClockRoot_VIDEO#
MIPIDSI_ESCCLK mux from VIDEO
-
enumerator kCLOCK_MIPIDSI_ESCCLK_ClockRoot_MEDIAPLL#
MIPIDSI_ESCCLK mux from MEDIAPLL
-
enumerator kCLOCK_MIPIDSI_REFCLK_ClockRoot_SXOSC#
MIPIDSI_REFCLK mux from SXOSC
-
enumerator kCLOCK_MIPIDSI_ClockRoot_PERI5#
MIPIDSI mux from PERI5
-
enumerator kCLOCK_MIPIDSI_ClockRoot_VIDEOPLL#
MIPIDSI mux from VIDEOPLL
-
enumerator kCLOCK_MIPIDSI_ClockRoot_VIDEO#
MIPIDSI mux from VIDEO
-
enumerator kCLOCK_MIPIDSI_ClockRoot_MEDIAPLL#
MIPIDSI mux from MEDIAPLL
-
enumerator kCLOCK_REFORMAT_ClockRoot_PERI5#
REFORMAT mux from PERI5
-
enumerator kCLOCK_REFORMAT_ClockRoot_VIDEOPLL#
REFORMAT mux from VIDEOPLL
-
enumerator kCLOCK_REFORMAT_ClockRoot_VIDEO#
REFORMAT mux from VIDEO
-
enumerator kCLOCK_REFORMAT_ClockRoot_MEDIAPLL#
REFORMAT mux from MEDIAPLL
-
enumerator kCLOCK_DCPIXEL_ClockRoot_PERI5#
DCPIXEL mux from PERI5
-
enumerator kCLOCK_DCPIXEL_ClockRoot_VIDEOPLL#
DCPIXEL mux from VIDEOPLL
-
enumerator kCLOCK_DCPIXEL_ClockRoot_VIDEO#
DCPIXEL mux from VIDEO
-
enumerator kCLOCK_DCPIXEL_ClockRoot_MEDIAPLL#
DCPIXEL mux from MEDIAPLL
-
enumerator kCLOCK_CSI_MCLKOUT_ClockRoot_PERI5#
CSI_MCLKOUT mux from PERI5
-
enumerator kCLOCK_CSI_MCLKOUT_ClockRoot_SXOSC#
CSI_MCLKOUT mux from SXOSC
-
enumerator kCLOCK_CSI_MCLKOUT_ClockRoot_VIDEO#
CSI_MCLKOUT mux from VIDEO
-
enumerator kCLOCK_CSI_MCLKOUT_ClockRoot_MEDIAPLL#
CSI_MCLKOUT mux from MEDIAPLL
-
enumerator kCLOCK_SXOSC_ClockRoot_OSC_24M#
-
enum _clock_gate_value#
CCM gate control value.
Values:
-
enumerator kCLOCK_BusOFF_FuncOFF#
bus clock OFF, functional clock OFF.
-
enumerator kCLOCK_BusON_FuncON_SLEEP#
bus clock ON(OFF in Sleep),functional clock ON(OFF in Sleep).
-
enumerator kCLOCK_BusON_FuncON_DEEPSLEEP#
bus clock ON(OFF in DeepSleep),functional clock ON(OFF in DeepSleep).
-
enumerator kCLOCK_BusON_FuncON#
bus clock ON(OFF in DeepSleep),functional clock ON.
-
enumerator kCLOCK_BusOFF_FuncOFF#
-
enum _clock_name#
Clock name.
Values:
-
enumerator kCLOCK_SRC_BASE#
-
enumerator kCLOCK_SRC_LOW#
-
enumerator kCLOCK_SRC_MAINPLL_DIVX#
-
enumerator kCLOCK_SRC_SYSPLL_DIVX#
-
enumerator kCLOCK_SRC_PLL_PFDX#
-
enumerator kCLOCK_SRC_MEDIA_PFDX#
-
enumerator kCLOCK_SRC_MAINDIVX#
-
enumerator kCLOCK_SRC_SAIMCLK#
-
enumerator kCLOCK_SRC_SAIMCLK0#
-
enumerator kCLOCK_SRC_SAIMCLK1#
-
enumerator kCLOCK_SRC_SAIMCLK2#
-
enumerator kCLOCK_SRC_ULP32K#
-
enumerator kCLOCK_SRC_FRO192M#
-
enumerator kCLOCK_SRC_FRO96M#
-
enumerator kCLOCK_SRC_FRO48M#
-
enumerator kCLOCK_SRC_FRO24M#
-
enumerator kCLOCK_SRC_SYSPLLDIV4#
-
enumerator kCLOCK_SRC_SYSPLLDIV5#
-
enumerator kCLOCK_SRC_MAINPLLDIV8#
-
enumerator kCLOCK_SRC_MAINPLLDIV10#
-
enumerator kCLOCK_SRC_AUDIOPLL#
-
enumerator kCLOCK_SRC_VIDEOPLL#
-
enumerator kCLOCK_SRC_CPU#
-
enumerator kCLOCK_SRC_NPU#
-
enumerator kCLOCK_SRC_MEDIABUS#
-
enumerator kCLOCK_SRC_AUDIOBUS#
-
enumerator kCLOCK_SRC_COMMBUS#
-
enumerator kCLOCK_SRC_WAKEBUS#
-
enumerator kCLOCK_SRC_PERI0#
-
enumerator kCLOCK_SRC_PERI1#
-
enumerator kCLOCK_SRC_PERI2#
-
enumerator kCLOCK_SRC_PERI3#
-
enumerator kCLOCK_SRC_PERI4#
-
enumerator kCLOCK_SRC_PERI5#
-
enumerator kCLOCK_SRC_PERI6#
-
enumerator kCLOCK_SRC_PERI7#
-
enumerator kCLOCK_SRC_AUDIO#
-
enumerator kCLOCK_SRC_VIDEO#
-
enumerator kCLOCK_SRC_USB1#
-
enumerator kCLOCK_SRC_ETH#
-
enumerator kCLOCK_SRC_MAIN#
-
enumerator kCLOCK_SRC_WAKE_LPCLK#
-
enumerator kCLOCK_SRC_MAIN_PERI0_DIV2#
-
enumerator kCLOCK_SRC_MAIN_PERI1_DIV2#
-
enumerator kCLOCK_SRC_MAINPFDX_DIV2#
-
enumerator kCLOCK_SRC_COMM_PERI1_DIV2#
-
enumerator kCLOCK_SRC_COMM_PERI2_DIV2#
-
enumerator kCLOCK_SRC_COMMPFDX_DIV2#
-
enumerator kCLOCK_SRC_BOUNDARY#
NOT a real src. Marks the end of the s_clockSrcRootMap-indexed segment. Used by the resolver.
-
enumerator kCLOCK_SRC_OSC_24M#
-
enumerator kCLOCK_SRC_SXOSC#
-
enumerator kCLOCK_SRC_FRO_192M#
-
enumerator kCLOCK_SRC_FRO_96M#
-
enumerator kCLOCK_SRC_FRO_48M#
-
enumerator kCLOCK_SRC_FRO_24M#
-
enumerator kCLOCK_SRC_LPOSC_12M_CORE#
-
enumerator kCLOCK_SRC_LPOSC_1M_CORE#
-
enumerator kCLOCK_SRC_LP1M_CORE#
-
enumerator kCLOCK_SRC_LP12M_WAKE#
-
enumerator kCLOCK_SRC_LP1M_WAKE#
-
enumerator kCLOCK_SRC_LP2M_WAKE#
-
enumerator kCLOCK_SRC_LPOSC32K#
-
enumerator kCLOCK_SRC_COREPLL_OUT#
-
enumerator kCLOCK_SRC_AUDIOPLL_DIVOUT#
-
enumerator kCLOCK_SRC_VIDEOPLL_DIVOUT#
-
enumerator kCLOCK_SRC_MAINPLL_DIV4#
-
enumerator kCLOCK_SRC_MAINPLL_DIV5#
-
enumerator kCLOCK_SRC_MAINPLL_DIV8#
-
enumerator kCLOCK_SRC_MAINPLL_DIV10#
-
enumerator kCLOCK_SRC_MAINPLL_DIV20#
-
enumerator kCLOCK_SRC_MAINPLL_DIVOUT0#
-
enumerator kCLOCK_SRC_MAINPLL_DIVOUT1#
-
enumerator kCLOCK_SRC_MAINPLL_DIVOUT2#
-
enumerator kCLOCK_SRC_SYSPLL_DIV4#
-
enumerator kCLOCK_SRC_SYSPLL_DIV5#
-
enumerator kCLOCK_SRC_SYSPLL_DIV10#
-
enumerator kCLOCK_SRC_SYSPLL_DIV20#
-
enumerator kCLOCK_SRC_SYSPLL_DIVOUT0#
-
enumerator kCLOCK_SRC_SYSPLL_DIVOUT1#
-
enumerator kCLOCK_SRC_SYSPLL_DIVOUT2#
-
enumerator kCLOCK_SRC_USBPLL_OUT#
-
enumerator kCLOCK_SRC_USBPLL_48M#
-
enumerator kCLOCK_SRC_MIPIPLL_DIV8#
-
enumerator kCLOCK_SRC_MEDIAPLL#
-
enumerator kCLOCK_SRC_SAI0_MCLK#
-
enumerator kCLOCK_SRC_SAI1_MCLK#
-
enumerator kCLOCK_SRC_SAI2_MCLK#
-
enumerator kCLOCK_SRC_TIE_LOW#
-
enumerator kCLOCK_SRC_Invalid#
-
enumerator kCLOCK_SRC_BASE#
-
enum _clock_cguana_ref_freq#
CGUANA PLL reference clock frequency selection.
Values:
-
enumerator kCLOCK_CguanaRefFreq19p2M#
19.2 MHz
-
enumerator kCLOCK_CguanaRefFreq24M#
24 MHz
-
enumerator kCLOCK_CguanaRefFreq32M#
32 MHz
-
enumerator kCLOCK_CguanaRefFreq40M#
40 MHz
-
enumerator kCLOCK_CguanaRefFreq19p2M#
-
enum _clock_pll_ref_src#
PLL reference clock source selector.
Maps to CGUANA CGUA_CTRL_REG bits CGUA_CLKGEN_CMS_PLL_CKIN_SEL (bit 22, Core/ Main/Sys PLLs) and CGUA_CLKGEN_AV_PLL_CKIN_SEL (bit 23, Audio/Video PLLs). Both legs are nominally 24 MHz on RT2660.
Values:
-
enumerator kCLOCK_PllRefSrc_FRO192M_24M#
24 MHz output of FRO192M
-
enumerator kCLOCK_PllRefSrc_SXOSC#
SXOSC output clock
-
enumerator kCLOCK_PllRefSrc_FRO192M_24M#
-
enum _clock_cguana_pll_start_mode#
CGUANA PLL starting (calibration) mode.
Values:
-
enumerator kCLOCK_CguanaPllStartFull#
Full auto with VCO calibration
-
enumerator kCLOCK_CguanaPllStartSkipCal#
Skip VCO calibration (reuses stored cal value)
-
enumerator kCLOCK_CguanaPllStartFull#
-
enum _clock_cguana_sxosc_mode#
SXOSC oscillator mode selection.
Values:
-
enumerator kCLOCK_CguanaSxoscModeCrystal#
Crystal (differential) mode
-
enumerator kCLOCK_CguanaSxoscModeAcSlave#
AC-coupled slave mode
-
enumerator kCLOCK_CguanaSxoscModeDcBypass#
DC-bypass mode
-
enumerator kCLOCK_CguanaSxoscModeDcBypassNoDet#
DC-bypass without level detector
-
enumerator kCLOCK_CguanaSxoscModeCrystal#
-
enum _clock_cguana_fro192m_otwb#
FRO 192 MHz oscillator trimming word band (OTWB) selection.
Values:
-
enumerator kCLOCK_CguanaFro192mOtwb96M#
96 MHz band
-
enumerator kCLOCK_CguanaFro192mOtwb120M#
120 MHz band
-
enumerator kCLOCK_CguanaFro192mOtwb144M#
144 MHz band
-
enumerator kCLOCK_CguanaFro192mOtwb192M#
192 MHz band
-
enumerator kCLOCK_CguanaFro192mOtwb240M#
240 MHz band
-
enumerator kCLOCK_CguanaFro192mOtwb288M#
288 MHz band
-
enumerator kCLOCK_CguanaFro192mOtwb384M#
384 MHz band
-
enumerator kCLOCK_CguanaFro192mOtwb480M#
480 MHz band
-
enumerator kCLOCK_CguanaFro192mOtwb96M#
-
enum _clock_cguana_fro12m_otwb#
FRO 12 MHz oscillator trimming word band (OTWB) selection.
Values:
-
enumerator kCLOCK_CguanaFro12mOtwb8M#
8 MHz band
-
enumerator kCLOCK_CguanaFro12mOtwb10M#
10 MHz band
-
enumerator kCLOCK_CguanaFro12mOtwb12M#
12 MHz band
-
enumerator kCLOCK_CguanaFro12mOtwb12p288M#
12.288 MHz band
-
enumerator kCLOCK_CguanaFro12mOtwb16M#
16 MHz band
-
enumerator kCLOCK_CguanaFro12mOtwb20M#
20 MHz band
-
enumerator kCLOCK_CguanaFro12mOtwb24M#
24 MHz band
-
enumerator kCLOCK_CguanaFro12mOtwb32M#
32 MHz band
-
enumerator kCLOCK_CguanaFro12mOtwb8M#
-
enum _clock_cguana_frac_pll_vco_freq#
Main/System fractional PLL VCO frequency selection.
Values:
-
enumerator kCLOCK_CguanaFracPllVco2000M#
2000 MHz
-
enumerator kCLOCK_CguanaFracPllVco1950M#
1950 MHz
-
enumerator kCLOCK_CguanaFracPllVco1900M#
1900 MHz
-
enumerator kCLOCK_CguanaFracPllVco1850M#
1850 MHz
-
enumerator kCLOCK_CguanaFracPllVco2000M#
-
enum _clock_usb_fs_src#
USB FS (USBFS/KHCI) functional clock source (COMM usb1_fclk root mux).
Values:
-
enumerator kCLOCK_UsbFsSrcUsb1Root#
usb1_rootclk (root47 output, configured in clock_config)
-
enumerator kCLOCK_UsbFsSrcUsbPllOut#
USB PHY PLL 480M direct out (needs /10 in root -> 48M)
-
enumerator kCLOCK_UsbFsSrcUsbPll48M#
USB PHY PLL 480M/10 = 48M (recommended, exact)
-
enumerator kCLOCK_UsbFsSrcFro48M#
Free-running FRO 48M (RC accuracy, may not meet USB FS)
-
enumerator kCLOCK_UsbFsSrcUsb1Root#
-
enum _clock_fro_tuner_src#
FRO tuner (FLL) reference-clock source.
Selects the reference against which the tuner locks an FRO. The first five values use the SXOSC crystal path (CKREF_SOURCE_SEL == 0) and differ only by the SXOSC frequency; the last two use a USB Start-Of-Frame pulse as the reference. The enumerators are ordered to match the reference manual FRO_TUNER settings tables and are used to index the internal parameter tables in fsl_clock.c, so do not reorder them.
Values:
-
enumerator kCLOCK_FroTunerRefSxosc19M2#
SXOSC crystal at 19.2 MHz.
-
enumerator kCLOCK_FroTunerRefSxosc24M#
SXOSC crystal at 24 MHz.
-
enumerator kCLOCK_FroTunerRefSxosc32M#
SXOSC crystal at 32 MHz.
-
enumerator kCLOCK_FroTunerRefSxosc40M#
SXOSC crystal at 40 MHz.
-
enumerator kCLOCK_FroTunerRefSxosc32768Hz#
SXOSC crystal at 32.768 kHz.
-
enumerator kCLOCK_FroTunerRefUsbFsSof1kHz#
USB Full-/Low-Speed 1 kHz Start-Of-Frame.
-
enumerator kCLOCK_FroTunerRefUsbHsSof8kHz#
USB High-Speed 8 kHz Start-Of-Frame.
-
enumerator kCLOCK_FroTunerRefSxosc19M2#
-
enum _clock_fro_tuner_target#
Which FRO the tuner (FLL) locks.
Values:
-
enumerator kCLOCK_FroTuner12M#
Tune the 12 MHz FRO.
-
enumerator kCLOCK_FroTuner192M#
Tune the 192 MHz FRO.
-
enumerator kCLOCK_FroTuner12M#
-
enum _clock_osc_24m_src#
CLK24M_SEL MODCON selection for the OSC_24M (L0) clock.
Maps to MAIN MODCON CLK24M_SEL_CFG.SEL (offset 0x8810).
Values:
-
enumerator kCLOCK_Osc24mSrc_FRO_24M#
OSC_24M driven by FRO 24 MHz
-
enumerator kCLOCK_Osc24mSrc_SXOSC#
OSC_24M driven by SXOSC crystal
-
enumerator kCLOCK_Osc24mSrc_FRO_24M#
-
enum _clock_main_sys_pll#
Fractional-N PLL identifier (Main or System PLL).
The two fractional-N PLLs on RT2660 (Main and System) share an identical register layout in PERI_CGUANA.h: PLLn_PLL1_REG holds the integer divider enables (DIV5/8/10/20 at bits 3/5/7/9) and PLLn_PLL2_REG holds the fractional divider enables (DIVFRAC0/1/2 at bits 0/8/16). The identical layout is exploited by CLOCK_EnableMainSysPllOutput and peers to keep the per-output mapping table single-copy.
Values:
-
enumerator kCLOCK_MainSysPll_Main#
Main PLL (CGUA_MAINPLL_PLL1_REG / CGUA_MAINPLL_PLL2_REG).
-
enumerator kCLOCK_MainSysPll_Sys#
System PLL (CGUA_SYSPLL_PLL1_REG / CGUA_SYSPLL_PLL2_REG).
-
enumerator kCLOCK_MainSysPll_Count#
Sentinel — not a valid PLL identifier.
-
enumerator kCLOCK_MainSysPll_Main#
-
enum _clock_main_sys_pll_output#
Fractional-N PLL divider output identifier.
Each enumerator names one divider output tap of a Main/System PLL. The physical bit position in the PLL’s PLL1_REG / PLL2_REG is documented in the trailing comment. Because Main and System PLLs share the same bit layout, one enumerator value is valid for either PLL — the target PLL is selected by the clock_main_sys_pll_t argument to the API.
Values:
-
enumerator kCLOCK_MainSysPllOutput_Div5#
PLL1_REG bit 3 — MAINPLL_DIV5_EN / SYSPLL_DIV5_EN.
-
enumerator kCLOCK_MainSysPllOutput_Div8#
PLL1_REG bit 5 — MAINPLL_DIV8_EN / SYSPLL_DIV8_EN.
-
enumerator kCLOCK_MainSysPllOutput_Div10#
PLL1_REG bit 7 — MAINPLL_DIV10_EN / SYSPLL_DIV10_EN.
-
enumerator kCLOCK_MainSysPllOutput_Div20#
PLL1_REG bit 9 — MAINPLL_DIV20_EN / SYSPLL_DIV20_EN.
-
enumerator kCLOCK_MainSysPllOutput_Divfrac0#
PLL2_REG bit 0 — MAINPLL_DIVFRAC0_EN / SYSPLL_DIVFRAC0_EN.
-
enumerator kCLOCK_MainSysPllOutput_Divfrac1#
PLL2_REG bit 8 — MAINPLL_DIVFRAC1_EN / SYSPLL_DIVFRAC1_EN.
-
enumerator kCLOCK_MainSysPllOutput_Divfrac2#
PLL2_REG bit 16 — MAINPLL_DIVFRAC2_EN / SYSPLL_DIVFRAC2_EN.
-
enumerator kCLOCK_MainSysPllOutput_All#
All 7 outputs at once — see the Enable/Disable/IsEnabled contracts.
-
enumerator kCLOCK_MainSysPllOutput_Count#
Sentinel — not a valid output identifier.
-
enumerator kCLOCK_MainSysPllOutput_Div5#
-
enum _clock_av_pll#
Audio/Video PLL identifier.
The two AV PLLs on RT2660 (Audio and Video) share an identical CLKOUT_EN bit layout in PERI_CGUANA.h — both at bit 3 of PLLn_PLL1_REG.
Values:
-
enumerator kCLOCK_AvPll_Audio#
Audio PLL (CGUA_AUDIOPLL_PLL1_REG bit 3).
-
enumerator kCLOCK_AvPll_Video#
Video PLL (CGUA_VIDEOPLL_PLL1_REG bit 3).
-
enumerator kCLOCK_AvPll_Count#
Sentinel — not a valid PLL identifier.
-
enumerator kCLOCK_AvPll_Audio#
-
typedef enum _clock_lpcg clock_lpcg_t#
Clock LPCG index.
-
typedef enum _clock_root clock_root_t#
Root clock index.
-
typedef enum _clock_root_mux_source clock_root_mux_source_t#
The enumerator of clock roots’ clock source mux value.
-
typedef enum _clock_gate_value clock_gate_value_t#
CCM gate control value.
-
typedef enum _clock_name clock_name_t#
Clock name.
-
typedef struct _clock_root_config_t clock_root_config_t#
-
typedef enum _clock_cguana_ref_freq clock_cguana_ref_freq_t#
CGUANA PLL reference clock frequency selection.
-
typedef enum _clock_pll_ref_src clock_pll_ref_src_t#
PLL reference clock source selector.
Maps to CGUANA CGUA_CTRL_REG bits CGUA_CLKGEN_CMS_PLL_CKIN_SEL (bit 22, Core/ Main/Sys PLLs) and CGUA_CLKGEN_AV_PLL_CKIN_SEL (bit 23, Audio/Video PLLs). Both legs are nominally 24 MHz on RT2660.
-
typedef enum _clock_cguana_pll_start_mode clock_cguana_pll_start_mode_t#
CGUANA PLL starting (calibration) mode.
-
typedef enum _clock_cguana_sxosc_mode clock_cguana_sxosc_mode_t#
SXOSC oscillator mode selection.
-
typedef enum _clock_cguana_fro192m_otwb clock_cguana_fro192m_otwb_t#
FRO 192 MHz oscillator trimming word band (OTWB) selection.
-
typedef enum _clock_cguana_fro12m_otwb clock_cguana_fro12m_otwb_t#
FRO 12 MHz oscillator trimming word band (OTWB) selection.
-
typedef enum _clock_cguana_frac_pll_vco_freq clock_cguana_frac_pll_vco_freq_t#
Main/System fractional PLL VCO frequency selection.
-
typedef struct _clock_cguana_sscg_config clock_cguana_sscg_config_t#
Spread-spectrum (SSCG) configuration, shared by frac PLLs and AV PLLs.
-
typedef struct _clock_cguana_sxosc_config clock_cguana_sxosc_config_t#
SXOSC crystal oscillator configuration.
-
typedef struct _clock_cguana_fro192m_config clock_cguana_fro192m_config_t#
FRO 192 MHz configuration.
-
typedef struct _clock_cguana_fro12m_config clock_cguana_fro12m_config_t#
FRO 12 MHz configuration.
-
typedef struct _clock_cguana_core_pll_config clock_cguana_core_pll_config_t#
Core PLL configuration.
-
typedef struct _clock_cguana_frac_div_config clock_cguana_frac_div_config_t#
Fractional output divider configuration for Main/Sys PLL.
-
typedef struct _clock_cguana_frac_pll_config clock_cguana_frac_pll_config_t#
Main/System PLL (fractional-N) configuration.
-
typedef struct _clock_cguana_avpll_config clock_cguana_avpll_config_t#
Audio/Video PLL (AV PLL) configuration.
The AV PLL VCO frequency is determined by: F_VCO = F_REF * DNUM / 2^24 (DNUM is 30-bit, upper 6 bits are integer part) Output frequency: F_OUT = F_VCO / postDivRatio
-
typedef enum _clock_usb_fs_src clock_usb_fs_src_t#
USB FS (USBFS/KHCI) functional clock source (COMM usb1_fclk root mux).
-
typedef enum _clock_fro_tuner_src clock_fro_tuner_src_t#
FRO tuner (FLL) reference-clock source.
Selects the reference against which the tuner locks an FRO. The first five values use the SXOSC crystal path (CKREF_SOURCE_SEL == 0) and differ only by the SXOSC frequency; the last two use a USB Start-Of-Frame pulse as the reference. The enumerators are ordered to match the reference manual FRO_TUNER settings tables and are used to index the internal parameter tables in fsl_clock.c, so do not reorder them.
-
typedef enum _clock_fro_tuner_target clock_fro_tuner_target_t#
Which FRO the tuner (FLL) locks.
-
typedef enum _clock_osc_24m_src clock_osc_24m_src_t#
CLK24M_SEL MODCON selection for the OSC_24M (L0) clock.
Maps to MAIN MODCON CLK24M_SEL_CFG.SEL (offset 0x8810).
-
typedef enum _clock_main_sys_pll clock_main_sys_pll_t#
Fractional-N PLL identifier (Main or System PLL).
The two fractional-N PLLs on RT2660 (Main and System) share an identical register layout in PERI_CGUANA.h: PLLn_PLL1_REG holds the integer divider enables (DIV5/8/10/20 at bits 3/5/7/9) and PLLn_PLL2_REG holds the fractional divider enables (DIVFRAC0/1/2 at bits 0/8/16). The identical layout is exploited by CLOCK_EnableMainSysPllOutput and peers to keep the per-output mapping table single-copy.
-
typedef enum _clock_main_sys_pll_output clock_main_sys_pll_output_t#
Fractional-N PLL divider output identifier.
Each enumerator names one divider output tap of a Main/System PLL. The physical bit position in the PLL’s PLL1_REG / PLL2_REG is documented in the trailing comment. Because Main and System PLLs share the same bit layout, one enumerator value is valid for either PLL — the target PLL is selected by the clock_main_sys_pll_t argument to the API.
-
typedef enum _clock_av_pll clock_av_pll_t#
Audio/Video PLL identifier.
The two AV PLLs on RT2660 (Audio and Video) share an identical CLKOUT_EN bit layout in PERI_CGUANA.h — both at bit 3 of PLLn_PLL1_REG.
-
void CLOCK_EnableClock(clock_lpcg_t name)#
Enable the clock for specific IP.
- Parameters:
name – Which clock to enable, see clock_lpcg_t.
-
void CLOCK_DisableClock(clock_lpcg_t name)#
Disable the clock for specific IP.
- Parameters:
name – Which clock to disable, see clock_lpcg_t.
-
void CLOCK_SetClockGateMode(clock_lpcg_t name, clock_gate_value_t mode, uint8_t hskSel, bool bypassHandshake)#
Program the LPCG_CFG, HSK_SEL, and HSK_BYPASS fields of a peripheral clock gate in one update.
Writes bits[1:0] (LPCG_CFG), bits[18:16] (HSK_SEL), and bit[8] (HSK_BYPASS) of the CCM SLICE_CONTROL register that owns
name. Other bits of SLICE_CONTROL are preserved. Use this when a peripheral requires more than the simple on/off behavior provided by CLOCK_EnableClock / CLOCK_DisableClock, for example to gate the clock automatically in Sleep / Deep Sleep or to select which CMC instance(s) drive the clock-gate handshake.- Parameters:
name – Clock IP identifier, see clock_lpcg_t.
mode – Desired LPCG_CFG value (see clock_gate_value_t).
hskSel – HSK_SEL value (3 bits) selecting the CMC instance(s) that drive the clock-gate handshake for this LPCG.
bypassHandshake – If true, set HSK_BYPASS to bypass the clock-gate handshake. Use only for early bring-up when the downstream CMC partner is not yet functional.
-
uint32_t CLOCK_GetRootClockFreq(clock_root_t root)#
Gets the clock frequency for a specific root clock name.
This function walks the 3-layer RT2660 clock tree (L0 analog roots -> L1 CGUDIG mux -> L2 subsystem mux) using the current mux/divider/MODCON state and returns the actual frequency for the requested root. Returns 0U for out-of-range roots, invalid sources, or divider-by-zero (REQ-006). ISR-safe and reentrant (REQ-009) - read-only, no locks, no critical sections.
- Parameters:
root – Clock root defined in clock_root_t
- Returns:
Clock frequency in hertz, or 0 if it cannot be resolved.
-
uint32_t CLOCK_GetClockSrcFreq(clock_name_t name)#
Gets the frequency of an upstream clock source identified by clock_name_t.
Resolves L0 analog roots (constants and PLL helpers), L1 CGUDIG aliases (recursing into the owning root), L1/L2 SS feedback sources, MODCON-controlled (Mx) values, and macro-backed PLLs (USBPLL/MEDIAPLL/MIPIPLL). Returns 0U for kCLOCK_SRC_Invalid, kCLOCK_SRC_TIE_LOW, and unrecognized enum values. ISR-safe and reentrant.
- Parameters:
name – Source name, see clock_name_t.
- Returns:
Source frequency in hertz, or 0 if it cannot be resolved.
-
uint32_t CLOCK_GetExternalSrcFreq(clock_name_t name)#
Board-overridable hook returning the frequency of an external source.
Used by CLOCK_GetClockSrcFreq to resolve external (Dx) sources whose frequency the SoC cannot know on its own, including kCLOCK_SRC_SAI0_MCLK, kCLOCK_SRC_SAI1_MCLK, kCLOCK_SRC_SAI2_MCLK, and any future EXT source. The default weak implementation returns 0U. Board ports override it to declare the actually-wired external frequency.
- Parameters:
name – External source name, see clock_name_t.
- Returns:
External source frequency in hertz, or 0 if unknown.
-
uint32_t CLOCK_MeasureRootClockFreq(clock_root_t root)#
Measures the actual frequency of a clock root using the FREQME hardware.
Unlike CLOCK_GetRootClockFreq(), which computes a theoretical value from the clock-tree configuration, this function measures the real signal with the FREQME instance of the subsystem the root belongs to. This matters while the internal FROs are untrimmed (e.g. FRO192M configured as 192 MHz may actually run near 220 MHz). INPUTMUX routing, FREQME instance selection, and the reference-clock chain are handled internally:
CGU and WAKE roots measure against the 24 MHz crystal (SXOSC) directly.
Roots in the CMPT/MAIN/COMM/AUDIO/MEDIA subsystems are measured by that subsystem’s FREQME; its reference clock is itself first measured against SXOSC by the SYSCON FREQME, so accuracy always derives from the crystal.
Note
Preconditions: the clock under test must be enabled/running (this function never enables the measured clock; a gated target reads as a failure). The FREQME/INPUTMUX access clocks are enabled internally and restored afterwards. OSC_24M must be sourced from the SXOSC crystal (see CLOCK_SetOsc24mSource()); if it is sourced from the untrimmed FRO_24M the returned values are only as accurate as that FRO.
Note
Blocking: one measurement takes 2^FSL_CLOCK_FREQME_REF_SCALE reference cycles (~2.73 ms at the 24 MHz reference with the default scale of 16; a two-level measurement roughly doubles that). If the target is too slow (or gated) the measurement is automatically retried with a larger scale, up to 2^24 cycles (~0.7 s) worst case before returning 0. A dead reference clock is detected by a bounded polling loop whose worst-case detection time at the maximum scale can reach several seconds (CPU-speed dependent) — this only occurs in the double-fault case of an escalated retry with a dead reference.
Note
Not ISR-safe and not reentrant: the FREQME and INPUTMUX FREQMEAS muxes of the involved subsystems are reprogrammed (those muxes serve only the FREQME and are not restored), and the FREQME access gate save/restore is a non-atomic read-modify-write.
- Parameters:
root – Clock root defined in clock_root_t.
- Returns:
Measured frequency in hertz, or 0 on failure: root out of range, measurement timeout (reference dead), or result under/overflow (target dead/gated, or outside the 2 GHz ceiling).
-
uint32_t CLOCK_MeasureClockSrcFreq(clock_name_t name)#
Measures the actual frequency of a clock source using the FREQME hardware.
Companion of CLOCK_GetClockSrcFreq() that returns a measured value instead of a computed one; see CLOCK_MeasureRootClockFreq() for the measurement chain, preconditions, and blocking behavior.
Supported are the in-map sources (below kCLOCK_SRC_BOUNDARY): each resolves to its owning clock root and is measured there, with the MODCON /2 of the six kCLOCK_SRC_*_DIV2 sources applied afterwards (the /2 is a deterministic divider, so halving the measured parent is exact). kCLOCK_SRC_CPU is measured at its dedicated hardware tap (SYSCON tar cpu_rootclk) rather than derived from the MAIN tap.
Note
Terminal analog sources (kCLOCK_SRC_FRO_192M, PLL taps, external SAI MCLKs, …) have no FREQME tap and return 0; measure the corresponding root alias instead. Beware the one-underscore difference: kCLOCK_SRC_FRO_192M (raw analog source, returns 0) vs kCLOCK_SRC_FRO192M (CGU root alias, measurable) — use the latter, or kCLOCK_Root_CGU_FRO192M_ROOTCLK, for the FRO 192 MHz output. The same applies to the FRO_96M/FRO_48M/FRO_24M vs FRO96M/FRO48M/FRO24M pairs.
Note
To measure the CPU clock, kCLOCK_SRC_CPU is the most direct choice (dedicated hardware tap).
- Parameters:
name – Source name, see clock_name_t.
- Returns:
Measured frequency in hertz, or 0 if the source is not measurable, the measurement times out, or the result is out of range.
-
void CLOCK_SetRootClockMux(clock_root_t root, clock_root_mux_source_t src)#
Set the mux source for a clock root.
- Parameters:
root – Clock root, see clock_root_t.
src – Mux selection, see clock_root_mux_source_t. Range 0..3.
-
uint32_t CLOCK_GetRootClockMux(clock_root_t root)#
Get the current mux source value of a clock root.
- Parameters:
root – Clock root, see clock_root_t.
- Returns:
mux selection value (0..3).
-
clock_name_t CLOCK_GetRootClockSource(clock_root_t root, uint32_t src)#
Resolve the clock_name_t source feeding a root for the given mux selection.
- Parameters:
root – Clock root, see clock_root_t.
src – Mux selection value (0..3).
- Returns:
Upstream clock_name_t for that root/mux pair.
-
void CLOCK_SetRootClockDiv(clock_root_t root, uint32_t div)#
Set the integer post-divider for a clock root.
- Parameters:
root – Clock root, see clock_root_t.
div – Divider value (1-based; must be >= 1).
-
uint32_t CLOCK_GetRootClockDiv(clock_root_t root)#
Get the current post-divider for a clock root.
- Parameters:
root – Clock root, see clock_root_t.
- Returns:
Divider value (1-based).
-
void CLOCK_PowerOffRootClock(clock_root_t root)#
Power off a clock root (clockShutdown=1).
- Parameters:
root – Clock root, see clock_root_t.
-
void CLOCK_PowerOnRootClock(clock_root_t root)#
Power on a clock root (clockShutdown=0).
- Parameters:
root – Clock root, see clock_root_t.
-
void CLOCK_SetRootClock(clock_root_t root, const clock_root_config_t *config)#
Program a clock root’s mux, divider and (optional) second divider in one call.
- Parameters:
root – Clock root, see clock_root_t.
config – Pointer to the root configuration (mux/div/sndDiv/clockShutdown).
-
void CLOCK_SetOsc24mSource(clock_osc_24m_src_t src)#
Select the source driving the OSC_24M L0 clock.
- Parameters:
src – Source selection, see clock_osc_24m_src_t.
-
clock_osc_24m_src_t CLOCK_GetOsc24mSource(void)#
Get the current source driving the OSC_24M L0 clock.
- Returns:
Current selection, see clock_osc_24m_src_t.
-
void CLOCK_SetClockSrcDiv2(clock_name_t src, bool useDiv2)#
Program one of the six MODCON-controlled /2 clock selects (Mx).
Selects pass-through or divide-by-two for the L2 Mx sources defined in the MCUX-88602 MODCON control table:
kCLOCK_SRC_MAIN_PERI0_DIV2 : MAIN XSPI0 MODCON.CFG[PERI_ROOTCLK0]
kCLOCK_SRC_MAIN_PERI1_DIV2 : MAIN XSPI1 MODCON.CFG[PERI_ROOTCLK1]
kCLOCK_SRC_MAINPFDX_DIV2 : MAIN XSPI0 MODCON.CFG[MAINPFDX_ROOTCLK]
kCLOCK_SRC_COMM_PERI1_DIV2 : COMM USDHC0 MODCON.CFG[PERI_ROOTCLK1_SEL_DIV2]
kCLOCK_SRC_COMM_PERI2_DIV2 : COMM USDHC1 MODCON.CFG[PERI_ROOTCLK2_SEL_DIV2]
kCLOCK_SRC_COMMPFDX_DIV2 : COMM USDHC0 MODCON.CFG[COMMPFDX_ROOTCLK_SEL_DIV2]
SW invariant: all consumers of the same Mx source program identical /2 selections. CLOCK_GetClockSrcFreq reads from one canonical MODCON instance per Mx; CLOCK_SetClockSrcDiv2 writes to the same instance.
No-op for any other clock_name_t value.
- Parameters:
src – One of the six kCLOCK_SRC_*_DIV2 sources above.
useDiv2 – false = pass-through (/1); true = divide by 2 (/2).
-
bool CLOCK_GetClockSrcDiv2(clock_name_t src)#
Read the current /2 selection of a MODCON-controlled Mx source.
- Parameters:
src – One of the six kCLOCK_SRC_*_DIV2 sources accepted by CLOCK_SetClockSrcDiv2.
- Returns:
false = pass-through (/1); true = divide by 2 (/2). Returns false for sources that are not MODCON-controlled.
-
void CLOCK_InitSxosc(const clock_cguana_sxosc_config_t *config)#
Initialize the SXOSC crystal oscillator.
Configures SXOSC analog parameters and requests the CGUANA FSM to power on and enable SXOSC. Blocks until the FSM reports SXOSC ready.
- Parameters:
config – Pointer to SXOSC configuration; must not be NULL.
-
void CLOCK_DeinitSxosc(void)#
De-initialize the SXOSC crystal oscillator.
Requests the CGUANA FSM to power off SXOSC.
-
void CLOCK_InitFro192M(const clock_cguana_fro192m_config_t *config)#
Initialize the FRO 192 MHz oscillator.
Configures the oscillator band and requests FSM enable. Blocks until ready.
- Parameters:
config – Pointer to FRO192M configuration; must not be NULL.
-
void CLOCK_DeinitFro192M(void)#
De-initialize the FRO 192 MHz oscillator.
-
void CLOCK_InitFro12M(const clock_cguana_fro12m_config_t *config)#
Initialize the FRO 12 MHz oscillator.
- Parameters:
config – Pointer to FRO12M configuration; must not be NULL.
-
void CLOCK_DeinitFro12M(void)#
De-initialize the FRO 12 MHz oscillator.
-
void CLOCK_InitCorePll(const clock_cguana_core_pll_config_t *config)#
Initialize the Core PLL.
Configures Core PLL registers and requests FSM enable. Blocks until ready.
- Parameters:
config – Pointer to Core PLL configuration; must not be NULL.
-
void CLOCK_DeinitCorePll(void)#
De-initialize the Core PLL.
-
uint32_t CLOCK_GetCorePllFreq(void)#
Get the Core PLL output frequency.
Reads the current FREF, LOOPDIV_NINT, and POSTDIV register settings.
- Returns:
Core PLL output frequency in Hz, or 0 if PLL is not ready.
-
void CLOCK_InitMainPll(const clock_cguana_frac_pll_config_t *config)#
Initialize the Main PLL.
Configures Main PLL fractional-N registers and requests FSM enable. Blocks until ready.
- Parameters:
config – Pointer to Main PLL configuration; must not be NULL.
-
void CLOCK_DeinitMainPll(void)#
De-initialize the Main PLL.
-
uint32_t CLOCK_GetMainPllVcoFreq(void)#
Get the Main PLL VCO frequency.
Reads the LOWFREQ band-select field and returns the base VCO frequency, one of 2 GHz / 1.95 GHz / 1.90 GHz / 1.85 GHz. The integer-divider outputs DIV4/DIV5/DIV8/DIV10/DIV20 are simply VCO / N at the call site.
- Returns:
VCO frequency in Hz.
-
uint32_t CLOCK_GetMainPllFreq(uint8_t fracIdx)#
Get the Main PLL fractional output frequency (DIVOUT0 / DIVOUT1 / DIVOUT2).
- Parameters:
fracIdx – Fractional output index: 0 = DIVOUT0, 1 = DIVOUT1, 2 = DIVOUT2.
- Returns:
Output frequency in Hz, or 0 if the output is disabled.
-
void CLOCK_InitSysPll(const clock_cguana_frac_pll_config_t *config)#
Initialize the System PLL.
- Parameters:
config – Pointer to System PLL configuration; must not be NULL.
-
void CLOCK_DeinitSysPll(void)#
De-initialize the System PLL.
-
uint32_t CLOCK_GetSysPllVcoFreq(void)#
Get the System PLL VCO frequency.
See CLOCK_GetMainPllVcoFreq — same VCO/integer-divider relationship.
- Returns:
VCO frequency in Hz.
-
uint32_t CLOCK_GetSysPllFreq(uint8_t fracIdx)#
Get the System PLL fractional output frequency (DIVOUT0 / DIVOUT1 / DIVOUT2).
- Parameters:
fracIdx – Fractional output index: 0 = DIVOUT0, 1 = DIVOUT1, 2 = DIVOUT2.
- Returns:
Output frequency in Hz, or 0 if disabled.
-
void CLOCK_InitAudioPll(const clock_cguana_avpll_config_t *config)#
Initialize the Audio PLL.
Configures Audio PLL registers and performs the direct enable sequence (PWREN -> PWRACK -> RSTN -> PLL_EN -> READY -> CLKOUT_EN).
- Parameters:
config – Pointer to Audio PLL configuration; must not be NULL.
-
void CLOCK_DeinitAudioPll(void)#
De-initialize the Audio PLL.
-
uint32_t CLOCK_GetAudioPllFreq(void)#
Get the Audio PLL output frequency.
- Returns:
Audio PLL output frequency in Hz. Uses DNUM as 6.24 fixed-point (F_VCO = F_REF * DNUM / 2^24) divided by POSTDIV.
-
void CLOCK_UpdateAudioPllDnum(uint32_t dnum)#
Update the Audio PLL output frequency via DNUM.
Issues a DNUM update request and waits for the acknowledgement.
- Parameters:
dnum – New 30-bit DNUM value [29:0].
-
void CLOCK_InitVideoPll(const clock_cguana_avpll_config_t *config)#
Initialize the Video PLL.
- Parameters:
config – Pointer to Video PLL configuration; must not be NULL.
-
void CLOCK_DeinitVideoPll(void)#
De-initialize the Video PLL.
-
uint32_t CLOCK_GetVideoPllFreq(void)#
Get the Video PLL output frequency.
- Returns:
Video PLL output frequency in Hz.
-
void CLOCK_UpdateVideoPllDnum(uint32_t dnum)#
Update the Video PLL output frequency via DNUM.
- Parameters:
dnum – New 30-bit DNUM value [29:0].
-
void CLOCK_SetCmsPllRefSource(clock_pll_ref_src_t src)#
Select the reference clock source feeding the Core, Main and System PLLs.
Writes CGUANA CGUA_CTRL_REG.CGUA_CLKGEN_CMS_PLL_CKIN_SEL (bit 22).
- Parameters:
src – Source selection, see clock_pll_ref_src_t.
-
clock_pll_ref_src_t CLOCK_GetCmsPllRefSource(void)#
Get the current reference clock source feeding the Core, Main and System PLLs.
- Returns:
Current selection, see clock_pll_ref_src_t.
-
void CLOCK_SetAvPllRefSource(clock_pll_ref_src_t src)#
Select the reference clock source feeding the Audio and Video PLLs.
Writes CGUANA CGUA_CTRL_REG.CGUA_CLKGEN_AV_PLL_CKIN_SEL (bit 23).
- Parameters:
src – Source selection, see clock_pll_ref_src_t.
-
clock_pll_ref_src_t CLOCK_GetAvPllRefSource(void)#
Get the current reference clock source feeding the Audio and Video PLLs.
- Returns:
Current selection, see clock_pll_ref_src_t.
-
void CLOCK_EnableMainSysPllOutput(clock_main_sys_pll_t pll, clock_main_sys_pll_output_t out)#
Enable one or all divider outputs of a Main/System PLL.
If
outnames a single output (Div5/8/10/20/Divfrac0/1/2), sets the single bit that gates it in the selectedpll; every other bit of the containing register is preserved. Ifoutis kCLOCK_MainSysPllOutput_All, sets all seven output-enable bits in one pass — Div5/8/10/20 in PLL1_REG and Divfrac0/1/2 in PLL2_REG; every other bit of PLL1_REG and PLL2_REG is preserved.Note
This function does not poll a “ready” status bit — the caller is responsible for waiting on CGUA_MAINPLL_STS / CGUA_SYSPLL_STS if the downstream consumer needs the output to be settled.
Note
This function does not run PLL bring-up. Use CLOCK_InitMainPll / CLOCK_InitSysPll to bring the PLL up for the first time.
- Parameters:
pll – One of kCLOCK_MainSysPll_Main or kCLOCK_MainSysPll_Sys.
out – One of the clock_main_sys_pll_output_t values, or kCLOCK_MainSysPllOutput_All to enable every output at once.
-
void CLOCK_DisableMainSysPllOutput(clock_main_sys_pll_t pll, clock_main_sys_pll_output_t out)#
Disable one or all divider outputs of a Main/System PLL.
Symmetric with CLOCK_EnableMainSysPllOutput: clears the single bit for a named output, or clears all seven output-enable bits across PLL1_REG and PLL2_REG when
outis kCLOCK_MainSysPllOutput_All.Note
This function does not poll a “ready” status bit.
- Parameters:
pll – One of kCLOCK_MainSysPll_Main or kCLOCK_MainSysPll_Sys.
out – One of the clock_main_sys_pll_output_t values, or kCLOCK_MainSysPllOutput_All to disable every output at once.
-
bool CLOCK_IsMainSysPllOutputEnabled(clock_main_sys_pll_t pll, clock_main_sys_pll_output_t out)#
Query whether Main/System PLL divider outputs are enabled.
If
outnames a single output, reads the corresponding PLL1_REG or PLL2_REG bit and returns whether it is set. Ifoutis kCLOCK_MainSysPllOutput_All, returnstrueonly when every one of the seven output-enable bits is currently set (AND semantics — “are all
enabled?”).
- Parameters:
pll – One of kCLOCK_MainSysPll_Main or kCLOCK_MainSysPll_Sys.
out – One of the clock_main_sys_pll_output_t values, or kCLOCK_MainSysPllOutput_All to query “all outputs enabled”.
- Returns:
true for a single output: its enable bit is currently 1.
- Returns:
true for kCLOCK_MainSysPllOutput_All: all seven output-enable bits are currently 1.
- Returns:
false the enable bit(s) not fully set, or an argument is out of range.
-
void CLOCK_EnableAvPllClkout(clock_av_pll_t pll)#
Enable the CLKOUT output of an Audio or Video PLL.
Sets AUDIOPLL_CLKOUT_EN (or VIDEOPLL_CLKOUT_EN) in the selected PLL’s PLL1_REG. Every other bit of the register is preserved.
Note
This function does not poll a “ready” status bit.
Note
This function does not run PLL bring-up. Use CLOCK_InitAudioPll / CLOCK_InitVideoPll to bring the PLL up for the first time.
- Parameters:
pll – One of kCLOCK_AvPll_Audio or kCLOCK_AvPll_Video.
-
void CLOCK_DisableAvPllClkout(clock_av_pll_t pll)#
Disable the CLKOUT output of an Audio or Video PLL.
Clears AUDIOPLL_CLKOUT_EN (or VIDEOPLL_CLKOUT_EN) in the selected PLL’s PLL1_REG.
- Parameters:
pll – One of kCLOCK_AvPll_Audio or kCLOCK_AvPll_Video.
-
bool CLOCK_IsAvPllClkoutEnabled(clock_av_pll_t pll)#
Query whether the CLKOUT output of an Audio or Video PLL is enabled.
- Parameters:
pll – One of kCLOCK_AvPll_Audio or kCLOCK_AvPll_Video.
- Returns:
true if the CLKOUT_EN bit is currently 1.
- Returns:
false if it is 0 or
pllis out of range.
-
bool CLOCK_EnableUsbFsClock(clock_usb_fs_src_t src)#
Enable and select the USB FS (USBFS/KHCI) functional clock source.
Configures the USB FS SIE clock from the requested source. For PLL-based sources this powers up and locks the shared USB PHY PLL (480 MHz), which also ungates the USB PHY (COMM usb0) internally. The usb1_fclk clock root is expected to be pre-configured in clock_config.
For crystal-less operation (trimming an FRO from the USB frame timing), call CLOCK_EnableFroTuner with kCLOCK_FroTunerRefUsbFsSof1kHz as the reference source after this function.
- Parameters:
src – One of clock_usb_fs_src_t selecting the USB FS clocking path.
- Return values:
true – USB FS clock configured (PHY PLL locked for PLL-based sources).
false – The USB PHY PLL failed to lock (invalid reference/multiplier).
-
void CLOCK_DisableUsbFsClock(void)#
Disable the USB FS (USBFS/KHCI) functional clock.
Powers down the shared USB PHY PLL (which also gates the USB PHY, COMM usb0) and powers off the usb1_fclk clock root. Call this only after all USB HS consumers of the shared PHY PLL have been disabled.
-
bool CLOCK_EnableUsbHsClock(void)#
Enable and configure the USB HS (USBHS/EHCI) clocks.
Selects FRO48M on the usb0_fro48m root as the HS reference, powers up and locks the shared USB PHY PLL (480 MHz), then releases the USB HS controller from reset and issues the controller-level soft reset. The USB PHY (COMM usb0) is ungated inside CLOCK_EnableUsbPhyPllClock.
For crystal-less operation (trimming an FRO from the USB frame timing), call CLOCK_EnableFroTuner with kCLOCK_FroTunerRefUsbHsSof8kHz as the reference source after this function.
- Return values:
true – USB HS clocks configured and the PHY PLL locked.
false – The USB PHY PLL failed to lock; the controller is left in reset.
-
void CLOCK_DisableUsbHsClock(void)#
Disable the USB HS (USBHS/EHCI) clocks.
Reverses CLOCK_EnableUsbHsClock: powers down the shared USB PHY PLL (which also gates the USB PHY, COMM usb0) and powers off the usb0_fro48m clock root.
-
bool CLOCK_EnableUsbPhyPllClock(void)#
Power up and lock the USB PHY PLL (shared by USB FS and USB HS).
The single COMM USB PHY PLL produces the 480MHz output (and its /10 = 48MHz tap) that feeds both the USB HS PHY and the USB FS SIE (via the USBPLL_OUT / USBPLL_48M clock roots). The reference frequency is read internally from the usb0_phyclk clock root; the multiplier (480MHz / reference) must be one of the hardware-supported values (15, 16, 20, 22, 24, 25, 30, 40). This function blocks until the PLL reports lock.
- Return values:
true – USB PHY PLL powered up and locked.
false – The reference is zero or yields an unsupported multiplier.
-
void CLOCK_DisableUsbPhyPllClock(void)#
Power down the USB PHY PLL (shared by USB FS and USB HS).
Reverses CLOCK_EnableUsbPhyPllClock: gates the PHY clocks, stops the USB clock taps (the 480MHz output and its /10 = 48MHz tap), then powers down the PLL and its regulator. Call this only after all USB FS / USB HS consumers of the PLL have been disabled, as the PLL is shared between them.
-
void CLOCK_EnableFroTuner(clock_fro_tuner_target_t target, clock_fro_tuner_src_t src, uint16_t lockCriteria)#
Enable the FRO tuner (FLL) of the selected FRO against a reference source.
Configures and enables the CGUANA FLL that tunes either the 12 MHz FRO or the 192 MHz FRO (selected by
target) against the chosen reference window.Note
The selected reference source must already be running before the tuner is enabled. TUNE_EN is asserted last, after all configuration fields are programmed. Call CLOCK_DisableFroTuner to stop tuning.
Note
The FRO12M and FRO192M tuners share the reference-source selection (CKREF_SOURCE_SEL and SXOSC_FREF_SEL are common fields), so enabling one reprograms the reference selection for both. The two FROs can therefore only be tuned against the same reference source at the same time.
- Parameters:
target – Which FRO to tune, see clock_fro_tuner_target_t.
src – Which reference source tunes the FRO, see clock_fro_tuner_src_t.
lockCriteria – Number of consecutive in-window results required to declare lock (FROxxM_LOCK_CRITERIA field, 2 bits, range 0..3). A larger value is more robust to jitter but slower to lock; 2 is the typical default.
-
void CLOCK_DisableFroTuner(clock_fro_tuner_target_t target)#
Disable the FRO tuner (FLL) of the selected FRO.
Clears the selected FRO’s TUNE_EN to stop tuning; the other tuner configuration fields are left untouched so a subsequent CLOCK_EnableFroTuner can re-enable with the same or a new reference source.
- Parameters:
target – Which FRO tuner to disable, see clock_fro_tuner_target_t.
-
FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL#
Configure whether driver controls clock.
When set to 0, peripheral drivers will enable clock in initialize function and disable clock in de-initialize function. When set to 1, peripheral driver will not control the clock, application could control the clock out of the driver.
Note
All drivers share this feature switcher. If it is set to 1, application should handle clock enable and disable for all drivers.
-
SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY#
-
CMP_CLOCKS#
Clock gate name arrays.
Clock ip name array for ACMP.
-
LPADC_CLOCKS#
Clock ip name array for ADC.
-
SRAMC_CLOCKS#
Clock ip name array for SRAMC.
-
ASRC_CLOCKS#
Clock ip name array for ASRC.
-
AXBS_CLOCKS#
Clock ip name array for AXBS.
-
FLEXCAN_CLOCKS#
Clock ip name array for FLEXCAN.
-
CCM_CLOCKS#
Clock ip name array for CCM.
-
CRC_CLOCKS#
Clock ip name array for CRC.
-
CSI_CLOCKS#
Clock ip name array for CSI.
-
DCIF_CLOCKS#
Clock ip name array for DCIF.
-
DSI2_HOST_CLOCKS#
Clock ip name array for DSI2_HOST.
-
EDMA_CLOCKS#
Clock ip name array for EDMA, indexed to match EDMA_BASE_PTRS {MAIN__EDMA3, MAIN__EDMA5, AUDIO__EDMA3, WAKE__EDMA3}. Note the crossed MAIN gate naming per RM rev.1 Draft M Table 65 (ch.20.4 System clocks): gate main_edma0 (CGC_ROOT6) clocks MAIN_EDMA5, and gate main_edma1 (CGC_ROOT7) clocks MAIN_EDMA3. Verified on silicon: edma3/edma5 memory_to_memory examples bus-fault with the gates swapped and pass with this mapping.
-
ENET_CLOCKS#
Clock ip name array for ENET. Note the crossed gate naming per RM Table 65 (ch.20.4): gate comm_eth1 (CGC_ROOT2) clocks COMM_ENET, while gate comm_eth0 (CGC_ROOT1) clocks COMM_ENET_QOS.
-
ENETQOS_CLOCKS#
Clock ip name array for ENETQOS. Gate comm_eth0 (CGC_ROOT1) clocks COMM_ENET_QOS per RM Table 65 — see ENET_CLOCKS note.
-
QDC_CLOCKS#
Clock ip name array for QDC.
-
EWM_CLOCKS#
Clock ip name array for EWM.
-
FLEXIO_CLOCKS#
Clock ip name array for FLEXIO.
-
FLEXSPI_SLV_CLOCKS#
Clock ip name array for FLEXSPI.
-
FREQME_CLOCKS#
Clock ip name array for FREQME.
-
INPUTMUX_CLOCKS#
-
GPIO_CLOCKS#
Clock ip name array for GPIO, indexed to match GPIO_BASE_PTRS {HSP__GPIO_0..4, VBAT__GPIO, WAKE__GPIO} (7 entries). VBAT__GPIO has no LPCG (clocked directly from wake_clk per RM Table 65), so its slot is kCLOCK_IpInvalid.
-
SAI_CLOCKS#
Clock ip name array for SAI.
-
I3C_CLOCKS#
Clock ip name array for I3C.
-
ISI_CLOCKS#
Clock ip name array for ISI.
-
JPEGDEC_CLOCKS#
Clock ip name array for JPEGDEC.
-
LLC_CLOCKS#
Clock ip name array for LLC.
-
LPDAC_CLOCKS#
Clock ip name array for DAC.
-
LPI2C_CLOCKS#
Clock ip name array for LPI2C.
-
LPIT_CLOCKS#
Clock ip name array for LPIT.
-
LPSPI_CLOCKS#
Clock ip name array for LPSPI.
-
LPTMR_CLOCKS#
Clock ip name array for LPTMR.
-
LPUART_CLOCKS#
Clock ip name array for LPUART.
-
MMU_CLOCKS#
Clock ip name array for MMU.
-
MODCON_CLOCKS#
Clock ip name array for MODCON.
-
NIC_CLOCKS#
Clock ip name array for NIC.
-
NPU_CORE_CLOCKS#
Clock ip name array for NPU.
-
NPU_MEM_CLOCKS#
Clock ip name array for NPU.
-
PDCON_CLOCKS#
Clock ip name array for PDCON.
-
PDM_CLOCKS#
Clock ip name array for PDM.
-
PMU_CLOCKS#
Clock ip name array for PMU.
-
PWM_CLOCKS#
Clock ip name array for PWM.
-
REFORMATTER_CLOCKS#
Clock ip name array for REFORMATTER.
-
RESETCON_CLOCKS#
Clock ip name array for RESETCON.
-
ROMCP_CLOCKS#
Clock ip name array for ROMCP.
-
RTC_CLOCKS#
Clock ip name array for RTC.
-
SINC_CLOCKS#
Clock ip name array for SINC.
-
SPDIF_CLOCKS#
Clock ip name array for SPDIF.
-
SRAM_CTRL_CLOCKS#
Clock ip name array for SRAM.
-
STM_CLOCKS#
Clock ip name array for STM.
-
SWT_CLOCKS#
Clock ip name array for SWT.
-
TENBASET_PHY_CLOCKS#
Clock ip name array for TENBASET.
-
TINGPU_CLOCKS#
Clock ip name array for TINGPU.
-
TMR_CLOCKS#
Clock ip name array for TMR.
-
TPM_CLOCKS#
Clock ip name array for TPM.
-
TRDC_CLOCKS#
Clock ip name array for TRDC.
-
CMPT_TRDC_CLOCKS#
Clock ip name array for CMPT.
-
TRGSYNC_CLOCKS#
Clock ip name array for TRGSYNC.
-
USB_CLOCKS#
Clock ip name array for USB.
-
USDHC_CLOCKS#
Clock ip name array for USDHC.
-
XBAR_CLOCKS#
Clock ip name array for XBARs.
-
XSPI_CLOCKS#
Clock ip name array for XSPI.
-
kCLOCK_Ewm0#
-
clock_ip_name_t#
-
struct _clock_root_config_t#
Public Members
-
uint8_t mux#
See clock_root_mux_source_t for details.
-
uint8_t div#
it’s the actual divider
-
uint8_t sndDiv#
Second divider, if applicable
-
uint8_t mux#
-
struct _clock_cguana_sscg_config#
- #include <fsl_clock.h>
Spread-spectrum (SSCG) configuration, shared by frac PLLs and AV PLLs.
-
struct _clock_cguana_sxosc_config#
- #include <fsl_clock.h>
SXOSC crystal oscillator configuration.
Public Members
-
clock_cguana_sxosc_mode_t modeSel#
Oscillator operating mode
-
uint8_t gmSel#
Oscillator GM selection [2:0]
-
uint8_t xtal1CapTrim#
XTAL1 pad capacitor trim [5:0]
-
uint8_t xtal2CapTrim#
XTAL2 pad capacitor trim [5:0]
-
uint8_t detTrim#
Level detector trim [1:0]
-
bool clkDiv2En#
Enable divide-by-2 on output clock
-
clock_cguana_sxosc_mode_t modeSel#
-
struct _clock_cguana_fro192m_config#
- #include <fsl_clock.h>
FRO 192 MHz configuration.
Public Members
-
clock_cguana_fro192m_otwb_t otwb#
Target frequency band selection
-
clock_cguana_fro192m_otwb_t otwb#
-
struct _clock_cguana_fro12m_config#
- #include <fsl_clock.h>
FRO 12 MHz configuration.
Public Members
-
clock_cguana_fro12m_otwb_t otwb#
Target frequency band selection
-
clock_cguana_fro12m_otwb_t otwb#
-
struct _clock_cguana_core_pll_config#
- #include <fsl_clock.h>
Core PLL configuration.
Public Members
-
clock_cguana_pll_start_mode_t startMode#
Calibration/start mode
-
bool vcoSelHf#
false=LF VCO (600-858 MHz), true=HF VCO (858-1200 MHz)
-
clock_cguana_ref_freq_t refFreq#
Reference clock frequency
-
uint8_t loopDivNint#
Integer feedback division ratio [6:0]
-
bool postDivBy2#
false=600-1200 MHz output, true=300-600 MHz output
-
clock_cguana_pll_start_mode_t startMode#
-
struct _clock_cguana_frac_div_config#
- #include <fsl_clock.h>
Fractional output divider configuration for Main/Sys PLL.
-
struct _clock_cguana_frac_pll_config#
- #include <fsl_clock.h>
Main/System PLL (fractional-N) configuration.
Public Members
-
clock_cguana_pll_start_mode_t startMode#
Calibration/start mode
-
clock_cguana_ref_freq_t refFreq#
Reference clock frequency
-
clock_cguana_frac_pll_vco_freq_t lowFreq#
VCO frequency selection
-
bool div5En#
Enable divide-by-5 output
-
bool div8En#
Enable divide-by-8 output
-
bool div10En#
Enable divide-by-10 output
-
bool div20En#
Enable divide-by-20 output
-
clock_cguana_frac_div_config_t fracDiv[3]#
Three programmable fractional divider outputs
-
bool sscgEn#
Enable spread-spectrum clock generation
-
const clock_cguana_sscg_config_t *sscg#
SSCG config (may be NULL when sscgEn is false)
-
clock_cguana_pll_start_mode_t startMode#
-
struct _clock_cguana_avpll_config#
- #include <fsl_clock.h>
Audio/Video PLL (AV PLL) configuration.
The AV PLL VCO frequency is determined by: F_VCO = F_REF * DNUM / 2^24 (DNUM is 30-bit, upper 6 bits are integer part) Output frequency: F_OUT = F_VCO / postDivRatio
Public Members
-
clock_cguana_pll_start_mode_t startMode#
Calibration/start mode
-
clock_cguana_ref_freq_t refFreq#
Reference clock frequency
-
uint8_t ccoBandSel#
CCO_FREQ_BAND_SEL [2:0] for VCO band
-
uint8_t postDivRatio#
POSTDIV_DIVRATIO_SEL [6:0], minimum value 8
-
uint32_t dnum#
30-bit DNUM value [29:0]; F_VCO = F_REF * dnum / 2^24
-
bool sscgEn#
Enable SSCG
-
const clock_cguana_sscg_config_t *sscg#
SSCG config (may be NULL when sscgEn is false)
-
clock_cguana_pll_start_mode_t startMode#
CRC: Cyclic Redundancy Check Driver#
-
FSL_CRC_DRIVER_VERSION#
CRC driver version. Version 2.1.0.
Current version: 2.1.0
Change log:
Version 2.1.0
Choosing CRC clocks from CRC clock array according to instance instead of hardcoded value.
Version 2.0.5
Fix CERT-C issue with boolean-to-unsigned integer conversion.
Version 2.0.4
Release peripheral from reset if necessary in init function.
Version 2.0.3
Fix MISRA issues
Version 2.0.2
Fix MISRA issues
Version 2.0.1
move DATA and DATALL macro definition from header file to source file
-
enum _crc_bits#
CRC bit width.
Values:
-
enumerator kCrcBits16#
Generate 16-bit CRC code
-
enumerator kCrcBits32#
Generate 32-bit CRC code
-
enumerator kCrcBits16#
-
enum _crc_result#
CRC result type.
Values:
-
enumerator kCrcFinalChecksum#
CRC data register read value is the final checksum. Reflect out and final xor protocol features are applied.
-
enumerator kCrcIntermediateChecksum#
CRC data register read value is intermediate checksum (raw value). Reflect out and final xor protocol feature are not applied. Intermediate checksum can be used as a seed for CRC_Init() to continue adding data to this checksum.
-
enumerator kCrcFinalChecksum#
-
typedef enum _crc_result crc_result_t#
CRC result type.
-
typedef struct _crc_config crc_config_t#
CRC protocol configuration.
This structure holds the configuration for the CRC protocol.
-
void CRC_Init(CRC_Type *base, const crc_config_t *config)#
Enables and configures the CRC peripheral module.
This function enables the clock gate in the SIM module for the CRC peripheral. It also configures the CRC module and starts a checksum computation by writing the seed.
- Parameters:
base – CRC peripheral address.
config – CRC module configuration structure.
-
void CRC_Deinit(CRC_Type *base)#
Disables the CRC peripheral module.
This function disables the clock gate in the SIM module for the CRC peripheral.
- Parameters:
base – CRC peripheral address.
-
void CRC_GetDefaultConfig(crc_config_t *config)#
Loads default values to the CRC protocol configuration structure.
Loads default values to the CRC protocol configuration structure. The default values are as follows.
config->polynomial = 0x1021; config->seed = 0xFFFF; config->reflectIn = false; config->reflectOut = false; config->complementChecksum = false; config->crcBits = kCrcBits16; config->crcResult = kCrcFinalChecksum;
- Parameters:
config – CRC protocol configuration structure.
-
void CRC_WriteData(CRC_Type *base, const uint8_t *data, size_t dataSize)#
Writes data to the CRC module.
Writes input data buffer bytes to the CRC data register. The configured type of transpose is applied.
- Parameters:
base – CRC peripheral address.
data – Input data stream, MSByte in data[0].
dataSize – Size in bytes of the input data buffer.
-
uint32_t CRC_Get32bitResult(CRC_Type *base)#
Reads the 32-bit checksum from the CRC module.
Reads the CRC data register (either an intermediate or the final checksum). The configured type of transpose and complement is applied.
- Parameters:
base – CRC peripheral address.
- Returns:
An intermediate or the final 32-bit checksum, after configured transpose and complement operations.
-
uint16_t CRC_Get16bitResult(CRC_Type *base)#
Reads a 16-bit checksum from the CRC module.
Reads the CRC data register (either an intermediate or the final checksum). The configured type of transpose and complement is applied.
- Parameters:
base – CRC peripheral address.
- Returns:
An intermediate or the final 16-bit checksum, after configured transpose and complement operations.
-
CRC_DRIVER_USE_CRC16_CCIT_FALSE_AS_DEFAULT#
Default configuration structure filled by CRC_GetDefaultConfig(). Use CRC16-CCIT-FALSE as defeault.
-
struct _crc_config#
- #include <fsl_crc.h>
CRC protocol configuration.
This structure holds the configuration for the CRC protocol.
Public Members
-
uint32_t polynomial#
CRC Polynomial, MSBit first. Example polynomial: 0x1021 = 1_0000_0010_0001 = x^12+x^5+1
-
uint32_t seed#
Starting checksum value
-
bool reflectIn#
Reflect bits on input.
-
bool reflectOut#
Reflect bits on output.
-
bool complementChecksum#
True if the result shall be complement of the actual checksum.
-
crc_bits_t crcBits#
Selects 16- or 32- bit CRC protocol.
-
crc_result_t crcResult#
Selects final or intermediate checksum return from CRC_Get16bitResult() or CRC_Get32bitResult()
-
uint32_t polynomial#
MIPI CSI2 RX: MIPI CSI2 RX RAMBUS Driver#
CSI: CMOS Sensor Interface#
-
status_t CSI_Init(CSI_Type *base, const csi_config_t *config)#
Initialize the CSI.
This function enables the CSI peripheral clock, and resets the CSI registers.
- Parameters:
base – CSI peripheral base address.
config – Pointer to the configuration structure.
- Return values:
kStatus_Success – Initialize successfully.
kStatus_InvalidArgument – Initialize failed because of invalid argument.
-
void CSI_Deinit(CSI_Type *base)#
De-initialize the CSI.
This function disables the CSI peripheral clock.
- Parameters:
base – CSI peripheral base address.
-
void CSI_Reset(CSI_Type *base)#
Reset the CSI.
This function resets the CSI peripheral registers to default status.
- Parameters:
base – CSI peripheral base address.
-
void CSI_GetDefaultConfig(csi_config_t *config)#
Get the default configuration for to initialize the CSI.
The default configuration value is:
config->width = 320U; config->height = 240U; config->polarityFlags = kCSI_HsyncActiveHigh | kCSI_DataLatchOnRisingEdge; config->bytesPerPixel = 2U; config->linePitch_Bytes = 320U * 2U; config->workMode = kCSI_GatedClockMode; config->dataBus = kCSI_DataBus8Bit; config->useExtVsync = true;
- Parameters:
config – Pointer to the CSI configuration.
-
void CSI_ClearFifo(CSI_Type *base, csi_fifo_t fifo)#
Clear the CSI FIFO.
This function clears the CSI FIFO.
- Parameters:
base – CSI peripheral base address.
fifo – The FIFO to clear.
-
void CSI_ReflashFifoDma(CSI_Type *base, csi_fifo_t fifo)#
Reflash the CSI FIFO DMA.
This function reflashes the CSI FIFO DMA.
For RXFIFO, there are two frame buffers. When the CSI module started, it saves the frames to frame buffer 0 then frame buffer 1, the two buffers will be written by turns. After reflash DMA using this function, the CSI is reset to save frame to buffer 0.
- Parameters:
base – CSI peripheral base address.
fifo – The FIFO DMA to reflash.
-
void CSI_EnableFifoDmaRequest(CSI_Type *base, csi_fifo_t fifo, bool enable)#
Enable or disable the CSI FIFO DMA request.
- Parameters:
base – CSI peripheral base address.
fifo – The FIFO DMA reques to enable or disable.
enable – True to enable, false to disable.
-
static inline void CSI_Start(CSI_Type *base)#
Start to receive data.
- Parameters:
base – CSI peripheral base address.
-
static inline void CSI_Stop(CSI_Type *base)#
Stop to receiving data.
- Parameters:
base – CSI peripheral base address.
-
void CSI_SetRxBufferAddr(CSI_Type *base, uint8_t index, uint32_t addr)#
Set the RX frame buffer address.
- Parameters:
base – CSI peripheral base address.
index – Buffer index.
addr – Frame buffer address to set.
-
void CSI_EnableInterrupts(CSI_Type *base, uint32_t mask)#
Enables CSI interrupt requests.
- Parameters:
base – CSI peripheral base address.
mask – The interrupts to enable, pass in as OR’ed value of _csi_interrupt_enable.
-
void CSI_DisableInterrupts(CSI_Type *base, uint32_t mask)#
Disable CSI interrupt requests.
- Parameters:
base – CSI peripheral base address.
mask – The interrupts to disable, pass in as OR’ed value of _csi_interrupt_enable.
-
static inline uint32_t CSI_GetStatusFlags(CSI_Type *base)#
Gets the CSI status flags.
- Parameters:
base – CSI peripheral base address.
- Returns:
status flag, it is OR’ed value of _csi_flags.
-
static inline void CSI_ClearStatusFlags(CSI_Type *base, uint32_t statusMask)#
Clears the CSI status flag.
The flags to clear are passed in as OR’ed value of _csi_flags. The following flags are cleared automatically by hardware:
- Parameters:
base – CSI peripheral base address.
statusMask – The status flags mask, OR’ed value of _csi_flags.
-
status_t CSI_TransferCreateHandle(CSI_Type *base, csi_handle_t *handle, csi_transfer_callback_t callback, void *userData)#
Initializes the CSI handle.
This function initializes CSI handle, it should be called before any other CSI transactional functions.
- Parameters:
base – CSI peripheral base address.
handle – Pointer to the handle structure.
callback – Callback function for CSI transfer.
userData – Callback function parameter.
- Return values:
kStatus_Success – Handle created successfully.
-
status_t CSI_TransferStart(CSI_Type *base, csi_handle_t *handle)#
Start the transfer using transactional functions.
When the empty frame buffers have been submit to CSI driver using function CSI_TransferSubmitEmptyBuffer, user could call this function to start the transfer. The incoming frame will be saved to the empty frame buffer, and user could be optionally notified through callback function.
- Parameters:
base – CSI peripheral base address.
handle – Pointer to the handle structure.
- Return values:
kStatus_Success – Started successfully.
kStatus_CSI_NoEmptyBuffer – Could not start because no empty frame buffer in queue.
-
status_t CSI_TransferStop(CSI_Type *base, csi_handle_t *handle)#
Stop the transfer using transactional functions.
The driver does not clean the full frame buffers in queue. In other words, after calling this function, user still could get the full frame buffers in queue using function CSI_TransferGetFullBuffer.
- Parameters:
base – CSI peripheral base address.
handle – Pointer to the handle structure.
- Return values:
kStatus_Success – Stoped successfully.
-
status_t CSI_TransferSubmitEmptyBuffer(CSI_Type *base, csi_handle_t *handle, uint32_t frameBuffer)#
Submit empty frame buffer to queue.
This function could be called before CSI_TransferStart or after CSI_TransferStart. If there is no room in queue to store the empty frame buffer, this function returns error.
Note
This function and CSI_TransferGetFullBuffer are safe to call from main-loop code, an RTOS task or a non-CSI ISR (for example, a display callback). Both APIs mask the CSI FB1/FB2 DMA-done sources in CR1 for the duration of the queue update and issue a Data Synchronization Barrier so the peripheral observes the masked state before the queue is touched.
- Parameters:
base – CSI peripheral base address.
handle – Pointer to the handle structure.
frameBuffer – Empty frame buffer to submit.
- Return values:
kStatus_Success – Started successfully.
kStatus_CSI_QueueFull – Could not submit because there is no room in queue.
-
status_t CSI_TransferGetFullBuffer(CSI_Type *base, csi_handle_t *handle, uint32_t *frameBuffer)#
Get one full frame buffer from queue.
After the transfer started using function CSI_TransferStart, the incoming frames will be saved to the empty frame buffers in queue. This function gets the full-filled frame buffer from the queue. If there is no full frame buffer in queue, this function returns error.
- Parameters:
base – CSI peripheral base address.
handle – Pointer to the handle structure.
frameBuffer – Full frame buffer.
- Return values:
kStatus_Success – Started successfully.
kStatus_CSI_NoFullBuffer – There is no full frame buffer in queue.
-
void CSI_TransferHandleIRQ(CSI_Type *base, csi_handle_t *handle)#
CSI IRQ handle function.
This function handles the CSI IRQ request to work with CSI driver transactional APIs.
- Parameters:
base – CSI peripheral base address.
handle – CSI handle pointer.
-
FSL_CSI_DRIVER_VERSION#
Error codes for the CSI driver.
Values:
-
enumerator kStatus_CSI_NoEmptyBuffer#
No empty frame buffer in queue to load to CSI.
-
enumerator kStatus_CSI_NoFullBuffer#
No full frame buffer in queue to read out.
-
enumerator kStatus_CSI_QueueFull#
Queue is full, no room to save new empty buffer.
-
enumerator kStatus_CSI_FrameDone#
New frame received and saved to queue.
-
enumerator kStatus_CSI_NoEmptyBuffer#
-
enum _csi_work_mode#
CSI work mode.
The CCIR656 interlace mode is not supported currently.
Values:
-
enumerator kCSI_GatedClockMode#
HSYNC, VSYNC, and PIXCLK signals are used.
-
enumerator kCSI_NonGatedClockMode#
VSYNC, and PIXCLK signals are used.
-
enumerator kCSI_CCIR656ProgressiveMode#
CCIR656 progressive mode.
-
enumerator kCSI_GatedClockMode#
-
enum _csi_data_bus#
CSI data bus witdh.
Values:
-
enumerator kCSI_DataBus8Bit#
8-bit data bus.
-
enumerator kCSI_DataBus16Bit#
16-bit data bus.
-
enumerator kCSI_DataBus24Bit#
24-bit data bus.
-
enumerator kCSI_DataBus8Bit#
-
enum _csi_polarity_flags#
CSI signal polarity.
Values:
-
enumerator kCSI_HsyncActiveLow#
HSYNC is active low.
-
enumerator kCSI_HsyncActiveHigh#
HSYNC is active high.
-
enumerator kCSI_DataLatchOnRisingEdge#
Pixel data latched at rising edge of pixel clock.
-
enumerator kCSI_DataLatchOnFallingEdge#
Pixel data latched at falling edge of pixel clock.
-
enumerator kCSI_VsyncActiveHigh#
VSYNC is active high.
-
enumerator kCSI_VsyncActiveLow#
VSYNC is active low.
-
enumerator kCSI_HsyncActiveLow#
-
enum _csi_fifo#
The CSI FIFO, used for FIFO operation.
Values:
-
enumerator kCSI_RxFifo#
RXFIFO.
-
enumerator kCSI_StatFifo#
STAT FIFO.
-
enumerator kCSI_AllFifo#
Both RXFIFO and STAT FIFO.
-
enumerator kCSI_RxFifo#
-
enum _csi_interrupt_enable#
CSI feature interrupt source.
Values:
-
enumerator kCSI_EndOfFrameInterruptEnable#
End of frame interrupt enable.
-
enumerator kCSI_ChangeOfFieldInterruptEnable#
Change of field interrupt enable.
-
enumerator kCSI_StatFifoOverrunInterruptEnable#
STAT FIFO overrun interrupt enable.
-
enumerator kCSI_RxFifoOverrunInterruptEnable#
RXFIFO overrun interrupt enable.
-
enumerator kCSI_StatFifoDmaDoneInterruptEnable#
STAT FIFO DMA done interrupt enable.
-
enumerator kCSI_StatFifoFullInterruptEnable#
STAT FIFO full interrupt enable.
-
enumerator kCSI_RxBuffer1DmaDoneInterruptEnable#
RX frame buffer 1 DMA transfer done.
-
enumerator kCSI_RxBuffer0DmaDoneInterruptEnable#
RX frame buffer 0 DMA transfer done.
-
enumerator kCSI_RxFifoFullInterruptEnable#
RXFIFO full interrupt enable.
-
enumerator kCSI_StartOfFrameInterruptEnable#
Start of frame (SOF) interrupt enable.
-
enumerator kCSI_EccErrorInterruptEnable#
ECC error detection interrupt enable.
-
enumerator kCSI_AhbResErrorInterruptEnable#
AHB response Error interrupt enable.
-
enumerator kCSI_BaseAddrChangeErrorInterruptEnable#
The DMA output buffer base address changes before DMA completed.
-
enumerator kCSI_Field0DoneInterruptEnable#
Field 0 done interrupt enable.
-
enumerator kCSI_Field1DoneInterruptEnable#
Field 1 done interrupt enable.
-
enumerator kCSI_EndOfFrameInterruptEnable#
-
enum _csi_flags#
CSI status flags.
The following status register flags can be cleared:
kCSI_EccErrorFlag
kCSI_AhbResErrorFlag
kCSI_ChangeOfFieldFlag
kCSI_StartOfFrameFlag
kCSI_EndOfFrameFlag
kCSI_RxBuffer1DmaDoneFlag
kCSI_RxBuffer0DmaDoneFlag
kCSI_StatFifoDmaDoneFlag
kCSI_StatFifoOverrunFlag
kCSI_RxFifoOverrunFlag
kCSI_Field0DoneFlag
kCSI_Field1DoneFlag
kCSI_BaseAddrChangeErrorFlag
Values:
-
enumerator kCSI_RxFifoDataReadyFlag#
RXFIFO data ready.
-
enumerator kCSI_EccErrorFlag#
ECC error detected.
-
enumerator kCSI_AhbResErrorFlag#
Hresponse (AHB bus response) Error.
-
enumerator kCSI_ChangeOfFieldFlag#
Change of field.
-
enumerator kCSI_Field0PresentFlag#
Field 0 present in CCIR mode.
-
enumerator kCSI_Field1PresentFlag#
Field 1 present in CCIR mode.
-
enumerator kCSI_StartOfFrameFlag#
Start of frame (SOF) detected.
-
enumerator kCSI_EndOfFrameFlag#
End of frame (EOF) detected.
-
enumerator kCSI_RxFifoFullFlag#
RXFIFO full (Number of data reaches trigger level).
-
enumerator kCSI_RxBuffer1DmaDoneFlag#
RX frame buffer 1 DMA transfer done.
-
enumerator kCSI_RxBuffer0DmaDoneFlag#
RX frame buffer 0 DMA transfer done.
-
enumerator kCSI_StatFifoFullFlag#
STAT FIFO full (Reach trigger level).
-
enumerator kCSI_StatFifoDmaDoneFlag#
STAT FIFO DMA transfer done.
-
enumerator kCSI_StatFifoOverrunFlag#
STAT FIFO overrun.
-
enumerator kCSI_RxFifoOverrunFlag#
RXFIFO overrun.
-
enumerator kCSI_Field0DoneFlag#
Field 0 transfer done.
-
enumerator kCSI_Field1DoneFlag#
Field 1 transfer done.
-
enumerator kCSI_BaseAddrChangeErrorFlag#
The DMA output buffer base address changes before DMA completed.
-
typedef enum _csi_work_mode csi_work_mode_t#
CSI work mode.
The CCIR656 interlace mode is not supported currently.
-
typedef enum _csi_data_bus csi_data_bus_t#
CSI data bus witdh.
-
typedef struct _csi_config csi_config_t#
Configuration to initialize the CSI module.
-
typedef struct _csi_handle csi_handle_t#
-
typedef void (*csi_transfer_callback_t)(CSI_Type *base, csi_handle_t *handle, status_t status, void *userData)#
CSI transfer callback function.
When a new frame is received and saved to the frame buffer queue, the callback is called and the pass the status kStatus_CSI_FrameDone to upper layer.
-
CSI_REG_CR1(base)#
-
CSI_REG_CR2(base)#
-
CSI_REG_CR3(base)#
-
CSI_REG_CR18(base)#
-
CSI_REG_SR(base)#
-
CSI_REG_DMASA_FB1(base)#
-
CSI_REG_DMASA_FB2(base)#
-
CSI_REG_IMAG_PARA(base)#
-
CSI_REG_FBUF_PARA(base)#
-
CSI_DRIVER_QUEUE_SIZE#
Size of the frame buffer queue used in CSI transactional function.
-
CSI_DRIVER_FRAG_MODE#
Enable fragment capture function or not.
-
CSI_CR1_INT_EN_MASK#
-
CSI_CR3_INT_EN_MASK#
-
CSI_CR18_INT_EN_MASK#
-
struct _csi_config#
- #include <fsl_csi.h>
Configuration to initialize the CSI module.
Public Members
-
uint16_t width#
Pixels of the input frame.
-
uint16_t height#
Lines of the input frame.
-
uint32_t polarityFlags#
Timing signal polarity flags, OR’ed value of _csi_polarity_flags.
-
uint8_t bytesPerPixel#
Bytes per pixel, valid values are:
2: Used for RGB565, YUV422, and so on.
4: Used for XRGB8888, XYUV444, and so on.
-
uint16_t linePitch_Bytes#
Frame buffer line pitch, must be 8-byte aligned.
-
csi_work_mode_t workMode#
CSI work mode.
-
csi_data_bus_t dataBus#
Data bus width.
-
bool useExtVsync#
In CCIR656 progressive mode, set true to use external VSYNC signal, set false to use internal VSYNC signal decoded from SOF.
-
uint16_t width#
-
struct buf_queue_t#
-
struct _csi_handle#
- #include <fsl_csi.h>
CSI handle structure.
Please see the user guide for the details of the CSI driver queue mechanism.
Public Members
-
volatile uint8_t activeBufferNum#
How many frame buffers are in progress currently.
-
volatile uint8_t dmaDoneBufferIdx#
Index of the current full-filled framebuffer.
-
volatile bool transferStarted#
User has called CSI_TransferStart to start frame receiving.
-
csi_transfer_callback_t callback#
Callback function.
-
void *userData#
CSI callback function parameter.
-
volatile uint8_t activeBufferNum#
DAC: Digital-to-Analog Converter Driver#
-
void DAC_Init(LPDAC_Type *base, const dac_config_t *config)#
Initialize the DAC module with common configuartion.
The clock will be enabled in this function.
- Parameters:
base – DAC peripheral base address.
config – Pointer to configuration structure.
-
void DAC_GetDefaultConfig(dac_config_t *config)#
Get the default settings for initialization’s configuration.
This function initializes the user configuration structure to a default value. The default values are:
config->fifoWatermarkLevel = 0U; config->fifoTriggerMode = kDAC_FIFOTriggerByHardwareMode; config->fifoWorkMode = kDAC_FIFODisabled; config->enableLowPowerMode = false; config->referenceVoltageSource = kDAC_ReferenceVoltageSourceAlt1;
- Parameters:
config – Pointer to configuration structure.
-
void DAC_Deinit(LPDAC_Type *base)#
De-initialize the DAC module.
The clock will be disabled in this function.
- Parameters:
base – DAC peripheral base address.
-
static inline void DAC_SetReset(LPDAC_Type *base, uint32_t mask)#
Assert the reset control to part hardware.
This function is to assert the reset control to part hardware. Responding part hardware would remain reset untill cleared by software.
- Parameters:
base – DAC peripheral base address.
mask – The reset control mask, see to _dac_reset_control_t.
-
static inline void DAC_ClearReset(LPDAC_Type *base, uint32_t mask)#
Clear the reset control to part hardware.
This function is to clear the reset control to part hardware. Responding part hardware would work after the reset control is cleared by software.
- Parameters:
base – DAC peripheral base address.
mask – The reset control mask, see to _dac_reset_control_t.
-
static inline void DAC_Enable(LPDAC_Type *base, bool enable)#
Enable the DAC hardware system or not.
This function is to start the Programmable Reference Generator operation or not.
- Parameters:
base – DAC peripheral base address.
enable – Assertion of indicated event.
-
static inline void DAC_EnableInterrupts(LPDAC_Type *base, uint32_t mask)#
Enable the interrupts.
- Parameters:
base – DAC peripheral base address.
mask – Mask value of indicated interrupt events. See to _dac_interrupt_enable.
-
static inline void DAC_DisableInterrupts(LPDAC_Type *base, uint32_t mask)#
Disable the interrupts.
- Parameters:
base – DAC peripheral base address.
mask – Mask value of indicated interrupt events. See to _dac_interrupt_enable.
-
static inline void DAC_EnableDMA(LPDAC_Type *base, uint32_t mask, bool enable)#
Enable the DMA switchers or not.
- Parameters:
base – DAC peripheral base address.
mask – Mask value of indicated DMA requeset. See to _dac_dma_enable.
enable – Enable the DMA or not.
-
static inline uint32_t DAC_GetStatusFlags(LPDAC_Type *base)#
Get status flags of DAC module.
- Parameters:
base – DAC peripheral base address.
- Returns:
Mask value of status flags. See to _dac_status_flags.
-
static inline void DAC_ClearStatusFlags(LPDAC_Type *base, uint32_t flags)#
Clear status flags of DAC module.
- Parameters:
base – DAC peripheral base address.
flags – Mask value of status flags to be cleared. See to _dac_status_flags.
-
static inline void DAC_SetData(LPDAC_Type *base, uint32_t value)#
Set data into the entry of FIFO buffer.
- Parameters:
base – DAC peripheral base address.
value – Setting value into FIFO buffer.
-
static inline uint32_t DAC_GetFIFOWritePointer(LPDAC_Type *base)#
Get the value of the FIFO write pointer.
- Parameters:
base – DAC peripheral base address.
- Returns:
Current value of the FIFO write pointer.
-
static inline uint32_t DAC_GetFIFOReadPointer(LPDAC_Type *base)#
Get the value of the FIFO read pointer.
- Parameters:
base – DAC peripheral base address.
- Returns:
Current value of the FIFO read pointer.
-
static inline void DAC_DoSoftwareTriggerFIFO(LPDAC_Type *base)#
Do software trigger to FIFO when in software mode.
- Parameters:
base – DAC peripheral base address.
-
FSL_DAC_DRIVER_VERSION#
DAC driver version 2.2.0.
DAC reset control.
Values:
-
enumerator kDAC_ResetFIFO#
Resets the FIFO pointers and flags.
-
enumerator kDAC_ResetLogic#
Resets all DAC registers and internal logic.
-
enumerator kDAC_ResetFIFO#
DAC interrupts.
Values:
-
enumerator kDAC_FIFOFullInterruptEnable#
FIFO full interrupt enable.
-
enumerator kDAC_FIFOEmptyInterruptEnable#
FIFO empty interrupt enable.
-
enumerator kDAC_FIFOWatermarkInterruptEnable#
FIFO watermark interrupt enable.
-
enumerator kDAC_SwingBackInterruptEnable#
Swing back one cycle complete interrupt enable.
-
enumerator kDAC_FIFOOverflowInterruptEnable#
FIFO overflow interrupt enable.
-
enumerator kDAC_FIFOUnderflowInterruptEnable#
FIFO underflow interrupt enable.
-
enumerator kDAC_PeriodTriggerCompleteInterruptEnable#
Period trigger mode conversion complete interrupt enable
-
enumerator kDAC_FIFOFullInterruptEnable#
DAC DMA switchers.
Values:
-
enumerator kDAC_FIFOEmptyDMAEnable#
FIFO empty DMA enable.
-
enumerator kDAC_FIFOWatermarkDMAEnable#
FIFO watermark DMA enable.
-
enumerator kDAC_FIFOEmptyDMAEnable#
DAC status flags.
Values:
-
enumerator kDAC_FIFOUnderflowFlag#
This flag means that there is a new trigger after the buffer is empty. The FIFO read pointer will not increase in this case and the data sent to DAC analog conversion will not changed. This flag is cleared by writing a 1 to it.
-
enumerator kDAC_FIFOOverflowFlag#
This flag indicates that data is intended to write into FIFO after the buffer is full. The writer pointer will not increase in this case. The extra data will not be written into the FIFO. This flag is cleared by writing a 1 to it.
-
enumerator kDAC_FIFOSwingBackFlag#
This flag indicates that the DAC has completed one period of conversion in swing back mode. It means that the read pointer has increased to the top (write pointer) once and then decreased to zero once. For example, after three data is written to FIFO, the writer pointer is now 3. Then, if continually triggered, the read pointer will swing like: 0-1-2-1-0-1-2-, and so on. After the fourth trigger, the flag is set. This flag is cleared by writing a 1 to it.
-
enumerator kDAC_FIFOWatermarkFlag#
This field is set if the remaining data in FIFO is less than or equal to the setting value of wartermark. By writing data into FIFO by DMA or CPU, this flag is cleared automatically when the data in FIFO is more than the setting value of watermark.
-
enumerator kDAC_FIFOEmptyFlag#
FIFO empty flag.
-
enumerator kDAC_FIFOFullFlag#
FIFO full flag.
-
enumerator kDAC_PeriodTriggerCompleteFlag#
Period trigger mode conversion complete flag.
-
enumerator kDAC_FIFOUnderflowFlag#
-
enum _dac_fifo_trigger_mode#
DAC FIFO trigger mode.
Values:
-
enumerator kDAC_FIFOTriggerByHardwareMode#
Buffer would be triggered by hardware.
-
enumerator kDAC_FIFOTriggerBySoftwareMode#
Buffer would be triggered by software.
-
enumerator kDAC_FIFOTriggerByHardwareMode#
-
enum _dac_fifo_work_mode#
DAC FIFO work mode.
Values:
-
enumerator kDAC_FIFODisabled#
FIFO mode is disabled and buffer mode is enabled. Any data written to DATA[DATA] goes to buffer then goes to conversion.
-
enumerator kDAC_FIFOWorkAsNormalMode#
FIFO mode is enabled. Data will be first read from FIFO to buffer then goes to conversion.
-
enumerator kDAC_FIFOWorkAsSwingMode#
In swing mode, the read pointer swings between the writer pointer and zero. That is, the trigger increases the read pointer till reach the writer pointer and decreases the read pointer till zero, and so on. The FIFO empty/full/watermark flag will not update during swing back mode.
-
enumerator kDAC_FIFOWorkAsPeriodTriggerMode#
In periodic trigger mode, user only needs to send the first trigger. Then after every [PTG_PERIOD+1] RCLK cycles, DAC will be automatically triggered by internal trigger. There will be [PTG_NUM] internal triggers, thus in total [PTG_NUM+1] conversions including the first trigger sent by user. User can terminate the current conversion queue by clearing the GCR[PTGEN] bit. Then, after the current conversion is completed, the conversion is terminated and the PTGCOCO flag is set. If PCR[PTG_NUM] is set to zero, there will be infinite triggers following the first hardware/software trigger, until the GCR[PTGEN] is cleared by software. In any case, the conversion can be terminated by FIFORST/SWRST.
-
enumerator kDAC_FIFOWorkAsPeriodTriggerAndSwingMode#
Periodically trigger DAC and swing back.
-
enumerator kDAC_FIFODisabled#
-
enum _dac_reference_voltage_source#
DAC reference voltage source.
Values:
-
enumerator kDAC_ReferenceVoltageSourceAlt1#
The DAC selects VREFH_INT as the reference voltage.
-
enumerator kDAC_ReferenceVoltageSourceAlt2#
The DAC selects VREFH_EXT as the reference voltage.
-
enumerator kDAC_ReferenceVoltageSourceAlt1#
-
enum _dac_reference_current_source#
Values:
-
enumerator kDAC_ReferenceCurrentSourcePtat#
-
enumerator kDAC_ReferenceCurrentSourceInternal#
-
enumerator kDAC_ReferenceCurrentSourceZtc#
-
enumerator kDAC_ReferenceCurrentSourcePtat#
-
enum _dac_reference_current_trim#
Values:
-
enumerator kDAC_ReferenceCurrentTrimMinus25Percent#
Internal current value -25%.
-
enumerator kDAC_ReferenceCurrentTrimMinus125Percent#
Internal current value -12.5%.
-
enumerator kDAC_ReferenceCurrentTrimTypical#
Typical internal current value.
-
enumerator kDAC_ReferenceCurrentTrimPlus125Percent#
Internal current value +12.5%.
-
enumerator kDAC_ReferenceCurrentTrimPlus25Percent#
Internal current value +25%.
-
enumerator kDAC_ReferenceCurrentTrimMinus25Percent#
-
typedef enum _dac_fifo_trigger_mode dac_fifo_trigger_mode_t#
DAC FIFO trigger mode.
-
typedef enum _dac_fifo_work_mode dac_fifo_work_mode_t#
DAC FIFO work mode.
-
typedef enum _dac_reference_voltage_source dac_reference_voltage_source_t#
DAC reference voltage source.
-
typedef enum _dac_reference_current_source dac_reference_current_source_t#
-
typedef enum _dac_reference_current_trim dac_reference_current_trim_t#
-
typedef struct _dac_config dac_config_t#
DAC configuration structure.
-
struct _dac_config#
- #include <fsl_dac.h>
DAC configuration structure.
Public Members
-
uint32_t fifoWatermarkLevel#
FIFO’s watermark, the max value can be the hardware FIFO size.
-
dac_fifo_trigger_mode_t fifoTriggerMode#
Select the trigger mode for FIFO.
-
dac_fifo_work_mode_t fifoWorkMode#
Select the work mode for FIFO.
-
bool enableOpampBuffer#
Opamp is used as buffer.
-
bool enableAnalogOutputBufferBypass#
Bypass the DAC analog output buffer.
-
bool enableLowerLowPowerMode#
Enable the lower low power mode.
-
uint32_t periodicTriggerNumber#
There will be ‘periodicTriggerNumber’ internal triggers following the first hardware/software trigger. So there will be ‘periodicTriggerNumber + 1’ conversions in total. If set to zero, there will be infinite triggers following the first hw/sw trigger, until the GCR[PTGEN] is cleared.
-
uint32_t periodicTriggerWidth#
Control the periodic trigger frequency. There will be ‘periodicTriggerWidth + 1’ RCLK cycles between each periodic trigger. The periodic trigger frequency should be configured to not larger than the analog conversion speed.
-
dac_reference_current_source_t referenceCurrentSource#
Select the internal reference current source.
-
dac_reference_current_trim_t referenceCurrentTrim#
Select the internal reference current trim.
-
dac_reference_voltage_source_t referenceVoltageSource#
Select the reference voltage source.
-
uint32_t fifoWatermarkLevel#
DCIF: Display control Interface#
-
void DCIF_Init(DCIF_Type *base)#
Initialize the DCIF.
This function initializes the DCIF to prepare it to work.
- Parameters:
base – DCIF peripheral base address.
-
void DCIF_Deinit(DCIF_Type *base)#
De-initialize the DCIF.
This function disables the DCIF peripheral clock.
- Parameters:
base – DCIF peripheral base address.
-
void DCIF_SetOutputConfig(DCIF_Type *base, const dcif_output_config_t *config)#
Set the DCIF output configuration.
Set the output configuration of frame size, output interface.
- Parameters:
base – DCIF peripheral base address.
config – Pointer to the configuration structure.
-
static inline void DCIF_EnableOutput(DCIF_Type *base, bool enable)#
-
void DCIF_Reset(DCIF_Type *base)#
Reset the DCIF module.
- Parameters:
base – DCIF peripheral base address.
-
void DCIF_SetLayerPosition(DCIF_Type *base, uint8_t layer, int32_t topLeftX, int32_t topLeftY, uint16_t width, uint16_t height)#
Configure the layer position.
- Parameters:
base – DCIF peripheral base address.
layer – Layer index.
topLeftX – The x value of thr top-left coordinate.
topLeftY – The y value of thr top-left coordinate.
width – The width of the layer.
height – The height of the layer.
-
status_t DCIF_SetLayerConfig(DCIF_Type *base, uint8_t layer, const dcif_layer_config_t *config)#
Set the DCIF layer configuration.
- Parameters:
base – DCIF peripheral base address.
layer – Layer index.
config – Pointer to the configuration structure.
- Return values:
kStatus_Success – Successfully get the configuration.
kStatus_InvalidArgument – The blend mode not supported.
-
static inline void DCIF_EnableLayer(DCIF_Type *base, uint8_t layer, bool enable)#
-
static inline void DCIF_DisableLayer(DCIF_Type *base, uint8_t layer)#
-
status_t DCIF_GetPorterDuffConfig(dcif_layer_porter_duff_blend_mode_t mode, dcif_layer_alpha_blend_config_t *config)#
Get the alpha blend configuration by porter duff blend mode.
- Parameters:
mode – The blend mode.
config – Pointer to the configuration.
- Return values:
kStatus_Success – Successfully get the configuration.
kStatus_InvalidArgument – The blend mode not supported.
-
void DCIF_SetLayerAlphaBlendConfig(DCIF_Type *base, uint8_t layer, const dcif_layer_alpha_blend_config_t *config)#
Set the DCIF layer alpha blend configuration.
- Parameters:
base – DCIF peripheral base address.
layer – Layer index.
config – Pointer to the configuration structure.
-
static inline void DCIF_SetLayerStride(DCIF_Type *base, uint8_t layer, uint32_t strideBytes)#
-
static inline void DCIF_SetLayerAddr(DCIF_Type *base, uint8_t layer, uint32_t address)#
-
static inline void DCIF_SetLayerUVAddr(DCIF_Type *base, uint8_t layer, uint32_t address)#
-
static inline void DCIF_SetBackGroundLayerColor(DCIF_Type *base, uint32_t backGroundColor)#
Set the color for back ground layer.
- Parameters:
base – DCIF peripheral base address.
backGroundColor – Pixel value of the background color.
-
static inline void DCIF_TriggerLayerShadowLoad(DCIF_Type *base, uint8_t layer)#
Trigger the layer configuration shadow load.
The new layer configurations are written to the shadow registers first, When all configurations written finished, call this function, then shadowed control registers are updated to the active control registers on VSYNC of next frame.
- Parameters:
base – DCIF peripheral base address.
layer – Layer layerIndex.
-
void DCIF_SetGammaData(DCIF_Type *base, uint32_t mask, uint8_t startIndex, const uint32_t *gamma, uint16_t gammaLen)#
Set the gamma correction value to the gamma table.
- Parameters:
base – DCIF peripheral base address.
mask – The mask of red/green/blue table access, OR’d value of _dcif_gamma_access.
startIndex – Start index in the gamma table that the value will be set to.
gamma – The gamma values to set to the gamma table.
gammaLen – The length of the gamma table data.
-
static inline void DCIF_EnableGamma(DCIF_Type *base, bool enable)#
Enables the gamma correction.
- Parameters:
base – DCIF peripheral base address.
enable – True to enable, false to disable.
-
void DCIF_ClutGetDefaultConfig(dcif_clut_config_t *config)#
Get the default configuration for CLUT.
The default configuration value is:
config->clutSelect[0] = kDCIF_Clut0; config->clutSelect[1] = kDCIF_Clut1;
- Parameters:
config – Pointer to the DCIF CLUT configuration.
-
void DCIF_ClutSetConfig(DCIF_Type *base, const dcif_clut_config_t *config)#
Set the color look up table configuration.
This function must be called before DCIF_SetLayerConfig if the input pixel format isIndex.
- Parameters:
base – DCIF peripheral base address.
config – The CLUT configuration.
-
void DCIF_ClutSetData(DCIF_Type *base, uint8_t startIndex, const uint32_t *clut, uint8_t clutLen)#
Set the CLUT value.
- Parameters:
base – DCIF peripheral base address.
startIndex – Start index in the CLUT that the value will be set to.
clut – The LUT values to set to the CLUT table.
clutLen – The length of the CLUT table data.
-
void DCIF_SetCscMode(DCIF_Type *base, uint8_t layerIndex, dcif_csc_mode_t mode)#
Set the color space conversion mode.
Supports YUV2RGB and YCbCr2RGB. This must be called before DCIF_SetLayerConfig if the layer pixel format is YUV.
- Parameters:
base – DCIF peripheral base address.
layerIndex – Index of the layer.
mode – The conversion mode.
-
void DCIF_EnableInterrupts(DCIF_Type *base, uint8_t domain, uint32_t mask)#
Enables DCIF interrupt requests.
- Parameters:
base – DCIF peripheral base address.
domain – CPU domain the interrupt signal routed to.
mask – interrupt source, OR’ed value of _dcif_interrupt.
-
void DCIF_DisableInterrupts(DCIF_Type *base, uint8_t domain, uint32_t mask)#
Disables DCIF interrupt requests.
- Parameters:
base – DCIF peripheral base address.
domain – CPU domain the interrupt signal routed to.
mask – interrupt source, OR’ed value of _dcif_interrupt.
-
uint32_t DCIF_GetInterruptStatus(DCIF_Type *base, uint8_t domain)#
Get DCIF interrupt peding status.
- Parameters:
base – DCIF peripheral base address.
domain – CPU domain the interrupt signal routed to.
- Returns:
Interrupt pending status, OR’ed value of _dcif_interrupt.
-
void DCIF_ClearInterruptStatus(DCIF_Type *base, uint8_t domain, uint32_t mask)#
Clear DCIF interrupt peding status.
- Parameters:
base – DCIF peripheral base address.
domain – CPU domain the interrupt signal routed to.
mask – of the flags to clear, OR’ed value of _dcif_interrupt.
-
void DCIF_EnableLayerInterrupts(DCIF_Type *base, uint8_t domain, uint8_t layer, uint32_t mask)#
Enables DCIF layer interrupt requests.
- Parameters:
base – DCIF peripheral base address.
domain – CPU domain the interrupt signal routed to.
mask – interrupt source, OR’ed value of _dcif_layer_interrupt.
-
void DCIF_DisableLayerInterrupts(DCIF_Type *base, uint8_t domain, uint8_t layer, uint32_t mask)#
Disables DCIF layer interrupt requests.
- Parameters:
base – DCIF peripheral base address.
domain – CPU domain the interrupt signal routed to.
mask – interrupt source, OR’ed value of _dcif_layer_interrupt.
-
uint32_t DCIF_GetLayerInterruptStatus(DCIF_Type *base, uint8_t domain, uint8_t layer)#
Get DCIF layer interrupt peding status.
- Parameters:
base – DCIF peripheral base address.
domain – CPU domain the interrupt signal routed to.
- Returns:
Interrupt pending status, OR’ed value of _dcif_layer_interrupt.
-
void DCIF_ClearLayerInterruptStatus(DCIF_Type *base, uint8_t domain, uint8_t layer, uint32_t mask)#
Clear DCIF layer interrupt peding status.
- Parameters:
base – DCIF peripheral base address.
domain – CPU domain the interrupt signal routed to.
mask – of the flags to clear, OR’ed value of _dcif_layer_interrupt.
-
void DCIF_PdiGetDefaultConfig(dcif_pdi_config_t *config)#
Get the default configuration for DCIF PDI input.
The default configuration value is:
config->enable = false; config->skipFirstFrame = false; config->vsyncControl = false; config->vsyncDelay_pclk = 0; config->vsyncTimeout_hsync = 0; config->polarityFlags = kDCIF_PdiVsyncActiveLow | kDCIF_PdiDriveDataOnFallingClkEdge; config->format = kDCIF_PdiRGB888; config->layer = kDCIF_PdiLayer0;
- Parameters:
config – Pointer to the DCIF PDI configuration.
-
void DCIF_PdiSetConfig(DCIF_Type *base, const dcif_pdi_config_t *config)#
Configure the DCIF PDI input.
- Parameters:
base – DCIF peripheral base address.
config – Pointer to the configuration structure.
-
void DCIF_FbdGetDefaultConfig(dcif_fbd_config_t *config)#
Get the default configuration for DCIF FBD input.
The default configuration value is:
config->enable = false; config->format = kDCIF_FbdRGBA16; config->layer = kDCIF_FbdLayer0;
param config Pointer to the DCIF PDI configuration.
-
void DCIF_FbdSetConfig(DCIF_Type *base, const dcif_fbd_config_t *config)#
Configure the DCIF FBD input.
- Parameters:
base – DCIF peripheral base address.
config – Pointer to the configuration structure.
-
void DCIF_DpiGetDefaultConfig(dcif_dpi_config_t *config)#
Get the default configuration for DPI interface.
The default configuration value is:
config->hsw = 0; config->hfp = 0; config->hbp = 0; config->vsw = 0; config->vfp = 0; config->vbp = 0; config->polarityFlags = kDCIF_HsyncActiveLow | kDCIF_VsyncActiveLow | kDCIF_DriveDataOnFallingClkEdge; config->format = kDCIF_DpiRGB565; config->displayMode = kDCIF_DpiNormal; config->frameFetch = kDCIF_DpiVfpBegin; config->txFifoFill = kDCIF_DpiVfpBegin; config->enableBackground = true;
- Parameters:
config – Pointer to the DCIF configuration.
-
void DCIF_DpiSetConfig(DCIF_Type *base, const dcif_dpi_config_t *config)#
Set the configuration for DCIF DPI interface.
This function configures the DCIF DPI interface.
- Parameters:
base – DCIF peripheral base address.
config – Pointer to the configuration structure.
-
void DCIF_DbiGetDefaultConfig(dcif_dbi_config_t *config)#
Get the default configuration to initialize the DCIF DBI interface.
The default configuration value is:
config->format = kDCIF_DbiOutD16RGB565; config->type = kDCIF_DbiTypeB; config->signalFlags = kDCIF_DbiTeEnable; config->rdHigh = 0U; config->rdLow = 0U; config->wrHigh = 0U; config->wrLow = 0U; config->csSetup = 0U; config->csHold = 0U;
- Parameters:
config – Pointer to the DCIF DBI configuration.
-
void DCIF_DbiSetConfig(DCIF_Type *base, const dcif_dbi_config_t *config)#
Set the configuration for DCIF DBI mode.
This function configures the DCIF DBI interface.
- Parameters:
base – DCIF peripheral base address.
config – Pointer to the configuration structure.
-
void DCIF_DbiWriteCommand(DCIF_Type *base, uint8_t cmd)#
Send command to DBI port.
- Parameters:
base – DCIF peripheral base address.
cmd – the DBI command to send.
-
void DCIF_DbiWriteParam(DCIF_Type *base, const uint8_t *data, uint32_t dataLen_Byte)#
Write parameter to DBI port.
- Parameters:
base – DCIF peripheral base address.
data – pointer to data buffer.
dataLen_Byte – data buffer length in byte.
-
static inline void DCIF_DbiWritePixel(DCIF_Type *base)#
Trigger the send of pixel data in frame buffer to panel controller memory.
This function starts sending the pixel data in frame buffer to panel controller, user can monitor interrupt kDCIF_InterruptDbiCommandDone to know when then data sending finished.
- Parameters:
base – DCIF peripheral base address.
-
status_t DCIF_DbiReadParam(DCIF_Type *base, const uint8_t *data, uint32_t dataLen_Byte)#
Read command followed by data to DBI port.
- Parameters:
base – DCIF peripheral base address.
data – pointer to data buffer.
dataLen_Byte – data buffer length in byte.
- Return values:
kStatus_Success – Successfully received parameters.
kStatus_Timeout – Timeout occurs while waiting completion.
-
void DCIF_DcsPktSetConfig(DCIF_Type *base, const dcif_dcs_pkt_config_t *config)#
Set the configuration for DCIF DCS packet interface.
This function configures the DCIF DCS packet interface.
- Parameters:
base – DCIF peripheral base address.
config – Pointer to the configuration structure.
-
void DCIF_DcsPktUpdateArea(DCIF_Type *base, uint16_t startX, uint16_t startY, uint16_t endX, uint16_t endY)#
brief Select the update area and send the pixels using DCS packet interface.
- Parameters:
base – DCIF peripheral base address.
startX – X coordinate for start pixel.
startY – Y coordinate for start pixel.
endX – X coordinate for end pixel.
endY – Y coordinate for end pixel.
-
static inline void DCIF_DcsPktTransferStart(DCIF_Type *base)#
Start the DCS packet transfer pixel data.
- Parameters:
base – DCIF peripheral base address.
-
FSL_DCIF_DRIVER_VERSION#
-
enum _dcif_csc_mode#
DCIF color space conversion mode.
Values:
-
enumerator kDCIF_CscDisable#
Disable the CSC.
-
enumerator kDCIF_CscYUV2RGB#
YUV to RGB.
-
enumerator kDCIF_CscYCbCr2RGB#
YCbCr to RGB.
-
enumerator kDCIF_CscDisable#
-
enum _dcif_interrupt#
DCIF interrupts and status flags.
Values:
-
enumerator kDCIF_InterruptVsync#
Indicate that the vertical synchronization phase.
-
enumerator kDCIF_InterruptOutputUnderflow#
Output buffer underflow.
-
enumerator kDCIF_InterruptVbp#
Indicate vertical blanking period.
-
enumerator kDCIF_InterruptPdiOverflow#
PDI buffer overflow condition.
-
enumerator kDCIF_InterruptPdiVsyncTimeout#
PDI VSYNC detection timeout.
-
enumerator kDCIF_InterruptDbiCommandDone#
DBI command finish.
-
enumerator kDCIF_InterruptTxPacketDone#
TX packet interface command finish.
-
enumerator kDCIF_InterruptTxPacketTimeout#
TX packet interface command execution timeout.
-
enumerator kDCIF_InterruptVsync#
-
enum _dcif_layer_interrupt#
DCIF interrupts and status flags for each layer.
Values:
-
enumerator kDCIF_InterruptLayerFifoPanic#
Layer FIFO is panic when the pixel blending.
-
enumerator kDCIF_InterruptLayerFetchError#
Layer has read error on AXI interface.
-
enumerator kDCIF_InterruptLayerFetchDone#
Layer has fetched the last pixel from memory.
-
enumerator kDCIF_InterruptLayerFifoUnderflow#
Layer FIFO in the pixel blending underflowed.
-
enumerator kDCIF_InterruptLayerFifoPanic#
-
enum _dcif_gamma_access#
DCIF gamma correction table access mask.
Values:
-
enumerator kDCIF_GammaAccessBluetable#
Enable write/read access to gamma correction blue table.
-
enumerator kDCIF_GammaAccessGreentable#
Enable write/read access to gamma correction green table.
-
enumerator kDCIF_GammaAccessRedtable#
Enable write/read access to gamma correction red table.
-
enumerator kDCIF_GammaAccessBluetable#
-
enum _dcif_clut#
DCIF CLUTs.
Values:
-
enumerator kDCIF_Clut0#
CLUT 0.
-
enumerator kDCIF_Clut1#
CLUT 1.
-
enumerator kDCIF_Clut0#
-
enum _dcif_pdi_format#
DCIF PDI input pixel format.
Values:
-
enumerator kDCIF_PdiRGB888#
24bps RGB888.
-
enumerator kDCIF_PdiRGB666#
18bps RGB666. XXXXXXRR_RRRRGGGG_GGBBBBBB.
-
enumerator kDCIF_PdiRGB565#
16bps RGB565. RRRRRGGG_GGGBBBBB.
-
enumerator kDCIF_PdiRGB444#
12bps RGB444. XXXXRRRR_GGGGBBBB.
-
enumerator kDCIF_PdiRGB555#
15bps RGB555. XRRRRRGG_GGGBBBBB.
-
enumerator kDCIF_PdiYCbCr422#
24bps YCbCr422.
-
enumerator kDCIF_PdiRGB888#
-
enum _dcif_pdi_layer_select#
DCIF PDI input layer select.
Values:
-
enumerator kDCIF_PdiLayer0#
Select layer 0 for PDI input.
-
enumerator kDCIF_PdiLayer1#
Select layer 1 for PDI input.
-
enumerator kDCIF_PdiLayer0#
-
enum _dcif_pdi_polarity_flags#
DCIF PDI signal polarity flags.
Values:
-
enumerator kDCIF_PdiVsyncActiveLow#
VSYNC active low.
-
enumerator kDCIF_PdiDataEnableActiveLow#
Data enable line active low.
-
enumerator kDCIF_PdiDriveDataOnFallingClkEdge#
Pixel data is launched on the PCLK falling edge.
-
enumerator kDCIF_PdiVsyncActiveLow#
-
enum _dcif_fbd_format#
DCIF FBD input pixel format.
Values:
-
enumerator kDCIF_FbdRGBA16#
16bps RGBA.
-
enumerator kDCIF_FbdRGB12#
12bps RGB.
-
enumerator kDCIF_FbdRGBA13#
13bps RGBA.
-
enumerator kDCIF_FbdRGB10#
10bps RGB.
-
enumerator kDCIF_FbdRGBA11#
11bps RGBA.
-
enumerator kDCIF_FbdRGB8#
8bps RGB.
-
enumerator kDCIF_FbdRGBA16#
-
enum _dcif_fbd_layer_select#
DCIF FBD input layer select.
Values:
-
enumerator kDCIF_FbdLayer0#
Select layer 0 for FBD input.
-
enumerator kDCIF_FbdLayer1#
Select layer 1 for FBD input.
-
enumerator kDCIF_FbdLayer0#
-
enum _dcif_dpi_polarity_flags#
DCIF DPI signal polarity flags.
Values:
-
enumerator kDCIF_DpiHsyncActiveHigh#
HSYNC active high.
-
enumerator kDCIF_DpiHsyncActiveLow#
HSYNC active low.
-
enumerator kDCIF_DpiVsyncActiveHigh#
VSYNC active high.
-
enumerator kDCIF_DpiVsyncActiveLow#
VSYNC active low.
-
enumerator kDCIF_DpiDataEnableActiveHigh#
Data enable line active high.
-
enumerator kDCIF_DpiDataEnableActiveLow#
Data enable line active low.
-
enumerator kDCIF_DpiDriveDataOnRisingClkEdge#
Pixel data is launched on the PCLK rising edge.
-
enumerator kDCIF_DpiDriveDataOnFallingClkEdge#
Pixel data is launched on the PCLK falling edge.
-
enumerator kDCIF_DpiPixelDataInvert#
Invert each bit of output pixel data.
-
enumerator kDCIF_DpiHsyncActiveHigh#
-
enum _dcif_dpi_display_mode#
DCIF DPI display mode.
Values:
-
enumerator kDCIF_DpiNormal#
Normal display mode.
-
enumerator kDCIF_DpiTestBackground#
Display background color only.
-
enumerator kDCIF_DpiTestColorBarColumn#
Display color bar column test pattern.
-
enumerator kDCIF_DpiTestColorBarRow#
Display color bar row test pattern.
-
enumerator kDCIF_DpiNormal#
-
enum _dcif_dpi_fifo_option#
When to fetch/fill the async tx FIFO.
Values:
-
enumerator kDCIF_DpiVfpBegin#
Fetch/fill starts as soon as vfp begins.
-
enumerator kDCIF_DpiVswBegin#
Fetch/fill starts as soon as vsw begins.
-
enumerator kDCIF_DpiVbpBegin#
Fetch/fill starts as soon as vbp begins.
-
enumerator kDCIF_DpiVbpEnd#
Fetch/fill starts as soon as vbp ends.
-
enumerator kDCIF_DpiVfpBegin#
-
enum _dcif_dpi_output_format#
DCIF DPI output format.
Values:
-
enumerator kDCIF_DpiRGB888#
24-bit.
-
enumerator kDCIF_DpiRBG888#
24-bit.
-
enumerator kDCIF_DpiGBR888#
24-bit.
-
enumerator kDCIF_DpiGRB888#
24-bit.
-
enumerator kDCIF_DpiBRG888#
24-bit.
-
enumerator kDCIF_DpiBGR888#
24-bit.
-
enumerator kDCIF_DpiRGB555#
15-bit. XRRRRRGG_GGGBBBBB.
-
enumerator kDCIF_DpiRGB565#
16-bit configuration 1. RRRRRGGG_GGGBBBBB.
-
enumerator kDCIF_DpiRGB666#
18-bit. XXXXXXRR_RRRRGGGG_GGBBBBBB.
-
enumerator kDCIF_DpiRGB888#
-
enum _dcif_dbi_out_format#
DCIF DBI output format.
Values:
-
enumerator kDCIF_DbiOutD8RGB332#
8-bit data bus width, pixel RGB332. For type A or B. 1 pixel sent in 1 cycle.
-
enumerator kDCIF_DbiOutD16RGB332#
16-bit data bus width, pixel RGB332. For type A or B. 2 pixels sent in 1 cycle.
-
enumerator kDCIF_DbiOutD8RGB444#
8-bit data bus width, pixel RGB444. For type A or B. 2 pixels sent in 3 cycles.
-
enumerator kDCIF_DbiOutD16RGB444#
16-bit data bus width, pixel RGB444. For type A or B. 1 pixel sent in 1 cycle, data bus 4 MSB not used.
-
enumerator kDCIF_DbiOutD8RGB565#
8-bit data bus width, pixel RGB565. For type A or B. 1 pixel sent in 2 cycles.
-
enumerator kDCIF_DbiOutD16RGB565#
16-bit data bus width, pixel RGB565. For type A or B. 1 pixel sent in 1 cycle.
-
enumerator kDCIF_DbiOutD8RGB666#
8-bit data bus width, pixel RGB666. For type A or B. 1 pixel sent in 3 cycles, data bus 2 LSB not used.
-
enumerator kDCIF_DbiOutD9RGB666#
9-bit data bus width, pixel RGB666. For type A or B. 1 pixel sent in 2 cycles.
-
enumerator kDCIF_DbiOutD16RGB666Option1#
16-bit data bus width, pixel RGB666. For type A or B. 2 pixels sent in 3 cycles.
-
enumerator kDCIF_DbiOutD16RGB666Option2#
16-bit data bus width, pixel RGB666. For type A or B. 1 pixel sent in 2 cycles.
-
enumerator kDCIF_DbiOutD8RGB888#
8-bit data bus width, pixel RGB888. For type A or B. 1 pixel sent in 3 cycles.
-
enumerator kDCIF_DbiOutD16RGB888Option1#
16-bit data bus width, pixel RGB888. For type A or B. 2 pixels sent in 3 cycles.
-
enumerator kDCIF_DbiOutD16RGB888Option2#
16-bit data bus width, pixel RGB888. For type A or B. 1 pixel sent in 2 cycles.
-
enumerator kDCIF_DbiOutD8RGB332#
-
enum _dcif_dbi_type#
DCIF DBI type.
Values:
-
enumerator kDCIF_DbiTypeA_ClockedE#
Selects DBI Type A Clocked E mode, 68000, Motorola mode.
-
enumerator kDCIF_DbiTypeA_FixedE#
Selects DBI type A fixed E mode, 68000, Motorola mode.
-
enumerator kDCIF_DbiTypeB#
Selects DBI type B, 8080, Intel mode.
-
enumerator kDCIF_DbiTypeA_ClockedE#
-
enum _dcif_dbi_cmd_type#
DCIF DBI command type.
Values:
-
enumerator kDCIF_DbiCmdReadParam#
Start read parameter.
-
enumerator kDCIF_DbiCmdWriteCommand#
Send address (or command).
-
enumerator kDCIF_DbiCmdWriteParam#
Send data(parameter).
-
enumerator kDCIF_DbiCmdWritePixel#
Start write memory(pixel data)
-
enumerator kDCIF_DbiCmdReadParam#
-
enum _dcif_dbi_signal_flags#
DCIF DBI signal flags.
Values:
-
enumerator kDCIF_DbiTeEnable#
Enable TE signal.
-
enumerator kDCIF_DbiCsxLow#
Force CSX signal to be low.
-
enumerator kDCIF_DbiTeEnable#
-
enum _dcif_dcs_pkt_out_format#
DCIF DCS packet output format.
Values:
-
enumerator kDCIF_DcsPktOutRGB565Ls#
-
enumerator kDCIF_DcsPktOutRGB565Ms#
RGB565, LS byte first.
-
enumerator kDCIF_DcsPktOutBGR565Ls#
RGB565, MS byte first.
-
enumerator kDCIF_DcsPktOutBGR565Ms#
BGR565, LS byte first.
-
enumerator kDCIF_DcsPktOutRGB565Ls#
-
enum _dcif_dcs_pkt_cmd_type#
DCIF DCS packet command type.
Values:
-
enumerator kDCIF_DcsPktCmdWritePixel#
DCS command write pixel start/continue.
-
enumerator kDCIF_DcsPktCmdSetColWritePixel#
DCS command set column address, then write pixel start/continue.
-
enumerator kDCIF_DcsPktCmdSetPageWritePixel#
DCS command set page address, then write pixel start/continue.
-
enumerator kDCIF_DcsPktCmdSetColPageWritePixel#
DCS command set column and page address, then write pixel start/continue
-
enumerator kDCIF_DcsPktCmdWritePixel#
-
enum _dcif_layer_alpha_factor_mode#
Lyer alpha blend factor mode.
Values:
-
enumerator kDCIF_AlphaFactorOne#
Use 1 as the blending factor.
-
enumerator kDCIF_AlphaFactorZero#
Use 0 as the blending factor.
-
enumerator kDCIF_AlphaFactorStraight#
Use the modified alpha component(As’’ for source layer or Ad’’ for destination layer) as the blending factor.
-
enumerator kDCIF_AlphaFactorInversed#
Use the inversed alpha component(1-As’’ for source layer or 1-Ad’’ for destination layer) as the blending factor.
-
enumerator kDCIF_AlphaFactorOne#
-
enum _dcif_layer_global_alpha_mode#
Layer global alpha mode for alpha blend.
Values:
-
enumerator kDCIF_AlphaGlobal#
Use the global alpha instead.
-
enumerator kDCIF_AlphaLocal#
Use the alpha(or inversed alpha) component directly.
-
enumerator kDCIF_AlphaScaled#
Multiply the alpha(or inversed alpha) component by the global alpha.
-
enumerator kDCIF_AlphaGlobal#
-
enum _dcif_layer_alpha_mode#
Layer alpha blend alpha component mode.
Values:
-
enumerator kDCIF_AlphaStraight#
Use straight alpha, s0_alpha’ = s0_alpha.
-
enumerator kDCIF_AlphaInversed#
Use inversed alpha, s0_alpha’ = 0xFF - s0_alpha.
-
enumerator kDCIF_AlphaStraight#
-
enum _dcif_layer_alpha_color_mode#
Layer alpha blend color mode.
Values:
-
enumerator kDCIF_AlphaColorNoAlpha#
s0_pixel’ = s0_pixel.
-
enumerator kDCIF_AlphaColorWithAlpha#
s0_pixel’ = s0_pixel * s0_alpha”.
-
enumerator kDCIF_AlphaColorNoAlpha#
-
enum _dcif_layer_alpha_background_mode#
Layer alpha blend color mode.
Values:
-
enumerator kDCIF_AlphaBackgroundPorterDuff#
Layer covered by background is blended in porter-duff blend mode.
-
enumerator kDCIF_AlphaBackgroundNormal#
Layer covered by background is blended in normal blend mode.
-
enumerator kDCIF_AlphaBackgroundPorterDuff#
-
enum _dcif_layer_porter_duff_blend_mode#
DCIF Porter Duff blend mode. Note: don’t change the enum item value.
Values:
-
enumerator kDCIF_PorterDuffSrc#
Source Only
-
enumerator kDCIF_PorterDuffAtop#
Source Atop
-
enumerator kDCIF_PorterDuffOver#
Source Over
-
enumerator kDCIF_PorterDuffIn#
Source In.
-
enumerator kDCIF_PorterDuffOut#
Source Out.
-
enumerator kDCIF_PorterDuffDst#
Destination Only.
-
enumerator kDCIF_PorterDuffDstAtop#
Destination Atop.
-
enumerator kDCIF_PorterDuffDstOver#
Destination Over.
-
enumerator kDCIF_PorterDuffDstIn#
Destination In.
-
enumerator kDCIF_PorterDuffDstOut#
Destination Out.
-
enumerator kDCIF_PorterDuffPlus#
Clear.
-
enumerator kDCIF_PorterDuffXor#
XOR.
-
enumerator kDCIF_PorterDuffClear#
Clear.
-
enumerator kDCIF_PorterDuffMax#
-
enumerator kDCIF_PorterDuffSrc#
-
enum _dcif_layer_alpha_blend_mode#
Layer alpha blend mode.
Values:
-
enumerator kDCIF_AlphaBlendEmbedded#
Blend with pixel defined alpha value.
-
enumerator kDCIF_AlphaBlendOverride#
Blend with gobal alpha value, pixel defined alpha value is overridden.
-
enumerator kDCIF_AlphaBlendPorterDuff#
Blend with Porter-Duff enable.
-
enumerator kDCIF_AlphaBlendEmbedded#
-
enum _dcif_layer_format#
Layer input pixel format.
Values:
-
enumerator kDCIF_LayerPixelFormatIndex1BPP#
LUT index 1 bit.
-
enumerator kDCIF_LayerPixelFormatIndex2BPP#
LUT index 2 bit.
-
enumerator kDCIF_LayerPixelFormatIndex4BPP#
LUT index 4 bit.
-
enumerator kDCIF_LayerPixelFormatIndex8BPP#
LUT index 8 bit.
-
enumerator kDCIF_LayerPixelFormatRGB565#
RGB565, two pixels use 32 bits.
-
enumerator kDCIF_LayerPixelFormatARGB1555#
ARGB1555, two pixels use 32 bits.
-
enumerator kDCIF_LayerPixelFormatARGB4444#
ARGB4444, two pixels use 32 bits. If CSC is YUV->RGB the input order from high to low is Y1V0Y0U0, if CSC is YCbCr->RGB the order is Y1Cr0Y0Cb0, only layer 0 and layer 1 support this.
-
enumerator kDCIF_LayerPixelFormatYVYU#
If CSC is YUV->RGB the input order from high to low is Y1U0Y0V0, if CSC is YCbCr->RGB the order is Y1CB0Y0CR0, only layer 0 and layer 1 support this.
-
enumerator kDCIF_LayerPixelFormatYUYV#
If CSC is YUV->RGB the input order from high to low is V0Y1U0Y0, if CSC is YCbCr->RGB the order is Cr0Y1Cb0Y0, only layer 0 and layer 1 support this.
-
enumerator kDCIF_LayerPixelFormatVYUY#
If CSC is YUV->RGB the input order from high to low is U0Y1V0Y0, if CSC is YCbCr->RGB the order is Cb0Y1Cr0Y0, only layer 0 and layer 1 support this.
-
enumerator kDCIF_LayerPixelFormatUYVY#
-
enumerator kDCIF_LayerPixelFormatRGB888#
RGB888 packed, one pixel uses 24 bits.
-
enumerator kDCIF_LayerPixelFormatARGB8888#
ARGB8888 unpacked, one pixel uses 32 bits.
-
enumerator kDCIF_LayerPixelFormatABGR8888#
ABGR8888 unpacked, one pixel uses 32 bits.
-
enumerator kDCIF_LayerPixelFormatBGR888#
BGR888 unpacked, one pixel uses 24 bits. YUV420 2 planner format. Planner 1 is for Y component, 8-bit each. Planner 2 is for VU component, 8-bit each from high to low.
-
enumerator kDCIF_LayerPixelFormatNV12#
YUV420 2 planner format. Planner 1 is for Y component, 8-bit each. Planner 2 is for UV component, 8-bit each from high to low.
-
enumerator kDCIF_LayerPixelFormatNV21#
If CSC is YUV->RGB the input order from high to low is YUV, if CSC is YCbCr->RGB the order is YCbCr, only layer 0 and layer 1 support this.
-
enumerator kDCIF_LayerPixelFormatYUV#
If CSC is YUV->RGB the input order from high to low is YVU, if CSC is YCbCr->RGB the order is YCrCb, only layer 0 and layer 1 support this.
-
enumerator kDCIF_LayerPixelFormatYVU#
If CSC is YUV->RGB the input order from high to low is UVY, if CSC is YCbCr->RGB the order is CbCrY, only layer 0 and layer 1 support this.
-
enumerator kDCIF_LayerPixelFormatUVY#
If CSC is YUV->RGB the input order from high to low is VUY, if CSC is YCbCr->RGB the order is CrCbY, only layer 0 and layer 1 support this.
-
enumerator kDCIF_LayerPixelFormatVUY#
-
enumerator kDCIF_LayerPixelFormatIndex1BPP#
-
enum _dcif_output_interface#
DCIF output interface.
Values:
-
enumerator kDCIF_OutputDpi#
DPI interface.
-
enumerator kDCIF_OutputDbi#
DBI interface.
-
enumerator kDCIF_OutputDcsPkt#
DCS packet interface.
-
enumerator kDCIF_OutputDpi#
-
typedef enum _dcif_csc_mode dcif_csc_mode_t#
DCIF color space conversion mode.
-
typedef enum _dcif_clut dcif_clut_t#
DCIF CLUTs.
-
typedef struct _dcif_clut_config dcif_clut_config_t#
DCIF CLUT configuration.
-
typedef enum _dcif_pdi_format dcif_pdi_format_t#
DCIF PDI input pixel format.
-
typedef enum _dcif_pdi_layer_select dcif_pdi_layer_select_t#
DCIF PDI input layer select.
-
typedef struct _dcif_pdi_config dcif_pdi_config_t#
PDI(parallel data input) configuration.
-
typedef enum _dcif_fbd_format dcif_fbd_format_t#
DCIF FBD input pixel format.
-
typedef enum _dcif_fbd_layer_select dcif_fbd_layer_select_t#
DCIF FBD input layer select.
-
typedef struct _dcif_fbd_config dcif_fbd_config_t#
FBD(frame buffer decompression) configuration.
-
typedef enum _dcif_dpi_display_mode dcif_dpi_display_mode_t#
DCIF DPI display mode.
-
typedef enum _dcif_dpi_fifo_option dcif_dpi_fifo_option_t#
When to fetch/fill the async tx FIFO.
-
typedef enum _dcif_dpi_output_format dcif_dpi_output_format_t#
DCIF DPI output format.
-
typedef struct _dcif_dpi_config dcif_dpi_config_t#
Configuration for DCIF module to work in DPI mode.
-
typedef enum _dcif_dbi_out_format dcif_dbi_out_format_t#
DCIF DBI output format.
-
typedef enum _dcif_dbi_type dcif_dbi_type_t#
DCIF DBI type.
-
typedef enum _dcif_dbi_cmd_type dcif_dbi_cmd_type_t#
DCIF DBI command type.
-
typedef struct _dcif_dbi_config dcif_dbi_config_t#
Configuration for DCIF module to work in DBI mode.
-
typedef enum _dcif_dcs_pkt_out_format dcif_dcs_pkt_out_format_t#
DCIF DCS packet output format.
-
typedef enum _dcif_dcs_pkt_cmd_type dcif_dcs_pkt_cmd_type_t#
DCIF DCS packet command type.
-
typedef struct _dcif_dcs_pkt_config dcif_dcs_pkt_config_t#
DCIF module DCS packet mode configuration.
-
typedef enum _dcif_layer_alpha_factor_mode dcif_layer_alpha_factor_mode_t#
Lyer alpha blend factor mode.
-
typedef enum _dcif_layer_global_alpha_mode dcif_layer_global_alpha_mode_t#
Layer global alpha mode for alpha blend.
-
typedef enum _dcif_layer_alpha_mode dcif_layer_alpha_mode_t#
Layer alpha blend alpha component mode.
-
typedef enum _dcif_layer_alpha_color_mode dcif_layer_alpha_color_mode_t#
Layer alpha blend color mode.
-
typedef enum _dcif_layer_alpha_background_mode dcif_layer_alpha_background_mode_t#
Layer alpha blend color mode.
-
typedef enum _dcif_layer_porter_duff_blend_mode dcif_layer_porter_duff_blend_mode_t#
DCIF Porter Duff blend mode. Note: don’t change the enum item value.
-
typedef enum _dcif_layer_alpha_blend_mode dcif_layer_alpha_blend_mode_t#
Layer alpha blend mode.
-
typedef enum _dcif_layer_format dcif_layer_format_t#
Layer input pixel format.
-
typedef struct _dcif_layer_panic_config_t dcif_layer_panic_config_t#
DCIF module layer panic configuration.
-
typedef struct _dcif_layer_config_t dcif_layer_config_t#
DCIF module layer configuration for all 4 user configurable layers.
-
typedef enum _dcif_output_interface dcif_output_interface_t#
DCIF output interface.
-
typedef struct _dcif_output_config_t dcif_output_config_t#
DCIF module output configuration.
-
DCIF_DBI_CMD_TIMEOUT#
Max loops to wait for DBI command complete.
-
DCIF_FB_ALIGN#
The frame buffer and stide must be 16 byte aligned.
-
struct _dcif_clut_config#
- #include <fsl_dcif.h>
DCIF CLUT configuration.
Public Members
-
dcif_clut_t clutAccess#
Choose which CLUT is accessed by APB write.
-
uint8_t clut0Layer#
Choose layer CLUT0 is used for.
-
uint8_t clut1Layer#
Choose layer CLUT1 is used for.
-
dcif_clut_t clutAccess#
-
struct _dcif_pdi_config#
- #include <fsl_dcif.h>
PDI(parallel data input) configuration.
Public Members
-
bool enable#
Enable PDI.
-
bool skipFirstFrame#
Enable to skip the first frame when the VBP of CSI input is less thancv the DPI output.
-
bool vsyncControl#
Use the vsyncDelay_pclk to control DPI vsync signal directly.
-
uint32_t vsyncDelay_pclk#
The delay count of pixel clock cycles from PDI vsync signal to DPI vsync signal.
-
uint32_t vsyncTimeout_hsync#
The timeout count of hsync cycles to detect PDI vsync signal. Set to 0 to disable.
-
uint8_t polarityFlags#
OR’ed value of _dcif_pdi_polarity_flags, used to contol the signal polarity.
-
dcif_pdi_format_t format#
PDI input pixel format.
-
dcif_pdi_layer_select_t layer#
Which layer to use the PDI input.
-
bool enable#
-
struct _dcif_fbd_config#
- #include <fsl_dcif.h>
FBD(frame buffer decompression) configuration.
Public Members
-
bool enable#
Enable FBD.
-
dcif_fbd_format_t format#
FBD input pixel format.
-
dcif_fbd_layer_select_t layer#
Which layer to use the FBD input.
-
bool enable#
-
struct _dcif_dpi_config#
- #include <fsl_dcif.h>
Configuration for DCIF module to work in DPI mode.
Public Members
-
uint8_t hsw#
HSYNC pulse width.
-
uint8_t hfp#
Horizontal front porch.
-
uint8_t hbp#
Horizontal back porch.
-
uint8_t vsw#
VSYNC pulse width.
-
uint8_t vfp#
Vrtical front porch.
-
uint8_t vbp#
Vertical back porch.
-
uint8_t polarityFlags#
OR’ed value of _dcif_dpi_polarity_flags, used to contol the signal polarity.
-
dcif_dpi_output_format_t format#
DPI output format.
-
dcif_dpi_display_mode_t displayMode#
DPI display mode.
-
dcif_dpi_fifo_option_t frameFetch#
When to start fetching for new frame. Also decide the shadow registers load and async tx fifo clear time.
-
dcif_dpi_fifo_option_t txFifoFill#
When to start fill async tx FIFO.
-
bool enableBackground#
Enable background to display when all layers are disabled in normal display mode.
-
uint8_t hsw#
-
struct _dcif_dbi_config#
- #include <fsl_dcif.h>
Configuration for DCIF module to work in DBI mode.
Public Members
-
dcif_dbi_out_format_t format#
Output format.
-
dcif_dbi_type_t type#
DBI type.
-
uint8_t signalFlags#
Signal flags. See _dcif_dbi_signal_flags.
-
uint8_t rdHigh#
RDX signal high time in clock cycles.
-
uint8_t rdLow#
RDX signal low time in clock cycles.
-
uint8_t wrHigh#
WRX signal high time in clock cycles.
-
uint8_t wrLow#
WRX signal low time in clock cycles.
-
uint8_t csSetup#
CSX setup time in clock cycles.
-
uint8_t csHold#
CSX hold time in clock cycles.
-
dcif_dbi_out_format_t format#
-
struct _dcif_dcs_pkt_config#
- #include <fsl_dcif.h>
DCIF module DCS packet mode configuration.
Public Members
-
uint32_t __pad0__#
Reserved.
-
uint32_t virtualChannel#
Virtual channel number.
-
uint32_t useHighSpeed#
Interface transfer mode. Enable to use high speed, disable to use low power.
-
uint32_t enableTe#
Enable TE signal.
-
uint32_t format#
Output data format. See dcif_dcs_pkt_out_format_t.
-
uint32_t __pad1__#
Reserved. Set pkt_tx_cmd_req to deasserts after receiving command request and re-asserts after request completes. otherwise the pkt_tx_cmd_req asserts until all command requests are sent.
-
uint32_t cmdReqWait#
The DCS command and pixel byte count for each packet. If the toltal count exceeds the payloadByteCnt, then the payload will be split into n packets, payloadByteCnt bytes each packet except for the last one.
-
uint32_t fifoSendLevel#
The DCS command and data are sent until this amount of data is filled into the async Tx FIFO.
-
uint32_t timeout#
Timeout wait count for command execution. The counter adds 1 each 65536 AXI clock cycle. Set to 0 to disable timeout.
-
uint32_t __pad0__#
-
struct dcif_layer_alpha_blend_config_t#
- #include <fsl_dcif.h>
DCIF ;ayer input alpha blend configuration.
Public Members
-
uint32_t srcFactorMode#
Source layer factor mode, see dcif_layer_alpha_factor_mode_t.
-
uint32_t dstGlobalAlphaMode#
Destination layer global alpha mode, see dcif_layer_global_alpha_mode_t.
-
uint32_t dstAlphaMode#
Destination layer alpha mode, see dcif_layer_alpha_mode_t.
-
uint32_t dstColorMode#
Destination layer (or PS, s0) color mode, see dcif_layer_alpha_color_mode_t.
-
uint32_t __pad0__#
Reserved.
-
uint32_t dstFactorMode#
Destination layer factor mode, see dcif_layer_alpha_factor_mode_t.
-
uint32_t srcGlobalAlphaMode#
Source layer global alpha mode, see dcif_layer_global_alpha_mode_t.
-
uint32_t srcAlphaMode#
Source layer alpha mode, see dcif_layer_alpha_mode_t.
-
uint32_t srcColorMode#
Source layer color mode, see dcif_layer_alpha_color_mode_t.
-
uint32_t __pad1__#
Reserved.
-
uint32_t backgroundBlendMode#
Which blend mode that the part of the layer covered by background uses, see dcif_layer_alpha_background_mode_t.
-
uint32_t dstGlobalAlpha#
Destination layer global alpha value, 0~255.
-
uint32_t __pad2__#
Reserved.
-
uint32_t srcFactorMode#
-
struct _dcif_layer_panic_config_t#
- #include <fsl_dcif.h>
DCIF module layer panic configuration.
Public Members
-
bool enable#
Enable panic request. Enable to prevent layer underflow.
-
uint16_t lowLevel#
When word count in layer FIFO is less than lowLevel, panic interrupt will be asserted.
-
uint16_t highLevel#
When word count in layer FIFO is greater than highLevel, panic interrupt will be cleared.
-
bool enable#
-
struct _dcif_layer_config_t#
- #include <fsl_dcif.h>
DCIF module layer configuration for all 4 user configurable layers.
Public Members
-
bool enable#
Enable layer.
-
dcif_layer_format_t format#
Layer input format.
-
int32_t topLeftX#
Top left Y coordinate, can not be negative value if PDI input is used.
-
int32_t topLeftY#
Top left Y coordinate, can not be negative value if PDI input is used.
-
uint16_t width#
The width of the layer.
-
uint16_t height#
The height of the layer.
-
uint32_t background#
The background color in ARGB8888 format of the layer. It is used to fill the not overlaped area of the layer compared with the output frame.
-
dcif_layer_panic_config_t panic#
Panic configuration.
-
uint8_t globalAlpha#
Global alpha value. alphaBlendConfig has a alpha value too. TODO
-
dcif_layer_alpha_blend_mode_t alphaBlendMode#
Alpha blending mode.
-
dcif_layer_alpha_blend_config_t alphaBlendConfig#
Alpha blend configuration.
-
bool enable#
-
struct _dcif_output_config_t#
- #include <fsl_dcif.h>
DCIF module output configuration.
Public Members
-
dcif_output_interface_t interface#
Output interface selection.
-
uint16_t width#
The width of the output frame in pixel. When in DPI mode, this should be the panel width.
-
uint16_t height#
The height of the output frame in pixel. When in DPI mode, this should be the panel height.
-
dcif_output_interface_t interface#
eDMA: Enhanced Direct Memory Access (eDMA) Controller Driver#
-
void EDMA_Init(EDMA_Type *base, const edma_config_t *config)#
Initializes the eDMA peripheral.
This function ungates the eDMA clock and configures the eDMA peripheral according to the configuration structure. All emda enabled request will be cleared in this function.
Note
This function enables the minor loop map feature.
- Parameters:
base – eDMA peripheral base address.
config – A pointer to the configuration structure, see “edma_config_t”.
-
void EDMA_Deinit(EDMA_Type *base)#
Deinitializes the eDMA peripheral.
This function gates the eDMA clock.
- Parameters:
base – eDMA peripheral base address.
-
void EDMA_InstallTCD(EDMA_Type *base, uint32_t channel, edma_tcd_t *tcd)#
Push content of TCD structure into hardware TCD register.
- Parameters:
base – EDMA peripheral base address.
channel – EDMA channel number.
tcd – Point to TCD structure.
-
void EDMA_GetDefaultConfig(edma_config_t *config)#
Gets the eDMA default configuration structure.
This function sets the configuration structure to default values. The default configuration is set to the following values.
config.enableContinuousLinkMode = false; config.enableHaltOnError = true; config.enableRoundRobinArbitration = false; config.enableDebugMode = false;
- Parameters:
config – A pointer to the eDMA configuration structure.
-
void EDMA_InitChannel(EDMA_Type *base, uint32_t channel, edma_channel_config_t *channelConfig)#
EDMA Channel initialization.
- Parameters:
base – eDMA4 peripheral base address.
channel – eDMA4 channel number.
channelConfig – pointer to user’s eDMA4 channel config structure, see edma_channel_config_t for detail.
-
static inline void EDMA_SetChannelMemoryAttribute(EDMA_Type *base, uint32_t channel, edma_channel_memory_attribute_t writeAttribute, edma_channel_memory_attribute_t readAttribute)#
Set channel memory attribute.
- Parameters:
base – eDMA4 peripheral base address.
channel – eDMA4 channel number.
writeAttribute – Attributes associated with a write transaction.
readAttribute – Attributes associated with a read transaction.
-
static inline void EDMA_SetChannelSignExtension(EDMA_Type *base, uint32_t channel, uint8_t position)#
Set channel sign extension.
- Parameters:
base – eDMA4 peripheral base address.
channel – eDMA4 channel number.
position – A non-zero value specifing the sign extend bit position. If 0, sign extension is disabled.
-
static inline void EDMA_SetChannelSwapSize(EDMA_Type *base, uint32_t channel, edma_channel_swap_size_t swapSize)#
Set channel swap size.
- Parameters:
base – eDMA4 peripheral base address.
channel – eDMA4 channel number.
swapSize – Swap occurs with respect to the specified transfer size. If 0, swap is disabled.
-
static inline void EDMA_SetChannelAccessType(EDMA_Type *base, uint32_t channel, edma_channel_access_type_t channelAccessType)#
Set channel access type.
- Parameters:
base – eDMA4 peripheral base address.
channel – eDMA4 channel number.
channelAccessType – eDMA4’s transactions type on the system bus when the channel is active.
-
static inline void EDMA_SetChannelMux(EDMA_Type *base, uint32_t channel, uint32_t channelRequestSource)#
Set channel request source.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
channelRequestSource – eDMA hardware service request source for the channel. User need to use the dma_request_source_t type as the input parameter. Note that devices may use other enum type to express dma request source and User can fined it in SOC header or fsl_edma_soc.h.
-
static inline uint32_t EDMA_GetChannelSystemBusInformation(EDMA_Type *base, uint32_t channel)#
Gets the channel identification and attribute information on the system bus interface.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
- Returns:
The mask of the channel system bus information. Users need to use the _edma_channel_sys_bus_info type to decode the return variables.
-
static inline void EDMA_EnableChannelMasterIDReplication(EDMA_Type *base, uint32_t channel, bool enable)#
Set channel master ID replication.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
enable – true is enable, false is disable.
-
static inline void EDMA_SetChannelProtectionLevel(EDMA_Type *base, uint32_t channel, edma_channel_protection_level_t level)#
Set channel security level.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
level – security level.
-
void EDMA_ResetChannel(EDMA_Type *base, uint32_t channel)#
Sets all TCD registers to default values.
This function sets TCD registers for this channel to default values.
Note
This function must not be called while the channel transfer is ongoing or it causes unpredictable results.
Note
This function enables the auto stop request feature.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
-
void EDMA_SetTransferConfig(EDMA_Type *base, uint32_t channel, const edma_transfer_config_t *config, edma_tcd_t *nextTcd)#
Configures the eDMA transfer attribute.
This function configures the transfer attribute, including source address, destination address, transfer size, address offset, and so on. It also configures the scatter gather feature if the user supplies the TCD address. Example:
edma_transfer_t config; edma_tcd_t tcd; config.srcAddr = ..; config.destAddr = ..; ... EDMA_SetTransferConfig(DMA0, channel, &config, &stcd);
Note
If nextTcd is not NULL, it means scatter gather feature is enabled and DREQ bit is cleared in the previous transfer configuration, which is set in the eDMA_ResetChannel.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
config – Pointer to eDMA transfer configuration structure.
nextTcd – Point to TCD structure. It can be NULL if users do not want to enable scatter/gather feature.
-
void EDMA_SetMinorOffsetConfig(EDMA_Type *base, uint32_t channel, const edma_minor_offset_config_t *config)#
Configures the eDMA minor offset feature.
The minor offset means that the signed-extended value is added to the source address or destination address after each minor loop.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
config – A pointer to the minor offset configuration structure.
-
void EDMA_SetChannelPreemptionConfig(EDMA_Type *base, uint32_t channel, const edma_channel_Preemption_config_t *config)#
Configures the eDMA channel preemption feature.
This function configures the channel preemption attribute and the priority of the channel.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number
config – A pointer to the channel preemption configuration structure.
-
void EDMA_SetChannelLink(EDMA_Type *base, uint32_t channel, edma_channel_link_type_t type, uint32_t linkedChannel)#
Sets the channel link for the eDMA transfer.
This function configures either the minor link or the major link mode. The minor link means that the channel link is triggered every time CITER decreases by 1. The major link means that the channel link is triggered when the CITER is exhausted.
Note
Users should ensure that DONE flag is cleared before calling this interface, or the configuration is invalid.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
type – A channel link type, which can be one of the following:
kEDMA_LinkNone
kEDMA_MinorLink
kEDMA_MajorLink
linkedChannel – The linked channel number.
-
void EDMA_SetBandWidth(EDMA_Type *base, uint32_t channel, edma_bandwidth_t bandWidth)#
Sets the bandwidth for the eDMA transfer.
Because the eDMA processes the minor loop, it continuously generates read/write sequences until the minor count is exhausted. The bandwidth forces the eDMA to stall after the completion of each read/write access to control the bus request bandwidth seen by the crossbar switch.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
bandWidth – A bandwidth setting, which can be one of the following:
kEDMABandwidthStallNone
kEDMABandwidthStall4Cycle
kEDMABandwidthStall8Cycle
-
void EDMA_SetModulo(EDMA_Type *base, uint32_t channel, edma_modulo_t srcModulo, edma_modulo_t destModulo)#
Sets the source modulo and the destination modulo for the eDMA transfer.
This function defines a specific address range specified to be the value after (SADDR + SOFF)/(DADDR + DOFF) calculation is performed or the original register value. It provides the ability to implement a circular data queue easily.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
srcModulo – A source modulo value.
destModulo – A destination modulo value.
-
static inline void EDMA_EnableAsyncRequest(EDMA_Type *base, uint32_t channel, bool enable)#
Enables an async request for the eDMA transfer.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
enable – The command to enable (true) or disable (false).
-
static inline void EDMA_EnableAutoStopRequest(EDMA_Type *base, uint32_t channel, bool enable)#
Enables an auto stop request for the eDMA transfer.
If enabling the auto stop request, the eDMA hardware automatically disables the hardware channel request.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
enable – The command to enable (true) or disable (false).
-
void EDMA_EnableChannelInterrupts(EDMA_Type *base, uint32_t channel, uint32_t mask)#
Enables the interrupt source for the eDMA transfer.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
mask – The mask of interrupt source to be set. Users need to use the defined edma_interrupt_enable_t type.
-
void EDMA_DisableChannelInterrupts(EDMA_Type *base, uint32_t channel, uint32_t mask)#
Disables the interrupt source for the eDMA transfer.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
mask – The mask of the interrupt source to be set. Use the defined edma_interrupt_enable_t type.
-
void EDMA_SetMajorOffsetConfig(EDMA_Type *base, uint32_t channel, int32_t sourceOffset, int32_t destOffset)#
Configures the eDMA channel TCD major offset feature.
Adjustment value added to the source address at the completion of the major iteration count
- Parameters:
base – eDMA peripheral base address.
channel – edma channel number.
sourceOffset – source address offset will be applied to source address after major loop done.
destOffset – destination address offset will be applied to source address after major loop done.
-
void EDMA_ConfigChannelSoftwareTCD(edma_tcd_t *tcd, const edma_transfer_config_t *transfer)#
Sets TCD fields according to the user’s channel transfer configuration structure, edma_transfer_config_t.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_ConfigChannelSoftwareTCDExt
Application should be careful about the TCD pool buffer storage class,
For the platform has cache, the software TCD should be put in non cache section
The TCD pool buffer should have a consistent storage class.
Note
This function enables the auto stop request feature.
- Parameters:
tcd – Pointer to the TCD structure.
transfer – channel transfer configuration pointer.
-
void EDMA_TcdReset(edma_tcd_t *tcd)#
Sets all fields to default values for the TCD structure.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdResetExt
This function sets all fields for this TCD structure to default value.
Note
This function enables the auto stop request feature.
- Parameters:
tcd – Pointer to the TCD structure.
-
void EDMA_TcdSetTransferConfig(edma_tcd_t *tcd, const edma_transfer_config_t *config, edma_tcd_t *nextTcd)#
Configures the eDMA TCD transfer attribute.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdSetTransferConfigExt
The TCD is a transfer control descriptor. The content of the TCD is the same as the hardware TCD registers. The TCD is used in the scatter-gather mode. This function configures the TCD transfer attribute, including source address, destination address, transfer size, address offset, and so on. It also configures the scatter gather feature if the user supplies the next TCD address. Example:
edma_transfer_t config = { ... } edma_tcd_t tcd __aligned(32); edma_tcd_t nextTcd __aligned(32); EDMA_TcdSetTransferConfig(&tcd, &config, &nextTcd);
Note
TCD address should be 32 bytes aligned or it causes an eDMA error.
Note
If the nextTcd is not NULL, the scatter gather feature is enabled and DREQ bit is cleared in the previous transfer configuration, which is set in the EDMA_TcdReset.
- Parameters:
tcd – Pointer to the TCD structure.
config – Pointer to eDMA transfer configuration structure.
nextTcd – Pointer to the next TCD structure. It can be NULL if users do not want to enable scatter/gather feature.
-
void EDMA_TcdSetMinorOffsetConfig(edma_tcd_t *tcd, const edma_minor_offset_config_t *config)#
Configures the eDMA TCD minor offset feature.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdSetMinorOffsetConfigExt
A minor offset is a signed-extended value added to the source address or a destination address after each minor loop.
- Parameters:
tcd – A point to the TCD structure.
config – A pointer to the minor offset configuration structure.
-
void EDMA_TcdSetChannelLink(edma_tcd_t *tcd, edma_channel_link_type_t type, uint32_t linkedChannel)#
Sets the channel link for the eDMA TCD.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdSetChannelLinkExt
This function configures either a minor link or a major link. The minor link means the channel link is triggered every time CITER decreases by 1. The major link means that the channel link is triggered when the CITER is exhausted.
Note
Users should ensure that DONE flag is cleared before calling this interface, or the configuration is invalid.
- Parameters:
tcd – Point to the TCD structure.
type – Channel link type, it can be one of:
kEDMA_LinkNone
kEDMA_MinorLink
kEDMA_MajorLink
linkedChannel – The linked channel number.
-
static inline void EDMA_TcdSetBandWidth(edma_tcd_t *tcd, edma_bandwidth_t bandWidth)#
Sets the bandwidth for the eDMA TCD.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdSetBandWidthExt
Because the eDMA processes the minor loop, it continuously generates read/write sequences until the minor count is exhausted. The bandwidth forces the eDMA to stall after the completion of each read/write access to control the bus request bandwidth seen by the crossbar switch.
- Parameters:
tcd – A pointer to the TCD structure.
bandWidth – A bandwidth setting, which can be one of the following:
kEDMABandwidthStallNone
kEDMABandwidthStall4Cycle
kEDMABandwidthStall8Cycle
-
void EDMA_TcdSetModulo(edma_tcd_t *tcd, edma_modulo_t srcModulo, edma_modulo_t destModulo)#
Sets the source modulo and the destination modulo for the eDMA TCD.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdSetModuloExt
This function defines a specific address range specified to be the value after (SADDR + SOFF)/(DADDR + DOFF) calculation is performed or the original register value. It provides the ability to implement a circular data queue easily.
- Parameters:
tcd – A pointer to the TCD structure.
srcModulo – A source modulo value.
destModulo – A destination modulo value.
-
static inline void EDMA_TcdEnableAutoStopRequest(edma_tcd_t *tcd, bool enable)#
Sets the auto stop request for the eDMA TCD.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdEnableAutoStopRequestExt
If enabling the auto stop request, the eDMA hardware automatically disables the hardware channel request.
- Parameters:
tcd – A pointer to the TCD structure.
enable – The command to enable (true) or disable (false).
-
void EDMA_TcdEnableInterrupts(edma_tcd_t *tcd, uint32_t mask)#
Enables the interrupt source for the eDMA TCD.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdEnableInterruptsExt
- Parameters:
tcd – Point to the TCD structure.
mask – The mask of interrupt source to be set. Users need to use the defined edma_interrupt_enable_t type.
-
void EDMA_TcdDisableInterrupts(edma_tcd_t *tcd, uint32_t mask)#
Disables the interrupt source for the eDMA TCD.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdDisableInterruptsExt
- Parameters:
tcd – Point to the TCD structure.
mask – The mask of interrupt source to be set. Users need to use the defined edma_interrupt_enable_t type.
-
void EDMA_TcdSetMajorOffsetConfig(edma_tcd_t *tcd, int32_t sourceOffset, int32_t destOffset)#
Configures the eDMA TCD major offset feature.
@Note This API only supports EDMA4 TCD type. It can be used to support all types with extension API EDMA_TcdSetMajorOffsetConfigExt
Adjustment value added to the source address at the completion of the major iteration count
- Parameters:
tcd – A point to the TCD structure.
sourceOffset – source address offset wiil be applied to source address after major loop done.
destOffset – destination address offset will be applied to source address after major loop done.
-
void EDMA_ConfigChannelSoftwareTCDExt(EDMA_Type *base, edma_tcd_t *tcd, const edma_transfer_config_t *transfer)#
Sets TCD fields according to the user’s channel transfer configuration structure, edma_transfer_config_t.
Application should be careful about the TCD pool buffer storage class,
For the platform has cache, the software TCD should be put in non cache section
The TCD pool buffer should have a consistent storage class.
Note
This function enables the auto stop request feature.
- Parameters:
base – eDMA peripheral base address.
tcd – Pointer to the TCD structure.
transfer – channel transfer configuration pointer.
-
void EDMA_TcdResetExt(EDMA_Type *base, edma_tcd_t *tcd)#
Sets all fields to default values for the TCD structure.
This function sets all fields for this TCD structure to default value.
Note
This function enables the auto stop request feature.
- Parameters:
base – eDMA peripheral base address.
tcd – Pointer to the TCD structure.
-
void EDMA_TcdSetTransferConfigExt(EDMA_Type *base, edma_tcd_t *tcd, const edma_transfer_config_t *config, edma_tcd_t *nextTcd)#
Configures the eDMA TCD transfer attribute.
The TCD is a transfer control descriptor. The content of the TCD is the same as the hardware TCD registers. The TCD is used in the scatter-gather mode. This function configures the TCD transfer attribute, including source address, destination address, transfer size, address offset, and so on. It also configures the scatter gather feature if the user supplies the next TCD address. Example:
edma_transfer_t config = { ... } edma_tcd_t tcd __aligned(32); edma_tcd_t nextTcd __aligned(32); EDMA_TcdSetTransferConfig(&tcd, &config, &nextTcd);
Note
TCD address should be 32 bytes aligned or it causes an eDMA error.
Note
If the nextTcd is not NULL, the scatter gather feature is enabled and DREQ bit is cleared in the previous transfer configuration, which is set in the EDMA_TcdReset.
- Parameters:
base – eDMA peripheral base address.
tcd – Pointer to the TCD structure.
config – Pointer to eDMA transfer configuration structure.
nextTcd – Pointer to the next TCD structure. It can be NULL if users do not want to enable scatter/gather feature.
-
void EDMA_TcdSetMinorOffsetConfigExt(EDMA_Type *base, edma_tcd_t *tcd, const edma_minor_offset_config_t *config)#
Configures the eDMA TCD minor offset feature.
A minor offset is a signed-extended value added to the source address or a destination address after each minor loop.
- Parameters:
base – eDMA peripheral base address.
tcd – A point to the TCD structure.
config – A pointer to the minor offset configuration structure.
-
void EDMA_TcdSetChannelLinkExt(EDMA_Type *base, edma_tcd_t *tcd, edma_channel_link_type_t type, uint32_t linkedChannel)#
Sets the channel link for the eDMA TCD.
This function configures either a minor link or a major link. The minor link means the channel link is triggered every time CITER decreases by 1. The major link means that the channel link is triggered when the CITER is exhausted.
Note
Users should ensure that DONE flag is cleared before calling this interface, or the configuration is invalid.
- Parameters:
base – eDMA peripheral base address.
tcd – Point to the TCD structure.
type – Channel link type, it can be one of:
kEDMA_LinkNone
kEDMA_MinorLink
kEDMA_MajorLink
linkedChannel – The linked channel number.
-
static inline void EDMA_TcdSetBandWidthExt(EDMA_Type *base, edma_tcd_t *tcd, edma_bandwidth_t bandWidth)#
Sets the bandwidth for the eDMA TCD.
Because the eDMA processes the minor loop, it continuously generates read/write sequences until the minor count is exhausted. The bandwidth forces the eDMA to stall after the completion of each read/write access to control the bus request bandwidth seen by the crossbar switch.
- Parameters:
base – eDMA peripheral base address.
tcd – A pointer to the TCD structure.
bandWidth – A bandwidth setting, which can be one of the following:
kEDMABandwidthStallNone
kEDMABandwidthStall4Cycle
kEDMABandwidthStall8Cycle
-
void EDMA_TcdSetModuloExt(EDMA_Type *base, edma_tcd_t *tcd, edma_modulo_t srcModulo, edma_modulo_t destModulo)#
Sets the source modulo and the destination modulo for the eDMA TCD.
This function defines a specific address range specified to be the value after (SADDR + SOFF)/(DADDR + DOFF) calculation is performed or the original register value. It provides the ability to implement a circular data queue easily.
- Parameters:
base – eDMA peripheral base address.
tcd – A pointer to the TCD structure.
srcModulo – A source modulo value.
destModulo – A destination modulo value.
-
static inline void EDMA_TcdEnableAutoStopRequestExt(EDMA_Type *base, edma_tcd_t *tcd, bool enable)#
Sets the auto stop request for the eDMA TCD.
If enabling the auto stop request, the eDMA hardware automatically disables the hardware channel request.
- Parameters:
base – eDMA peripheral base address.
tcd – A pointer to the TCD structure.
enable – The command to enable (true) or disable (false).
-
void EDMA_TcdEnableInterruptsExt(EDMA_Type *base, edma_tcd_t *tcd, uint32_t mask)#
Enables the interrupt source for the eDMA TCD.
- Parameters:
base – eDMA peripheral base address.
tcd – Point to the TCD structure.
mask – The mask of interrupt source to be set. Users need to use the defined edma_interrupt_enable_t type.
-
void EDMA_TcdDisableInterruptsExt(EDMA_Type *base, edma_tcd_t *tcd, uint32_t mask)#
Disables the interrupt source for the eDMA TCD.
- Parameters:
base – eDMA peripheral base address.
tcd – Point to the TCD structure.
mask – The mask of interrupt source to be set. Users need to use the defined edma_interrupt_enable_t type.
-
void EDMA_TcdSetMajorOffsetConfigExt(EDMA_Type *base, edma_tcd_t *tcd, int32_t sourceOffset, int32_t destOffset)#
Configures the eDMA TCD major offset feature.
Adjustment value added to the source address at the completion of the major iteration count
- Parameters:
base – eDMA peripheral base address.
tcd – A point to the TCD structure.
sourceOffset – source address offset wiil be applied to source address after major loop done.
destOffset – destination address offset will be applied to source address after major loop done.
-
static inline void EDMA_EnableChannelRequest(EDMA_Type *base, uint32_t channel)#
Enables the eDMA hardware channel request.
This function enables the hardware channel request.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
-
static inline void EDMA_DisableChannelRequest(EDMA_Type *base, uint32_t channel)#
Disables the eDMA hardware channel request.
This function disables the hardware channel request.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
-
static inline void EDMA_TriggerChannelStart(EDMA_Type *base, uint32_t channel)#
Starts the eDMA transfer by using the software trigger.
This function starts a minor loop transfer.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
-
uint32_t EDMA_GetRemainingMajorLoopCount(EDMA_Type *base, uint32_t channel)#
Gets the remaining major loop count from the eDMA current channel TCD.
This function checks the TCD (Task Control Descriptor) status for a specified eDMA channel and returns the number of major loop count that has not finished.
Note
1. This function can only be used to get unfinished major loop count of transfer without the next TCD, or it might be inaccuracy.
The unfinished/remaining transfer bytes cannot be obtained directly from registers while the channel is running. Because to calculate the remaining bytes, the initial NBYTES configured in DMA_TCDn_NBYTES_MLNO register is needed while the eDMA IP does not support getting it while a channel is active. In another word, the NBYTES value reading is always the actual (decrementing) NBYTES value the dma_engine is working with while a channel is running. Consequently, to get the remaining transfer bytes, a software-saved initial value of NBYTES (for example copied before enabling the channel) is needed. The formula to calculate it is shown below: RemainingBytes = RemainingMajorLoopCount * NBYTES(initially configured)
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
- Returns:
Major loop count which has not been transferred yet for the current TCD.
-
static inline uint32_t EDMA_GetErrorStatusFlags(EDMA_Type *base)#
Gets the eDMA channel error status flags.
- Parameters:
base – eDMA peripheral base address.
- Returns:
The mask of error status flags. Users need to use the _edma_error_status_flags type to decode the return variables.
-
uint32_t EDMA_GetChannelStatusFlags(EDMA_Type *base, uint32_t channel)#
Gets the eDMA channel status flags.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
- Returns:
The mask of channel status flags. Users need to use the _edma_channel_status_flags type to decode the return variables.
-
void EDMA_ClearChannelStatusFlags(EDMA_Type *base, uint32_t channel, uint32_t mask)#
Clears the eDMA channel status flags.
- Parameters:
base – eDMA peripheral base address.
channel – eDMA channel number.
mask – The mask of channel status to be cleared. Users need to use the defined _edma_channel_status_flags type.
-
status_t EDMA_CreateHandle(edma_handle_t *handle, EDMA_Type *base, uint32_t channel)#
Creates the eDMA handle.
This function is called if using the transactional API for eDMA. This function initializes the internal state of the eDMA handle.
- Parameters:
handle – eDMA handle pointer. The eDMA handle stores callback function and parameters.
base – eDMA peripheral base address.
channel – eDMA channel number.
- Return values:
kStatus_Success –
kStatus_InvalidArgument –
-
void EDMA_InstallTCDMemory(edma_handle_t *handle, edma_tcd_t *tcdPool, uint32_t tcdSize)#
Installs the TCDs memory pool into the eDMA handle.
This function is called after the EDMA_CreateHandle to use scatter/gather feature. This function shall only be used while users need to use scatter gather mode. Scatter gather mode enables EDMA to load a new transfer control block (tcd) in hardware, and automatically reconfigure that DMA channel for a new transfer. Users need to prepare tcd memory and also configure tcds using interface EDMA_SubmitTransfer.
- Parameters:
handle – eDMA handle pointer.
tcdPool – A memory pool to store TCDs. It must be 32 bytes aligned.
tcdSize – The number of TCD slots.
-
void EDMA_SetCallback(edma_handle_t *handle, edma_callback callback, void *userData)#
Installs a callback function for the eDMA transfer.
This callback is called in the eDMA IRQ handler. Use the callback to do something after the current major loop transfer completes. This function will be called every time one tcd finished transfer.
- Parameters:
handle – eDMA handle pointer.
callback – eDMA callback function pointer.
userData – A parameter for the callback function.
-
void EDMA_PrepareTransferConfig(edma_transfer_config_t *config, void *srcAddr, uint32_t srcWidth, int16_t srcOffset, void *destAddr, uint32_t destWidth, int16_t destOffset, uint32_t bytesEachRequest, uint32_t transferBytes)#
Prepares the eDMA transfer structure configurations.
This function prepares the transfer configuration structure according to the user input.
Note
The data address and the data width must be consistent. For example, if the SRC is 4 bytes, the source address must be 4 bytes aligned, or it results in source address error (SAE). User can check if 128 bytes support is available for specific instance by FSL_FEATURE_EDMA_INSTANCE_SUPPORT_128_BYTES_TRANSFERn.
- Parameters:
config – The user configuration structure of type edma_transfer_t.
srcAddr – eDMA transfer source address.
srcWidth – eDMA transfer source address width(bytes).
srcOffset – source address offset.
destAddr – eDMA transfer destination address.
destWidth – eDMA transfer destination address width(bytes).
destOffset – destination address offset.
bytesEachRequest – eDMA transfer bytes per channel request.
transferBytes – eDMA transfer bytes to be transferred.
-
void EDMA_PrepareTransfer(edma_transfer_config_t *config, void *srcAddr, uint32_t srcWidth, void *destAddr, uint32_t destWidth, uint32_t bytesEachRequest, uint32_t transferBytes, edma_transfer_type_t type)#
Prepares the eDMA transfer structure.
This function prepares the transfer configuration structure according to the user input.
Note
The data address and the data width must be consistent. For example, if the SRC is 4 bytes, the source address must be 4 bytes aligned, or it results in source address error (SAE).
- Parameters:
config – The user configuration structure of type edma_transfer_t.
srcAddr – eDMA transfer source address.
srcWidth – eDMA transfer source address width(bytes).
destAddr – eDMA transfer destination address.
destWidth – eDMA transfer destination address width(bytes).
bytesEachRequest – eDMA transfer bytes per channel request.
transferBytes – eDMA transfer bytes to be transferred.
type – eDMA transfer type.
-
void EDMA_PrepareTransferTCD(edma_handle_t *handle, edma_tcd_t *tcd, void *srcAddr, uint32_t srcWidth, int16_t srcOffset, void *destAddr, uint32_t destWidth, int16_t destOffset, uint32_t bytesEachRequest, uint32_t transferBytes, edma_tcd_t *nextTcd)#
Prepares the eDMA transfer content descriptor.
This function prepares the transfer content descriptor structure according to the user input.
Note
The data address and the data width must be consistent. For example, if the SRC is 4 bytes, the source address must be 4 bytes aligned, or it results in source address error (SAE).
- Parameters:
handle – eDMA handle pointer.
tcd – Pointer to eDMA transfer content descriptor structure.
srcAddr – eDMA transfer source address.
srcWidth – eDMA transfer source address width(bytes).
srcOffset – source address offset.
destAddr – eDMA transfer destination address.
destWidth – eDMA transfer destination address width(bytes).
destOffset – destination address offset.
bytesEachRequest – eDMA transfer bytes per channel request.
transferBytes – eDMA transfer bytes to be transferred.
nextTcd – eDMA transfer linked TCD address.
-
status_t EDMA_SubmitTransferTCD(edma_handle_t *handle, edma_tcd_t *tcd)#
Submits the eDMA transfer content descriptor.
This function submits the eDMA transfer request according to the transfer content descriptor. In scatter gather mode, call this function will add a configured tcd to the circular list of tcd pool. The tcd pools is setup by call function EDMA_InstallTCDMemory before.
Typical user case:
submit single transfer
edma_tcd_t tcd; EDMA_PrepareTransferTCD(handle, tcd, ....) EDMA_SubmitTransferTCD(handle, tcd) EDMA_StartTransfer(handle)
submit static link transfer,
edma_tcd_t tcd[2]; EDMA_PrepareTransferTCD(handle, &tcd[0], ....) EDMA_PrepareTransferTCD(handle, &tcd[1], ....) EDMA_SubmitTransferTCD(handle, &tcd[0]) EDMA_StartTransfer(handle)
submit dynamic link transfer
edma_tcd_t tcdpool[2]; EDMA_InstallTCDMemory(&g_DMA_Handle, tcdpool, 2); edma_tcd_t tcd; EDMA_PrepareTransferTCD(handle, tcd, ....) EDMA_SubmitTransferTCD(handle, tcd) EDMA_PrepareTransferTCD(handle, tcd, ....) EDMA_SubmitTransferTCD(handle, tcd) EDMA_StartTransfer(handle)
submit loop transfer
edma_tcd_t tcd[2]; EDMA_PrepareTransferTCD(handle, &tcd[0], ...,&tcd[1]) EDMA_PrepareTransferTCD(handle, &tcd[1], ..., &tcd[0]) EDMA_SubmitTransferTCD(handle, &tcd[0]) EDMA_StartTransfer(handle)
- Parameters:
handle – eDMA handle pointer.
tcd – Pointer to eDMA transfer content descriptor structure.
- Return values:
kStatus_EDMA_Success – It means submit transfer request succeed.
kStatus_EDMA_QueueFull – It means TCD queue is full. Submit transfer request is not allowed.
kStatus_EDMA_Busy – It means the given channel is busy, need to submit request later.
-
status_t EDMA_SubmitTransfer(edma_handle_t *handle, const edma_transfer_config_t *config)#
Submits the eDMA transfer request.
This function submits the eDMA transfer request according to the transfer configuration structure. In scatter gather mode, call this function will add a configured tcd to the circular list of tcd pool. The tcd pools is setup by call function EDMA_InstallTCDMemory before.
- Parameters:
handle – eDMA handle pointer.
config – Pointer to eDMA transfer configuration structure.
- Return values:
kStatus_EDMA_Success – It means submit transfer request succeed.
kStatus_EDMA_QueueFull – It means TCD queue is full. Submit transfer request is not allowed.
kStatus_EDMA_Busy – It means the given channel is busy, need to submit request later.
-
status_t EDMA_SubmitLoopTransfer(edma_handle_t *handle, edma_transfer_config_t *transfer, uint32_t transferLoopCount)#
Submits the eDMA scatter gather transfer configurations.
The function is target for submit loop transfer request, the ring transfer request means that the transfer request TAIL is link to HEAD, such as, A->B->C->D->A, or A->A
To use the ring transfer feature, the application should allocate several transfer object, such as
Then eDMA driver will link transfer[0] and transfer[1] to each otheredma_channel_transfer_config_t transfer[2]; EDMA_TransferSubmitLoopTransfer(psHandle, &transfer, 2U);
Note
Application should check the return value of this function to avoid transfer request submit failed
- Parameters:
handle – eDMA handle pointer
transfer – pointer to user’s eDMA channel configure structure, see edma_channel_transfer_config_t for detail
transferLoopCount – the count of the transfer ring, if loop count is 1, that means that the one will link to itself.
- Return values:
kStatus_Success – It means submit transfer request succeed
kStatus_EDMA_Busy – channel is in busy status
kStatus_InvalidArgument – Invalid Argument
-
void EDMA_StartTransfer(edma_handle_t *handle)#
eDMA starts transfer.
This function enables the channel request. Users can call this function after submitting the transfer request or before submitting the transfer request.
- Parameters:
handle – eDMA handle pointer.
-
void EDMA_StopTransfer(edma_handle_t *handle)#
eDMA stops transfer.
This function disables the channel request to pause the transfer. Users can call EDMA_StartTransfer() again to resume the transfer.
- Parameters:
handle – eDMA handle pointer.
-
void EDMA_AbortTransfer(edma_handle_t *handle)#
eDMA aborts transfer.
This function disables the channel request and clear transfer status bits. Users can submit another transfer after calling this API.
- Parameters:
handle – DMA handle pointer.
-
static inline uint32_t EDMA_GetUnusedTCDNumber(edma_handle_t *handle)#
Get unused TCD slot number.
This function gets current tcd index which is run. If the TCD pool pointer is NULL, it will return 0.
- Parameters:
handle – DMA handle pointer.
- Returns:
The unused tcd slot number.
-
static inline uint32_t EDMA_GetNextTCDAddress(edma_handle_t *handle)#
Get the next tcd address.
This function gets the next tcd address. If this is last TCD, return 0.
- Parameters:
handle – DMA handle pointer.
- Returns:
The next TCD address.
-
void EDMA_HandleIRQ(edma_handle_t *handle)#
eDMA IRQ handler for the current major loop transfer completion.
This function clears the channel major interrupt flag and calls the callback function if it is not NULL.
Note: For the case using TCD queue, when the major iteration count is exhausted, additional operations are performed. These include the final address adjustments and reloading of the BITER field into the CITER. Assertion of an optional interrupt request also occurs at this time, as does a possible fetch of a new TCD from memory using the scatter/gather address pointer included in the descriptor (if scatter/gather is enabled).
For instance, when the time interrupt of TCD[0] happens, the TCD[1] has already been loaded into the eDMA engine. As sga and sga_index are calculated based on the DLAST_SGA bitfield lies in the TCD_CSR register, the sga_index in this case should be 2 (DLAST_SGA of TCD[1] stores the address of TCD[2]). Thus, the “tcdUsed” updated should be (tcdUsed - 2U) which indicates the number of TCDs can be loaded in the memory pool (because TCD[0] and TCD[1] have been loaded into the eDMA engine at this point already.).
For the last two continuous ISRs in a scatter/gather process, they both load the last TCD (The last ISR does not load a new TCD) from the memory pool to the eDMA engine when major loop completes. Therefore, ensure that the header and tcdUsed updated are identical for them. tcdUsed are both 0 in this case as no TCD to be loaded.
See the “eDMA basic data flow” in the eDMA Functional description section of the Reference Manual for further details.
- Parameters:
handle – eDMA handle pointer.
-
void EDMA_TcdInit(EDMA_Type *base, edma_tcd_t *tcdRegs)#
Initialize all fields to 0 for the TCD structure.
This function initialize all fields for this TCD structure to 0.
- Parameters:
base – eDMA peripheral base address.
tcd – Pointer to the TCD structure.
-
FSL_EDMA_DRIVER_VERSION#
eDMA driver version
Version 2.10.14.
_edma_transfer_status eDMA transfer status
Values:
-
enumerator kStatus_EDMA_QueueFull#
TCD queue is full.
-
enumerator kStatus_EDMA_Busy#
Channel is busy and can’t handle the transfer request.
-
enumerator kStatus_EDMA_QueueFull#
-
enum _edma_transfer_size#
eDMA transfer configuration
Values:
-
enumerator kEDMA_TransferSize1Bytes#
Source/Destination data transfer size is 1 byte every time
-
enumerator kEDMA_TransferSize2Bytes#
Source/Destination data transfer size is 2 bytes every time
-
enumerator kEDMA_TransferSize4Bytes#
Source/Destination data transfer size is 4 bytes every time
-
enumerator kEDMA_TransferSize8Bytes#
Source/Destination data transfer size is 8 bytes every time
-
enumerator kEDMA_TransferSize16Bytes#
Source/Destination data transfer size is 16 bytes every time
-
enumerator kEDMA_TransferSize32Bytes#
Source/Destination data transfer size is 32 bytes every time
-
enumerator kEDMA_TransferSize64Bytes#
Source/Destination data transfer size is 64 bytes every time
-
enumerator kEDMA_TransferSize128Bytes#
Source/Destination data transfer size is 128 bytes every time
-
enumerator kEDMA_TransferSize1Bytes#
-
enum _edma_modulo#
eDMA modulo configuration
Values:
-
enumerator kEDMA_ModuloDisable#
Disable modulo
-
enumerator kEDMA_Modulo2bytes#
Circular buffer size is 2 bytes.
-
enumerator kEDMA_Modulo4bytes#
Circular buffer size is 4 bytes.
-
enumerator kEDMA_Modulo8bytes#
Circular buffer size is 8 bytes.
-
enumerator kEDMA_Modulo16bytes#
Circular buffer size is 16 bytes.
-
enumerator kEDMA_Modulo32bytes#
Circular buffer size is 32 bytes.
-
enumerator kEDMA_Modulo64bytes#
Circular buffer size is 64 bytes.
-
enumerator kEDMA_Modulo128bytes#
Circular buffer size is 128 bytes.
-
enumerator kEDMA_Modulo256bytes#
Circular buffer size is 256 bytes.
-
enumerator kEDMA_Modulo512bytes#
Circular buffer size is 512 bytes.
-
enumerator kEDMA_Modulo1Kbytes#
Circular buffer size is 1 K bytes.
-
enumerator kEDMA_Modulo2Kbytes#
Circular buffer size is 2 K bytes.
-
enumerator kEDMA_Modulo4Kbytes#
Circular buffer size is 4 K bytes.
-
enumerator kEDMA_Modulo8Kbytes#
Circular buffer size is 8 K bytes.
-
enumerator kEDMA_Modulo16Kbytes#
Circular buffer size is 16 K bytes.
-
enumerator kEDMA_Modulo32Kbytes#
Circular buffer size is 32 K bytes.
-
enumerator kEDMA_Modulo64Kbytes#
Circular buffer size is 64 K bytes.
-
enumerator kEDMA_Modulo128Kbytes#
Circular buffer size is 128 K bytes.
-
enumerator kEDMA_Modulo256Kbytes#
Circular buffer size is 256 K bytes.
-
enumerator kEDMA_Modulo512Kbytes#
Circular buffer size is 512 K bytes.
-
enumerator kEDMA_Modulo1Mbytes#
Circular buffer size is 1 M bytes.
-
enumerator kEDMA_Modulo2Mbytes#
Circular buffer size is 2 M bytes.
-
enumerator kEDMA_Modulo4Mbytes#
Circular buffer size is 4 M bytes.
-
enumerator kEDMA_Modulo8Mbytes#
Circular buffer size is 8 M bytes.
-
enumerator kEDMA_Modulo16Mbytes#
Circular buffer size is 16 M bytes.
-
enumerator kEDMA_Modulo32Mbytes#
Circular buffer size is 32 M bytes.
-
enumerator kEDMA_Modulo64Mbytes#
Circular buffer size is 64 M bytes.
-
enumerator kEDMA_Modulo128Mbytes#
Circular buffer size is 128 M bytes.
-
enumerator kEDMA_Modulo256Mbytes#
Circular buffer size is 256 M bytes.
-
enumerator kEDMA_Modulo512Mbytes#
Circular buffer size is 512 M bytes.
-
enumerator kEDMA_Modulo1Gbytes#
Circular buffer size is 1 G bytes.
-
enumerator kEDMA_Modulo2Gbytes#
Circular buffer size is 2 G bytes.
-
enumerator kEDMA_ModuloDisable#
-
enum _edma_bandwidth#
Bandwidth control.
Values:
-
enumerator kEDMA_BandwidthStallNone#
No eDMA engine stalls.
-
enumerator kEDMA_BandwidthStall4Cycle#
eDMA engine stalls for 4 cycles after each read/write.
-
enumerator kEDMA_BandwidthStall8Cycle#
eDMA engine stalls for 8 cycles after each read/write.
-
enumerator kEDMA_BandwidthStallNone#
-
enum _edma_channel_link_type#
Channel link type.
Values:
-
enumerator kEDMA_LinkNone#
No channel link
-
enumerator kEDMA_MinorLink#
Channel link after each minor loop
-
enumerator kEDMA_MajorLink#
Channel link while major loop count exhausted
-
enumerator kEDMA_LinkNone#
_edma_channel_status_flags eDMA channel status flags.
Values:
-
enumerator kEDMA_DoneFlag#
DONE flag, set while transfer finished, CITER value exhausted
-
enumerator kEDMA_ErrorFlag#
eDMA error flag, an error occurred in a transfer
-
enumerator kEDMA_InterruptFlag#
eDMA interrupt flag, set while an interrupt occurred of this channel
-
enumerator kEDMA_DoneFlag#
_edma_error_status_flags eDMA channel error status flags.
Values:
-
enumerator kEDMA_DestinationBusErrorFlag#
Bus error on destination address
-
enumerator kEDMA_SourceBusErrorFlag#
Bus error on the source address
-
enumerator kEDMA_ScatterGatherErrorFlag#
Error on the Scatter/Gather address, not 32byte aligned.
-
enumerator kEDMA_NbytesErrorFlag#
NBYTES/CITER configuration error
-
enumerator kEDMA_DestinationOffsetErrorFlag#
Destination offset not aligned with destination size
-
enumerator kEDMA_DestinationAddressErrorFlag#
Destination address not aligned with destination size
-
enumerator kEDMA_SourceOffsetErrorFlag#
Source offset not aligned with source size
-
enumerator kEDMA_SourceAddressErrorFlag#
Source address not aligned with source size
-
enumerator kEDMA_ErrorChannelFlag#
Error channel number of the cancelled channel number
-
enumerator kEDMA_TransferCanceledFlag#
Transfer cancelled
-
enumerator kEDMA_ValidFlag#
No error occurred, this bit is 0. Otherwise, it is 1.
-
enumerator kEDMA_DestinationBusErrorFlag#
_edma_interrupt_enable eDMA interrupt source
Values:
-
enumerator kEDMA_ErrorInterruptEnable#
Enable interrupt while channel error occurs.
-
enumerator kEDMA_MajorInterruptEnable#
Enable interrupt while major count exhausted.
-
enumerator kEDMA_HalfInterruptEnable#
Enable interrupt while major count to half value.
-
enumerator kEDMA_ErrorInterruptEnable#
-
enum _edma_transfer_type#
eDMA transfer type
Values:
-
enumerator kEDMA_MemoryToMemory#
Transfer from memory to memory
-
enumerator kEDMA_PeripheralToMemory#
Transfer from peripheral to memory
-
enumerator kEDMA_MemoryToPeripheral#
Transfer from memory to peripheral
-
enumerator kEDMA_PeripheralToPeripheral#
Transfer from Peripheral to peripheral
-
enumerator kEDMA_MemoryToMemory#
-
enum edma_channel_memory_attribute#
eDMA channel memory attribute
Values:
-
enumerator kEDMA_ChannelNoWriteNoReadNoCacheNoBuffer#
No write allocate, no read allocate, non-cacheable, non-bufferable.
-
enumerator kEDMA_ChannelNoWriteNoReadNoCacheBufferable#
No write allocate, no read allocate, non-cacheable, bufferable.
-
enumerator kEDMA_ChannelNoWriteNoReadCacheableNoBuffer#
No write allocate, no read allocate, cacheable, non-bufferable.
-
enumerator kEDMA_ChannelNoWriteNoReadCacheableBufferable#
No write allocate, no read allocate, cacheable, bufferable.
-
enumerator kEDMA_ChannelNoWriteReadNoCacheNoBuffer#
No write allocate, read allocate, non-cacheable, non-bufferable.
-
enumerator kEDMA_ChannelNoWriteReadNoCacheBufferable#
No write allocate, read allocate, non-cacheable, bufferable.
-
enumerator kEDMA_ChannelNoWriteReadCacheableNoBuffer#
No write allocate, read allocate, cacheable, non-bufferable.
-
enumerator kEDMA_ChannelNoWriteReadCacheableBufferable#
No write allocate, read allocate, cacheable, bufferable.
-
enumerator kEDMA_ChannelWriteNoReadNoCacheNoBuffer#
write allocate, no read allocate, non-cacheable, non-bufferable.
-
enumerator kEDMA_ChannelWriteNoReadNoCacheBufferable#
write allocate, no read allocate, non-cacheable, bufferable.
-
enumerator kEDMA_ChannelWriteNoReadCacheableNoBuffer#
write allocate, no read allocate, cacheable, non-bufferable.
-
enumerator kEDMA_ChannelWriteNoReadCacheableBufferable#
write allocate, no read allocate, cacheable, bufferable.
-
enumerator kEDMA_ChannelWriteReadNoCacheNoBuffer#
write allocate, read allocate, non-cacheable, non-bufferable.
-
enumerator kEDMA_ChannelWriteReadNoCacheBufferable#
write allocate, read allocate, non-cacheable, bufferable.
-
enumerator kEDMA_ChannelWriteReadCacheableNoBuffer#
write allocate, read allocate, cacheable, non-bufferable.
-
enumerator kEDMA_ChannelWriteReadCacheableBufferable#
write allocate, read allocate, cacheable, bufferable.
-
enumerator kEDMA_ChannelNoWriteNoReadNoCacheNoBuffer#
-
enum _edma_channel_swap_size#
eDMA4 channel swap size
Values:
-
enumerator kEDMA_ChannelSwapDisabled#
Swap is disabled.
-
enumerator kEDMA_ChannelReadWith8bitSwap#
Swap occurs with respect to the read 8bit.
-
enumerator kEDMA_ChannelReadWith16bitSwap#
Swap occurs with respect to the read 16bit.
-
enumerator kEDMA_ChannelReadWith32bitSwap#
Swap occurs with respect to the read 32bit.
-
enumerator kEDMA_ChannelWriteWith8bitSwap#
Swap occurs with respect to the write 8bit.
-
enumerator kEDMA_ChannelWriteWith16bitSwap#
Swap occurs with respect to the write 16bit.
-
enumerator kEDMA_ChannelWriteWith32bitSwap#
Swap occurs with respect to the write 32bit.
-
enumerator kEDMA_ChannelSwapDisabled#
eDMA channel system bus information, _edma_channel_sys_bus_info
Values:
-
enumerator kEDMA_PrivilegedAccessLevel#
Privileged Access Level for DMA transfers. 0b - User protection level; 1b - Privileged protection level.
-
enumerator kEDMA_MasterId#
DMA’s master ID when channel is active and master ID replication is enabled.
-
enumerator kEDMA_PrivilegedAccessLevel#
-
enum _edma_channel_access_type#
eDMA4 channel access type
Values:
-
enumerator kEDMA_ChannelDataAccess#
Data access for eDMA4 transfers.
-
enumerator kEDMA_ChannelInstructionAccess#
Instruction access for eDMA4 transfers.
-
enumerator kEDMA_ChannelDataAccess#
-
enum _edma_channel_protection_level#
eDMA4 channel protection level
Values:
-
enumerator kEDMA_ChannelProtectionLevelUser#
user protection level for eDMA transfers.
-
enumerator kEDMA_ChannelProtectionLevelPrivileged#
Privileged protection level eDMA transfers.
-
enumerator kEDMA_ChannelProtectionLevelUser#
-
typedef enum _edma_transfer_size edma_transfer_size_t#
eDMA transfer configuration
-
typedef enum _edma_modulo edma_modulo_t#
eDMA modulo configuration
-
typedef enum _edma_bandwidth edma_bandwidth_t#
Bandwidth control.
-
typedef enum _edma_channel_link_type edma_channel_link_type_t#
Channel link type.
-
typedef enum _edma_transfer_type edma_transfer_type_t#
eDMA transfer type
-
typedef struct _edma_channel_Preemption_config edma_channel_Preemption_config_t#
eDMA channel priority configuration
-
typedef struct _edma_minor_offset_config edma_minor_offset_config_t#
eDMA minor offset configuration
-
typedef enum edma_channel_memory_attribute edma_channel_memory_attribute_t#
eDMA channel memory attribute
-
typedef enum _edma_channel_swap_size edma_channel_swap_size_t#
eDMA4 channel swap size
-
typedef enum _edma_channel_access_type edma_channel_access_type_t#
eDMA4 channel access type
-
typedef enum _edma_channel_protection_level edma_channel_protection_level_t#
eDMA4 channel protection level
-
typedef struct _edma_channel_config edma_channel_config_t#
eDMA4 channel configuration
-
typedef edma_core_tcd_t edma_tcd_t#
eDMA TCD.
This structure is same as TCD register which is described in reference manual, and is used to configure the scatter/gather feature as a next hardware TCD.
-
typedef struct _edma_transfer_config edma_transfer_config_t#
eDMA channel transfer configuration
The transfer configuration structure support full feature configuration of the transfer control descriptor.
1.To perform a simple transfer, below members should be initialized at least .srcAddr - source address .dstAddr - destination address .srcWidthOfEachTransfer - data width of source address .dstWidthOfEachTransfer - data width of destination address, normally it should be as same as srcWidthOfEachTransfer .bytesEachRequest - bytes to be transferred in each DMA request .totalBytes - total bytes to be transferred .srcOffsetOfEachTransfer - offset value in bytes unit to be applied to source address as each source read is completed .dstOffsetOfEachTransfer - offset value in bytes unit to be applied to destination address as each destination write is completed enablchannelRequest - channel request can be enabled together with transfer configure submission
2.The transfer configuration structure also support advance feature: Programmable source/destination address range(MODULO) Programmable minor loop offset Programmable major loop offset Programmable channel chain feature Programmable channel transfer control descriptor link feature
Note
User should pay attention to the transfer size alignment limitation
the bytesEachRequest should align with the srcWidthOfEachTransfer and the dstWidthOfEachTransfer that is to say bytesEachRequest % srcWidthOfEachTransfer should be 0
the srcOffsetOfEachTransfer and dstOffsetOfEachTransfer must be aligne with transfer width
the totalBytes should align with the bytesEachRequest
the srcAddr should align with the srcWidthOfEachTransfer
the dstAddr should align with the dstWidthOfEachTransfer
the srcAddr should align with srcAddrModulo if modulo feature is enabled
the dstAddr should align with dstAddrModulo if modulo feature is enabled If anyone of above condition can not be satisfied, the eDMA interfaces will generate assert error.
-
typedef struct _edma_config edma_config_t#
eDMA global configuration structure.
-
typedef void (*edma_callback)(struct _edma_handle *handle, void *userData, bool transferDone, uint32_t tcds)#
Define callback function for eDMA.
This callback function is called in the EDMA interrupt handle. In normal mode, run into callback function means the transfer users need is done. In scatter gather mode, run into callback function means a transfer control block (tcd) is finished. Not all transfer finished, users can get the finished tcd numbers using interface EDMA_GetUnusedTCDNumber.
- Param handle:
EDMA handle pointer, users shall not touch the values inside.
- Param userData:
The callback user parameter pointer. Users can use this parameter to involve things users need to change in EDMA callback function.
- Param transferDone:
If the current loaded transfer done. In normal mode it means if all transfer done. In scatter gather mode, this parameter shows is the current transfer block in EDMA register is done. As the load of core is different, it will be different if the new tcd loaded into EDMA registers while this callback called. If true, it always means new tcd still not loaded into registers, while false means new tcd already loaded into registers.
- Param tcds:
How many tcds are done from the last callback. This parameter only used in scatter gather mode. It tells user how many tcds are finished between the last callback and this.
-
typedef struct _edma_handle edma_handle_t#
eDMA transfer handle structure
-
FSL_EDMA_DRIVER_UNIFIED#
eDMA driver name.
This is the unified eDMA driver serving the eDMA3, eDMA4 and eDMA5 IP versions. Its Kconfig component is
driver.edma_unified; the historicaldriver.edma4component and theFSL_EDMA_DRIVER_EDMA4macro are retained as deprecated aliases for backward compatibility. The version-specificedma4_*/edma5_*identifiers inside this driver refer to the corresponding IP TCD layout, not to the component name.
-
FSL_EDMA_DRIVER_EDMA4#
Deprecated alias of FSL_EDMA_DRIVER_UNIFIED; use FSL_EDMA_DRIVER_UNIFIED.
-
EDMA_ALLOCATE_TCD(name, number)#
Macro used for allocate edma TCD.
-
DMA_DCHPRI_INDEX(channel)#
Compute the offset unit from DCHPRI3.
-
struct _edma_channel_Preemption_config#
- #include <fsl_edma.h>
eDMA channel priority configuration
-
struct _edma_minor_offset_config#
- #include <fsl_edma.h>
eDMA minor offset configuration
-
struct _edma_channel_config#
- #include <fsl_edma.h>
eDMA4 channel configuration
Public Members
-
edma_channel_Preemption_config_t channelPreemptionConfig#
channel preemption configuration
-
edma_channel_memory_attribute_t channelReadMemoryAttribute#
channel memory read attribute configuration
-
edma_channel_memory_attribute_t channelWriteMemoryAttribute#
channel memory write attribute configuration
-
edma_channel_swap_size_t channelSwapSize#
channel swap size configuration
-
edma_channel_access_type_t channelAccessType#
channel access type configuration
-
uint8_t channelDataSignExtensionBitPosition#
channel data sign extension bit psition configuration
-
uint32_t channelRequestSource#
hardware service request source for the channel
-
bool enableMasterIDReplication#
enable master ID replication
-
edma_channel_protection_level_t protectionLevel#
protection level
-
edma_channel_Preemption_config_t channelPreemptionConfig#
-
struct _edma_transfer_config#
- #include <fsl_edma.h>
eDMA channel transfer configuration
The transfer configuration structure support full feature configuration of the transfer control descriptor.
1.To perform a simple transfer, below members should be initialized at least .srcAddr - source address .dstAddr - destination address .srcWidthOfEachTransfer - data width of source address .dstWidthOfEachTransfer - data width of destination address, normally it should be as same as srcWidthOfEachTransfer .bytesEachRequest - bytes to be transferred in each DMA request .totalBytes - total bytes to be transferred .srcOffsetOfEachTransfer - offset value in bytes unit to be applied to source address as each source read is completed .dstOffsetOfEachTransfer - offset value in bytes unit to be applied to destination address as each destination write is completed enablchannelRequest - channel request can be enabled together with transfer configure submission
2.The transfer configuration structure also support advance feature: Programmable source/destination address range(MODULO) Programmable minor loop offset Programmable major loop offset Programmable channel chain feature Programmable channel transfer control descriptor link feature
Note
User should pay attention to the transfer size alignment limitation
the bytesEachRequest should align with the srcWidthOfEachTransfer and the dstWidthOfEachTransfer that is to say bytesEachRequest % srcWidthOfEachTransfer should be 0
the srcOffsetOfEachTransfer and dstOffsetOfEachTransfer must be aligne with transfer width
the totalBytes should align with the bytesEachRequest
the srcAddr should align with the srcWidthOfEachTransfer
the dstAddr should align with the dstWidthOfEachTransfer
the srcAddr should align with srcAddrModulo if modulo feature is enabled
the dstAddr should align with dstAddrModulo if modulo feature is enabled If anyone of above condition can not be satisfied, the eDMA interfaces will generate assert error.
Public Members
-
uint32_t srcAddr#
Source data address.
-
uint32_t destAddr#
Destination data address.
-
edma_transfer_size_t srcTransferSize#
Source data transfer size.
-
edma_transfer_size_t destTransferSize#
Destination data transfer size.
-
int16_t srcOffset#
Sign-extended offset value in byte unit applied to the current source address to form the next-state value as each source read is completed
-
int16_t destOffset#
Sign-extended offset value in byte unit applied to the current destination address to form the next-state value as each destination write is completed.
-
uint32_t minorLoopBytes#
bytes in each minor loop or each request range: 1 - (2^30 -1) when minor loop mapping is enabled range: 1 - (2^10 - 1) when minor loop mapping is enabled and source or dest minor loop offset is enabled range: 1 - (2^32 - 1) when minor loop mapping is disabled
-
uint32_t majorLoopCounts#
minor loop counts in each major loop, should be 1 at least for each transfer range: (0 - (2^15 - 1)) when minor loop channel link is disabled range: (0 - (2^9 - 1)) when minor loop channel link is enabled total bytes in a transfer = minorLoopCountsEachMajorLoop * bytesEachMinorLoop
-
uint16_t enabledInterruptMask#
channel interrupt to enable, can be OR’ed value of _edma_interrupt_enable
-
edma_modulo_t srcAddrModulo#
source circular data queue range
-
int32_t srcMajorLoopOffset#
source major loop offset
-
edma_modulo_t dstAddrModulo#
destination circular data queue range
-
int32_t dstMajorLoopOffset#
destination major loop offset
-
bool enableSrcMinorLoopOffset#
enable source minor loop offset
-
bool enableDstMinorLoopOffset#
enable dest minor loop offset
-
int32_t minorLoopOffset#
burst offset, the offset will be applied after minor loop update
-
bool enableChannelMajorLoopLink#
channel link when major loop complete
-
uint32_t majorLoopLinkChannel#
major loop link channel number
-
bool enableChannelMinorLoopLink#
channel link when minor loop complete
-
uint32_t minorLoopLinkChannel#
minor loop link channel number
-
edma_tcd_t *linkTCD#
pointer to the link transfer control descriptor
-
struct _edma_config#
- #include <fsl_edma.h>
eDMA global configuration structure.
Public Members
-
bool enableContinuousLinkMode#
Enable (true) continuous link mode. Upon minor loop completion, the channel activates again if that channel has a minor loop channel link enabled and the link channel is itself.
-
bool enableMasterIdReplication#
Enable (true) master ID replication. If Master ID replication is disabled, the privileged protection level (supervisor mode) for eDMA4 transfers is used.
-
bool enableGlobalChannelLink#
Enable(true) channel linking is available and controlled by each channel’s link settings.
-
bool enableHaltOnError#
Enable (true) transfer halt on error. Any error causes the HALT bit to set. Subsequently, all service requests are ignored until the HALT bit is cleared.
-
bool enableDebugMode#
Enable(true) eDMA4 debug mode. When in debug mode, the eDMA4 stalls the start of a new channel. Executing channels are allowed to complete.
-
bool enableRoundRobinArbitration#
Enable(true) channel linking is available and controlled by each channel’s link settings.
-
edma_channel_config_t *channelConfig[1]#
channel preemption configuration
-
bool enableContinuousLinkMode#
-
struct _edma_handle#
- #include <fsl_edma.h>
eDMA transfer handle structure
Public Members
-
edma_callback callback#
Callback function for major count exhausted.
-
void *userData#
Callback function parameter.
-
EDMA_ChannelType *channelBase#
eDMA peripheral channel base address.
-
EDMA_TCDType *tcdBase#
eDMA peripheral tcd base address.
-
edma_tcd_t *tcdPool#
Pointer to memory stored TCDs.
-
uint32_t channel#
eDMA channel number.
-
volatile int8_t header#
The first TCD index. Should point to the next TCD to be loaded into the eDMA engine.
-
volatile int8_t tail#
The last TCD index. Should point to the next TCD to be stored into the memory pool.
-
volatile int8_t tcdUsed#
The number of used TCD slots. Should reflect the number of TCDs can be used/loaded in the memory.
-
volatile int8_t tcdSize#
The total number of TCD slots in the queue.
-
edma_callback callback#
eDMA core Driver#
-
enum _edma_tcd_type#
eDMA tcd flag type
Values:
-
enumerator kEDMA_EDMA4Flag#
Data access for eDMA4 transfers.
-
enumerator kEDMA_EDMA5Flag#
Instruction access for eDMA4 transfers.
-
enumerator kEDMA_EDMA4Flag#
-
typedef struct _edma_core_mp edma_core_mp_t#
edma core channel struture definition
-
typedef struct _edma_core_channel edma_core_channel_t#
edma core channel struture definition
-
typedef enum _edma_tcd_type edma_tcd_type_t#
eDMA tcd flag type
-
typedef struct _edma5_core_tcd edma5_core_tcd_t#
edma5 core TCD struture definition
-
typedef struct _edma4_core_tcd edma4_core_tcd_t#
edma4 core TCD struture definition
-
typedef struct _edma_core_tcd edma_core_tcd_t#
edma core TCD struture definition
-
typedef edma_core_channel_t EDMA_ChannelType#
EDMA typedef.
-
typedef edma_core_tcd_t EDMA_TCDType#
-
typedef void EDMA_Type#
-
DMA_CORE_MP_CSR_EDBG_MASK#
-
DMA_CORE_MP_CSR_ERCA_MASK#
-
DMA_CORE_MP_CSR_HAE_MASK#
-
DMA_CORE_MP_CSR_HALT_MASK#
-
DMA_CORE_MP_CSR_GCLC_MASK#
-
DMA_CORE_MP_CSR_GMRC_MASK#
-
DMA_CORE_MP_CSR_EDBG(x)#
-
DMA_CORE_MP_CSR_ERCA(x)#
-
DMA_CORE_MP_CSR_HAE(x)#
-
DMA_CORE_MP_CSR_HALT(x)#
-
DMA_CORE_MP_CSR_GCLC(x)#
-
DMA_CORE_MP_CSR_GMRC(x)#
-
DMA_CSR_INTMAJOR_MASK#
-
DMA_CSR_INTHALF_MASK#
-
DMA_CSR_DREQ_MASK#
-
DMA_CSR_ESG_MASK#
-
DMA_CSR_BWC_MASK#
-
DMA_CSR_BWC(x)#
-
DMA_CSR_START_MASK#
-
DMA_CITER_ELINKNO_CITER_MASK#
-
DMA_BITER_ELINKNO_BITER_MASK#
-
DMA_CITER_ELINKNO_CITER_SHIFT#
-
DMA_CITER_ELINKYES_CITER_MASK#
-
DMA_CITER_ELINKYES_CITER_SHIFT#
-
DMA_ATTR_SMOD_MASK#
-
DMA_ATTR_DMOD_MASK#
-
DMA_ATTR_SSIZE_MASK#
-
DMA_ATTR_SSIZE_SHIFT#
-
DMA_ATTR_DSIZE_MASK#
-
DMA_ATTR_DSIZE_SHIFT#
-
DMA_CITER_ELINKNO_ELINK_MASK#
-
DMA_CSR_MAJORELINK_MASK#
-
DMA_BITER_ELINKYES_ELINK_MASK#
-
DMA_CITER_ELINKYES_ELINK_MASK#
-
DMA_CSR_MAJORLINKCH_MASK#
-
DMA_BITER_ELINKYES_LINKCH_MASK#
-
DMA_CITER_ELINKYES_LINKCH_MASK#
-
DMA_NBYTES_MLOFFYES_MLOFF_MASK#
-
DMA_NBYTES_MLOFFYES_DMLOE_MASK#
-
DMA_NBYTES_MLOFFYES_SMLOE_MASK#
-
DMA_NBYTES_MLOFFNO_NBYTES_MASK#
-
DMA_ATTR_DMOD(x)#
-
DMA_ATTR_SMOD(x)#
-
DMA_BITER_ELINKYES_LINKCH(x)#
-
DMA_CITER_ELINKYES_LINKCH(x)#
-
DMA_NBYTES_MLOFFYES_MLOFF(x)#
-
DMA_NBYTES_MLOFFYES_DMLOE(x)#
-
DMA_NBYTES_MLOFFYES_SMLOE(x)#
-
DMA_NBYTES_MLOFFNO_NBYTES(x)#
-
DMA_NBYTES_MLOFFYES_NBYTES(x)#
-
DMA_ATTR_DSIZE(x)#
-
DMA_ATTR_SSIZE(x)#
-
DMA_CSR_DREQ(x)#
-
DMA_CSR_MAJORLINKCH(x)#
-
DMA_CH_MATTR_WCACHE(x)#
-
DMA_CH_MATTR_RCACHE(x)#
-
DMA_CH_CSR_SIGNEXT_MASK#
-
DMA_CH_CSR_SIGNEXT_SHIFT#
-
DMA_CH_CSR_SWAP_MASK#
-
DMA_CH_CSR_SWAP_SHIFT#
-
DMA_CH_SBR_INSTR_MASK#
-
DMA_CH_SBR_INSTR_SHIFT#
-
DMA_CH_SBR_EMI_MASK#
-
DMA_CH_SBR_EMI_SHIFT#
-
DMA_CH_MUX_SOURCE(x)#
-
DMA_ERR_DBE_FLAG#
DMA error flag.
-
DMA_ERR_SBE_FLAG#
-
DMA_ERR_SGE_FLAG#
-
DMA_ERR_NCE_FLAG#
-
DMA_ERR_DOE_FLAG#
-
DMA_ERR_DAE_FLAG#
-
DMA_ERR_SOE_FLAG#
-
DMA_ERR_SAE_FLAG#
-
DMA_ERR_ERRCHAN_FLAG#
-
DMA_ERR_ECX_FLAG#
-
DMA_ERR_FLAG#
-
DMA_CLEAR_DONE_STATUS(base, channel)#
get/clear DONE bit
-
DMA_GET_DONE_STATUS(base, channel)#
-
DMA_ENABLE_ERROR_INT(base, channel)#
enable/disable error interupt
-
DMA_DISABLE_ERROR_INT(base, channel)#
-
DMA_CLEAR_ERROR_STATUS(base, channel)#
get/clear error status
-
DMA_GET_ERROR_STATUS(base, channel)#
-
DMA_CLEAR_INT_STATUS(base, channel)#
get/clear INT status
-
DMA_GET_INT_STATUS(base, channel)#
-
DMA_ENABLE_MAJOR_INT(base, channel)#
enable/dsiable MAJOR/HALF INT
-
DMA_ENABLE_HALF_INT(base, channel)#
-
DMA_DISABLE_MAJOR_INT(base, channel)#
-
DMA_DISABLE_HALF_INT(base, channel)#
-
EDMA_TCD_ALIGN_SIZE#
EDMA tcd align size.
-
EDMA_CORE_BASE(base)#
EDMA base address convert macro.
-
EDMA_MP_BASE(base)#
-
EDMA_CHANNEL_BASE(base, channel)#
-
EDMA_TCD_BASE(base, channel)#
-
EDMA_TCD_TYPE(x)#
EDMA TCD type macro.
-
EDMA_TCD_SADDR(tcd, flag)#
EDMA TCD address convert macro.
-
EDMA_TCD_SOFF(tcd, flag)#
-
EDMA_TCD_ATTR(tcd, flag)#
-
EDMA_TCD_NBYTES(tcd, flag)#
-
EDMA_TCD_SLAST(tcd, flag)#
-
EDMA_TCD_DADDR(tcd, flag)#
-
EDMA_TCD_DOFF(tcd, flag)#
-
EDMA_TCD_CITER(tcd, flag)#
-
EDMA_TCD_DLAST_SGA(tcd, flag)#
-
EDMA_TCD_CSR(tcd, flag)#
-
EDMA_TCD_BITER(tcd, flag)#
-
struct _edma_core_mp#
- #include <fsl_edma_core.h>
edma core channel struture definition
Public Members
- __IO uint32_t MP_CSR
Channel Control and Status, array offset: 0x10000, array step: 0x10000
- __IO uint32_t MP_ES
Channel Error Status, array offset: 0x10004, array step: 0x10000
-
struct _edma_core_channel#
- #include <fsl_edma_core.h>
edma core channel struture definition
Public Members
- __IO uint32_t CH_CSR
Channel Control and Status, array offset: 0x10000, array step: 0x10000
- __IO uint32_t CH_ES
Channel Error Status, array offset: 0x10004, array step: 0x10000
- __IO uint32_t CH_INT
Channel Interrupt Status, array offset: 0x10008, array step: 0x10000
- __IO uint32_t CH_SBR
Channel System Bus, array offset: 0x1000C, array step: 0x10000
- __IO uint32_t CH_PRI
Channel Priority, array offset: 0x10010, array step: 0x10000
-
struct _edma5_core_tcd#
- #include <fsl_edma_core.h>
edma5 core TCD struture definition
Public Members
- __IO uint32_t SADDR
SADDR register, used to save source address
- __IO uint32_t SADDR_HIGH
SADDR HIGH register, used to save source address
- __IO uint16_t SOFF
SOFF register, save offset bytes every transfer
- __IO uint16_t ATTR
ATTR register, source/destination transfer size and modulo
- __IO uint32_t NBYTES
Nbytes register, minor loop length in bytes
- __IO uint32_t SLAST
SLAST register
- __IO uint32_t SLAST_SDA_HIGH
SLAST SDA HIGH register
- __IO uint32_t DADDR
DADDR register, used for destination address
- __IO uint32_t DADDR_HIGH
DADDR HIGH register, used for destination address
- __IO uint32_t DLAST_SGA
DLASTSGA register, next tcd address used in scatter-gather mode
- __IO uint32_t DLAST_SGA_HIGH
DLASTSGA HIGH register, next tcd address used in scatter-gather mode
- __IO uint16_t DOFF
DOFF register, used for destination offset
- __IO uint16_t CITER
CITER register, current minor loop numbers, for unfinished minor loop.
- __IO uint16_t CSR
CSR register, for TCD control status
- __IO uint16_t BITER
BITER register, begin minor loop count.
-
uint8_t RESERVED[16]#
Aligned 64 bytes
-
struct _edma4_core_tcd#
- #include <fsl_edma_core.h>
edma4 core TCD struture definition
Public Members
- __IO uint32_t SADDR
SADDR register, used to save source address
- __IO uint16_t SOFF
SOFF register, save offset bytes every transfer
- __IO uint16_t ATTR
ATTR register, source/destination transfer size and modulo
- __IO uint32_t NBYTES
Nbytes register, minor loop length in bytes
- __IO uint32_t SLAST
SLAST register
- __IO uint32_t DADDR
DADDR register, used for destination address
- __IO uint16_t DOFF
DOFF register, used for destination offset
- __IO uint16_t CITER
CITER register, current minor loop numbers, for unfinished minor loop.
- __IO uint32_t DLAST_SGA
DLASTSGA register, next tcd address used in scatter-gather mode
- __IO uint16_t CSR
CSR register, for TCD control status
- __IO uint16_t BITER
BITER register, begin minor loop count.
-
struct _edma_core_tcd#
- #include <fsl_edma_core.h>
edma core TCD struture definition
-
union MP_REGS#
Public Members
-
struct _edma_core_mp EDMA5_REG#
-
struct _edma_core_mp EDMA5_REG#
-
struct EDMA5_REG
Public Members
- __IO uint32_t MP_INT_LOW
Channel Control and Status, array offset: 0x10008, array step: 0x10000
- __I uint32_t MP_INT_HIGH
Channel Control and Status, array offset: 0x1000C, array step: 0x10000
- __I uint32_t MP_HRS_LOW
Channel Control and Status, array offset: 0x10010, array step: 0x10000
- __I uint32_t MP_HRS_HIGH
Channel Control and Status, array offset: 0x10014, array step: 0x10000
- __IO uint32_t MP_STOPCH
Channel Control and Status, array offset: 0x10020, array step: 0x10000
- __I uint32_t MP_SSR_LOW
Channel Control and Status, array offset: 0x10030, array step: 0x10000
- __I uint32_t MP_SSR_HIGH
Channel Control and Status, array offset: 0x10034, array step: 0x10000
- __IO uint32_t CH_GRPRI [64]
Channel Control and Status, array offset: 0x10100, array step: 0x10000
- __IO uint32_t CH_MUX [64]
Channel Control and Status, array offset: 0x10200, array step: 0x10000
- __IO uint32_t CH_PROT [64]
Channel Control and Status, array offset: 0x10400, array step: 0x10000
-
union CH_REGS#
-
struct EDMA5_REG
Public Members
- __IO uint32_t CH_MATTR
Memory Attributes Register, array offset: 0x10018, array step: 0x8000
-
struct EDMA4_REG
Public Members
- __IO uint32_t CH_MUX
Channel Multiplexor Configuration, array offset: 0x10014, array step: 0x10000
- __IO uint16_t CH_MATTR
Memory Attributes Register, array offset: 0x10018, array step: 0x8000
-
union TCD_REGS#
Public Members
-
edma4_core_tcd_t edma4_tcd#
-
edma4_core_tcd_t edma4_tcd#
EDMA SOC Driver#
-
FSL_EDMA_SOC_DRIVER_VERSION#
Driver version 2.0.0.
-
FSL_EDMA_SOC_IP_DMA3#
DMA IP version.
-
FSL_EDMA_SOC_IP_DMA5#
-
EDMA_BASE_PTRS#
DMA base table.
-
EDMA_CHN_IRQS#
-
EDMA_CHANNEL_OFFSET#
EDMA base address convert macro.
-
EDMA_CHANNEL_ARRAY_STEP(base)#
ENET: Ethernet MAC Driver#
-
void ENET_GetDefaultConfig(enet_config_t *config)#
Gets the ENET default configuration structure.
The purpose of this API is to get the default ENET MAC controller configure structure for ENET_Init(). User may use the initialized structure unchanged in ENET_Init(), or modify some fields of the structure before calling ENET_Init(). Example:
enet_config_t config; ENET_GetDefaultConfig(&config);
- Parameters:
config – The ENET mac controller configuration structure pointer.
-
status_t ENET_Up(ENET_Type *base, enet_handle_t *handle, const enet_config_t *config, const enet_buffer_config_t *bufferConfig, uint8_t *macAddr, uint32_t srcClock_Hz)#
Initializes the ENET module.
This function initializes the module with the ENET configuration.
Note
ENET has two buffer descriptors legacy buffer descriptors and enhanced IEEE 1588 buffer descriptors. The legacy descriptor is used by default. To use the IEEE 1588 feature, use the enhanced IEEE 1588 buffer descriptor by defining “ENET_ENHANCEDBUFFERDESCRIPTOR_MODE” and calling ENET_Ptp1588Configure() to configure the 1588 feature and related buffers after calling ENET_Up().
- Parameters:
base – ENET peripheral base address.
handle – ENET handler pointer.
config – ENET mac configuration structure pointer. The “enet_config_t” type mac configuration return from ENET_GetDefaultConfig can be used directly. It is also possible to verify the Mac configuration using other methods.
bufferConfig – ENET buffer configuration structure pointer. The buffer configuration should be prepared for ENET Initialization. It is the start address of “ringNum” enet_buffer_config structures. To support added multi-ring features in some soc and compatible with the previous enet driver version. For single ring supported, this bufferConfig is a buffer configure structure pointer, for multi-ring supported and used case, this bufferConfig pointer should be a buffer configure structure array pointer.
macAddr – ENET mac address of Ethernet device. This MAC address should be provided.
srcClock_Hz – The internal module clock source for MII clock.
- Return values:
kStatus_Success – Succeed to initialize the ethernet driver.
kStatus_ENET_InitMemoryFail – Init fails since buffer memory is not enough.
-
status_t ENET_Init(ENET_Type *base, enet_handle_t *handle, const enet_config_t *config, const enet_buffer_config_t *bufferConfig, uint8_t *macAddr, uint32_t srcClock_Hz)#
Initializes the ENET module.
This function ungates the module clock and initializes it with the ENET configuration.
Note
ENET has two buffer descriptors legacy buffer descriptors and enhanced IEEE 1588 buffer descriptors. The legacy descriptor is used by default. To use the IEEE 1588 feature, use the enhanced IEEE 1588 buffer descriptor by defining “ENET_ENHANCEDBUFFERDESCRIPTOR_MODE” and calling ENET_Ptp1588Configure() to configure the 1588 feature and related buffers after calling ENET_Init().
- Parameters:
base – ENET peripheral base address.
handle – ENET handler pointer.
config – ENET mac configuration structure pointer. The “enet_config_t” type mac configuration return from ENET_GetDefaultConfig can be used directly. It is also possible to verify the Mac configuration using other methods.
bufferConfig – ENET buffer configuration structure pointer. The buffer configuration should be prepared for ENET Initialization. It is the start address of “ringNum” enet_buffer_config structures. To support added multi-ring features in some soc and compatible with the previous enet driver version. For single ring supported, this bufferConfig is a buffer configure structure pointer, for multi-ring supported and used case, this bufferConfig pointer should be a buffer configure structure array pointer.
macAddr – ENET mac address of Ethernet device. This MAC address should be provided.
srcClock_Hz – The internal module clock source for MII clock.
- Return values:
kStatus_Success – Succeed to initialize the ethernet driver.
kStatus_ENET_InitMemoryFail – Init fails since buffer memory is not enough.
-
void ENET_Down(ENET_Type *base)#
Stops the ENET module.
This function disables the ENET module.
- Parameters:
base – ENET peripheral base address.
-
void ENET_Deinit(ENET_Type *base)#
Deinitializes the ENET module.
This function gates the module clock, clears ENET interrupts, and disables the ENET module.
- Parameters:
base – ENET peripheral base address.
-
static inline void ENET_Reset(ENET_Type *base)#
Resets the ENET module.
This function restores the ENET module to reset state. Note that this function sets all registers to reset state. As a result, the ENET module can’t work after calling this function.
- Parameters:
base – ENET peripheral base address.
-
void ENET_SetMII(ENET_Type *base, enet_mii_speed_t speed, enet_mii_duplex_t duplex)#
Sets the ENET MII speed and duplex.
This API is provided to dynamically change the speed and dulpex for MAC.
- Parameters:
base – ENET peripheral base address.
speed – The speed of the RMII mode.
duplex – The duplex of the RMII mode.
-
void ENET_SetSMI(ENET_Type *base, uint32_t srcClock_Hz, bool isPreambleDisabled)#
Sets the ENET SMI(serial management interface)- MII management interface.
- Parameters:
base – ENET peripheral base address.
srcClock_Hz – This is the ENET module clock frequency. See clock distribution.
isPreambleDisabled – The preamble disable flag.
true Enables the preamble.
false Disables the preamble.
-
static inline bool ENET_GetSMI(ENET_Type *base)#
Gets the ENET SMI- MII management interface configuration.
This API is used to get the SMI configuration to check whether the MII management interface has been set.
- Parameters:
base – ENET peripheral base address.
- Returns:
The SMI setup status true or false.
-
static inline uint32_t ENET_ReadSMIData(ENET_Type *base)#
Reads data from the PHY register through an SMI interface.
- Parameters:
base – ENET peripheral base address.
- Returns:
The data read from PHY
-
static inline void ENET_StartSMIWrite(ENET_Type *base, uint8_t phyAddr, uint8_t regAddr, enet_mii_write_t operation, uint16_t data)#
Sends the MDIO IEEE802.3 Clause 22 format write command.
After calling this function, need to check whether the transmission is over then do next MDIO operation. For ease of use, encapsulated ENET_MDIOWrite() can be called. For customized requirements, implement with combining separated APIs.
- Parameters:
base – ENET peripheral base address.
phyAddr – The PHY address. Range from 0 ~ 31.
regAddr – The PHY register address. Range from 0 ~ 31.
operation – The write operation.
data – The data written to PHY.
-
static inline void ENET_StartSMIRead(ENET_Type *base, uint8_t phyAddr, uint8_t regAddr, enet_mii_read_t operation)#
Sends the MDIO IEEE802.3 Clause 22 format read command.
After calling this function, need to check whether the transmission is over then do next MDIO operation. For ease of use, encapsulated ENET_MDIORead() can be called. For customized requirements, implement with combining separated APIs.
- Parameters:
base – ENET peripheral base address.
phyAddr – The PHY address. Range from 0 ~ 31.
regAddr – The PHY register address. Range from 0 ~ 31.
operation – The read operation.
-
status_t ENET_MDIOWrite(ENET_Type *base, uint8_t phyAddr, uint8_t regAddr, uint16_t data)#
MDIO write with IEEE802.3 Clause 22 format.
- Parameters:
base – ENET peripheral base address.
phyAddr – The PHY address. Range from 0 ~ 31.
regAddr – The PHY register. Range from 0 ~ 31.
data – The data written to PHY.
- Returns:
kStatus_Success MDIO access succeeds.
- Returns:
kStatus_Timeout MDIO access timeout.
-
status_t ENET_MDIORead(ENET_Type *base, uint8_t phyAddr, uint8_t regAddr, uint16_t *pData)#
MDIO read with IEEE802.3 Clause 22 format.
- Parameters:
base – ENET peripheral base address.
phyAddr – The PHY address. Range from 0 ~ 31.
regAddr – The PHY register. Range from 0 ~ 31.
pData – The data read from PHY.
- Returns:
kStatus_Success MDIO access succeeds.
- Returns:
kStatus_Timeout MDIO access timeout.
-
static inline void ENET_StartExtC45SMIWriteReg(ENET_Type *base, uint8_t portAddr, uint8_t devAddr, uint16_t regAddr)#
Sends the MDIO IEEE802.3 Clause 45 format write register command.
After calling this function, need to check whether the transmission is over then do next MDIO operation. For ease of use, encapsulated ENET_MDIOC45Write()/ENET_MDIOC45Read() can be called. For customized requirements, implement with combining separated APIs.
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
regAddr – The PHY register address.
-
static inline void ENET_StartExtC45SMIWriteData(ENET_Type *base, uint8_t portAddr, uint8_t devAddr, uint16_t data)#
Sends the MDIO IEEE802.3 Clause 45 format write data command.
After calling this function, need to check whether the transmission is over then do next MDIO operation. For ease of use, encapsulated ENET_MDIOC45Write() can be called. For customized requirements, implement with combining separated APIs.
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
data – The data written to PHY.
-
static inline void ENET_StartExtC45SMIReadData(ENET_Type *base, uint8_t portAddr, uint8_t devAddr)#
Sends the MDIO IEEE802.3 Clause 45 format read data command.
After calling this function, need to check whether the transmission is over then do next MDIO operation. For ease of use, encapsulated ENET_MDIOC45Read() can be called. For customized requirements, implement with combining separated APIs.
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
-
status_t ENET_MDIOC45Write(ENET_Type *base, uint8_t portAddr, uint8_t devAddr, uint16_t regAddr, uint16_t data)#
MDIO write with IEEE802.3 Clause 45 format.
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
regAddr – The PHY register address.
data – The data written to PHY.
- Returns:
kStatus_Success MDIO access succeeds.
- Returns:
kStatus_Timeout MDIO access timeout.
-
status_t ENET_MDIOC45Read(ENET_Type *base, uint8_t portAddr, uint8_t devAddr, uint16_t regAddr, uint16_t *pData)#
MDIO read with IEEE802.3 Clause 45 format.
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
regAddr – The PHY register address.
pData – The data read from PHY.
- Returns:
kStatus_Success MDIO access succeeds.
- Returns:
kStatus_Timeout MDIO access timeout.
-
static inline void ENET_SetRGMIIClockDelay(ENET_Type *base, bool txEnabled, bool rxEnabled)#
Control the usage of the delayed tx/rx RGMII clock.
- Parameters:
base – ENET peripheral base address.
txEnabled – Enable or disable to generate the delayed version of RGMII_TXC.
rxEnabled – Enable or disable to use the delayed version of RGMII_RXC.
-
void ENET_SetMacAddr(ENET_Type *base, uint8_t *macAddr)#
Sets the ENET module Mac address.
- Parameters:
base – ENET peripheral base address.
macAddr – The six-byte Mac address pointer. The pointer is allocated by application and input into the API.
-
void ENET_GetMacAddr(ENET_Type *base, uint8_t *macAddr)#
Gets the ENET module Mac address.
- Parameters:
base – ENET peripheral base address.
macAddr – The six-byte Mac address pointer. The pointer is allocated by application and input into the API.
-
void ENET_AddMulticastGroup(ENET_Type *base, uint8_t *address)#
Adds the ENET device to a multicast group.
- Parameters:
base – ENET peripheral base address.
address – The six-byte multicast group address which is provided by application.
-
void ENET_LeaveMulticastGroup(ENET_Type *base, uint8_t *address)#
Moves the ENET device from a multicast group.
- Parameters:
base – ENET peripheral base address.
address – The six-byte multicast group address which is provided by application.
-
static inline void ENET_ActiveRead(ENET_Type *base)#
Activates frame reception for multiple rings.
This function is to active the enet read process.
Note
This must be called after the MAC configuration and state are ready. It must be called after the ENET_Init(). This should be called when the frame reception is required.
- Parameters:
base – ENET peripheral base address.
-
static inline void ENET_EnableSleepMode(ENET_Type *base, bool enable)#
Enables/disables the MAC to enter sleep mode. This function is used to set the MAC enter sleep mode. When entering sleep mode, the magic frame wakeup interrupt should be enabled to wake up MAC from the sleep mode and reset it to normal mode.
- Parameters:
base – ENET peripheral base address.
enable – True enable sleep mode, false disable sleep mode.
-
static inline void ENET_GetAccelFunction(ENET_Type *base, uint32_t *txAccelOption, uint32_t *rxAccelOption)#
Gets ENET transmit and receive accelerator functions from MAC controller.
- Parameters:
base – ENET peripheral base address.
txAccelOption – The transmit accelerator option. The “enet_tx_accelerator_t” is recommended to be used to as the mask to get the exact the accelerator option.
rxAccelOption – The receive accelerator option. The “enet_rx_accelerator_t” is recommended to be used to as the mask to get the exact the accelerator option.
-
static inline void ENET_EnableInterrupts(ENET_Type *base, uint32_t mask)#
Enables the ENET interrupt.
This function enables the ENET interrupt according to the provided mask. The mask is a logical OR of enumeration members. See enet_interrupt_enable_t. For example, to enable the TX frame interrupt and RX frame interrupt, do the following.
ENET_EnableInterrupts(ENET, kENET_TxFrameInterrupt | kENET_RxFrameInterrupt);
- Parameters:
base – ENET peripheral base address.
mask – ENET interrupts to enable. This is a logical OR of the enumeration enet_interrupt_enable_t.
-
static inline void ENET_DisableInterrupts(ENET_Type *base, uint32_t mask)#
Disables the ENET interrupt.
This function disables the ENET interrupts according to the provided mask. The mask is a logical OR of enumeration members. See enet_interrupt_enable_t. For example, to disable the TX frame interrupt and RX frame interrupt, do the following.
ENET_DisableInterrupts(ENET, kENET_TxFrameInterrupt | kENET_RxFrameInterrupt);
- Parameters:
base – ENET peripheral base address.
mask – ENET interrupts to disable. This is a logical OR of the enumeration enet_interrupt_enable_t.
-
static inline uint32_t ENET_GetInterruptStatus(ENET_Type *base)#
Gets the ENET interrupt status flag.
- Parameters:
base – ENET peripheral base address.
- Returns:
The event status of the interrupt source. This is the logical OR of members of the enumeration enet_interrupt_enable_t.
-
static inline void ENET_ClearInterruptStatus(ENET_Type *base, uint32_t mask)#
Clears the ENET interrupt events status flag.
This function clears enabled ENET interrupts according to the provided mask. The mask is a logical OR of enumeration members. See the enet_interrupt_enable_t. For example, to clear the TX frame interrupt and RX frame interrupt, do the following.
ENET_ClearInterruptStatus(ENET, kENET_TxFrameInterrupt | kENET_RxFrameInterrupt);
- Parameters:
base – ENET peripheral base address.
mask – ENET interrupt source to be cleared. This is the logical OR of members of the enumeration enet_interrupt_enable_t.
-
void ENET_SetRxISRHandler(ENET_Type *base, enet_isr_t ISRHandler)#
Set the second level Rx IRQ handler.
- Parameters:
base – ENET peripheral base address.
ISRHandler – The handler to install.
-
void ENET_SetTxISRHandler(ENET_Type *base, enet_isr_t ISRHandler)#
Set the second level Tx IRQ handler.
- Parameters:
base – ENET peripheral base address.
ISRHandler – The handler to install.
-
void ENET_SetErrISRHandler(ENET_Type *base, enet_isr_t ISRHandler)#
Set the second level Err IRQ handler.
- Parameters:
base – ENET peripheral base address.
ISRHandler – The handler to install.
-
void ENET_GetRxErrBeforeReadFrame(enet_handle_t *handle, enet_data_error_stats_t *eErrorStatic, uint8_t ringId)#
Gets the error statistics of a received frame for ENET specified ring.
This API must be called after the ENET_GetRxFrameSize and before the ENET_ReadFrame(). If the ENET_GetRxFrameSize returns kStatus_ENET_RxFrameError, the ENET_GetRxErrBeforeReadFrame can be used to get the exact error statistics. This is an example.
status = ENET_GetRxFrameSize(&g_handle, &length, 0); if (status == kStatus_ENET_RxFrameError) { Comments: Get the error information of the received frame. ENET_GetRxErrBeforeReadFrame(&g_handle, &eErrStatic, 0); Comments: update the receive buffer. ENET_ReadFrame(EXAMPLE_ENET, &g_handle, NULL, 0); }
- Parameters:
handle – The ENET handler structure pointer. This is the same handler pointer used in the ENET_Init.
eErrorStatic – The error statistics structure pointer.
ringId – The ring index, range from 0 ~ (FSL_FEATURE_ENET_INSTANCE_QUEUEn(x) - 1).
-
void ENET_EnableStatistics(ENET_Type *base, bool enable)#
Enables/disables collection of transfer statistics.
Note that this function does not reset any of the already collected data, use the function ENET_ResetStatistics to clear the transfer statistics if needed.
- Parameters:
base – ENET peripheral base address.
enable – True enable statistics collection, false disable statistics collection.
-
void ENET_GetStatistics(ENET_Type *base, enet_transfer_stats_t *statistics)#
Gets transfer statistics.
Copies the actual value of hardware counters into the provided structure. Calling this function does not reset the counters in hardware.
- Parameters:
base – ENET peripheral base address.
statistics – The statistics structure pointer.
-
void ENET_ResetStatistics(ENET_Type *base)#
Resets transfer statistics.
Sets the value of hardware transfer counters to zero.
- Parameters:
base – ENET peripheral base address.
-
status_t ENET_GetRxFrameSize(enet_handle_t *handle, uint32_t *length, uint8_t ringId)#
Gets the size of the read frame for specified ring.
This function gets a received frame size from the ENET buffer descriptors.
Note
The FCS of the frame is automatically removed by MAC and the size is the length without the FCS. After calling ENET_GetRxFrameSize, ENET_ReadFrame() should be called to receive frame and update the BD if the result is not “kStatus_ENET_RxFrameEmpty”.
- Parameters:
handle – The ENET handler structure. This is the same handler pointer used in the ENET_Init.
length – The length of the valid frame received.
ringId – The ring index or ring number.
- Return values:
kStatus_ENET_RxFrameEmpty – No frame received. Should not call ENET_ReadFrame to read frame.
kStatus_ENET_RxFrameError – Data error happens. ENET_ReadFrame should be called with NULL data and NULL length to update the receive buffers.
kStatus_Success – Receive a frame Successfully then the ENET_ReadFrame should be called with the right data buffer and the captured data length input.
-
status_t ENET_ReadFrame(ENET_Type *base, enet_handle_t *handle, uint8_t *data, uint32_t length, uint8_t ringId, uint32_t *ts)#
Reads a frame from the ENET device. This function reads a frame (both the data and the length) from the ENET buffer descriptors. User can get timestamp through ts pointer if the ts is not NULL.
Note
It doesn’t store the timestamp in the receive timestamp queue. The ENET_GetRxFrameSize should be used to get the size of the prepared data buffer. This API uses memcpy to copy data from DMA buffer to application buffer, 4 bytes aligned data buffer in 32 bits platforms provided by user may let compiler use optimization instruction to reduce time consumption. This is an example:
uint32_t length; enet_handle_t g_handle; Comments: Get the received frame size firstly. status = ENET_GetRxFrameSize(&g_handle, &length, 0); if (length != 0) { Comments: Allocate memory here with the size of "length" uint8_t *data = memory allocate interface; if (!data) { ENET_ReadFrame(ENET, &g_handle, NULL, 0, 0, NULL); Comments: Add the console warning log. } else { status = ENET_ReadFrame(ENET, &g_handle, data, length, 0, NULL); Comments: Call stack input API to deliver the data to stack } } else if (status == kStatus_ENET_RxFrameError) { Comments: Update the received buffer when a error frame is received. ENET_ReadFrame(ENET, &g_handle, NULL, 0, 0, NULL); }- Parameters:
base – ENET peripheral base address.
handle – The ENET handler structure. This is the same handler pointer used in the ENET_Init.
data – The data buffer provided by user to store the frame which memory size should be at least “length”.
length – The size of the data buffer which is still the length of the received frame.
ringId – The ring index or ring number.
ts – The timestamp address to store received timestamp.
- Returns:
The execute status, successful or failure.
-
status_t ENET_SendFrame(ENET_Type *base, enet_handle_t *handle, const uint8_t *data, uint32_t length, uint8_t ringId, bool tsFlag, void *context)#
Transmits an ENET frame for specified ring.
Note
The CRC is automatically appended to the data. Input the data to send without the CRC. This API uses memcpy to copy data from DMA buffer to application buffer, 4 bytes aligned data buffer in 32 bits platforms provided by user may let compiler use optimization instruction to reduce time consumption.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer. This is the same handler pointer used in the ENET_Init.
data – The data buffer provided by user to send.
length – The length of the data to send.
ringId – The ring index or ring number.
tsFlag – Timestamp enable flag.
context – Used by user to handle some events after transmit over.
- Return values:
kStatus_Success – Send frame succeed.
kStatus_ENET_TxFrameBusy – Transmit buffer descriptor is busy under transmission. The transmit busy happens when the data send rate is over the MAC capacity. The waiting mechanism is recommended to be added after each call return with kStatus_ENET_TxFrameBusy.
-
status_t ENET_SetTxReclaim(enet_handle_t *handle, bool isEnable, uint8_t ringId)#
Enable or disable tx descriptors reclaim mechanism.
Note
This function must be called when no pending send frame action. Set enable if you want to reclaim context or timestamp in interrupt.
- Parameters:
handle – The ENET handler pointer. This is the same handler pointer used in the ENET_Init.
isEnable – Enable or disable flag.
ringId – The ring index or ring number.
- Return values:
kStatus_Success – Succeed to enable/disable Tx reclaim.
kStatus_Fail – Fail to enable/disable Tx reclaim.
-
void ENET_ReclaimTxDescriptor(ENET_Type *base, enet_handle_t *handle, uint8_t ringId)#
Reclaim tx descriptors. This function is used to update the tx descriptor status and store the tx timestamp when the 1588 feature is enabled. This is called by the transmit interupt IRQ handler after the complete of a frame transmission.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer. This is the same handler pointer used in the ENET_Init.
ringId – The ring index or ring number.
-
status_t ENET_GetRxFrame(ENET_Type *base, enet_handle_t *handle, enet_rx_frame_struct_t *rxFrame, uint8_t ringId)#
Receives one frame in specified BD ring with zero copy.
This function uses the user-defined allocation and free callbacks. Every time application gets one frame through this function, driver stores the buffer address(es) in enet_buffer_struct_t and allocate new buffer(s) for the BD(s). If there’s no memory buffer in the pool, this function drops current one frame to keep the Rx frame in BD ring is as fresh as possible.
Note
Application must provide a memory pool including at least BD number + n buffers in order for this function to work properly, because each BD must always take one buffer while driver is running, then other extra n buffer(s) can be taken by application. Here n is the ceil(max_frame_length(set by RCR) / bd_rx_size(set by MRBR)). Application must also provide an array structure in rxFrame->rxBuffArray with n index to receive one complete frame in any case.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer. This is the same handler pointer used in the ENET_Init.
rxFrame – The received frame information structure provided by user.
ringId – The ring index or ring number.
- Return values:
kStatus_Success – Succeed to get one frame and allocate new memory for Rx buffer.
kStatus_ENET_RxFrameEmpty – There’s no Rx frame in the BD.
kStatus_ENET_RxFrameError – There’s issue in this receiving.
kStatus_ENET_RxFrameDrop – There’s no new buffer memory for BD, drop this frame.
-
status_t ENET_StartTxFrame(ENET_Type *base, enet_handle_t *handle, enet_tx_frame_struct_t *txFrame, uint8_t ringId)#
Sends one frame in specified BD ring with zero copy.
This function supports scattered buffer transmit, user needs to provide the buffer array.
Note
Tx reclaim should be enabled to ensure the Tx buffer ownership can be given back to application after Tx is over.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer. This is the same handler pointer used in the ENET_Init.
txFrame – The Tx frame structure.
ringId – The ring index or ring number.
- Return values:
kStatus_Success – Succeed to send one frame.
kStatus_ENET_TxFrameBusy – The BD is not ready for Tx or the reclaim operation still not finishs.
kStatus_ENET_TxFrameOverLen – The Tx frame length is over max ethernet frame length.
-
void ENET_TransmitIRQHandler(ENET_Type *base, enet_handle_t *handle)#
The transmit IRQ handler.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer.
-
void ENET_ReceiveIRQHandler(ENET_Type *base, enet_handle_t *handle)#
The receive IRQ handler.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer.
-
void ENET_ErrorIRQHandler(ENET_Type *base, enet_handle_t *handle)#
Some special IRQ handler including the error, mii, wakeup irq handler.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer.
-
void ENET_Ptp1588IRQHandler(ENET_Type *base)#
the common IRQ handler for the 1588 irq handler.
This is used for the 1588 timer interrupt.
- Parameters:
base – ENET peripheral base address.
-
void ENET_CommonFrame0IRQHandler(ENET_Type *base)#
the common IRQ handler for the tx/rx/error etc irq handler.
This is used for the combined tx/rx/error interrupt for single/mutli-ring (frame 0).
- Parameters:
base – ENET peripheral base address.
-
void ENET_CommonFrame0DriverIRQHandler(uint32_t instance)#
Parameterized frame-0 (tx/rx/error) common IRQ handler.
Takes the instance directly to avoid the ENET_GetInstance() lookup in the ISR path. Each SoC binds this from the interrupt lines that carry its frame-0 tx/rx/error events.
- Parameters:
instance – ENET peripheral instance number.
-
void ENET_Ptp1588DriverIRQHandler(uint32_t instance)#
Parameterized 1588 timer common IRQ handler.
Takes the instance directly to avoid the ENET_GetInstance() lookup in the ISR path. Each SoC binds this from the interrupt line that carries its 1588 timer event.
- Parameters:
instance – ENET peripheral instance number.
-
FSL_ENET_DRIVER_VERSION#
Defines the driver version.
-
ENET_BUFFDESCRIPTOR_RX_EMPTY_MASK#
Empty bit mask.
-
ENET_BUFFDESCRIPTOR_RX_SOFTOWNER1_MASK#
Software owner one mask.
-
ENET_BUFFDESCRIPTOR_RX_WRAP_MASK#
Next buffer descriptor is the start address.
-
ENET_BUFFDESCRIPTOR_RX_SOFTOWNER2_Mask#
Software owner two mask.
-
ENET_BUFFDESCRIPTOR_RX_LAST_MASK#
Last BD of the frame mask.
-
ENET_BUFFDESCRIPTOR_RX_MISS_MASK#
Received because of the promiscuous mode.
-
ENET_BUFFDESCRIPTOR_RX_BROADCAST_MASK#
Broadcast packet mask.
-
ENET_BUFFDESCRIPTOR_RX_MULTICAST_MASK#
Multicast packet mask.
-
ENET_BUFFDESCRIPTOR_RX_LENVLIOLATE_MASK#
Length violation mask.
-
ENET_BUFFDESCRIPTOR_RX_NOOCTET_MASK#
Non-octet aligned frame mask.
-
ENET_BUFFDESCRIPTOR_RX_CRC_MASK#
CRC error mask.
-
ENET_BUFFDESCRIPTOR_RX_OVERRUN_MASK#
FIFO overrun mask.
-
ENET_BUFFDESCRIPTOR_RX_TRUNC_MASK#
Frame is truncated mask.
-
ENET_BUFFDESCRIPTOR_TX_READY_MASK#
Ready bit mask.
-
ENET_BUFFDESCRIPTOR_TX_SOFTOWENER1_MASK#
Software owner one mask.
-
ENET_BUFFDESCRIPTOR_TX_WRAP_MASK#
Wrap buffer descriptor mask.
-
ENET_BUFFDESCRIPTOR_TX_SOFTOWENER2_MASK#
Software owner two mask.
-
ENET_BUFFDESCRIPTOR_TX_LAST_MASK#
Last BD of the frame mask.
-
ENET_BUFFDESCRIPTOR_TX_TRANMITCRC_MASK#
Transmit CRC mask.
-
ENET_FRAME_MAX_FRAMELEN#
Default maximum Ethernet frame size without VLAN tag.
-
ENET_FRAME_VLAN_TAGLEN#
Ethernet single VLAN tag size.
-
ENET_FRAME_CRC_LEN#
CRC size in a frame.
-
ENET_FRAME_TX_LEN_LIMITATION(x)#
-
ENET_FIFO_MIN_RX_FULL#
ENET minimum receive FIFO full.
-
ENET_RX_MIN_BUFFERSIZE#
ENET minimum buffer size.
-
ENET_PHY_MAXADDRESS#
Maximum PHY address.
-
ENET_TX_INTERRUPT#
Enet Tx interrupt flag.
-
ENET_RX_INTERRUPT#
Enet Rx interrupt flag.
-
ENET_TS_INTERRUPT#
Enet timestamp interrupt flag.
-
ENET_ERR_INTERRUPT#
Enet error interrupt flag.
Defines the status return codes for transaction.
Values:
-
enumerator kStatus_ENET_InitMemoryFail#
Init fails since buffer memory is not enough.
-
enumerator kStatus_ENET_RxFrameError#
A frame received but data error happen.
-
enumerator kStatus_ENET_RxFrameFail#
Failed to receive a frame.
-
enumerator kStatus_ENET_RxFrameEmpty#
No frame arrive.
-
enumerator kStatus_ENET_RxFrameDrop#
Rx frame is dropped since no buffer memory.
-
enumerator kStatus_ENET_TxFrameOverLen#
Tx frame over length.
-
enumerator kStatus_ENET_TxFrameBusy#
Tx buffer descriptors are under process.
-
enumerator kStatus_ENET_TxFrameFail#
Transmit frame fail.
-
enumerator kStatus_ENET_InitMemoryFail#
-
enum _enet_mii_mode#
Defines the MII/RMII/RGMII mode for data interface between the MAC and the PHY.
Values:
-
enumerator kENET_MiiMode#
MII mode for data interface.
-
enumerator kENET_RmiiMode#
RMII mode for data interface.
-
enumerator kENET_RgmiiMode#
RGMII mode for data interface.
-
enumerator kENET_MiiMode#
-
enum _enet_mii_speed#
Defines the 10/100/1000 Mbps speed for the MII data interface.
Notice: “kENET_MiiSpeed1000M” only supported when mii mode is “kENET_RgmiiMode”.
Values:
-
enumerator kENET_MiiSpeed10M#
Speed 10 Mbps.
-
enumerator kENET_MiiSpeed100M#
Speed 100 Mbps.
-
enumerator kENET_MiiSpeed1000M#
Speed 1000M bps.
-
enumerator kENET_MiiSpeed10M#
-
enum _enet_mii_duplex#
Defines the half or full duplex for the MII data interface.
Values:
-
enumerator kENET_MiiHalfDuplex#
Half duplex mode.
-
enumerator kENET_MiiFullDuplex#
Full duplex mode.
-
enumerator kENET_MiiHalfDuplex#
-
enum _enet_mii_write#
Define the MII opcode for normal MDIO_CLAUSES_22 Frame.
Values:
-
enumerator kENET_MiiWriteNoCompliant#
Write frame operation, but not MII-compliant.
-
enumerator kENET_MiiWriteValidFrame#
Write frame operation for a valid MII management frame.
-
enumerator kENET_MiiWriteNoCompliant#
-
enum _enet_mii_read#
Defines the read operation for the MII management frame.
Values:
-
enumerator kENET_MiiReadValidFrame#
Read frame operation for a valid MII management frame.
-
enumerator kENET_MiiReadNoCompliant#
Read frame operation, but not MII-compliant.
-
enumerator kENET_MiiReadValidFrame#
-
enum _enet_mii_extend_opcode#
Define the MII opcode for extended MDIO_CLAUSES_45 Frame.
Values:
-
enumerator kENET_MiiAddrWrite_C45#
Address Write operation.
-
enumerator kENET_MiiWriteFrame_C45#
Write frame operation for a valid MII management frame.
-
enumerator kENET_MiiReadFrame_C45#
Read frame operation for a valid MII management frame.
-
enumerator kENET_MiiAddrWrite_C45#
-
enum _enet_special_control_flag#
Defines a special configuration for ENET MAC controller.
These control flags are provided for special user requirements. Normally, these control flags are unused for ENET initialization. For special requirements, set the flags to macSpecialConfig in the enet_config_t. The kENET_ControlStoreAndFwdDisable is used to disable the FIFO store and forward. FIFO store and forward means that the FIFO read/send is started when a complete frame is stored in TX/RX FIFO. If this flag is set, configure rxFifoFullThreshold and txFifoWatermark in the enet_config_t.
Values:
-
enumerator kENET_ControlFlowControlEnable#
Enable ENET flow control: pause frame.
-
enumerator kENET_ControlRxPayloadCheckEnable#
Enable ENET receive payload length check.
-
enumerator kENET_ControlRxPadRemoveEnable#
Padding is removed from received frames.
-
enumerator kENET_ControlRxBroadCastRejectEnable#
Enable broadcast frame reject.
-
enumerator kENET_ControlMacAddrInsert#
Enable MAC address insert.
-
enumerator kENET_ControlStoreAndFwdDisable#
Enable FIFO store and forward.
-
enumerator kENET_ControlSMIPreambleDisable#
Enable SMI preamble.
-
enumerator kENET_ControlPromiscuousEnable#
Enable promiscuous mode.
-
enumerator kENET_ControlMIILoopEnable#
Enable ENET MII loop back.
-
enumerator kENET_ControlVLANTagEnable#
Enable normal VLAN (single vlan tag).
-
enumerator kENET_ControlSVLANEnable#
Enable S-VLAN.
-
enumerator kENET_ControlVLANUseSecondTag#
Enable extracting the second vlan tag for further processing.
-
enumerator kENET_ControlFlowControlEnable#
-
enum _enet_interrupt_enable#
List of interrupts supported by the peripheral. This enumeration uses one-bit encoding to allow a logical OR of multiple members. Members usually map to interrupt enable bits in one or more peripheral registers.
Values:
-
enumerator kENET_BabrInterrupt#
Babbling receive error interrupt source
-
enumerator kENET_BabtInterrupt#
Babbling transmit error interrupt source
-
enumerator kENET_GraceStopInterrupt#
Graceful stop complete interrupt source
-
enumerator kENET_TxFrameInterrupt#
TX FRAME interrupt source
-
enumerator kENET_TxBufferInterrupt#
TX BUFFER interrupt source
-
enumerator kENET_RxFrameInterrupt#
RX FRAME interrupt source
-
enumerator kENET_RxBufferInterrupt#
RX BUFFER interrupt source
-
enumerator kENET_MiiInterrupt#
MII interrupt source
-
enumerator kENET_EBusERInterrupt#
Ethernet bus error interrupt source
-
enumerator kENET_LateCollisionInterrupt#
Late collision interrupt source
-
enumerator kENET_RetryLimitInterrupt#
Collision Retry Limit interrupt source
-
enumerator kENET_UnderrunInterrupt#
Transmit FIFO underrun interrupt source
-
enumerator kENET_PayloadRxInterrupt#
Payload Receive error interrupt source
-
enumerator kENET_WakeupInterrupt#
WAKEUP interrupt source
-
enumerator kENET_TsAvailInterrupt#
TS AVAIL interrupt source for PTP
-
enumerator kENET_TsTimerInterrupt#
TS WRAP interrupt source for PTP
-
enumerator kENET_BabrInterrupt#
-
enum _enet_event#
Defines the common interrupt event for callback use.
Values:
-
enumerator kENET_RxEvent#
Receive event.
-
enumerator kENET_TxEvent#
Transmit event.
-
enumerator kENET_ErrEvent#
Error event: BABR/BABT/EBERR/LC/RL/UN/PLR .
-
enumerator kENET_WakeUpEvent#
Wake up from sleep mode event.
-
enumerator kENET_TimeStampEvent#
Time stamp event.
-
enumerator kENET_TimeStampAvailEvent#
Time stamp available event.
-
enumerator kENET_RxEvent#
-
enum _enet_idle_slope#
Defines certain idle slope for bandwidth fraction.
Values:
-
enumerator kENET_IdleSlope1#
The bandwidth fraction is about 0.002.
-
enumerator kENET_IdleSlope2#
The bandwidth fraction is about 0.003.
-
enumerator kENET_IdleSlope4#
The bandwidth fraction is about 0.008.
-
enumerator kENET_IdleSlope8#
The bandwidth fraction is about 0.02.
-
enumerator kENET_IdleSlope16#
The bandwidth fraction is about 0.03.
-
enumerator kENET_IdleSlope32#
The bandwidth fraction is about 0.06.
-
enumerator kENET_IdleSlope64#
The bandwidth fraction is about 0.11.
-
enumerator kENET_IdleSlope128#
The bandwidth fraction is about 0.20.
-
enumerator kENET_IdleSlope256#
The bandwidth fraction is about 0.33.
-
enumerator kENET_IdleSlope384#
The bandwidth fraction is about 0.43.
-
enumerator kENET_IdleSlope512#
The bandwidth fraction is about 0.50.
-
enumerator kENET_IdleSlope640#
The bandwidth fraction is about 0.56.
-
enumerator kENET_IdleSlope768#
The bandwidth fraction is about 0.60.
-
enumerator kENET_IdleSlope896#
The bandwidth fraction is about 0.64.
-
enumerator kENET_IdleSlope1024#
The bandwidth fraction is about 0.67.
-
enumerator kENET_IdleSlope1152#
The bandwidth fraction is about 0.69.
-
enumerator kENET_IdleSlope1280#
The bandwidth fraction is about 0.71.
-
enumerator kENET_IdleSlope1408#
The bandwidth fraction is about 0.73.
-
enumerator kENET_IdleSlope1536#
The bandwidth fraction is about 0.75.
-
enumerator kENET_IdleSlope1#
-
enum _enet_tx_accelerator#
Defines the transmit accelerator configuration.
Note that the hardware does not insert ICMPv6 protocol checksums as mentioned in errata ERR052152.
Values:
-
enumerator kENET_TxAccelIsShift16Enabled#
Transmit FIFO shift-16.
-
enumerator kENET_TxAccelIpCheckEnabled#
Insert IP header checksum.
-
enumerator kENET_TxAccelProtoCheckEnabled#
Insert protocol checksum (TCP, UDP, ICMPv4).
-
enumerator kENET_TxAccelIsShift16Enabled#
-
enum _enet_rx_accelerator#
Defines the receive accelerator configuration.
Note that the hardware does not validate ICMPv6 protocol checksums as mentioned in errata ERR052152.
Values:
-
enumerator kENET_RxAccelPadRemoveEnabled#
Padding removal for short IP frames.
-
enumerator kENET_RxAccelIpCheckEnabled#
Discard with wrong IP header checksum.
-
enumerator kENET_RxAccelProtoCheckEnabled#
Discard with wrong protocol checksum (TCP, UDP, ICMPv4).
-
enumerator kENET_RxAccelMacCheckEnabled#
Discard with Mac layer errors.
-
enumerator kENET_RxAccelisShift16Enabled#
Receive FIFO shift-16.
-
enumerator kENET_RxAccelPadRemoveEnabled#
-
typedef enum _enet_mii_mode enet_mii_mode_t#
Defines the MII/RMII/RGMII mode for data interface between the MAC and the PHY.
-
typedef enum _enet_mii_speed enet_mii_speed_t#
Defines the 10/100/1000 Mbps speed for the MII data interface.
Notice: “kENET_MiiSpeed1000M” only supported when mii mode is “kENET_RgmiiMode”.
-
typedef enum _enet_mii_duplex enet_mii_duplex_t#
Defines the half or full duplex for the MII data interface.
-
typedef enum _enet_mii_write enet_mii_write_t#
Define the MII opcode for normal MDIO_CLAUSES_22 Frame.
-
typedef enum _enet_mii_read enet_mii_read_t#
Defines the read operation for the MII management frame.
-
typedef enum _enet_mii_extend_opcode enet_mii_extend_opcode#
Define the MII opcode for extended MDIO_CLAUSES_45 Frame.
-
typedef enum _enet_special_control_flag enet_special_control_flag_t#
Defines a special configuration for ENET MAC controller.
These control flags are provided for special user requirements. Normally, these control flags are unused for ENET initialization. For special requirements, set the flags to macSpecialConfig in the enet_config_t. The kENET_ControlStoreAndFwdDisable is used to disable the FIFO store and forward. FIFO store and forward means that the FIFO read/send is started when a complete frame is stored in TX/RX FIFO. If this flag is set, configure rxFifoFullThreshold and txFifoWatermark in the enet_config_t.
-
typedef enum _enet_interrupt_enable enet_interrupt_enable_t#
List of interrupts supported by the peripheral. This enumeration uses one-bit encoding to allow a logical OR of multiple members. Members usually map to interrupt enable bits in one or more peripheral registers.
-
typedef enum _enet_event enet_event_t#
Defines the common interrupt event for callback use.
-
typedef enum _enet_idle_slope enet_idle_slope_t#
Defines certain idle slope for bandwidth fraction.
-
typedef enum _enet_tx_accelerator enet_tx_accelerator_t#
Defines the transmit accelerator configuration.
Note that the hardware does not insert ICMPv6 protocol checksums as mentioned in errata ERR052152.
-
typedef enum _enet_rx_accelerator enet_rx_accelerator_t#
Defines the receive accelerator configuration.
Note that the hardware does not validate ICMPv6 protocol checksums as mentioned in errata ERR052152.
-
typedef struct _enet_rx_bd_struct enet_rx_bd_struct_t#
Defines the receive buffer descriptor structure for the little endian system.
-
typedef struct _enet_tx_bd_struct enet_tx_bd_struct_t#
Defines the enhanced transmit buffer descriptor structure for the little endian system.
-
typedef struct _enet_data_error_stats enet_data_error_stats_t#
Defines the ENET data error statistics structure.
-
typedef struct _enet_rx_frame_error enet_rx_frame_error_t#
Defines the Rx frame error structure.
-
typedef struct _enet_transfer_stats enet_transfer_stats_t#
Defines the ENET transfer statistics structure.
-
typedef struct enet_frame_info enet_frame_info_t#
Defines the frame info structure.
-
typedef struct _enet_tx_dirty_ring enet_tx_dirty_ring_t#
Defines the ENET transmit dirty addresses ring/queue structure.
-
typedef void *(*enet_rx_alloc_callback_t)(ENET_Type *base, void *userData, uint8_t ringId)#
Defines the ENET Rx memory buffer alloc function pointer.
-
typedef void (*enet_rx_free_callback_t)(ENET_Type *base, void *buffer, void *userData, uint8_t ringId)#
Defines the ENET Rx memory buffer free function pointer.
-
typedef struct _enet_buffer_config enet_buffer_config_t#
Defines the receive buffer descriptor configuration structure.
Note that for the internal DMA requirements, the buffers have a corresponding alignment requirements.
The aligned receive and transmit buffer size must be evenly divisible by ENET_BUFF_ALIGNMENT. when the data buffers are in cacheable region when cache is enabled, all those size should be aligned to the maximum value of “ENET_BUFF_ALIGNMENT” and the cache line size.
The aligned transmit and receive buffer descriptor start address must be at least 64 bit aligned. However, it’s recommended to be evenly divisible by ENET_BUFF_ALIGNMENT. buffer descriptors should be put in non-cacheable region when cache is enabled.
The aligned transmit and receive data buffer start address must be evenly divisible by ENET_BUFF_ALIGNMENT. Receive buffers should be continuous with the total size equal to “rxBdNumber * rxBuffSizeAlign”. Transmit buffers should be continuous with the total size equal to “txBdNumber * txBuffSizeAlign”. when the data buffers are in cacheable region when cache is enabled, all those size should be aligned to the maximum value of “ENET_BUFF_ALIGNMENT” and the cache line size.
-
typedef struct _enet_intcoalesce_config enet_intcoalesce_config_t#
Defines the interrupt coalescing configure structure.
-
typedef struct _enet_avb_config enet_avb_config_t#
Defines the ENET AVB Configure structure.
This is used for to configure the extended ring 1 and ring 2.
The classification match format is (CMP3 << 12) | (CMP2 << 8) | (CMP1 << 4) | CMP0. composed of four 3-bit compared VLAN priority field cmp0~cmp3, cm0 ~ cmp3 are used in parallel.
If CMP1,2,3 are not unused, please set them to the same value as CMP0.
The idleSlope is used to calculate the Band Width fraction, BW fraction = 1 / (1 + 512/idleSlope). For avb configuration, the BW fraction of Class 1 and Class 2 combined must not exceed 0.75.
-
typedef struct _enet_handle enet_handle_t#
-
typedef void (*enet_callback_t)(ENET_Type *base, enet_handle_t *handle, enet_event_t event, enet_frame_info_t *frameInfo, void *userData)#
ENET callback function.
-
typedef struct _enet_config enet_config_t#
Defines the basic configuration structure for the ENET device.
Note:
macSpecialConfig is used for a special control configuration, A logical OR of “enet_special_control_flag_t”. For a special configuration for MAC, set this parameter to 0.
txWatermark is used for a cut-through operation. It is in steps of 64 bytes: 0/1 - 64 bytes written to TX FIFO before transmission of a frame begins. 2 - 128 bytes written to TX FIFO …. 3 - 192 bytes written to TX FIFO …. The maximum of txWatermark is 0x2F - 4032 bytes written to TX FIFO …. txWatermark allows minimizing the transmit latency to set the txWatermark to 0 or 1 or for larger bus access latency 3 or larger due to contention for the system bus.
rxFifoFullThreshold is similar to the txWatermark for cut-through operation in RX. It is in 64-bit words. The minimum is ENET_FIFO_MIN_RX_FULL and the maximum is 0xFF. If the end of the frame is stored in FIFO and the frame size if smaller than the txWatermark, the frame is still transmitted. The rule is the same for rxFifoFullThreshold in the receive direction.
When “kENET_ControlFlowControlEnable” is set in the macSpecialConfig, ensure that the pauseDuration, rxFifoEmptyThreshold, and rxFifoStatEmptyThreshold are set for flow control enabled case.
When “kENET_ControlStoreAndFwdDisabled” is set in the macSpecialConfig, ensure that the rxFifoFullThreshold and txFifoWatermark are set for store and forward disable.
The rxAccelerConfig and txAccelerConfig default setting with 0 - accelerator are disabled. The “enet_tx_accelerator_t” and “enet_rx_accelerator_t” are recommended to be used to enable the transmit and receive accelerator. After the accelerators are enabled, the store and forward feature should be enabled. As a result, kENET_ControlStoreAndFwdDisabled should not be set.
The intCoalesceCfg can be used in the rx or tx enabled cases to decrese the CPU loading.
-
typedef struct _enet_tx_bd_ring enet_tx_bd_ring_t#
Defines the ENET transmit buffer descriptor ring/queue structure.
-
typedef struct _enet_rx_bd_ring enet_rx_bd_ring_t#
Defines the ENET receive buffer descriptor ring/queue structure.
-
typedef struct _enet_buffer_struct enet_buffer_struct_t#
-
typedef struct _enet_rx_frame_attribute_struct enet_rx_frame_attribute_t#
-
typedef struct _enet_rx_frame_struct enet_rx_frame_struct_t#
-
typedef struct _enet_tx_frame_struct enet_tx_frame_struct_t#
-
typedef void (*enet_isr_t)(ENET_Type *base, enet_handle_t *handle)#
Define interrupt IRQ handler.
-
const clock_ip_name_t s_enetClock[]#
Pointers to enet clocks for each instance.
-
const clock_ip_name_t s_enetExtraClock[]#
-
uint32_t ENET_GetInstance(ENET_Type *base)#
Get the ENET instance from peripheral base address.
- Parameters:
base – ENET peripheral base address.
- Returns:
ENET instance.
-
ENET_BUFFDESCRIPTOR_RX_ERR_MASK#
Defines the receive error status flag mask.
-
struct _enet_rx_bd_struct#
- #include <fsl_enet.h>
Defines the receive buffer descriptor structure for the little endian system.
-
struct _enet_tx_bd_struct#
- #include <fsl_enet.h>
Defines the enhanced transmit buffer descriptor structure for the little endian system.
-
struct _enet_data_error_stats#
- #include <fsl_enet.h>
Defines the ENET data error statistics structure.
-
struct _enet_rx_frame_error#
- #include <fsl_enet.h>
Defines the Rx frame error structure.
-
struct _enet_transfer_stats#
- #include <fsl_enet.h>
Defines the ENET transfer statistics structure.
Public Members
-
uint32_t statsRxFrameCount#
Rx frame number.
-
uint32_t statsRxFrameOk#
Good Rx frame number.
-
uint32_t statsRxCrcErr#
Rx frame number with CRC error.
-
uint32_t statsRxAlignErr#
Rx frame number with alignment error.
-
uint32_t statsRxDropInvalidSFD#
Dropped frame number due to invalid SFD.
-
uint32_t statsRxFifoOverflowErr#
Rx FIFO overflow count.
-
uint32_t statsTxFrameCount#
Tx frame number.
-
uint32_t statsTxFrameOk#
Good Tx frame number.
-
uint32_t statsTxCrcAlignErr#
The transmit frame is error.
-
uint32_t statsTxFifoUnderRunErr#
Tx FIFO underrun count.
-
uint32_t statsRxFrameCount#
-
struct enet_frame_info#
- #include <fsl_enet.h>
Defines the frame info structure.
Public Members
-
void *context#
User specified data
-
void *context#
-
struct _enet_tx_dirty_ring#
- #include <fsl_enet.h>
Defines the ENET transmit dirty addresses ring/queue structure.
-
struct _enet_buffer_config#
- #include <fsl_enet.h>
Defines the receive buffer descriptor configuration structure.
Note that for the internal DMA requirements, the buffers have a corresponding alignment requirements.
The aligned receive and transmit buffer size must be evenly divisible by ENET_BUFF_ALIGNMENT. when the data buffers are in cacheable region when cache is enabled, all those size should be aligned to the maximum value of “ENET_BUFF_ALIGNMENT” and the cache line size.
The aligned transmit and receive buffer descriptor start address must be at least 64 bit aligned. However, it’s recommended to be evenly divisible by ENET_BUFF_ALIGNMENT. buffer descriptors should be put in non-cacheable region when cache is enabled.
The aligned transmit and receive data buffer start address must be evenly divisible by ENET_BUFF_ALIGNMENT. Receive buffers should be continuous with the total size equal to “rxBdNumber * rxBuffSizeAlign”. Transmit buffers should be continuous with the total size equal to “txBdNumber * txBuffSizeAlign”. when the data buffers are in cacheable region when cache is enabled, all those size should be aligned to the maximum value of “ENET_BUFF_ALIGNMENT” and the cache line size.
Public Members
-
uint16_t rxBdNumber#
Receive buffer descriptor number.
-
uint16_t txBdNumber#
Transmit buffer descriptor number.
-
uint16_t rxBuffSizeAlign#
Aligned receive data buffer size.
-
uint16_t txBuffSizeAlign#
Aligned transmit data buffer size.
-
volatile enet_rx_bd_struct_t *rxBdStartAddrAlign#
Aligned receive buffer descriptor start address: should be non-cacheable.
-
volatile enet_tx_bd_struct_t *txBdStartAddrAlign#
Aligned transmit buffer descriptor start address: should be non-cacheable.
-
uint8_t *rxBufferAlign#
Receive data buffer start address.
-
uint8_t *txBufferAlign#
Transmit data buffer start address.
-
bool rxMaintainEnable#
Receive buffer cache maintain.
-
bool txMaintainEnable#
Transmit buffer cache maintain.
-
enet_frame_info_t *txFrameInfo#
Transmit frame information start address.
-
struct _enet_intcoalesce_config#
- #include <fsl_enet.h>
Defines the interrupt coalescing configure structure.
Public Members
-
uint8_t txCoalesceFrameCount[1]#
Transmit interrupt coalescing frame count threshold.
-
uint16_t txCoalesceTimeCount[1]#
Transmit interrupt coalescing timer count threshold.
-
uint8_t rxCoalesceFrameCount[1]#
Receive interrupt coalescing frame count threshold.
-
uint16_t rxCoalesceTimeCount[1]#
Receive interrupt coalescing timer count threshold.
-
uint8_t txCoalesceFrameCount[1]#
-
struct _enet_avb_config#
- #include <fsl_enet.h>
Defines the ENET AVB Configure structure.
This is used for to configure the extended ring 1 and ring 2.
The classification match format is (CMP3 << 12) | (CMP2 << 8) | (CMP1 << 4) | CMP0. composed of four 3-bit compared VLAN priority field cmp0~cmp3, cm0 ~ cmp3 are used in parallel.
If CMP1,2,3 are not unused, please set them to the same value as CMP0.
The idleSlope is used to calculate the Band Width fraction, BW fraction = 1 / (1 + 512/idleSlope). For avb configuration, the BW fraction of Class 1 and Class 2 combined must not exceed 0.75.
Public Members
-
uint16_t rxClassifyMatch[1 - 1]#
The classification match value for the ring.
-
enet_idle_slope_t idleSlope[1 - 1]#
The idle slope for certian bandwidth fraction.
-
struct _enet_config#
- #include <fsl_enet.h>
Defines the basic configuration structure for the ENET device.
Note:
macSpecialConfig is used for a special control configuration, A logical OR of “enet_special_control_flag_t”. For a special configuration for MAC, set this parameter to 0.
txWatermark is used for a cut-through operation. It is in steps of 64 bytes: 0/1 - 64 bytes written to TX FIFO before transmission of a frame begins. 2 - 128 bytes written to TX FIFO …. 3 - 192 bytes written to TX FIFO …. The maximum of txWatermark is 0x2F - 4032 bytes written to TX FIFO …. txWatermark allows minimizing the transmit latency to set the txWatermark to 0 or 1 or for larger bus access latency 3 or larger due to contention for the system bus.
rxFifoFullThreshold is similar to the txWatermark for cut-through operation in RX. It is in 64-bit words. The minimum is ENET_FIFO_MIN_RX_FULL and the maximum is 0xFF. If the end of the frame is stored in FIFO and the frame size if smaller than the txWatermark, the frame is still transmitted. The rule is the same for rxFifoFullThreshold in the receive direction.
When “kENET_ControlFlowControlEnable” is set in the macSpecialConfig, ensure that the pauseDuration, rxFifoEmptyThreshold, and rxFifoStatEmptyThreshold are set for flow control enabled case.
When “kENET_ControlStoreAndFwdDisabled” is set in the macSpecialConfig, ensure that the rxFifoFullThreshold and txFifoWatermark are set for store and forward disable.
The rxAccelerConfig and txAccelerConfig default setting with 0 - accelerator are disabled. The “enet_tx_accelerator_t” and “enet_rx_accelerator_t” are recommended to be used to enable the transmit and receive accelerator. After the accelerators are enabled, the store and forward feature should be enabled. As a result, kENET_ControlStoreAndFwdDisabled should not be set.
The intCoalesceCfg can be used in the rx or tx enabled cases to decrese the CPU loading.
Public Members
-
uint32_t macSpecialConfig#
Mac special configuration. A logical OR of “enet_special_control_flag_t”.
-
uint32_t interrupt#
Mac interrupt source. A logical OR of “enet_interrupt_enable_t”.
-
uint16_t rxMaxFrameLen#
Receive maximum frame length.
-
enet_mii_mode_t miiMode#
MII mode.
-
enet_mii_speed_t miiSpeed#
MII Speed.
-
enet_mii_duplex_t miiDuplex#
MII duplex.
-
uint8_t rxAccelerConfig#
Receive accelerator, A logical OR of “enet_rx_accelerator_t”.
-
uint8_t txAccelerConfig#
Transmit accelerator, A logical OR of “enet_rx_accelerator_t”.
-
uint16_t pauseDuration#
For flow control enabled case: Pause duration.
-
uint8_t rxFifoEmptyThreshold#
For flow control enabled case: when RX FIFO level reaches this value, it makes MAC generate XOFF pause frame.
-
uint8_t rxFifoStatEmptyThreshold#
For flow control enabled case: number of frames in the receive FIFO, independent of size, that can be accept. If the limit is reached, reception continues and a pause frame is triggered.
-
uint8_t rxFifoFullThreshold#
For store and forward disable case, the data required in RX FIFO to notify the MAC receive ready status.
-
uint8_t txFifoWatermark#
For store and forward disable case, the data required in TX FIFO before a frame transmit start.
-
enet_intcoalesce_config_t *intCoalesceCfg#
If the interrupt coalsecence is not required in the ring n(0,1,2), please set to NULL.
-
uint8_t ringNum#
Number of used rings. default with 1 — single ring.
-
enet_rx_alloc_callback_t rxBuffAlloc#
Callback function to alloc memory, must be provided for zero-copy Rx.
-
enet_rx_free_callback_t rxBuffFree#
Callback function to free memory, must be provided for zero-copy Rx.
-
enet_callback_t callback#
General callback function.
-
void *userData#
Callback function parameter.
-
struct _enet_tx_bd_ring#
- #include <fsl_enet.h>
Defines the ENET transmit buffer descriptor ring/queue structure.
Public Members
-
volatile enet_tx_bd_struct_t *txBdBase#
Buffer descriptor base address pointer.
-
uint16_t txGenIdx#
The current available transmit buffer descriptor pointer.
-
uint16_t txConsumIdx#
Transmit consume index.
-
volatile uint16_t txDescUsed#
Transmit descriptor used number.
-
uint16_t txRingLen#
Transmit ring length.
-
volatile enet_tx_bd_struct_t *txBdBase#
-
struct _enet_rx_bd_ring#
- #include <fsl_enet.h>
Defines the ENET receive buffer descriptor ring/queue structure.
Public Members
-
volatile enet_rx_bd_struct_t *rxBdBase#
Buffer descriptor base address pointer.
-
uint16_t rxGenIdx#
The current available receive buffer descriptor pointer.
-
uint16_t rxRingLen#
Receive ring length.
-
volatile enet_rx_bd_struct_t *rxBdBase#
-
struct _enet_handle#
- #include <fsl_enet.h>
Defines the ENET handler structure.
Public Members
-
enet_rx_bd_ring_t rxBdRing[1]#
Receive buffer descriptor.
-
enet_tx_bd_ring_t txBdRing[1]#
Transmit buffer descriptor.
-
uint16_t rxBuffSizeAlign[1]#
Receive buffer size alignment.
-
uint16_t txBuffSizeAlign[1]#
Transmit buffer size alignment.
-
bool rxMaintainEnable[1]#
Receive buffer cache maintain.
-
bool txMaintainEnable[1]#
Transmit buffer cache maintain.
-
uint8_t ringNum#
Number of used rings.
-
enet_callback_t callback#
Callback function.
-
void *userData#
Callback function parameter.
-
enet_tx_dirty_ring_t txDirtyRing[1]#
Ring to store tx frame information.
-
bool txReclaimEnable[1]#
Tx reclaim enable flag.
-
enet_rx_alloc_callback_t rxBuffAlloc#
Callback function to alloc memory for zero copy Rx.
-
enet_rx_free_callback_t rxBuffFree#
Callback function to free memory for zero copy Rx.
-
uint8_t multicastCount[64]#
Multicast collisions counter
-
uint32_t enetClock#
The clock of enet peripheral, to caculate core cycles for PTP timestamp.
-
uint32_t tsDelayCount#
The count of core cycles for PTP timestamp capture delay.
-
enet_rx_bd_ring_t rxBdRing[1]#
-
struct _enet_buffer_struct#
-
struct _enet_rx_frame_attribute_struct#
Public Members
-
bool promiscuous#
This frame is received because of promiscuous mode.
-
bool promiscuous#
-
struct _enet_rx_frame_struct#
Public Members
-
enet_buffer_struct_t *rxBuffArray#
Rx frame buffer structure.
-
uint16_t totLen#
Rx frame total length.
-
enet_rx_frame_attribute_t rxAttribute#
Rx frame attribute structure.
-
enet_rx_frame_error_t rxFrameError#
Rx frame error.
-
enet_buffer_struct_t *rxBuffArray#
-
struct _enet_tx_frame_struct#
Public Members
-
enet_buffer_struct_t *txBuffArray#
Tx frame buffer structure.
-
uint32_t txBuffNum#
Buffer number of this Tx frame.
-
void *context#
Driver reclaims and gives it in Tx over callback, usually store network packet header.
-
enet_buffer_struct_t *txBuffArray#
EQOS-TSN: Ethernet QoS with TSN Driver#
Enet_qos_qos#
-
void ENET_QOS_GetDefaultConfig(enet_qos_config_t *config)#
Gets the ENET default configuration structure.
The purpose of this API is to get the default ENET configure structure for ENET_QOS_Init(). User may use the initialized structure unchanged in ENET_QOS_Init(), or modify some fields of the structure before calling ENET_QOS_Init(). Example:
enet_qos_config_t config; ENET_QOS_GetDefaultConfig(&config);
- Parameters:
config – The ENET mac controller configuration structure pointer.
-
status_t ENET_QOS_Up(ENET_QOS_Type *base, const enet_qos_config_t *config, uint8_t *macAddr, uint8_t macCount, uint32_t refclkSrc_Hz)#
Initializes the ENET module.
This function initializes it with the ENET basic configuration.
- Parameters:
base – ENET peripheral base address.
config – ENET mac configuration structure pointer. The “enet_qos_config_t” type mac configuration return from ENET_QOS_GetDefaultConfig can be used directly. It is also possible to verify the Mac configuration using other methods.
macAddr – Pointer to ENET mac address array of Ethernet device. This MAC address should be provided.
macCount – Count of macAddr in the ENET mac address array
refclkSrc_Hz – ENET input reference clock.
-
status_t ENET_QOS_Init(ENET_QOS_Type *base, const enet_qos_config_t *config, uint8_t *macAddr, uint8_t macCount, uint32_t refclkSrc_Hz)#
Initializes the ENET module.
This function ungates the module clock and initializes it with the ENET basic configuration.
- Parameters:
base – ENET peripheral base address.
config – ENET mac configuration structure pointer. The “enet_qos_config_t” type mac configuration return from ENET_QOS_GetDefaultConfig can be used directly. It is also possible to verify the Mac configuration using other methods.
macAddr – Pointer to ENET mac address array of Ethernet device. This MAC address should be provided.
macCount – Count of macAddr in the ENET mac address array
refclkSrc_Hz – ENET input reference clock.
-
void ENET_QOS_Down(ENET_QOS_Type *base)#
Stops the ENET module.
This function disables the ENET module.
- Parameters:
base – ENET peripheral base address.
-
void ENET_QOS_Deinit(ENET_QOS_Type *base)#
Deinitializes the ENET module.
This function gates the module clock and disables the ENET module.
- Parameters:
base – ENET peripheral base address.
-
uint32_t ENET_QOS_GetInstance(ENET_QOS_Type *base)#
Get the ENET instance from peripheral base address.
- Parameters:
base – ENET peripheral base address.
- Returns:
ENET instance.
-
status_t ENET_QOS_DescriptorInit(ENET_QOS_Type *base, enet_qos_config_t *config, enet_qos_buffer_config_t *bufferConfig)#
Initialize for all ENET descriptors.
Note
This function is do all tx/rx descriptors initialization. Because this API read all interrupt registers first and then set the interrupt flag for all descriptors, if the interrupt register is set. so the descriptor initialization should be called after ENET_QOS_Init(), ENET_QOS_EnableInterrupts() and ENET_QOS_CreateHandle()(if transactional APIs are used).
- Parameters:
base – ENET peripheral base address.
config – The configuration for ENET.
bufferConfig – All buffers configuration.
-
status_t ENET_QOS_RxBufferAllocAll(ENET_QOS_Type *base, enet_qos_handle_t *handle)#
Allocates Rx buffers for all BDs. It’s used for zero copy Rx. In zero copy Rx case, Rx buffers are dynamic. This function will populate initial buffers in all BDs for receiving. Then ENET_QOS_GetRxFrame() is used to get Rx frame with zero copy, it will allocate new buffer to replace the buffer in BD taken by application application should free those buffers after they’re used.
Note
This function should be called after ENET_QOS_CreateHandler() and buffer allocating callback function should be ready.
- Parameters:
base – ENET_QOS peripheral base address.
handle – The ENET_QOS handler structure. This is the same handler pointer used in the ENET_QOS_Init.
-
void ENET_QOS_RxBufferFreeAll(ENET_QOS_Type *base, enet_qos_handle_t *handle)#
Frees Rx buffers in all BDs. It’s used for zero copy Rx. In zero copy Rx case, Rx buffers are dynamic. This function will free left buffers in all BDs.
- Parameters:
base – ENET_QOS peripheral base address.
handle – The ENET_QOS handler structure. This is the same handler pointer used in the ENET_QOS_Init.
-
void ENET_QOS_StartRxTx(ENET_QOS_Type *base, uint8_t txRingNum, uint8_t rxRingNum)#
Starts the ENET rx/tx. This function enable the tx/rx and starts the rx/tx DMA. This shall be set after ENET initialization and before starting to receive the data.
Note
This must be called after all the ENET initialization. And should be called when the ENET receive/transmit is required.
Note
The MAC transmitter (MAC_Configuration[TE]) is enabled before the transmit DMA is started as a workaround for errata ERR051222.
- Parameters:
base – ENET peripheral base address.
rxRingNum – The number of the used rx rings. It shall not be larger than the ENET_QOS_RING_NUM_MAX(2). If the ringNum is set with 1, the ring 0 will be used.
txRingNum – The number of the used tx rings. It shall not be larger than the ENET_QOS_RING_NUM_MAX(2). If the ringNum is set with 1, the ring 0 will be used.
-
status_t ENET_QOS_SetMII(ENET_QOS_Type *base, enet_qos_mii_speed_t speed, enet_qos_mii_duplex_t duplex)#
Sets the ENET MII speed and duplex.
This API is provided to dynamically change the speed and duplex for MAC.
- Parameters:
base – ENET peripheral base address.
speed – The speed of the RMII mode.
duplex – The duplex of the RMII mode.
- Returns:
kStatus_Success The ENET MII speed and duplex has been set successfully.
- Returns:
kStatus_InvalidArgument Could not set the desired ENET MII speed and duplex combination.
-
void ENET_QOS_SetSMI(ENET_QOS_Type *base, uint32_t csrClock_Hz)#
Sets the ENET SMI(serial management interface)- MII management interface.
- Parameters:
base – ENET peripheral base address.
csrClock_Hz – CSR clock frequency in HZ
-
static inline bool ENET_QOS_IsSMIBusy(ENET_QOS_Type *base)#
Checks if the SMI is busy.
- Parameters:
base – ENET peripheral base address.
- Returns:
The status of MII Busy status.
-
static inline uint16_t ENET_QOS_ReadSMIData(ENET_QOS_Type *base)#
Reads data from the PHY register through SMI interface.
- Parameters:
base – ENET peripheral base address.
- Returns:
The data read from PHY
-
void ENET_QOS_StartSMIWrite(ENET_QOS_Type *base, uint8_t phyAddr, uint8_t regAddr, uint16_t data)#
Sends the MDIO IEEE802.3 Clause 22 format write command. After send command, user needs to check whether the transmission is over with ENET_QOS_IsSMIBusy().
- Parameters:
base – ENET peripheral base address.
phyAddr – The PHY address.
regAddr – The PHY register address.
data – The data written to PHY.
-
void ENET_QOS_StartSMIRead(ENET_QOS_Type *base, uint8_t phyAddr, uint8_t regAddr)#
Sends the MDIO IEEE802.3 Clause 22 format read command. After send command, user needs to check whether the transmission is over with ENET_QOS_IsSMIBusy().
- Parameters:
base – ENET peripheral base address.
phyAddr – The PHY address.
regAddr – The PHY register address.
-
void ENET_QOS_StartExtC45SMIWrite(ENET_QOS_Type *base, uint8_t portAddr, uint8_t devAddr, uint16_t regAddr, uint16_t data)#
Sends the MDIO IEEE802.3 Clause 45 format write command. After send command, user needs to check whether the transmission is over with ENET_QOS_IsSMIBusy().
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
regAddr – The PHY register address.
data – The data written to PHY.
-
void ENET_QOS_StartExtC45SMIRead(ENET_QOS_Type *base, uint8_t portAddr, uint8_t devAddr, uint16_t regAddr)#
Sends the MDIO IEEE802.3 Clause 45 format read command. After send command, user needs to check whether the transmission is over with ENET_QOS_IsSMIBusy().
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
regAddr – The PHY register address.
-
status_t ENET_QOS_MDIOWrite(ENET_QOS_Type *base, uint8_t phyAddr, uint8_t regAddr, uint16_t data)#
MDIO write with IEEE802.3 MDIO Clause 22 format.
- Parameters:
base – ENET peripheral base address.
phyAddr – The PHY address.
regAddr – The PHY register.
data – The data written to PHY.
- Returns:
kStatus_Success MDIO access succeeds.
- Returns:
kStatus_Timeout MDIO access timeout.
-
status_t ENET_QOS_MDIORead(ENET_QOS_Type *base, uint8_t phyAddr, uint8_t regAddr, uint16_t *pData)#
MDIO read with IEEE802.3 MDIO Clause 22 format.
- Parameters:
base – ENET peripheral base address.
phyAddr – The PHY address.
regAddr – The PHY register.
pData – The data read from PHY.
- Returns:
kStatus_Success MDIO access succeeds.
- Returns:
kStatus_Timeout MDIO access timeout.
-
status_t ENET_QOS_MDIOC45Write(ENET_QOS_Type *base, uint8_t portAddr, uint8_t devAddr, uint16_t regAddr, uint16_t data)#
MDIO write with IEEE802.3 Clause 45 format.
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
regAddr – The PHY register address.
data – The data written to PHY.
- Returns:
kStatus_Success MDIO access succeeds.
- Returns:
kStatus_Timeout MDIO access timeout.
-
status_t ENET_QOS_MDIOC45Read(ENET_QOS_Type *base, uint8_t portAddr, uint8_t devAddr, uint16_t regAddr, uint16_t *pData)#
MDIO read with IEEE802.3 Clause 45 format.
- Parameters:
base – ENET peripheral base address.
portAddr – The MDIO port address(PHY address).
devAddr – The device address.
regAddr – The PHY register address.
pData – The data read from PHY.
- Returns:
kStatus_Success MDIO access succeeds.
- Returns:
kStatus_Timeout MDIO access timeout.
-
static inline void ENET_QOS_SetMacAddr(ENET_QOS_Type *base, uint8_t *macAddr, uint8_t index)#
Sets the ENET module Mac address.
- Parameters:
base – ENET peripheral base address.
macAddr – The six-byte Mac address pointer. The pointer is allocated by application and input into the API.
index – Configure macAddr to MAC_ADDRESS[index] register.
-
void ENET_QOS_GetMacAddr(ENET_QOS_Type *base, uint8_t *macAddr, uint8_t index)#
Gets the ENET module Mac address.
- Parameters:
base – ENET peripheral base address.
macAddr – The six-byte Mac address pointer. The pointer is allocated by application and input into the API.
index – Get macAddr from MAC_ADDRESS[index] register.
-
void ENET_QOS_AddMulticastGroup(ENET_QOS_Type *base, uint8_t *address)#
Adds the ENET_QOS device to a multicast group.
- Parameters:
base – ENET_QOS peripheral base address.
address – The six-byte multicast group address which is provided by application.
-
void ENET_QOS_LeaveMulticastGroup(ENET_QOS_Type *base, uint8_t *address)#
Moves the ENET_QOS device from a multicast group.
- Parameters:
base – ENET_QOS peripheral base address.
address – The six-byte multicast group address which is provided by application.
-
static inline void ENET_QOS_AcceptAllMulticast(ENET_QOS_Type *base)#
Enable ENET device to accept all multicast frames.
- Parameters:
base – ENET peripheral base address.
-
static inline void ENET_QOS_RejectAllMulticast(ENET_QOS_Type *base)#
ENET device reject to accept all multicast frames.
- Parameters:
base – ENET peripheral base address.
-
void ENET_QOS_EnterPowerDown(ENET_QOS_Type *base, uint32_t *wakeFilter)#
Set the MAC to enter into power down mode. the remote power wake up frame and magic frame can wake up the ENET from the power down mode.
- Parameters:
base – ENET peripheral base address.
wakeFilter – The wakeFilter provided to configure the wake up frame filter. Set the wakeFilter to NULL is not required. But if you have the filter requirement, please make sure the wakeFilter pointer shall be eight continuous 32-bits configuration.
-
static inline void ENET_QOS_ExitPowerDown(ENET_QOS_Type *base)#
Set the MAC to exit power down mode. Exit from the power down mode and recover to normal work mode.
- Parameters:
base – ENET peripheral base address.
-
status_t ENET_QOS_EnableRxParser(ENET_QOS_Type *base, bool enable)#
Enable/Disable Rx parser,please notice that for enable/disable Rx Parser, should better disable Receive first.
- Parameters:
base – ENET_QOS peripheral base address.
enable – Enable/Disable Rx parser function
- Return values:
kStatus_Success – Configure rx parser success.
kStatus_ENET_QOS_Timeout – Poll status flag timeout.
-
void ENET_QOS_EnableInterrupts(ENET_QOS_Type *base, uint32_t mask)#
Enables the ENET DMA and MAC interrupts.
This function enables the ENET interrupts according to the provided mask. Already enabled interrupts stay enabled even if not listed in the provided mask. The mask is a logical OR of enet_qos_dma_interrupt_enable_t and enet_qos_mac_interrupt_enable_t. For example, to enable the dma and mac interrupt, do the following: code ENET_QOS_EnableInterrupts(ENET, kENET_QOS_DmaRx | kENET_QOS_DmaTx | kENET_QOS_MacPmt); endcode
param base ENET peripheral base address. param mask ENET interrupts to enable. This is a logical OR of both enumeration :: enet_qos_dma_interrupt_enable_t and enet_qos_mac_interrupt_enable_t.
-
void ENET_QOS_DisableInterrupts(ENET_QOS_Type *base, uint32_t mask)#
Disables the ENET DMA and MAC interrupts.
This function disables the ENET interrupt according to the provided mask. The mask is a logical OR of enet_qos_dma_interrupt_enable_t and enet_qos_mac_interrupt_enable_t. For example, to disable the dma and mac interrupt, do the following.
ENET_QOS_DisableInterrupts(ENET, kENET_QOS_DmaRx | kENET_QOS_DmaTx | kENET_QOS_MacPmt);
- Parameters:
base – ENET peripheral base address.
mask – ENET interrupts to disables. This is a logical OR of both enumeration :: enet_qos_dma_interrupt_enable_t and enet_qos_mac_interrupt_enable_t.
-
static inline uint32_t ENET_QOS_GetDmaInterruptStatus(ENET_QOS_Type *base, uint8_t channel)#
Gets the ENET DMA interrupt status flag.
- Parameters:
base – ENET peripheral base address.
channel – The DMA Channel. Shall not be larger than ENET_QOS_RING_NUM_MAX.
- Returns:
The event status of the interrupt source. This is the logical OR of members of the enumeration :: enet_qos_dma_interrupt_enable_t.
-
static inline void ENET_QOS_ClearDmaInterruptStatus(ENET_QOS_Type *base, uint8_t channel, uint32_t mask)#
Clear the ENET DMA interrupt status flag.
- Parameters:
base – ENET peripheral base address.
channel – The DMA Channel. Shall not be larger than ENET_QOS_RING_NUM_MAX.
mask – The interrupt status to be cleared. This is the logical OR of members of the enumeration :: enet_qos_dma_interrupt_enable_t.
-
static inline uint32_t ENET_QOS_GetMacInterruptStatus(ENET_QOS_Type *base)#
Gets the ENET MAC interrupt status flag.
- Parameters:
base – ENET peripheral base address.
- Returns:
The event status of the interrupt source. Use the enum in enet_qos_mac_interrupt_enable_t and right shift ENET_QOS_MACINT_ENUM_OFFSET to mask the returned value to get the exact interrupt status.
-
void ENET_QOS_ClearMacInterruptStatus(ENET_QOS_Type *base, uint32_t mask)#
Clears the ENET mac interrupt events status flag.
This function clears enabled ENET interrupts according to the provided mask. The mask is a logical OR of enumeration members. See the enet_qos_mac_interrupt_enable_t. For example, to clear the TX frame interrupt and RX frame interrupt, do the following.
ENET_QOS_ClearMacInterruptStatus(ENET, kENET_QOS_MacPmt);
- Parameters:
base – ENET peripheral base address.
mask – ENET interrupt source to be cleared. This is the logical OR of members of the enumeration :: enet_qos_mac_interrupt_enable_t.
-
static inline bool ENET_QOS_IsTxDescriptorDmaOwn(enet_qos_tx_bd_struct_t *txDesc)#
Get the tx descriptor DMA Own flag.
- Parameters:
txDesc – The given tx descriptor.
- Return values:
True – the dma own tx descriptor, false application own tx descriptor.
-
void ENET_QOS_SetupTxDescriptor(enet_qos_tx_bd_struct_t *txDesc, void *buffer1, uint32_t bytes1, void *buffer2, uint32_t bytes2, uint32_t framelen, bool intEnable, bool tsEnable, enet_qos_desc_flag flag, uint8_t slotNum)#
Setup a given tx descriptor. This function is a low level functional API to setup or prepare a given tx descriptor.
Note
This must be called after all the ENET initialization. And should be called when the ENET receive/transmit is required. Transmit buffers are ‘zero-copy’ buffers, so the buffer must remain in memory until the packet has been fully transmitted. The buffers should be free or requeued in the transmit interrupt irq handler.
- Parameters:
txDesc – The given tx descriptor.
buffer1 – The first buffer address in the descriptor.
bytes1 – The bytes in the fist buffer.
buffer2 – The second buffer address in the descriptor.
bytes2 – The bytes in the second buffer.
framelen – The length of the frame to be transmitted.
intEnable – Interrupt enable flag.
tsEnable – The timestamp enable.
flag – The flag of this tx descriptor, enet_qos_desc_flag .
slotNum – The slot num used for AV only.
-
static inline void ENET_QOS_UpdateTxDescriptorTail(ENET_QOS_Type *base, uint8_t channel, uint32_t txDescTailAddrAlign)#
Update the tx descriptor tail pointer. This function is a low level functional API to update the the tx descriptor tail. This is called after you setup a new tx descriptor to update the tail pointer to make the new descriptor accessible by DMA.
- Parameters:
base – ENET peripheral base address.
channel – The tx DMA channel.
txDescTailAddrAlign – The new tx tail pointer address.
-
static inline void ENET_QOS_UpdateRxDescriptorTail(ENET_QOS_Type *base, uint8_t channel, uint32_t rxDescTailAddrAlign)#
Update the rx descriptor tail pointer. This function is a low level functional API to update the the rx descriptor tail. This is called after you setup a new rx descriptor to update the tail pointer to make the new descriptor accessible by DMA and to anouse the rx poll command for DMA.
- Parameters:
base – ENET peripheral base address.
channel – The rx DMA channel.
rxDescTailAddrAlign – The new rx tail pointer address.
-
static inline uint32_t ENET_QOS_GetRxDescriptor(enet_qos_rx_bd_struct_t *rxDesc)#
Gets the context in the ENET rx descriptor. This function is a low level functional API to get the the status flag from a given rx descriptor.
Note
This must be called after all the ENET initialization. And should be called when the ENET receive/transmit is required.
- Parameters:
rxDesc – The given rx descriptor.
- Return values:
The – RDES3 regions for write-back format rx buffer descriptor.
-
void ENET_QOS_UpdateRxDescriptor(enet_qos_rx_bd_struct_t *rxDesc, void *buffer1, void *buffer2, bool intEnable, bool doubleBuffEnable)#
Updates the buffers and the own status for a given rx descriptor. This function is a low level functional API to Updates the buffers and the own status for a given rx descriptor.
Note
This must be called after all the ENET initialization. And should be called when the ENET receive/transmit is required.
- Parameters:
rxDesc – The given rx descriptor.
buffer1 – The first buffer address in the descriptor.
buffer2 – The second buffer address in the descriptor.
intEnable – Interrupt enable flag.
doubleBuffEnable – The double buffer enable flag.
-
status_t ENET_QOS_ConfigureRxParser(ENET_QOS_Type *base, enet_qos_rxp_config_t *rxpConfig, uint16_t entryCount)#
Configure flexible rx parser.
This function is used to configure the flexible rx parser table.
- Parameters:
base – ENET peripheral base address..
rxpConfig – The rx parser configuration pointer.
entryCount – The rx parser entry count.
- Return values:
kStatus_Success – Configure rx parser success.
kStatus_ENET_QOS_Timeout – Poll status flag timeout.
-
status_t ENET_QOS_ReadRxParser(ENET_QOS_Type *base, enet_qos_rxp_config_t *rxpConfig, uint16_t entryIndex)#
Read flexible rx parser configuration at specified index.
This function is used to read flexible rx parser configuration at specified index.
- Parameters:
base – ENET peripheral base address..
rxpConfig – The rx parser configuration pointer.
entryIndex – The rx parser entry index to read, start from 0.
- Return values:
kStatus_Success – Configure rx parser success.
kStatus_ENET_QOS_Timeout – Poll status flag timeout.
-
status_t ENET_QOS_EstProgramGcl(ENET_QOS_Type *base, enet_qos_est_gcl_t *gcl, uint32_t ptpClk_Hz)#
Program Gate Control List.
This function is used to program the Enhanced Scheduled Transmisson. (IEEE802.1Qbv)
- Parameters:
base – ENET peripheral base address..
gcl – Pointer to the Gate Control List structure.
ptpClk_Hz – frequency of the PTP clock.
-
status_t ENET_QOS_EstReadGcl(ENET_QOS_Type *base, enet_qos_est_gcl_t *gcl, uint32_t listLen, bool hwList)#
Read Gate Control List.
This function is used to read the Enhanced Scheduled Transmisson list. (IEEE802.1Qbv)
- Parameters:
base – ENET peripheral base address..
gcl – Pointer to the Gate Control List structure.
listLen – length of the provided opList array in gcl structure.
hwList – Boolean if True read HW list, false read SW list.
-
static inline void ENET_QOS_FpeEnable(ENET_QOS_Type *base)#
Enable Frame Preemption.
This function is used to enable frame preemption. (IEEE802.1Qbu)
- Parameters:
base – ENET peripheral base address..
-
static inline void ENET_QOS_FpeDisable(ENET_QOS_Type *base)#
Disable Frame Preemption.
This function is used to disable frame preemption. (IEEE802.1Qbu)
- Parameters:
base – ENET peripheral base address..
-
static inline void ENET_QOS_FpeConfigPreemptable(ENET_QOS_Type *base, uint8_t queueMask)#
Configure preemptable transmit queues.
This function is used to configure the preemptable queues. (IEEE802.1Qbu)
- Parameters:
base – ENET peripheral base address..
queueMask – bitmask representing queues to set in preemptable mode. The N-th bit represents the queue N.
-
void ENET_QOS_AVBConfigure(ENET_QOS_Type *base, const enet_qos_cbs_config_t *config, uint8_t queueIndex)#
Sets the ENET AVB feature.
ENET_QOS AVB feature configuration, set transmit bandwidth. This API is called when the AVB feature is required.
- Parameters:
base – ENET_QOS peripheral base address.
config – The ENET_QOS AVB feature configuration structure.
queueIndex – ENET_QOS queue index.
-
void ENET_QOS_GetStatistics(ENET_QOS_Type *base, enet_qos_transfer_stats_t *statistics)#
Gets statistical data in transfer.
- Parameters:
base – ENET_QOS peripheral base address.
statistics – The statistics structure pointer.
-
void ENET_QOS_CreateHandler(ENET_QOS_Type *base, enet_qos_handle_t *handle, enet_qos_config_t *config, enet_qos_buffer_config_t *bufferConfig, enet_qos_callback_t callback, void *userData)#
Create ENET Handler.
This is a transactional API and it’s provided to store all data which are needed during the whole transactional process. This API should not be used when you use functional APIs to do data tx/rx. This is function will store many data/flag for transactional use, so all configure API such as ENET_QOS_Init(), ENET_QOS_DescriptorInit(), ENET_QOS_EnableInterrupts() etc.
Note
as our transactional transmit API use the zero-copy transmit buffer. so there are two thing we emphasize here:
tx buffer free/requeue for application should be done in the tx interrupt handler. Please set callback: kENET_QOS_TxIntEvent with tx buffer free/requeue process APIs.
the tx interrupt is forced to open.
- Parameters:
base – ENET peripheral base address.
handle – ENET handler.
config – ENET configuration.
bufferConfig – ENET buffer configuration.
callback – The callback function.
userData – The application data.
-
status_t ENET_QOS_GetRxFrameSize(ENET_QOS_Type *base, enet_qos_handle_t *handle, uint32_t *length, uint8_t channel)#
Gets the size of the read frame. This function gets a received frame size from the ENET buffer descriptors.
Note
The FCS of the frame is automatically removed by MAC and the size is the length without the FCS. After calling ENET_QOS_GetRxFrameSize, ENET_QOS_ReadFrame() should be called to update the receive buffers If the result is not “kStatus_ENET_QOS_RxFrameEmpty”.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler structure. This is the same handler pointer used in the ENET_QOS_Init.
length – The length of the valid frame received.
channel – The DMAC channel for the rx.
- Return values:
kStatus_ENET_QOS_RxFrameEmpty – No frame received. Should not call ENET_QOS_ReadFrame to read frame.
kStatus_ENET_QOS_RxFrameError – Data error happens. ENET_QOS_ReadFrame should be called with NULL data and NULL length to update the receive buffers.
kStatus_Success – Receive a frame Successfully then the ENET_QOS_ReadFrame should be called with the right data buffer and the captured data length input.
-
status_t ENET_QOS_ReadFrame(ENET_QOS_Type *base, enet_qos_handle_t *handle, uint8_t *data, uint32_t length, uint8_t channel, enet_qos_ptp_time_t *ts)#
Reads a frame from the ENET device. This function reads a frame from the ENET DMA descriptors. The ENET_QOS_GetRxFrameSize should be used to get the size of the prepared data buffer. For example use rx dma channel 0:
uint32_t length; enet_qos_handle_t g_handle; status = ENET_QOS_GetRxFrameSize(&g_handle, &length, 0); if (length != 0) { uint8_t *data = memory allocate interface; if (!data) { ENET_QOS_ReadFrame(ENET, &g_handle, NULL, 0, 0); } else { status = ENET_QOS_ReadFrame(ENET, &g_handle, data, length, 0); } } else if (status == kStatus_ENET_QOS_RxFrameError) { ENET_QOS_ReadFrame(ENET, &g_handle, NULL, 0, 0); }- Parameters:
base – ENET peripheral base address.
handle – The ENET handler structure. This is the same handler pointer used in the ENET_QOS_Init.
data – The data buffer provided by user to store the frame which memory size should be at least “length”.
length – The size of the data buffer which is still the length of the received frame.
channel – The rx DMA channel. shall not be larger than 2.
ts – Pointer to the structure enet_qos_ptp_time_t to save frame timestamp.
- Returns:
The execute status, successful or failure.
-
status_t ENET_QOS_SendFrame(ENET_QOS_Type *base, enet_qos_handle_t *handle, uint8_t *data, uint32_t length, uint8_t channel, bool isNeedTs, void *context, enet_qos_tx_offload_t txOffloadOps)#
Transmits an ENET frame.
Note
The CRC is automatically appended to the data. Input the data to send without the CRC.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer. This is the same handler pointer used in the ENET_QOS_Init.
data – The data buffer provided by user to be send.
length – The length of the data to be send.
channel – Channel to send the frame, same with queue index.
isNeedTs – True to enable timestamp save for the frame
context – pointer to user context to be kept in the tx dirty frame information.
txOffloadOps – The Tx frame checksum offload option.
- Return values:
kStatus_Success – Send frame succeed.
kStatus_ENET_QOS_TxFrameBusy – Transmit buffer descriptor is busy under transmission. The transmit busy happens when the data send rate is over the MAC capacity. The waiting mechanism is recommended to be added after each call return with kStatus_ENET_QOS_TxFrameBusy.
-
void ENET_QOS_ReclaimTxDescriptor(ENET_QOS_Type *base, enet_qos_handle_t *handle, uint8_t channel)#
Reclaim tx descriptors. This function is used to update the tx descriptor status and store the tx timestamp when the 1588 feature is enabled. This is called by the transmit interrupt IRQ handler after the complete of a frame transmission.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer. This is the same handler pointer used in the ENET_QOS_Init.
channel – The tx DMA channel.
-
void ENET_QOS_CommonIRQHandler(ENET_QOS_Type *base, enet_qos_handle_t *handle)#
The ENET IRQ handler.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer.
-
void ENET_QOS_CommonDriverIRQHandler(uint32_t instance)#
Parameterized common IRQ handler.
Services the given ENET_QOS instance, so a single entry can back that instance’s interrupt vector. Named ENET_QOS_CommonDriverIRQHandler because ENET_QOS_DriverIRQHandler is already used.
- Parameters:
instance – ENET_QOS peripheral instance number.
-
void ENET_QOS_SetISRHandler(ENET_QOS_Type *base, enet_qos_isr_t ISRHandler)#
Set the second level IRQ handler, allow user to overwrite the default second level weak IRQ handler.
- Parameters:
base – ENET peripheral base address.
ISRHandler – The handler to install.
-
status_t ENET_QOS_Ptp1588CorrectTimerInCoarse(ENET_QOS_Type *base, enet_qos_systime_op operation, uint32_t second, uint32_t nanosecond)#
Correct the ENET PTP 1588 timer in coarse method.
- Parameters:
base – ENET peripheral base address.
operation – The system time operation, refer to “enet_qos_systime_op”
second – The correction second.
nanosecond – The correction nanosecond.
-
status_t ENET_QOS_Ptp1588CorrectTimerInFine(ENET_QOS_Type *base, uint32_t addend)#
Correct the ENET PTP 1588 timer in fine method.
Note
Should take refer to the chapter “System time correction” and see the description for the “fine correction method”.
- Parameters:
base – ENET peripheral base address.
addend – The addend value to be set in the fine method
-
static inline uint32_t ENET_QOS_Ptp1588GetAddend(ENET_QOS_Type *base)#
Get the ENET Time stamp current addend value.
- Parameters:
base – ENET peripheral base address.
- Returns:
The addend value.
-
void ENET_QOS_Ptp1588GetTimerNoIRQDisable(ENET_QOS_Type *base, uint64_t *second, uint32_t *nanosecond)#
Gets the current ENET time from the PTP 1588 timer without IRQ disable.
- Parameters:
base – ENET peripheral base address.
second – The PTP 1588 system timer second.
nanosecond – The PTP 1588 system timer nanosecond. For the unit of the nanosecond is 1ns. so the nanosecond is the real nanosecond.
-
static inline status_t ENET_Ptp1588PpsControl(ENET_QOS_Type *base, enet_qos_ptp_pps_instance_t instance, enet_qos_ptp_pps_trgt_mode_t trgtMode, enet_qos_ptp_pps_cmd_t cmd)#
Sets the ENET PTP 1588 PPS control. All channels operate in flexible PPS output mode.
- Parameters:
base – ENET peripheral base address.
instance – The ENET QOS PTP PPS instance.
trgtMode – The target time register mode.
cmd – The target flexible PPS output control command.
-
status_t ENET_QOS_Ptp1588PpsSetTrgtTime(ENET_QOS_Type *base, enet_qos_ptp_pps_instance_t instance, uint32_t seconds, uint32_t nanoseconds)#
Sets the ENET OQS PTP 1588 PPS target time registers.
Note
kStatus_InvalidArgument can only be returned on MCXE32B targets (errata ERR050595 workaround). On all other devices this return code is never produced by this function.
- Parameters:
base – ENET QOS peripheral base address.
instance – The ENET QOS PTP PPS instance.
seconds – The target seconds.
nanoseconds – The target nanoseconds.
- Return values:
kStatus_Success – Target time registers programmed successfully.
kStatus_ENET_QOS_TrgtBusy – Target time register busy, previous target not yet consumed.
kStatus_InvalidArgument – On devices affected by errata ERR050595 (MCXE32B), the requested target time is not strictly in the future. The caller must read the current system time with ENET_QOS_Ptp1588GetTimer, compute a target time in the future and retry, otherwise the erratum could produce an incorrect PPS output.
-
static inline void ENET_QOS_Ptp1588PpsSetWidth(ENET_QOS_Type *base, enet_qos_ptp_pps_instance_t instance, uint32_t width)#
Sets the ENET OQS PTP 1588 PPS output signal interval.
- Parameters:
base – ENET QOS peripheral base address.
instance – The ENET QOS PTP PPS instance.
width – Signal Width. It is stored in terms of number of units of sub-second increment value. The width value must be lesser than interval value.
-
static inline void ENET_QOS_Ptp1588PpsSetInterval(ENET_QOS_Type *base, enet_qos_ptp_pps_instance_t instance, uint32_t interval)#
Sets the ENET OQS PTP 1588 PPS output signal width.
- Parameters:
base – ENET QOS peripheral base address.
instance – The ENET QOS PTP PPS instance.
interval – Signal Interval. It is stored in terms of number of units of sub-second increment value.
-
void ENET_QOS_Ptp1588GetTimer(ENET_QOS_Type *base, uint64_t *second, uint32_t *nanosecond)#
Gets the current ENET time from the PTP 1588 timer.
- Parameters:
base – ENET peripheral base address.
second – The PTP 1588 system timer second.
nanosecond – The PTP 1588 system timer nanosecond. For the unit of the nanosecond is 1ns.so the nanosecond is the real nanosecond.
-
void ENET_QOS_GetTxFrame(enet_qos_handle_t *handle, enet_qos_frame_info_t *txFrame, uint8_t channel)#
Gets the time stamp of the transmit frame.
This function is used for PTP stack to get the timestamp captured by the ENET driver.
- Parameters:
handle – The ENET handler pointer.This is the same state pointer used in ENET_QOS_Init.
txFrame – Input parameter, pointer to enet_qos_frame_info_t for saving read out frame information.
channel – Channel for searching the tx frame.
-
status_t ENET_QOS_GetRxFrame(ENET_QOS_Type *base, enet_qos_handle_t *handle, enet_qos_rx_frame_struct_t *rxFrame, uint8_t channel)#
Receives one frame in specified BD ring with zero copy.
This function will use the user-defined allocate and free callback. Every time application gets one frame through this function, driver will allocate new buffers for the BDs whose buffers have been taken by application.
Note
This function will drop current frame and update related BDs as available for DMA if new buffers allocating fails. Application must provide a memory pool including at least BD number + 1 buffers(+2 if enable double buffer) to make this function work normally. If user calls this function in Rx interrupt handler, be careful that this function makes Rx BD ready with allocating new buffer(normal) or updating current BD(out of memory). If there’s always new Rx frame input, Rx interrupt will be triggered forever. Application need to disable Rx interrupt according to specific design in this case.
- Parameters:
base – ENET peripheral base address.
handle – The ENET handler pointer. This is the same handler pointer used in the ENET_Init.
rxFrame – The received frame information structure provided by user.
channel – Channel for searching the rx frame.
- Return values:
kStatus_Success – Succeed to get one frame and allocate new memory for Rx buffer.
kStatus_ENET_QOS_RxFrameEmpty – There’s no Rx frame in the BD.
kStatus_ENET_QOS_RxFrameError – There’s issue in this receiving.
kStatus_ENET_QOS_RxFrameDrop – There’s no new buffer memory for BD, drop this frame.
-
FSL_ENET_QOS_DRIVER_VERSION#
Defines the driver version.
-
ENET_QOS_RXDESCRIP_RD_BUFF1VALID_MASK#
Defines for read format.
Buffer1 address valid.
-
ENET_QOS_RXDESCRIP_RD_BUFF2VALID_MASK#
Buffer2 address valid.
-
ENET_QOS_RXDESCRIP_RD_IOC_MASK#
Interrupt enable on complete.
-
ENET_QOS_RXDESCRIP_RD_OWN_MASK#
Own bit.
-
ENET_QOS_RXDESCRIP_WR_ERR_MASK#
Defines for write back format.
-
ENET_QOS_RXDESCRIP_WR_PYLOAD_MASK#
-
ENET_QOS_RXDESCRIP_WR_PTPMSGTYPE_MASK#
-
ENET_QOS_RXDESCRIP_WR_PTPTYPE_MASK#
-
ENET_QOS_RXDESCRIP_WR_PTPVERSION_MASK#
-
ENET_QOS_RXDESCRIP_WR_PTPTSA_MASK#
-
ENET_QOS_RXDESCRIP_WR_PACKETLEN_MASK#
-
ENET_QOS_RXDESCRIP_WR_ERRSUM_MASK#
-
ENET_QOS_RXDESCRIP_WR_TYPE_MASK#
-
ENET_QOS_RXDESCRIP_WR_DE_MASK#
-
ENET_QOS_RXDESCRIP_WR_RE_MASK#
-
ENET_QOS_RXDESCRIP_WR_OE_MASK#
-
ENET_QOS_RXDESCRIP_WR_RWT_MASK#
-
ENET_QOS_RXDESCRIP_WR_GP_MASK#
-
ENET_QOS_RXDESCRIP_WR_CRC_MASK#
-
ENET_QOS_RXDESCRIP_WR_RS0V_MASK#
-
ENET_QOS_RXDESCRIP_WR_RS1V_MASK#
-
ENET_QOS_RXDESCRIP_WR_RS2V_MASK#
-
ENET_QOS_RXDESCRIP_WR_LD_MASK#
-
ENET_QOS_RXDESCRIP_WR_FD_MASK#
-
ENET_QOS_RXDESCRIP_WR_CTXT_MASK#
-
ENET_QOS_RXDESCRIP_WR_OWN_MASK#
-
ENET_QOS_RXDESCRIP_WR_SA_FAILURE_MASK#
-
ENET_QOS_RXDESCRIP_WR_DA_FAILURE_MASK#
-
ENET_QOS_TXDESCRIP_RD_BL1_MASK#
Defines for read format.
-
ENET_QOS_TXDESCRIP_RD_BL2_MASK#
-
ENET_QOS_TXDESCRIP_RD_BL1(n)#
-
ENET_QOS_TXDESCRIP_RD_BL2(n)#
-
ENET_QOS_TXDESCRIP_RD_TTSE_MASK#
-
ENET_QOS_TXDESCRIP_RD_IOC_MASK#
-
ENET_QOS_TXDESCRIP_RD_FL_MASK#
-
ENET_QOS_TXDESCRIP_RD_FL(n)#
-
ENET_QOS_TXDESCRIP_RD_CIC(n)#
-
ENET_QOS_TXDESCRIP_RD_TSE_MASK#
-
ENET_QOS_TXDESCRIP_RD_SLOT(n)#
-
ENET_QOS_TXDESCRIP_RD_SAIC(n)#
-
ENET_QOS_TXDESCRIP_RD_CPC(n)#
-
ENET_QOS_TXDESCRIP_RD_LDFD(n)#
-
ENET_QOS_TXDESCRIP_RD_LD_MASK#
-
ENET_QOS_TXDESCRIP_RD_FD_MASK#
-
ENET_QOS_TXDESCRIP_RD_CTXT_MASK#
-
ENET_QOS_TXDESCRIP_RD_OWN_MASK#
-
ENET_QOS_TXDESCRIP_WB_TTSS_MASK#
Defines for write back format.
-
ENET_QOS_ABNORM_INT_MASK#
-
ENET_QOS_NORM_INT_MASK#
-
ENET_QOS_RING_NUM_MAX#
The Maximum number of tx/rx descriptor rings.
-
ENET_QOS_FRAME_MAX_FRAMELEN#
Default maximum Ethernet frame size.
-
ENET_QOS_FCS_LEN#
Ethernet FCS length.
-
ENET_QOS_ADDR_ALIGNMENT#
Recommended Ethernet buffer alignment.
-
ENET_QOS_BUFF_ALIGNMENT#
Receive buffer alignment shall be 4bytes-aligned.
-
ENET_QOS_MTL_RXFIFOSIZE#
The rx fifo size.
-
ENET_QOS_MTL_TXFIFOSIZE#
The tx fifo size.
-
ENET_QOS_MACINT_ENUM_OFFSET#
The offest for mac interrupt in enum type.
-
ENET_QOS_RXP_ENTRY_COUNT#
RXP table entry count, implied by FRPES in MAC_HW_FEATURE3
-
ENET_QOS_RXP_BUFFER_SIZE#
RXP Buffer size, implied by FRPBS in MAC_HW_FEATURE3
-
ENET_QOS_EST_WID#
Width of the time interval in Gate Control List
-
ENET_QOS_EST_DEP#
Maxmimum depth of Gate Control List
Defines the status return codes for transaction.
Values:
-
enumerator kStatus_ENET_QOS_InitMemoryFail#
Init fails since buffer memory is not enough.
-
enumerator kStatus_ENET_QOS_RxFrameError#
A frame received but data error happen.
-
enumerator kStatus_ENET_QOS_RxFrameFail#
Failed to receive a frame.
-
enumerator kStatus_ENET_QOS_RxFrameEmpty#
No frame arrive.
-
enumerator kStatus_ENET_QOS_RxFrameDrop#
Rx frame is dropped since no buffer memory.
-
enumerator kStatus_ENET_QOS_TxFrameBusy#
Transmit descriptors are under process.
-
enumerator kStatus_ENET_QOS_TxFrameFail#
Transmit frame fail.
-
enumerator kStatus_ENET_QOS_TxFrameOverLen#
Transmit oversize.
-
enumerator kStatus_ENET_QOS_Est_SwListBusy#
SW Gcl List not yet processed by HW.
-
enumerator kStatus_ENET_QOS_Est_SwListWriteAbort#
SW Gcl List write aborted .
-
enumerator kStatus_ENET_QOS_Est_InvalidParameter#
Invalid parameter in Gcl List .
-
enumerator kStatus_ENET_QOS_Est_BtrError#
Base Time Error when loading list.
-
enumerator kStatus_ENET_QOS_TrgtBusy#
Target time register busy.
-
enumerator kStatus_ENET_QOS_Timeout#
Target time register busy.
-
enumerator kStatus_ENET_QOS_PpsBusy#
Pps command busy.
-
enumerator kStatus_ENET_QOS_InitMemoryFail#
-
enum _enet_qos_mii_mode#
Defines the MII/RGMII mode for data interface between the MAC and the PHY.
Values:
-
enumerator kENET_QOS_MiiMode#
MII mode for data interface.
-
enumerator kENET_QOS_RgmiiMode#
RGMII mode for data interface.
-
enumerator kENET_QOS_RmiiMode#
RMII mode for data interface.
-
enumerator kENET_QOS_MiiMode#
-
enum _enet_qos_mii_speed#
Defines the 10/100/1000 Mbps speed for the MII data interface.
Values:
-
enumerator kENET_QOS_MiiSpeed10M#
Speed 10 Mbps.
-
enumerator kENET_QOS_MiiSpeed100M#
Speed 100 Mbps.
-
enumerator kENET_QOS_MiiSpeed1000M#
Speed 1000 Mbps.
-
enumerator kENET_QOS_MiiSpeed2500M#
Speed 2500 Mbps.
-
enumerator kENET_QOS_MiiSpeed10M#
-
enum _enet_qos_mii_duplex#
Defines the half or full duplex for the MII data interface.
Values:
-
enumerator kENET_QOS_MiiHalfDuplex#
Half duplex mode.
-
enumerator kENET_QOS_MiiFullDuplex#
Full duplex mode.
-
enumerator kENET_QOS_MiiHalfDuplex#
-
enum _enet_qos_mii_normal_opcode#
Define the MII opcode for normal MDIO_CLAUSES_22 Frame.
Values:
-
enumerator kENET_QOS_MiiWriteFrame#
Write frame operation for a valid MII management frame.
-
enumerator kENET_QOS_MiiReadFrame#
Read frame operation for a valid MII management frame.
-
enumerator kENET_QOS_MiiWriteFrame#
-
enum _enet_qos_dma_burstlen#
Define the DMA maximum transmit burst length.
Values:
-
enumerator kENET_QOS_BurstLen1#
DMA burst length 1.
-
enumerator kENET_QOS_BurstLen2#
DMA burst length 2.
-
enumerator kENET_QOS_BurstLen4#
DMA burst length 4.
-
enumerator kENET_QOS_BurstLen8#
DMA burst length 8.
-
enumerator kENET_QOS_BurstLen16#
DMA burst length 16.
-
enumerator kENET_QOS_BurstLen32#
DMA burst length 32.
-
enumerator kENET_QOS_BurstLen64#
DMA burst length 64. eight times enabled.
-
enumerator kENET_QOS_BurstLen128#
DMA burst length 128. eight times enabled.
-
enumerator kENET_QOS_BurstLen256#
DMA burst length 256. eight times enabled.
-
enumerator kENET_QOS_BurstLen1#
-
enum _enet_qos_desc_flag#
Define the flag for the descriptor.
Values:
-
enumerator kENET_QOS_MiddleFlag#
It’s a middle descriptor of the frame.
-
enumerator kENET_QOS_LastFlagOnly#
It’s the last descriptor of the frame.
-
enumerator kENET_QOS_FirstFlagOnly#
It’s the first descriptor of the frame.
-
enumerator kENET_QOS_FirstLastFlag#
It’s the first and last descriptor of the frame.
-
enumerator kENET_QOS_MiddleFlag#
-
enum _enet_qos_systime_op#
Define the system time adjust operation control.
Values:
-
enumerator kENET_QOS_SystimeAdd#
System time add to.
-
enumerator kENET_QOS_SystimeSubtract#
System time subtract.
-
enumerator kENET_QOS_SystimeAdd#
-
enum _enet_qos_ts_rollover_type#
Define the system time rollover control.
Values:
-
enumerator kENET_QOS_BinaryRollover#
System time binary rollover.
-
enumerator kENET_QOS_DigitalRollover#
System time digital rollover.
-
enumerator kENET_QOS_BinaryRollover#
-
enum _enet_qos_special_config#
Defines some special configuration for ENET.
These control flags are provided for special user requirements. Normally, these is no need to set this control flags for ENET initialization. But if you have some special requirements, set the flags to specialControl in the enet_qos_config_t.
Note
“kENET_QOS_StoreAndForward” is recommended to be set.
Values:
-
enumerator kENET_QOS_DescDoubleBuffer#
The double buffer is used in the tx/rx descriptor.
-
enumerator kENET_QOS_StoreAndForward#
The rx/tx store and forward enable.
-
enumerator kENET_QOS_PromiscuousEnable#
The promiscuous enabled.
-
enumerator kENET_QOS_FlowControlEnable#
The flow control enabled.
-
enumerator kENET_QOS_BroadCastRxDisable#
The broadcast disabled.
-
enumerator kENET_QOS_MulticastAllEnable#
All multicast are passed.
-
enumerator kENET_QOS_8023AS2KPacket#
8023as support for 2K packets.
-
enumerator kENET_QOS_HashMulticastEnable#
The multicast packets are filtered through hash table.
-
enumerator kENET_QOS_RxChecksumOffloadEnable#
The Rx checksum offload enabled.
-
enumerator kENET_QOS_DescDoubleBuffer#
-
enum _enet_qos_dma_interrupt_enable#
List of DMA interrupts supported by the ENET interrupt. This enumeration uses one-bot encoding to allow a logical OR of multiple members.
Values:
-
enumerator kENET_QOS_DmaTx#
Tx interrupt.
-
enumerator kENET_QOS_DmaTxStop#
Tx stop interrupt.
Tx buffer unavailable.
-
enumerator kENET_QOS_DmaRx#
Rx interrupt.
Rx buffer unavailable.
-
enumerator kENET_QOS_DmaRxStop#
Rx stop.
-
enumerator kENET_QOS_DmaRxWatchdogTimeout#
Rx watchdog timeout.
-
enumerator kENET_QOS_DmaEarlyTx#
Early transmit.
-
enumerator kENET_QOS_DmaEarlyRx#
Early receive.
-
enumerator kENET_QOS_DmaBusErr#
Fatal bus error.
-
enumerator kENET_QOS_DmaTx#
-
enum _enet_qos_mac_interrupt_enable#
List of mac interrupts supported by the ENET interrupt. This enumeration uses one-bot encoding to allow a logical OR of multiple members.
Values:
-
enumerator kENET_QOS_MacTimestamp#
-
enumerator kENET_QOS_MacTimestamp#
-
enum _enet_qos_event#
Defines the common interrupt event for callback use.
Values:
-
enumerator kENET_QOS_RxIntEvent#
Receive interrupt event.
-
enumerator kENET_QOS_TxIntEvent#
Transmit interrupt event.
-
enumerator kENET_QOS_WakeUpIntEvent#
Wake up interrupt event.
-
enumerator kENET_QOS_TimeStampIntEvent#
Time stamp interrupt event.
-
enumerator kENET_QOS_DmaBusErrEvent#
DMA fatal bus error event. Application must perform software reset and full reconfigure.
-
enumerator kENET_QOS_RxIntEvent#
-
enum _enet_qos_queue_mode#
Define the MTL mode for multiple queues/rings.
Values:
-
enumerator kENET_QOS_AVB_Mode#
Enable queue in AVB mode.
-
enumerator kENET_QOS_DCB_Mode#
Enable queue in DCB mode.
-
enumerator kENET_QOS_AVB_Mode#
-
enum _enet_qos_mtl_multiqueue_txsche#
Define the MTL tx scheduling algorithm for multiple queues/rings.
Values:
-
enumerator kENET_QOS_txWeightRR#
Tx weight round-robin.
-
enumerator kENET_QOS_txWeightFQ#
Tx weight fair queuing.
-
enumerator kENET_QOS_txDefictWeightRR#
Tx deficit weighted round-robin.
-
enumerator kENET_QOS_txStrPrio#
Tx strict priority.
-
enumerator kENET_QOS_txWeightRR#
-
enum _enet_qos_mtl_multiqueue_rxsche#
Define the MTL rx scheduling algorithm for multiple queues/rings.
Values:
-
enumerator kENET_QOS_rxStrPrio#
Rx strict priority, Queue 0 has the lowest priority.
-
enumerator kENET_QOS_rxWeightStrPrio#
Weighted Strict Priority.
-
enumerator kENET_QOS_rxStrPrio#
-
enum _enet_qos_mtl_rxqueuemap#
Define the MTL rx queue and DMA channel mapping.
Values:
-
enumerator kENET_QOS_StaticDirctMap#
The received fame in rx Qn(n = 0,1) directly map to dma channel n.
-
enumerator kENET_QOS_DynamicMap#
The received frame in rx Qn(n = 0,1) map to the dma channel m(m = 0,1) related with the same Mac.
-
enumerator kENET_QOS_StaticDirctMap#
-
enum _enet_qos_rx_queue_route#
Defines the package type for receive queue routing.
Values:
-
enumerator kENET_QOS_PacketNoQ#
-
enumerator kENET_QOS_PacketAVCPQ#
-
enumerator kENET_QOS_PacketPTPQ#
-
enumerator kENET_QOS_PacketUPQ#
-
enumerator kENET_QOS_PacketMCBCQ#
-
enumerator kENET_QOS_PacketNoQ#
-
enum _enet_qos_ptp_event_type#
Defines the ENET PTP message related constant.
Values:
-
enumerator kENET_QOS_PtpEventMsgType#
PTP event message type.
-
enumerator kENET_QOS_PtpSrcPortIdLen#
PTP message sequence id length.
-
enumerator kENET_QOS_PtpEventPort#
PTP event port number.
-
enumerator kENET_QOS_PtpGnrlPort#
PTP general port number.
-
enumerator kENET_QOS_PtpEventMsgType#
-
enum _enet_qos_ptp_pps_instance#
Defines the PPS instance numbers.
Values:
-
enumerator kENET_QOS_PtpPpsIstance0#
PPS instance 0.
-
enumerator kENET_QOS_PtpPpsIstance1#
PPS instance 1.
-
enumerator kENET_QOS_PtpPpsIstance2#
PPS instance 2.
-
enumerator kENET_QOS_PtpPpsIstance3#
PPS instance 3.
-
enumerator kENET_QOS_PtpPpsIstance0#
-
enum _enet_qos_ptp_pps_trgt_mode#
Defines the Target Time register mode.
Values:
-
enumerator kENET_QOS_PtpPpsTrgtModeOnlyInt#
Only interrupts.
-
enumerator kENET_QOS_PtpPpsTrgtModeIntSt#
Both interrupt and output signal.
-
enumerator kENET_QOS_PtpPpsTrgtModeOnlySt#
Only output signal.
-
enumerator kENET_QOS_PtpPpsTrgtModeOnlyInt#
-
enum _enet_qos_ptp_pps_cmd#
Defines commands for ppscmd register.
Values:
-
enumerator kENET_QOS_PtpPpsCmdNC#
No Command.
-
enumerator kENET_QOS_PtpPpsCmdSSP#
Start Single Pulse.
-
enumerator kENET_QOS_PtpPpsCmdSPT#
Start Pulse Train.
-
enumerator kENET_QOS_PtpPpsCmdCS#
Cancel Start.
-
enumerator kENET_QOS_PtpPpsCmdSPTAT#
Stop Pulse Train At Time.
-
enumerator kENET_QOS_PtpPpsCmdSPTI#
Stop Pulse Train Immediately.
-
enumerator kENET_QOS_PtpPpsCmdCSPT#
Cancel Stop Pulse Train.
-
enumerator kENET_QOS_PtpPpsCmdNC#
-
enum _enet_qos_ets_list_length#
Defines the enmueration of ETS list length.
Values:
-
enumerator kENET_QOS_Ets_List_64#
List length of 64
-
enumerator kENET_QOS_Ets_List_128#
List length of 128
-
enumerator kENET_QOS_Ets_List_256#
List length of 256
-
enumerator kENET_QOS_Ets_List_512#
List length of 512
-
enumerator kENET_QOS_Ets_List_1024#
List length of 1024
-
enumerator kENET_QOS_Ets_List_64#
-
enum _enet_qos_ets_gccr_addr#
Defines the enmueration of ETS gate control address.
Values:
-
enumerator kENET_QOS_Ets_btr_low#
BTR Low
-
enumerator kENET_QOS_Ets_btr_high#
BTR High
-
enumerator kENET_QOS_Ets_ctr_low#
CTR Low
-
enumerator kENET_QOS_Ets_ctr_high#
CTR High
-
enumerator kENET_QOS_Ets_ter#
TER
-
enumerator kENET_QOS_Ets_llr#
LLR
-
enumerator kENET_QOS_Ets_btr_low#
-
enum _enet_qos_rxp_dma_chn#
Defines the enmueration of DMA channel used for rx parser entry.
Values:
-
enumerator kENET_QOS_Rxp_DMAChn0#
DMA Channel 0 used for RXP entry match
-
enumerator kENET_QOS_Rxp_DMAChn1#
DMA Channel 1 used for RXP entry match
-
enumerator kENET_QOS_Rxp_DMAChn2#
DMA Channel 2 used for RXP entry match
-
enumerator kENET_QOS_Rxp_DMAChn3#
DMA Channel 3 used for RXP entry match
-
enumerator kENET_QOS_Rxp_DMAChn4#
DMA Channel 4 used for RXP entry match
-
enumerator kENET_QOS_Rxp_DMAChn0#
-
enum _enet_qos_tx_offload#
Define the Tx checksum offload options.
Values:
-
enumerator kENET_QOS_TxOffloadDisable#
Disable Tx checksum offload.
-
enumerator kENET_QOS_TxOffloadIPHeader#
Enable IP header checksum calculation and insertion.
-
enumerator kENET_QOS_TxOffloadIPHeaderPlusPayload#
Enable IP header and payload checksum calculation and insertion.
-
enumerator kENET_QOS_TxOffloadAll#
Enable IP header, payload and pseudo header checksum calculation and insertion.
-
enumerator kENET_QOS_TxOffloadDisable#
-
typedef enum _enet_qos_mii_mode enet_qos_mii_mode_t#
Defines the MII/RGMII mode for data interface between the MAC and the PHY.
-
typedef enum _enet_qos_mii_speed enet_qos_mii_speed_t#
Defines the 10/100/1000 Mbps speed for the MII data interface.
-
typedef enum _enet_qos_mii_duplex enet_qos_mii_duplex_t#
Defines the half or full duplex for the MII data interface.
-
typedef enum _enet_qos_mii_normal_opcode enet_qos_mii_normal_opcode#
Define the MII opcode for normal MDIO_CLAUSES_22 Frame.
-
typedef enum _enet_qos_dma_burstlen enet_qos_dma_burstlen#
Define the DMA maximum transmit burst length.
-
typedef enum _enet_qos_desc_flag enet_qos_desc_flag#
Define the flag for the descriptor.
-
typedef enum _enet_qos_systime_op enet_qos_systime_op#
Define the system time adjust operation control.
-
typedef enum _enet_qos_ts_rollover_type enet_qos_ts_rollover_type#
Define the system time rollover control.
-
typedef enum _enet_qos_special_config enet_qos_special_config_t#
Defines some special configuration for ENET.
These control flags are provided for special user requirements. Normally, these is no need to set this control flags for ENET initialization. But if you have some special requirements, set the flags to specialControl in the enet_qos_config_t.
Note
“kENET_QOS_StoreAndForward” is recommended to be set.
-
typedef enum _enet_qos_dma_interrupt_enable enet_qos_dma_interrupt_enable_t#
List of DMA interrupts supported by the ENET interrupt. This enumeration uses one-bot encoding to allow a logical OR of multiple members.
-
typedef enum _enet_qos_mac_interrupt_enable enet_qos_mac_interrupt_enable_t#
List of mac interrupts supported by the ENET interrupt. This enumeration uses one-bot encoding to allow a logical OR of multiple members.
-
typedef enum _enet_qos_event enet_qos_event_t#
Defines the common interrupt event for callback use.
-
typedef enum _enet_qos_queue_mode enet_qos_queue_mode_t#
Define the MTL mode for multiple queues/rings.
-
typedef enum _enet_qos_mtl_multiqueue_txsche enet_qos_mtl_multiqueue_txsche#
Define the MTL tx scheduling algorithm for multiple queues/rings.
-
typedef enum _enet_qos_mtl_multiqueue_rxsche enet_qos_mtl_multiqueue_rxsche#
Define the MTL rx scheduling algorithm for multiple queues/rings.
-
typedef enum _enet_qos_mtl_rxqueuemap enet_qos_mtl_rxqueuemap_t#
Define the MTL rx queue and DMA channel mapping.
-
typedef enum _enet_qos_rx_queue_route enet_qos_rx_queue_route_t#
Defines the package type for receive queue routing.
-
typedef enum _enet_qos_ptp_event_type enet_qos_ptp_event_type_t#
Defines the ENET PTP message related constant.
-
typedef enum _enet_qos_ptp_pps_instance enet_qos_ptp_pps_instance_t#
Defines the PPS instance numbers.
-
typedef enum _enet_qos_ptp_pps_trgt_mode enet_qos_ptp_pps_trgt_mode_t#
Defines the Target Time register mode.
-
typedef enum _enet_qos_ptp_pps_cmd enet_qos_ptp_pps_cmd_t#
Defines commands for ppscmd register.
-
typedef enum _enet_qos_ets_list_length enet_qos_ets_list_length_t#
Defines the enmueration of ETS list length.
-
typedef enum _enet_qos_ets_gccr_addr enet_qos_ets_gccr_addr_t#
Defines the enmueration of ETS gate control address.
-
typedef enum _enet_qos_rxp_dma_chn enet_qos_rxp_dma_chn_t#
Defines the enmueration of DMA channel used for rx parser entry.
-
typedef enum _enet_qos_tx_offload enet_qos_tx_offload_t#
Define the Tx checksum offload options.
-
typedef struct _enet_qos_rx_bd_struct enet_qos_rx_bd_struct_t#
Defines the receive descriptor structure has the read-format and write-back format structure. They both has the same size with different region definition. so we define the read-format region as the receive descriptor structure Use the read-format region mask bits in the descriptor initialization Use the write-back format region mask bits in the receive data process.
-
typedef struct _enet_qos_tx_bd_struct enet_qos_tx_bd_struct_t#
Defines the transmit descriptor structure has the read-format and write-back format structure. They both has the same size with different region definition. so we define the read-format region as the transmit descriptor structure Use the read-format region mask bits in the descriptor initialization Use the write-back format region mask bits in the transmit data process.
-
typedef struct _enet_qos_tx_bd_config_struct enet_qos_tx_bd_config_struct_t#
Defines the Tx BD configuration structure.
-
typedef struct _enet_qos_ptp_time enet_qos_ptp_time_t#
Defines the ENET PTP time stamp structure.
-
typedef struct enet_qos_frame_info enet_qos_frame_info_t#
Defines the frame info structure.
-
typedef struct _enet_qos_tx_dirty_ring enet_qos_tx_dirty_ring_t#
Defines the ENET transmit dirty addresses ring/queue structure.
-
typedef struct _enet_qos_ptp_config enet_qos_ptp_config_t#
Defines the ENET PTP configuration structure.
-
typedef struct _enet_qos_est_gate_op enet_qos_est_gate_op_t#
Defines the EST gate operation structure.
-
typedef struct _enet_qos_est_gcl enet_qos_est_gcl_t#
Defines the EST gate control list structure.
-
typedef struct _enet_qos_rxp_config enet_qos_rxp_config_t#
Defines the ENET_QOS Rx parser configuration structure.
-
typedef struct _enet_qos_buffer_config enet_qos_buffer_config_t#
Defines the buffer descriptor configure structure.
Note
The receive and transmit descriptor start address pointer and tail pointer must be word-aligned.
The recommended minimum tx/rx ring length is 4.
The tx/rx descriptor tail address shall be the address pointer to the address just after the end of the last last descriptor. because only the descriptors between the start address and the tail address will be used by DMA.
The descriptor address is the start address of all used contiguous memory. for example, the rxDescStartAddrAlign is the start address of rxRingLen contiguous descriptor memories for rx descriptor ring 0.
The “*rxBufferstartAddr” is the first element of rxRingLen (2*rxRingLen for double buffers) rx buffers. It means the *rxBufferStartAddr is the rx buffer for the first descriptor the *rxBufferStartAddr + 1 is the rx buffer for the second descriptor or the rx buffer for the second buffer in the first descriptor. so please make sure the rxBufferStartAddr is the address of a rxRingLen or 2*rxRingLen array.
-
typedef struct _enet_qos_cbs_config enet_qos_cbs_config_t#
Defines the CBS configuration for queue.
-
typedef struct enet_qos_tx_queue_config enet_qos_queue_tx_config_t#
Defines the queue configuration structure.
-
typedef struct enet_qos_rx_queue_config enet_qos_queue_rx_config_t#
Defines the queue configuration structure.
-
typedef struct enet_qos_multiqueue_config enet_qos_multiqueue_config_t#
Defines the configuration when multi-queue is used.
-
typedef void *(*enet_qos_rx_alloc_callback_t)(ENET_QOS_Type *base, void *userData, uint8_t channel)#
Defines the Rx memory buffer alloc function pointer.
-
typedef void (*enet_qos_rx_free_callback_t)(ENET_QOS_Type *base, void *buffer, void *userData, uint8_t channel)#
Defines the Rx memory buffer free function pointer.
-
typedef struct _enet_qos_config enet_qos_config_t#
Defines the basic configuration structure for the ENET device.
Note
Default the signal queue is used so the “*multiqueueCfg” is set default with NULL. Set the pointer with a valid configuration pointer if the multiple queues are required. If multiple queue is enabled, please make sure the buffer configuration for all are prepared also.
-
typedef struct _enet_qos_handle enet_qos_handle_t#
-
typedef void (*enet_qos_callback_t)(ENET_QOS_Type *base, enet_qos_handle_t *handle, enet_qos_event_t event, uint8_t channel, void *userData)#
ENET callback function.
-
typedef struct _enet_qos_tx_bd_ring enet_qos_tx_bd_ring_t#
Defines the ENET transmit buffer descriptor ring/queue structure.
-
typedef struct _enet_qos_rx_bd_ring enet_qos_rx_bd_ring_t#
Defines the ENET receive buffer descriptor ring/queue structure.
-
typedef struct _enet_qos_state enet_qos_state_t#
Defines the ENET state structure.
Note
The structure contains saved state for the instance. It could be stored in enet_qos_handle_t, but that’s used only with the transactional API.
-
typedef struct _enet_qos_buffer_struct enet_qos_buffer_struct_t#
Defines the frame buffer structure.
-
typedef struct _enet_qos_rx_frame_error enet_qos_rx_frame_error_t#
Defines the Rx frame error structure.
-
typedef struct _enet_qos_rx_frame_attribute_struct enet_qos_rx_frame_attribute_t#
-
typedef struct _enet_qos_rx_frame_struct enet_qos_rx_frame_struct_t#
Defines the Rx frame data structure.
-
typedef struct _enet_qos_transfer_stats enet_qos_transfer_stats_t#
Defines the ENET QOS transfer statistics structure.
-
typedef void (*enet_qos_isr_t)(ENET_QOS_Type *base, enet_qos_handle_t *handle)#
-
const clock_ip_name_t s_enetqosClock[]#
Pointers to enet clocks for each instance.
-
void ENET_QOS_SetSYSControl(enet_qos_mii_mode_t miiMode)#
Set ENET system configuration.
Note
User needs to provide the implementation because the implementation is SoC specific. This function set the phy selection and enable clock. It should be called before any other ethernet operation.
- Parameters:
miiMode – The MII/RGMII/RMII mode for interface between the phy and Ethernet.
-
void ENET_QOS_EnableClock(bool enable)#
Enable/Disable ENET qos clock.
Note
User needs to provide the implementation because the implementation is SoC specific. This function should be called before config RMII mode.
-
struct _enet_qos_rx_bd_struct#
- #include <fsl_enet_qos.h>
Defines the receive descriptor structure has the read-format and write-back format structure. They both has the same size with different region definition. so we define the read-format region as the receive descriptor structure Use the read-format region mask bits in the descriptor initialization Use the write-back format region mask bits in the receive data process.
Public Members
- __IO uint32_t buff1Addr
Buffer 1 address
- __IO uint32_t reserved
Reserved
- __IO uint32_t buff2Addr
Buffer 2 or next descriptor address
- __IO uint32_t control
Buffer 1/2 byte counts and control
-
struct _enet_qos_tx_bd_struct#
- #include <fsl_enet_qos.h>
Defines the transmit descriptor structure has the read-format and write-back format structure. They both has the same size with different region definition. so we define the read-format region as the transmit descriptor structure Use the read-format region mask bits in the descriptor initialization Use the write-back format region mask bits in the transmit data process.
Public Members
- __IO uint32_t buff1Addr
Buffer 1 address
- __IO uint32_t buff2Addr
Buffer 2 address
- __IO uint32_t buffLen
Buffer 1/2 byte counts
- __IO uint32_t controlStat
TDES control and status word
-
struct _enet_qos_tx_bd_config_struct#
- #include <fsl_enet_qos.h>
Defines the Tx BD configuration structure.
Public Members
-
void *buffer1#
The first buffer address in the descriptor.
-
uint32_t bytes1#
The bytes in the fist buffer.
-
void *buffer2#
The second buffer address in the descriptor.
-
uint32_t bytes2#
The bytes in the second buffer.
-
uint32_t framelen#
The length of the frame to be transmitted.
-
bool intEnable#
Interrupt enable flag.
-
bool tsEnable#
The timestamp enable.
-
enet_qos_tx_offload_t txOffloadOps#
The Tx checksum offload option.
-
enet_qos_desc_flag flag#
The flag of this tx desciriptor, see “enet_qos_desc_flag”.
-
void *buffer1#
-
struct _enet_qos_ptp_time#
- #include <fsl_enet_qos.h>
Defines the ENET PTP time stamp structure.
-
struct enet_qos_frame_info#
- #include <fsl_enet_qos.h>
Defines the frame info structure.
Public Members
-
void *context#
User specified data, could be buffer address for free
-
bool isTsAvail#
Flag indicates timestamp available status
-
enet_qos_ptp_time_t timeStamp#
Timestamp of frame
-
void *context#
-
struct _enet_qos_tx_dirty_ring#
- #include <fsl_enet_qos.h>
Defines the ENET transmit dirty addresses ring/queue structure.
-
struct _enet_qos_ptp_config#
- #include <fsl_enet_qos.h>
Defines the ENET PTP configuration structure.
Public Members
-
bool fineUpdateEnable#
Use the fine update.
-
uint32_t defaultAddend#
Default addend value when fine update is enable, could be 2^32 / (refClk_Hz / ENET_QOS_MICRSECS_ONESECOND / ENET_QOS_SYSTIME_REQUIRED_CLK_MHZ).
-
bool ptp1588V2Enable#
The desired system time frequency. Must be lower than reference clock. (Only used with fine correction method). ptp 1588 version 2 is used.
-
enet_qos_ts_rollover_type tsRollover#
1588 time nanosecond rollover.
-
bool fineUpdateEnable#
-
struct _enet_qos_est_gate_op#
- #include <fsl_enet_qos.h>
Defines the EST gate operation structure.
-
struct _enet_qos_est_gcl#
- #include <fsl_enet_qos.h>
Defines the EST gate control list structure.
Public Members
-
bool enable#
Enable or disable EST
-
uint64_t cycleTime#
Base Time 32 bits seconds 32 bits nanoseconds
-
uint32_t extTime#
Cycle Time 32 bits seconds 32 bits nanoseconds
-
uint32_t numEntries#
Time Extension 32 bits seconds 32 bits nanoseconds
-
enet_qos_est_gate_op_t *opList#
Number of entries
-
bool enable#
-
struct _enet_qos_rxp_config#
- #include <fsl_enet_qos.h>
Defines the ENET_QOS Rx parser configuration structure.
Public Members
-
uint32_t matchEnable#
4-byte match data used for comparing with incoming packet
-
uint8_t acceptFrame#
When matchEnable is set to 1, the matchData is used for comparing
-
uint8_t rejectFrame#
When acceptFrame = 1 and data is matched, the frame will be sent to DMA channel
-
uint8_t inverseMatch#
When rejectFrame = 1 and data is matched, the frame will be dropped
-
uint8_t nextControl#
Inverse match
-
uint8_t reserved#
Next instruction indexing control
-
uint8_t frameOffset#
Reserved control fields
-
uint8_t okIndex#
Frame offset in the packet data to be compared for match, in terms of 4 bytes.
-
uint8_t dmaChannel#
Memory Index to be used next.
-
uint32_t reserved2#
The DMA channel enet_qos_rxp_dma_chn_t used for receiving the frame when frame match and acceptFrame = 1
-
uint32_t matchEnable#
-
struct _enet_qos_buffer_config#
- #include <fsl_enet_qos.h>
Defines the buffer descriptor configure structure.
Note
The receive and transmit descriptor start address pointer and tail pointer must be word-aligned.
The recommended minimum tx/rx ring length is 4.
The tx/rx descriptor tail address shall be the address pointer to the address just after the end of the last last descriptor. because only the descriptors between the start address and the tail address will be used by DMA.
The descriptor address is the start address of all used contiguous memory. for example, the rxDescStartAddrAlign is the start address of rxRingLen contiguous descriptor memories for rx descriptor ring 0.
The “*rxBufferstartAddr” is the first element of rxRingLen (2*rxRingLen for double buffers) rx buffers. It means the *rxBufferStartAddr is the rx buffer for the first descriptor the *rxBufferStartAddr + 1 is the rx buffer for the second descriptor or the rx buffer for the second buffer in the first descriptor. so please make sure the rxBufferStartAddr is the address of a rxRingLen or 2*rxRingLen array.
Public Members
-
uint8_t rxRingLen#
The length of receive buffer descriptor ring.
-
uint8_t txRingLen#
The length of transmit buffer descriptor ring.
-
enet_qos_tx_bd_struct_t *txDescStartAddrAlign#
Aligned transmit descriptor start address.
-
enet_qos_tx_bd_struct_t *txDescTailAddrAlign#
Aligned transmit descriptor tail address.
-
enet_qos_frame_info_t *txDirtyStartAddr#
Start address of the dirty tx frame information.
-
enet_qos_rx_bd_struct_t *rxDescStartAddrAlign#
Aligned receive descriptor start address.
-
enet_qos_rx_bd_struct_t *rxDescTailAddrAlign#
Aligned receive descriptor tail address.
-
uint32_t *rxBufferStartAddr#
Start address of the rx buffers.
-
uint32_t rxBuffSizeAlign#
Aligned receive data buffer size.
-
bool rxBuffNeedMaintain#
Whether receive data buffer need cache maintain.
-
struct _enet_qos_cbs_config#
- #include <fsl_enet_qos.h>
Defines the CBS configuration for queue.
-
struct enet_qos_tx_queue_config#
- #include <fsl_enet_qos.h>
Defines the queue configuration structure.
Public Members
-
enet_qos_queue_mode_t mode#
tx queue mode configuration.
-
uint32_t weight#
Refer to the MTL TxQ Quantum Weight register.
-
uint32_t priority#
Refer to Transmit Queue Priority Mapping register.
-
enet_qos_cbs_config_t *cbsConfig#
CBS configuration if queue use AVB mode.
-
enet_qos_queue_mode_t mode#
-
struct enet_qos_rx_queue_config#
- #include <fsl_enet_qos.h>
Defines the queue configuration structure.
Public Members
-
enet_qos_queue_mode_t mode#
rx queue mode configuration.
-
uint8_t mapChannel#
tx queue map dma channel.
-
uint32_t priority#
Rx queue priority.
-
enet_qos_rx_queue_route_t packetRoute#
Receive packet routing.
-
enet_qos_queue_mode_t mode#
-
struct enet_qos_multiqueue_config#
- #include <fsl_enet_qos.h>
Defines the configuration when multi-queue is used.
Public Members
-
enet_qos_dma_burstlen burstLen#
Burst len for the multi-queue.
-
uint8_t txQueueUse#
Used Tx queue count.
-
enet_qos_mtl_multiqueue_txsche mtltxSche#
Transmit schedule for multi-queue.
-
enet_qos_queue_tx_config_t txQueueConfig[ENET_QOS_DMA_CH_COUNT]#
Tx Queue configuration.
-
uint8_t rxQueueUse#
Used Rx queue count.
-
enet_qos_mtl_multiqueue_rxsche mtlrxSche#
Receive schedule for multi-queue.
-
enet_qos_queue_rx_config_t rxQueueConfig[ENET_QOS_DMA_CH_COUNT]#
Rx Queue configuration.
-
enet_qos_dma_burstlen burstLen#
-
struct _enet_qos_config#
- #include <fsl_enet_qos.h>
Defines the basic configuration structure for the ENET device.
Note
Default the signal queue is used so the “*multiqueueCfg” is set default with NULL. Set the pointer with a valid configuration pointer if the multiple queues are required. If multiple queue is enabled, please make sure the buffer configuration for all are prepared also.
Public Members
-
uint16_t specialControl#
The logic or of enet_qos_special_config_t
-
enet_qos_multiqueue_config_t *multiqueueCfg#
Use multi-queue.
-
enet_qos_mii_mode_t miiMode#
MII mode.
-
enet_qos_mii_speed_t miiSpeed#
MII Speed.
-
enet_qos_mii_duplex_t miiDuplex#
MII duplex.
-
uint16_t pauseDuration#
Used in the tx flow control frame, only valid when kENET_QOS_FlowControlEnable is set.
-
enet_qos_ptp_config_t *ptpConfig#
PTP 1588 feature configuration
-
uint32_t csrClock_Hz#
CSR clock frequency in HZ.
-
enet_qos_rx_alloc_callback_t rxBuffAlloc#
Callback to alloc memory, must be provided for zero-copy Rx.
-
enet_qos_rx_free_callback_t rxBuffFree#
Callback to free memory, must be provided for zero-copy Rx.
-
uint16_t specialControl#
-
struct _enet_qos_tx_bd_ring#
- #include <fsl_enet_qos.h>
Defines the ENET transmit buffer descriptor ring/queue structure.
-
struct _enet_qos_rx_bd_ring#
- #include <fsl_enet_qos.h>
Defines the ENET receive buffer descriptor ring/queue structure.
Public Members
-
enet_qos_rx_bd_struct_t *rxBdBase#
Buffer descriptor base address pointer.
-
uint16_t rxGenIdx#
The current available receive buffer descriptor pointer.
-
uint16_t rxRingLen#
Receive ring length.
-
uint32_t rxBuffSizeAlign#
Receive buffer size.
-
enet_qos_rx_bd_struct_t *rxBdBase#
-
struct _enet_qos_handle#
- #include <fsl_enet_qos.h>
Defines the ENET handler structure.
Public Members
-
uint8_t txQueueUse#
Used tx queue count.
-
uint8_t rxQueueUse#
Used rx queue count.
-
bool doubleBuffEnable#
The double buffer is used in the descriptor.
-
bool rxintEnable#
Rx interrupt enabled.
-
bool rxMaintainEnable[ENET_QOS_DMA_CH_COUNT]#
Rx buffer cache maintain enabled.
-
enet_qos_rx_bd_ring_t rxBdRing[ENET_QOS_DMA_CH_COUNT]#
Receive buffer descriptor.
-
enet_qos_tx_bd_ring_t txBdRing[ENET_QOS_DMA_CH_COUNT]#
Transmit buffer descriptor.
-
enet_qos_tx_dirty_ring_t txDirtyRing[ENET_QOS_DMA_CH_COUNT]#
Transmit dirty buffers addresses.
-
uint32_t *rxBufferStartAddr[ENET_QOS_DMA_CH_COUNT]#
Rx buffer start address for reInitialize.
-
enet_qos_callback_t callback#
Callback function.
-
void *userData#
Callback function parameter.
-
uint8_t multicastCount[64]#
Multicast collisions counter
-
enet_qos_rx_alloc_callback_t rxBuffAlloc#
Callback to alloc memory, must be provided for zero-copy Rx.
-
enet_qos_rx_free_callback_t rxBuffFree#
Callback to free memory, must be provided for zero-copy Rx.
-
uint8_t txQueueUse#
-
struct _enet_qos_state#
- #include <fsl_enet_qos.h>
Defines the ENET state structure.
Note
The structure contains saved state for the instance. It could be stored in enet_qos_handle_t, but that’s used only with the transactional API.
Public Members
-
enet_qos_mii_mode_t miiMode#
MII mode.
-
enet_qos_mii_mode_t miiMode#
-
struct _enet_qos_buffer_struct#
- #include <fsl_enet_qos.h>
Defines the frame buffer structure.
-
struct _enet_qos_rx_frame_error#
- #include <fsl_enet_qos.h>
Defines the Rx frame error structure.
Public Members
-
bool rxDstAddrFilterErr#
Destination Address Filter Fail.
-
bool rxSrcAddrFilterErr#
SA Address Filter Fail.
-
bool rxDribbleErr#
Dribble error.
-
bool rxReceiveErr#
Receive error.
-
bool rxOverFlowErr#
Receive over flow.
-
bool rxWatchDogErr#
Watch dog timeout.
-
bool rxGaintPacketErr#
Receive gaint packet.
-
bool rxCrcErr#
Receive CRC error.
-
bool rxDstAddrFilterErr#
-
struct _enet_qos_rx_frame_attribute_struct#
Public Members
-
bool isTsAvail#
Rx frame timestamp is available or not.
-
enet_qos_ptp_time_t timestamp#
The nanosecond part timestamp of this Rx frame.
-
bool isTsAvail#
-
struct _enet_qos_rx_frame_struct#
- #include <fsl_enet_qos.h>
Defines the Rx frame data structure.
Public Members
-
enet_qos_buffer_struct_t *rxBuffArray#
Rx frame buffer structure.
-
uint16_t totLen#
Rx frame total length.
-
enet_qos_rx_frame_attribute_t rxAttribute#
Rx frame attribute structure.
-
enet_qos_rx_frame_error_t rxFrameError#
Rx frame error.
-
enet_qos_buffer_struct_t *rxBuffArray#
-
struct _enet_qos_transfer_stats#
- #include <fsl_enet_qos.h>
Defines the ENET QOS transfer statistics structure.
Public Members
-
uint32_t statsRxFrameCount#
Rx frame number.
-
uint32_t statsRxCrcErr#
Rx frame number with CRC error.
-
uint32_t statsRxAlignErr#
Rx frame number with alignment error.
-
uint32_t statsRxLengthErr#
Rx frame length field doesn’t equal to packet size.
-
uint32_t statsRxFifoOverflowErr#
Rx FIFO overflow count.
-
uint32_t statsTxFrameCount#
Tx frame number. Reported as 0 when frame preemption (EFPE) is enabled, because the transmit MMC counters are unreliable under frame preemption (ERR050597 workaround).
-
uint32_t statsTxFifoUnderRunErr#
Tx FIFO underrun count. Reported as 0 when frame preemption (EFPE) is enabled, because the transmit MMC counters are unreliable under frame preemption (ERR050597 workaround).
-
uint32_t statsRxFrameCount#
EQDC: Enhanced Quadrature Encoder/Decoder#
-
void EQDC_Init(EQDC_Type *base, const eqdc_config_t *psConfig)#
Initializes the EQDC module.
This function initializes the EQDC by enabling the IP bus clock (optional).
- Parameters:
base – EQDC peripheral base address.
psConfig – Pointer to configuration structure.
-
void EQDC_GetDefaultConfig(eqdc_config_t *psConfig)#
Gets an available pre-defined configuration.
The default value are:
psConfig->enableReverseDirection = false; psConfig->countOnce = false; psConfig->operateMode = kEQDC_QuadratureDecodeOperationMode; psConfig->countMode = kEQDC_QuadratureX4; psConfig->homeEnableInitPosCounterMode = kEQDC_HomeInitPosCounterDisabled; psConfig->indexPresetInitPosCounterMode = kEQDC_IndexInitPosCounterDisabled; psConfig->enableIndexInitPositionCounter = false; psConfig->enableDma = false; psConfig->bufferedRegisterLoadMode = false; psConfig->enableTriggerInitPositionCounter = false; psConfig->enableTriggerClearPositionRegisters = false; psConfig->enableTriggerHoldPositionRegisters = false; psConfig->enableWatchdog = false; psConfig->watchdogTimeoutValue = 0xFFFFU; psConfig->filterPhaseA = 0U; psConfig->filterPhaseB = 0U; psConfig->filterIndPre = 0U; psConfig->filterHomEna = 0U; psConfig->filterClockSourceselection = false; psConfig->filterSampleCount = kEQDC_Filter3Samples; psConfig->filterSamplePeriod = 0U; psConfig->outputPulseMode = kEQDC_OutputPulseOnCounterEqualCompare; psConfig->positionCompareValue[0] = 0xFFFFFFFFU; psConfig->positionCompareValue[1] = 0xFFFFFFFFU; psConfig->positionCompareValue[2] = 0xFFFFFFFFU; psConfig->positionCompareValue[3] = 0xFFFFFFFFU; psConfig->revolutionCountCondition = kEQDC_RevolutionCountOnIndexPulse; psConfig->positionModulusValue = 0U; psConfig->positionInitialValue = 0U; psConfig->positionCounterValue = 0U; psConfig->enablePeriodMeasurement = false; psConfig->prescaler = kEQDC_Prescaler1; psConfig->enabledInterruptsMask = 0U;
- Parameters:
psConfig – Pointer to configuration structure.
-
void EQDC_Deinit(EQDC_Type *base)#
De-initializes the EQDC module.
This function deinitializes the EQDC by disabling the IP bus clock (optional).
- Parameters:
base – EQDC peripheral base address.
-
void EQDC_SetOperateMode(EQDC_Type *base, eqdc_operate_mode_t operateMode)#
Initializes the mode of operation.
This function initializes mode of operation by enabling the IP bus clock (optional).
- Parameters:
base – EQDC peripheral base address.
operateMode – Select operation mode.
-
static inline void EQDC_SetCountMode(EQDC_Type *base, eqdc_count_mode_t countMode)#
Initializes the mode of count.
These bits control the basic counting and behavior of Position Counter and Position Difference Counter. Setting CTRL[REV] to 1 can reverse the counting direction. 1.In quadrature Mode (CTRL[PH1] = 0): 00b - CM0: Normal/Reverse Quadrature X4 01b - CM1: Normal/Reverse Quadrature X2 10b - CM2: Normal/Reverse Quadrature X1 11b - CM3: Reserved 2.In Single Phase Mode (CTRL[PH1] = 1): 00b - CM0: UP/DOWN Pulse Count Mode 01b - CM1: Signed Mode, count PHASEA rising/falling edge, position counter counts up when PHASEB is low and counts down when PHASEB is high 10b - CM2: Signed Count Mode,count PHASEA rising edge only, position counter counts up when PHASEB is low and counts down when PHASEB is high 11b - CM3: Reserved
- Parameters:
base – EQDC peripheral base address.
countMode – Select count mode.
-
static inline void EQDC_EnableWatchdog(EQDC_Type *base, bool bEnable)#
Enable watchdog for EQDC module.
- Parameters:
base – EQDC peripheral base address
bEnable – Enables or disables the watchdog
-
static inline void EQDC_SetWatchdogTimeout(EQDC_Type *base, uint16_t u16Timeout)#
Set watchdog timeout value.
- Parameters:
base – EQDC peripheral base address
u16Timeout – Number of clock cycles, plus one clock cycle that the watchdog timer counts before timing out
-
static inline void EQDC_EnableDMA(EQDC_Type *base, bool bEnable)#
Enable DMA for EQDC module.
- Parameters:
base – EQDC peripheral base address
bEnable – Enables or disables the DMA
-
static inline void EQDC_SetBufferedRegisterLoadUpdateMode(EQDC_Type *base)#
Set Buffered Register Load (Update) Mode.
This bit selects the loading time point of the buffered compare registers UCOMPx/LCOMPx, x=0~3, initial register (UINIT/LINIT), and modulus register (UMOD/LMOD). Buffered registers are loaded and take effect at the next roll-over or roll-under if CTRL[LDOK] is set.
- Parameters:
base – EQDC peripheral base address
-
static inline void EQDC_ClearBufferedRegisterLoadUpdateMode(EQDC_Type *base)#
Clear Buffered Register Load (Update) Mode.
Buffered Register Load (Update) Mode bit selects the loading time point of the buffered compare registers UCOMPx/LCOMPx, x=0~3, initial register (UINIT/LINIT), and modulus register (UMOD/LMOD). Buffered registers are loaded and take effect immediately upon CTRL[LDOK] is set.
- Parameters:
base – EQDC peripheral base address
-
static inline void EQDC_SetEqdcLdok(EQDC_Type *base)#
Set load okay.
Load okay enables that the outer-set values of buffered compare registers (UCOMPx/LCOMPx, x=0~3), initial register(UINIT/LINIT) and modulus register(UMOD/LMOD) can be loaded into their inner-sets and take effect. When LDOK is set, this loading action occurs at the next position counter roll-over or roll-under if CTRL2[LDMOD] is set, or it occurs immediately if CTRL2[LDMOD] is cleared. LDOK is automatically cleared after the values in outer-set is loaded into the inner-set.
- Parameters:
base – EQDC peripheral base address.
-
static inline uint16_t EQDC_GetEqdcLdok(EQDC_Type *base)#
Get load okay.
- Parameters:
base – EQDC peripheral base address.
-
static inline void EQDC_ClearEqdcLdok(EQDC_Type *base)#
Clear load okay.
- Parameters:
base – EQDC peripheral base address.
-
static inline uint32_t EQDC_GetStatusFlags(EQDC_Type *base)#
Get the status flags.
- Parameters:
base – EQDC peripheral base address.
- Returns:
Logical OR’ed value of the status flags, _eqdc_status_flags.
-
static inline void EQDC_ClearStatusFlags(EQDC_Type *base, uint32_t u32Flags)#
Clear the status flags.
- Parameters:
base – EQDC peripheral base address.
u32Flags – Logical OR’ed value of the flags to clear, _eqdc_status_flags.
-
static inline uint16_t EQDC_GetSignalStatusFlags(EQDC_Type *base)#
Get the signals’ real-time status.
- Parameters:
base – EQDC peripheral base address.
- Returns:
Logical OR’ed value of the real-time signal status, _eqdc_signal_status.
-
static inline eqdc_count_direction_flag_t EQDC_GetLastCountDirection(EQDC_Type *base)#
Get the direction of the last count.
- Parameters:
base – EQDC peripheral base address.
- Returns:
Direction of the last count.
-
static inline void EQDC_EnableInterrupts(EQDC_Type *base, uint32_t u32Interrupts)#
Enable the interrupts.
- Parameters:
base – EQDC peripheral base address.
u32Interrupts – Logical OR’ed value of the interrupts, _eqdc_interrupt_enable.
-
static inline void EQDC_DisableInterrupts(EQDC_Type *base, uint32_t u32Interrupts)#
Disable the interrupts.
- Parameters:
base – EQDC peripheral base address.
u32Interrupts – Logical OR’ed value of the interrupts, _eqdc_interrupt_enable.
-
static inline void EQDC_DoSoftwareLoadInitialPositionValue(EQDC_Type *base)#
Load the initial position value to position counter.
Software trigger to load the initial position value (UINIT and LINIT) contents to position counter (UPOS and LPOS), so that to provide the consistent operation the position counter registers.
- Parameters:
base – EQDC peripheral base address.
-
static inline void EQDC_SetInitialPositionValue(EQDC_Type *base, uint32_t u32PositionInitValue)#
Set initial position value for EQDC module.
Set the position counter initial value (UINIT, LINIT). After writing values to the UINIT and LINIT registers, the values are “buffered” into outer-set registers temporarily. Values will be loaded into inner-set registers and take effect using the following two methods:
If CTRL2[LDMODE] is 1, “buffered” values are loaded into inner-set and take effect at the next roll-over or roll-under if CTRL[LDOK] is set.
If CTRL2[LDMODE] is 0, “buffered” values are loaded into inner-set and take effect immediately when CTRL[LDOK] is set.
- Parameters:
base – EQDC peripheral base address
u32PositionInitValue – Position initial value
-
static inline void EQDC_SetPositionCounterValue(EQDC_Type *base, uint32_t positionCounterValue)#
Set position counter value.
Set the position counter value (POS or UPOS, LPOS).
- Parameters:
base – EQDC peripheral base address
positionCounterValue – Position counter value
-
static inline void EQDC_SetPositionModulusValue(EQDC_Type *base, uint32_t positionModulusValue)#
Set position counter modulus value.
Set the position counter modulus value (UMOD, LMOD). After writing values to the UMOD and LMOD registers, the values are “buffered” into outer-set registers temporarily. Values will be loaded into inner-set registers and take effect using the following two methods:
If CTRL2[LDMODE] is 1, “buffered” values are loaded into inner-set and take effect at the next roll-over or roll-under if CTRL[LDOK] is set.
If CTRL2[LDMODE] is 0, “buffered” values are loaded into inner-set and take effect immediately when CTRL[LDOK] is set.
- Parameters:
base – EQDC peripheral base address
positionModulusValue – Position modulus value
-
static inline void EQDC_SetPositionCompare0Value(EQDC_Type *base, uint32_t u32PositionComp0Value)#
Set position counter compare 0 value.
Set the position counter compare 0 value (UCOMP0, LCOMP0). After writing values to the UCOMP0 and LCOMP0 registers, the values are “buffered” into outer-set registers temporarily. Values will be loaded into inner-set registers and take effect using the following two methods:
If CTRL2[LDMODE] is 1, “buffered” values are loaded into inner-set and take effect at the next roll-over or roll-under if CTRL[LDOK] is set.
If CTRL2[LDMODE] is 0, “buffered” values are loaded into inner-set and take effect immediately when CTRL[LDOK] is set.
- Parameters:
base – EQDC peripheral base address
u32PositionComp0Value – Position modulus value
-
static inline void EQDC_SetPositionCompare1Value(EQDC_Type *base, uint32_t u32PositionComp1Value)#
Set position counter compare 1 value.
Set the position counter compare 1 value (UCOMP1, LCOMP1). After writing values to the UCOMP1 and LCOMP1 registers, the values are “buffered” into outer-set registers temporarily. Values will be loaded into inner-set registers and take effect using the following two methods:
If CTRL2[LDMODE] is 1, “buffered” values are loaded into inner-set and take effect at the next roll-over or roll-under if CTRL[LDOK] is set.
If CTRL2[LDMODE] is 0, “buffered” values are loaded into inner-set and take effect immediately when CTRL[LDOK] is set.
- Parameters:
base – EQDC peripheral base address
u32PositionComp1Value – Position modulus value
-
static inline void EQDC_SetPositionCompare2Value(EQDC_Type *base, uint32_t u32PositionComp2Value)#
Set position counter compare 2 value.
Set the position counter compare 2 value (UCOMP2, LCOMP2). After writing values to the UCOMP2 and LCOMP2 registers, the values are “buffered” into outer-set registers temporarily. Values will be loaded into inner-set registers and take effect using the following two methods:
If CTRL2[LDMODE] is 1, “buffered” values are loaded into inner-set and take effect at the next roll-over or roll-under if CTRL[LDOK] is set.
If CTRL2[LDMODE] is 0, “buffered” values are loaded into inner-set and take effect immediately when CTRL[LDOK] is set.
- Parameters:
base – EQDC peripheral base address
u32PositionComp2Value – Position modulus value
-
static inline void EQDC_SetPositionCompare3Value(EQDC_Type *base, uint32_t u32PositionComp3Value)#
Set position counter compare 3 value.
Set the position counter compare 3 value (UCOMP3, LCOMP3). After writing values to the UCOMP3 and LCOMP3 registers, the values are “buffered” into outer-set registers temporarily. Values will be loaded into inner-set registers and take effect using the following two methods:
If CTRL2[LDMODE] is 1, “buffered” values are loaded into inner-set and take effect at the next roll-over or roll-under if CTRL[LDOK] is set.
If CTRL2[LDMODE] is 0, “buffered” values are loaded into inner-set and take effect immediately when CTRL[LDOK] is set.
- Parameters:
base – EQDC peripheral base address
u32PositionComp3Value – Position modulus value
-
static inline uint32_t EQDC_GetPosition(EQDC_Type *base)#
Get the current position counter’s value.
- Parameters:
base – EQDC peripheral base address.
- Returns:
Current position counter’s value.
-
static inline uint32_t EQDC_GetHoldPosition(EQDC_Type *base)#
Get the hold position counter’s value.
The position counter (POS or UPOS, LPOS) value is loaded to hold position (POSH or UPOSH, LPOSH) when:
Position register (POS or UPOS, LPOS), or position difference register (POSD), or revolution register (REV) is read.
TRIGGER happens and TRIGGER is enabled to update the hold registers.
- Parameters:
base – EQDC peripheral base address.
- Returns:
Hold position counter’s value.
-
static inline uint32_t EQDC_GetHoldPosition1(EQDC_Type *base)#
Get the hold position counter1’s value.
The Upper Position Counter Hold Register 1(UPOSH1) shares the same address with UCOMP1. When read, this register means the value of UPOSH1, which is the upper 16 bits of POSH1. The Lower Position Counter Hold Register 1(LPOSH1) shares the same address with LCOMP1. When read, this register means the value of LPOSH1, which is the lower 16 bits of POSH1. Position counter is captured into POSH1 on the rising edge of ICAP[1].
- Parameters:
base – EQDC peripheral base address.
- Returns:
Hold position counter1’s value.
-
static inline uint32_t EQDC_GetHoldPosition2(EQDC_Type *base)#
Get the hold position counter2’s value.
The Upper Position Counter Hold Register 2(UPOSH2) shares the same address with UCOMP2. When read,this register means the value of UPOSH2, which is the upper 16 bits of POSH2. The Lower Position Counter Hold Register 2(LPOSH2) shares the same address with LCOMP2. When read, this register means the value of LPOSH2, which is the lower 16 bits of POSH2. Position counter is captured into POSH2 on the rising edge of ICAP[2].
- Parameters:
base – EQDC peripheral base address.
- Returns:
Hold position counter2’s value.
-
static inline uint32_t EQDC_GetHoldPosition3(EQDC_Type *base)#
Get the hold position counter3’s value.
The Upper Position Counter Hold Register 3(UPOSH3) shares the same address with UCOMP3. When read,this register means the value of UPOSH3, which is the upper 16 bits of POSH3. The Lower Position Counter Hold Register 3(LPOSH3) shares the same address with LCOMP3. When read, this register means the value of LPOSH3, which is the lower 16 bits of POSH3. Position counter is captured into POSH3 on the rising edge of ICAP[3].
- Parameters:
base – EQDC peripheral base address.
- Returns:
Hold position counter3’s value.
-
static inline uint16_t EQDC_GetPositionDifference(EQDC_Type *base)#
Get the position difference counter’s value.
- Parameters:
base – EQDC peripheral base address.
- Returns:
The position difference counter’s value.
-
static inline uint16_t EQDC_GetHoldPositionDifference(EQDC_Type *base)#
Get the hold position difference counter’s value.
The position difference (POSD) value is loaded to hold position difference (POSDH) when:
Position register (POS or UPOS, LPOS), or position difference register (POSD), or revolution register (REV) is read. When Period Measurement is enabled (CTRL3[PMEN] = 1), POSDH will only be udpated when reading POSD.
TRIGGER happens and TRIGGER is enabled to update the hold registers.
- Parameters:
base – EQDC peripheral base address.
- Returns:
Hold position difference counter’s value.
-
static inline uint16_t EQDC_GetRevolution(EQDC_Type *base)#
Get the revolution counter’s value.
Get the revolution counter (REV) value.
- Parameters:
base – EQDC peripheral base address.
- Returns:
The revolution counter’s value.
-
static inline uint16_t EQDC_GetHoldRevolution(EQDC_Type *base)#
Get the hold revolution counter’s value.
The revolution counter (REV) value is loaded to hold revolution (REVH) when:
Position register (POS or UPOS, LPOS), or position difference register (POSD), or revolution register (REV) is read.
TRIGGER happens and TRIGGER is enabled to update the hold registers.
- Parameters:
base – EQDC peripheral base address.
- Returns:
Hold position revolution counter’s value.
-
static inline uint16_t EQDC_GetLastEdgeTime(EQDC_Type *base)#
Get the last edge time.
Last edge time (LASTEDGE) is the time since the last edge occurred on PHASEA or PHASEB. The last edge time register counts up using the peripheral clock after prescaler. Any edge on PHASEA or PHASEB will reset this register to 0 and start counting. If the last edge timer count reaches 0xffff, the counting will stop in order to prevent an overflow.Counting will continue when an edge occurs on PHASEA or PHASEB.
- Parameters:
base – EQDC peripheral base address.
- Returns:
The last edge time.
-
static inline uint16_t EQDC_GetHoldLastEdgeTime(EQDC_Type *base)#
Get the hold last edge time.
The hold of last edge time(LASTEDGEH) is update to last edge time(LASTEDGE) when the position difference register register (POSD) is read.
- Parameters:
base – EQDC peripheral base address.
- Returns:
Hold of last edge time.
-
static inline uint16_t EQDC_GetPositionDifferencePeriod(EQDC_Type *base)#
Get the Position Difference Period counter value.
The Position Difference Period counter (POSDPER) counts up using the prescaled peripheral clock. When reading the position difference register(POSD), the last edge time (LASTEDGE) will be loaded to position difference period counter(POSDPER). If the POSDPER count reaches 0xffff, the counting will stop in order to prevent an overflow. Counting will continue when an edge occurs on PHASEA or PHASEB.
- Parameters:
base – EQDC peripheral base address.
- Returns:
The position difference period counter value.
-
static inline uint16_t EQDC_GetBufferedPositionDifferencePeriod(EQDC_Type *base)#
Get buffered Position Difference Period counter value.
The Bufferd Position Difference Period (POSDPERBFR) value is updated with the position difference period counter(POSDPER) when any edge occurs on PHASEA or PHASEB.
- Parameters:
base – EQDC peripheral base address.
- Returns:
The buffered position difference period counter value.
-
static inline uint16_t EQDC_GetHoldPositionDifferencePeriod(EQDC_Type *base)#
Get Hold Position Difference Period counter value.
The hold position difference period(POSDPERH) is updated with the value of buffered position difference period(POSDPERBFR) when the position difference(POSD) register is read.
- Parameters:
base – EQDC peripheral base address.
- Returns:
The hold position difference period counter value.
-
enum _eqdc_status_flags#
EQDC status flags, these flags indicate the counter’s events. .
Values:
-
enumerator kEQDC_HomeEnableTransitionFlag#
HOME/ENABLE signal transition occured.
-
enumerator kEQDC_IndexPresetPulseFlag#
INDEX/PRESET pulse occured.
-
enumerator kEQDC_WatchdogTimeoutFlag#
Watchdog timeout occured.
-
enumerator kEQDC_SimultPhaseChangeFlag#
Simultaneous change of PHASEA and PHASEB occured.
-
enumerator kEQDC_CountDirectionChangeFlag#
Count direction change interrupt enable.
-
enumerator kEQDC_PositionRollOverFlag#
Position counter rolls over from 0xFFFFFFFF to 0, or from MOD value to INIT value.
-
enumerator kEQDC_PositionRollUnderFlag#
Position register roll under from 0 to 0xFFFFFFFF, or from INIT value to MOD value.
-
enumerator kEQDC_PositionCompare0Flag#
Position counter match the COMP0 value.
-
enumerator kEQDC_PositionCompare1Flag#
Position counter match the COMP1 value.
-
enumerator kEQDC_PositionCompare2Flag#
Position counter match the COMP2 value.
-
enumerator kEQDC_PositionCompare3Flag#
Position counter match the COMP3 value.
-
enumerator kEQDC_StatusAllFlags#
-
enumerator kEQDC_HomeEnableTransitionFlag#
-
enum _eqdc_signal_status#
Signal status, these flags indicate the raw and filtered input signal status. .
Values:
-
enumerator kEQDC_SignalStatusRawHomeEnable#
Raw HOME/ENABLE input.
-
enumerator kEQDC_SignalStatusRawIndexPreset#
Raw INDEX/PRESET input.
-
enumerator kEQDC_SignalStatusRawPhaseB#
Raw PHASEB input.
-
enumerator kEQDC_SignalStatusRawPhaseA#
Raw PHASEA input.
-
enumerator kEQDC_SignalStatusFilteredHomeEnable#
The filtered HOME/ENABLE input.
-
enumerator kEQDC_SignalStatusFilteredIndexPreset#
The filtered INDEX/PRESET input.
-
enumerator kEQDC_SignalStatusFilteredPhaseB#
The filtered PHASEB input.
-
enumerator kEQDC_SignalStatusFilteredPhaseA#
The filtered PHASEA input.
-
enumerator kEQDC_SignalStatusPositionCompare0Flag#
Position Compare 0 Flag Output.
-
enumerator kEQDC_SignalStatusPositionCompare1Flag#
Position Compare 1 Flag Output.
-
enumerator kEQDC_SignalStatusPositionCompare2Flag#
Position Compare 2 Flag Output.
-
enumerator kEQDC_SignalStatusPositionCompare3Flag#
Position Compare 3 Flag Output.
-
enumerator kEQDC_SignalStatusCountDirectionFlagHold#
Count Direction Flag Hold.
-
enumerator kEQDC_SignalStatusCountDirectionFlag#
Count Direction Flag Output.
-
enumerator kEQDC_SignalStatusAllFlags#
-
enumerator kEQDC_SignalStatusRawHomeEnable#
-
enum _eqdc_interrupt_enable#
Interrupt enable/disable mask. .
Values:
-
enumerator kEQDC_HomeEnableTransitionInterruptEnable#
HOME/ENABLE signal transition interrupt enable.
-
enumerator kEQDC_IndexPresetPulseInterruptEnable#
INDEX/PRESET pulse interrupt enable.
-
enumerator kEQDC_WatchdogTimeoutInterruptEnable#
Watchdog timeout interrupt enable.
-
enumerator kEQDC_SimultPhaseChangeInterruptEnable#
Simultaneous PHASEA and PHASEB change interrupt enable.
-
enumerator kEQDC_CountDirectionChangeInterruptEnable#
Count direction change interrupt enable.
-
enumerator kEQDC_PositionRollOverInterruptEnable#
Roll-over interrupt enable.
-
enumerator kEQDC_PositionRollUnderInterruptEnable#
Roll-under interrupt enable.
-
enumerator kEQDC_AllInterruptEnable#
-
enumerator kEQDC_HomeEnableTransitionInterruptEnable#
-
enum _eqdc_home_enable_init_pos_counter_mode#
Define HOME/ENABLE signal’s trigger mode.
Values:
-
enumerator kEQDC_HomeInitPosCounterDisabled#
Don’t use HOME/ENABLE signal to initialize the position counter.
-
enumerator kEQDC_HomeInitPosCounterOnRisingEdge#
Use positive going edge to trigger initialization of position counters.
-
enumerator kEQDC_HomeInitPosCounterOnFallingEdge#
Use negative going edge to trigger initialization of position counters.
-
enumerator kEQDC_HomeInitPosCounterDisabled#
-
enum _eqdc_index_preset_init_pos_counter_mode#
Define INDEX/PRESET signal’s trigger mode.
Values:
-
enumerator kEQDC_IndexInitPosCounterDisabled#
INDEX/PRESET pulse does not initialize the position counter.
-
enumerator kEQDC_IndexInitPosCounterOnRisingEdge#
Use INDEX/PRESET pulse rising edge to initialize position counter.
-
enumerator kEQDC_IndexInitPosCounterOnFallingEdge#
Use INDEX/PRESET pulse falling edge to initialize position counter.
-
enumerator kEQDC_IndexInitPosCounterDisabled#
-
enum _eqdc_operate_mode#
Define type for decoder opertion mode.
The Quadrature Decoder operates in following 4 operation modes: 1.Quadrature Decode(QDC) Operation Mode (CTRL[PH1] = 0,CTRL2[OPMODE] = 0) In QDC operation mode, Module uses PHASEA, PHASEB, INDEX, HOME, TRIGGER and ICAP[3:1] to decode the PHASEA and PHASEB signals from Speed/Position sensor. 2.Quadrature Count(QCT) Operation Mode (CTRL[PH1] = 0,CTRL2[OPMODE] = 1) In QCT operation mode, Module uses PHASEA, PHASEB, PRESET, ENABLE, TRIGGER and ICAP[3:1] to count the PHASEA and PHASEB signals from Speed/Position sensor. 3.Single Phase Decode(PH1DC) Operation Mode (CTRL[PH1] = 1,CTRL2[OPMODE] = 0) In PH1DC operation mode, the module uses PHASEA, PHASEB, INDEX, HOME, TRIGGER and ICAP[3:1] to decode the PHASEA and PHASEB signals from Speed/Position sensor. 4.Single Phase Count(PH1CT) Operation Mode (CTRL[PH1] = 1,CTRL2[OPMODE] = 1) In PH1CT operation mode, the module uses PHASEA, PHASEB, PRESET, ENABLE, TRIGGER and ICAP[3:1] to count the PHASEA and PHASEB signals from Speed/Position sensor.
Values:
-
enumerator kEQDC_QuadratureDecodeOperationMode#
Use standard quadrature decoder with PHASEA/PHASEB, INDEX/HOME.
-
enumerator kEQDC_QuadratureCountOperationMode#
Use quadrature count operation mode with PHASEA/PHASEB, PRESET/ENABLE.
-
enumerator kEQDC_SinglePhaseDecodeOperationMode#
Use single phase quadrature decoder with PHASEA/PHASEB, INDEX/HOME.
-
enumerator kEQDC_SinglePhaseCountOperationMode#
Use single phase count decoder with PHASEA/PHASEB, PRESET/ENABLE.
-
enumerator kEQDC_QuadratureDecodeOperationMode#
-
enum _eqdc_count_mode#
Define type for decoder count mode.
In decode mode, it uses the standard quadrature decoder with PHASEA and PHASEB, PHASEA = 0 and PHASEB = 0 mean reverse direction.
If PHASEA leads PHASEB, then motion is in the positive direction.
If PHASEA trails PHASEB,then motion is in the negative direction. In single phase mode, there are three count modes:
In Signed Count mode (Single Edge). Both position counter (POS) and position difference counter (POSD) count on the input PHASEA rising edge while the input PHASEB provides the selected position counter direction (up/down). If CTRL[REV] is 1, then the position counter will count in the opposite direction.
In Signed Count mode (double edge), both position counter (POS) and position difference counter (POSD) count the input PHASEA on both rising edge and falling edge while the input PHASEB provides the selected position counter direction (up/down).
In UP/DOWN Pulse Count mode. Both position counter (POS) and position difference counter (POSD) count in the up direction when input PHASEA rising edge occurs. Both counters count in the down direction when input PHASEB rising edge occurs. If CTRL[REV] is 1, then the position counter will count in the opposite direction.
Values:
-
enumerator kEQDC_QuadratureX4#
Active on kEQDC_QuadratureDecodeOperationMode/kEQDC_QuadratureCountOperationMode.
-
enumerator kEQDC_QuadratureX2#
Active on kEQDC_QuadratureDecodeOperationMode/kEQDC_QuadratureCountOperationMode.
-
enumerator kEQDC_QuadratureX1#
Active on kEQDC_QuadratureDecodeOperationMode/kEQDC_QuadratureCountOperationMode.
-
enumerator kEQDC_UpDownPulseCount#
Active on kEQDC_SinglePhaseDecodeOperationMode/kEQDC_SinglePhaseCountOperationMode.
-
enumerator kEQDC_SignedCountDoubleEdge#
Active on kEQDC_SinglePhaseDecodeOperationMode/kEQDC_SinglePhaseCountOperationMode.
-
enumerator kEQDC_SignedCountSingleEdge#
Active on kEQDC_SinglePhaseDecodeOperationMode/kEQDC_SinglePhaseCountOperationMode.
-
enum _eqdc_output_pulse_mode#
Define type for the condition of POSMATCH pulses.
Values:
-
enumerator kEQDC_OutputPulseOnCounterEqualCompare#
POSMATCH pulses when a match occurs between the position counters (POS) and the compare value (UCOMPx/LCOMPx)(x range is 0-3).
-
enumerator kEQDC_OutputPulseOnReadingPositionCounter#
POSMATCH pulses when reading position counter(POS and LPOS), revolution counter(REV), position difference counter(POSD).
-
enumerator kEQDC_OutputPulseOnCounterEqualCompare#
-
enum _eqdc_revolution_count_condition#
Define type for determining how the revolution counter (REV) is incremented/decremented.
Values:
-
enumerator kEQDC_RevolutionCountOnIndexPulse#
Use INDEX pulse to increment/decrement revolution counter.
-
enumerator kEQDC_RevolutionCountOnRollOverModulus#
Use modulus counting roll-over/under to increment/decrement revolution counter.
-
enumerator kEQDC_RevolutionCountOnIndexPulse#
-
enum _eqdc_filter_sample_count#
Input Filter Sample Count.
The Input Filter Sample Count represents the number of consecutive samples that must agree, before the input filter accepts an input transition
Values:
-
enumerator kEQDC_Filter3Samples#
3 samples.
-
enumerator kEQDC_Filter4Samples#
4 samples.
-
enumerator kEQDC_Filter5Samples#
5 samples.
-
enumerator kEQDC_Filter6Samples#
6 samples.
-
enumerator kEQDC_Filter7Samples#
7 samples.
-
enumerator kEQDC_Filter8Samples#
8 samples.
-
enumerator kEQDC_Filter9Samples#
9 samples.
-
enumerator kEQDC_Filter10Samples#
10 samples.
-
enumerator kEQDC_Filter3Samples#
-
enum _eqdc_count_direction_flag#
Count direction.
Values:
-
enumerator kEQDC_CountDirectionDown#
Last count was in down direction.
-
enumerator kEQDC_CountDirectionUp#
Last count was in up direction.
-
enumerator kEQDC_CountDirectionDown#
-
enum _eqdc_prescaler#
Prescaler used by Last Edge Time (LASTEDGE) and Position Difference Period Counter (POSDPER).
Values:
-
enumerator kEQDC_Prescaler1#
Prescaler value 1.
-
enumerator kEQDC_Prescaler2#
Prescaler value 2.
-
enumerator kEQDC_Prescaler4#
Prescaler value 4.
-
enumerator kEQDC_Prescaler8#
Prescaler value 8.
-
enumerator kEQDC_Prescaler16#
Prescaler value 16.
-
enumerator kEQDC_Prescaler32#
Prescaler value 32.
-
enumerator kEQDC_Prescaler64#
Prescaler value 64.
-
enumerator kEQDC_Prescaler128#
Prescaler value 128.
-
enumerator kEQDC_Prescaler256#
Prescaler value 256.
-
enumerator kEQDC_Prescaler512#
Prescaler value 512.
-
enumerator kEQDC_Prescaler1024#
Prescaler value 1024.
-
enumerator kEQDC_Prescaler2048#
Prescaler value 2048.
-
enumerator kEQDC_Prescaler4096#
Prescaler value 4096.
-
enumerator kEQDC_Prescaler8192#
Prescaler value 8192.
-
enumerator kEQDC_Prescaler16384#
Prescaler value 16384.
-
enumerator kEQDC_Prescaler32768#
Prescaler value 32768.
-
enumerator kEQDC_Prescaler1#
-
typedef enum _eqdc_home_enable_init_pos_counter_mode eqdc_home_enable_init_pos_counter_mode_t#
Define HOME/ENABLE signal’s trigger mode.
-
typedef enum _eqdc_index_preset_init_pos_counter_mode eqdc_index_preset_init_pos_counter_mode_t#
Define INDEX/PRESET signal’s trigger mode.
-
typedef enum _eqdc_operate_mode eqdc_operate_mode_t#
Define type for decoder opertion mode.
The Quadrature Decoder operates in following 4 operation modes: 1.Quadrature Decode(QDC) Operation Mode (CTRL[PH1] = 0,CTRL2[OPMODE] = 0) In QDC operation mode, Module uses PHASEA, PHASEB, INDEX, HOME, TRIGGER and ICAP[3:1] to decode the PHASEA and PHASEB signals from Speed/Position sensor. 2.Quadrature Count(QCT) Operation Mode (CTRL[PH1] = 0,CTRL2[OPMODE] = 1) In QCT operation mode, Module uses PHASEA, PHASEB, PRESET, ENABLE, TRIGGER and ICAP[3:1] to count the PHASEA and PHASEB signals from Speed/Position sensor. 3.Single Phase Decode(PH1DC) Operation Mode (CTRL[PH1] = 1,CTRL2[OPMODE] = 0) In PH1DC operation mode, the module uses PHASEA, PHASEB, INDEX, HOME, TRIGGER and ICAP[3:1] to decode the PHASEA and PHASEB signals from Speed/Position sensor. 4.Single Phase Count(PH1CT) Operation Mode (CTRL[PH1] = 1,CTRL2[OPMODE] = 1) In PH1CT operation mode, the module uses PHASEA, PHASEB, PRESET, ENABLE, TRIGGER and ICAP[3:1] to count the PHASEA and PHASEB signals from Speed/Position sensor.
-
typedef enum _eqdc_count_mode eqdc_count_mode_t#
Define type for decoder count mode.
In decode mode, it uses the standard quadrature decoder with PHASEA and PHASEB, PHASEA = 0 and PHASEB = 0 mean reverse direction.
If PHASEA leads PHASEB, then motion is in the positive direction.
If PHASEA trails PHASEB,then motion is in the negative direction. In single phase mode, there are three count modes:
In Signed Count mode (Single Edge). Both position counter (POS) and position difference counter (POSD) count on the input PHASEA rising edge while the input PHASEB provides the selected position counter direction (up/down). If CTRL[REV] is 1, then the position counter will count in the opposite direction.
In Signed Count mode (double edge), both position counter (POS) and position difference counter (POSD) count the input PHASEA on both rising edge and falling edge while the input PHASEB provides the selected position counter direction (up/down).
In UP/DOWN Pulse Count mode. Both position counter (POS) and position difference counter (POSD) count in the up direction when input PHASEA rising edge occurs. Both counters count in the down direction when input PHASEB rising edge occurs. If CTRL[REV] is 1, then the position counter will count in the opposite direction.
-
typedef enum _eqdc_output_pulse_mode eqdc_output_pulse_mode_t#
Define type for the condition of POSMATCH pulses.
-
typedef enum _eqdc_revolution_count_condition eqdc_revolution_count_condition_t#
Define type for determining how the revolution counter (REV) is incremented/decremented.
-
typedef enum _eqdc_filter_sample_count eqdc_filter_sample_count_t#
Input Filter Sample Count.
The Input Filter Sample Count represents the number of consecutive samples that must agree, before the input filter accepts an input transition
-
typedef enum _eqdc_count_direction_flag eqdc_count_direction_flag_t#
Count direction.
-
typedef enum _eqdc_prescaler eqdc_prescaler_t#
Prescaler used by Last Edge Time (LASTEDGE) and Position Difference Period Counter (POSDPER).
-
typedef struct _eqdc_config eqdc_config_t#
Define user configuration structure for EQDC module.
-
FSL_EQDC_DRIVER_VERSION#
-
EQDC_CTRL_W1C_FLAGS#
W1C bits in EQDC CTRL registers.
-
EQDC_INTCTRL_W1C_FLAGS#
W1C bits in EQDC INTCTRL registers.
-
EQDC_CTRL_INT_EN#
Interrupt enable bits in EQDC CTRL registers.
-
EQDC_INTCTRL_INT_EN#
Interrupt enable bits in EQDC INTCTRL registers.
-
EQDC_CTRL_INT_FLAGS#
Interrupt flag bits in EQDC CTRL registers.
-
EQDC_INTCTRL_INT_FLAGS#
Interrupt flag bits in EQDC INTCTRL registers.
-
struct _eqdc_config#
- #include <fsl_eqdc.h>
Define user configuration structure for EQDC module.
Public Members
-
bool enableReverseDirection#
Enable reverse direction counting.
-
bool countOnce#
Selects modulo loop or one shot counting mode.
-
bool enableDma#
Enable DMA for new written buffer values of COMPx/INIT/MOD(x range is 0-3)
-
bool bufferedRegisterLoadMode#
selects the loading time point of the buffered compare registers UCOMPx/LCOMPx, x=0~3, initial register (UINIT/LINIT), and modulus register (UMOD/LMOD).
-
bool enableTriggerInitPositionCounter#
Initialize position counter with initial register(UINIT, LINIT) value on TRIGGER’s rising edge.
-
bool enableIndexInitPositionCounter#
Enables the feature that the position counter to be initialized by Index Event Edge Mark.
This option works together with _eqdc_index_preset_init_pos_counter_mode and enableReverseDirection; If enabled, the behavior is like this:
When PHA leads PHB (Clockwise): If _eqdc_index_preset_init_pos_counter_mode is kEQDC_IndexInitPosCounterOnRisingEdge, then INDEX rising edge reset position counter. If _eqdc_index_preset_init_pos_counter_mode is kEQDC_IndexInitPosCounterOnFallingEdge, then INDEX falling edge reset position counter. If enableReverseDirection is false, then Reset position counter to initial value. If enableReverseDirection is true, then reset position counter to modulus value.
When PHA lags PHB (Counter Clockwise): If _eqdc_index_preset_init_pos_counter_mode is kEQDC_IndexInitPosCounterOnRisingEdge, then INDEX falling edge reset position counter. If _eqdc_index_preset_init_pos_counter_mode is kEQDC_IndexInitPosCounterOnFallingEdge, then INDEX rising edge reset position counter. If enableReverseDirection is false, then Reset position counter to modulus value. If enableReverseDirection is true, then reset position counter to initial value.
-
bool enableTriggerClearPositionRegisters#
Clear position counter(POS), revolution counter(REV), position difference counter (POSD) on TRIGGER’s rising edge.
-
bool enableTriggerHoldPositionRegisters#
Load position counter(POS), revolution counter(REV), position difference counter (POSD) values to hold registers on TRIGGER’s rising edge.
-
bool filterPhaseA#
Filter operation on PHASEA input, when write 1, it means filter for PHASEA input is bypassed.
-
bool filterPhaseB#
Filter operation on PHASEB input, when write 1, it means filter for PHASEB input is bypassed.
-
bool filterIndPre#
Filter operation on INDEX/PRESET input, when write 1, it means filter for INDEX/PRESET input is bypassed.
-
bool filterHomEna#
Filter operation on HOME/ENABLE input, when write 1, it means filter for HOME/ENABLE input is bypassed.
-
bool enableWatchdog#
Enable the watchdog to detect if the target is moving or not.
-
uint16_t watchdogTimeoutValue#
Watchdog timeout count value. It stores the timeout count for the quadrature decoder module watchdog timer.
-
eqdc_prescaler_t prescaler#
Prescaler.
-
bool filterClockSourceselection#
Filter Clock Source selection.
-
eqdc_filter_sample_count_t filterSampleCount#
Input Filter Sample Count. This value should be chosen to reduce the probability of noisy samples causing an incorrect transition to be recognized. The value represent the number of consecutive samples that must agree prior to the input filter accepting an input transition.
-
uint8_t filterSamplePeriod#
Input Filter Sample Period. This value should be set such that the sampling period is larger than the period of the expected noise. This value represents the sampling period (in IPBus clock cycles) of the decoder input signals. The available range is 0 - 255.
-
eqdc_operate_mode_t operateMode#
Selects operation mode.
-
eqdc_count_mode_t countMode#
Selects count mode.
-
eqdc_home_enable_init_pos_counter_mode_t homeEnableInitPosCounterMode#
Select how HOME/Enable signal used to initialize position counters.
-
eqdc_index_preset_init_pos_counter_mode_t indexPresetInitPosCounterMode#
Select how INDEX/Preset signal used to initialize position counters.
-
eqdc_output_pulse_mode_t outputPulseMode#
The condition of POSMATCH pulses.
-
uint32_t positionCompareValue[4]#
Position compare 0 ~ 3 value. The available value is a 32-bit number.
-
eqdc_revolution_count_condition_t revolutionCountCondition#
Revolution Counter Modulus Enable.
-
uint32_t positionModulusValue#
Position modulus value. The available value is a 32-bit number.
-
uint32_t positionInitialValue#
Position initial value. The available value is a 32-bit number.
-
uint32_t positionCounterValue#
Position counter value. When Modulo mode enabled, the positionCounterValue should be in the range of positionInitialValue and positionModulusValue.
-
bool enablePeriodMeasurement#
Enable period measurement. When enabled, the position difference hold register (POSDH) is only updated when position difference register (POSD) is read.
-
uint16_t enabledInterruptsMask#
Mask of interrupts to be enabled, should be OR’ed value of _eqdc_interrupt_enable.
-
bool enableReverseDirection#
EVTG: Event Generator Driver#
-
FSL_EVTG_DRIVER_VERSION#
EVTG driver version.
Version 2.1.0.
-
enum _evtg_index#
EVTG instance index.
Values:
-
enumerator kEVTG_Index0#
EVTG instance index 0.
-
enumerator kEVTG_Index1#
EVTG instance index 1.
-
enumerator kEVTG_Index2#
EVTG instance index 2.
-
enumerator kEVTG_Index3#
EVTG instance index 3.
-
enumerator kEVTG_Index0#
-
enum _evtg_input_index#
EVTG input index.
Values:
-
enumerator kEVTG_InputA#
EVTG input A.
-
enumerator kEVTG_InputB#
EVTG input B.
-
enumerator kEVTG_InputC#
EVTG input C.
-
enumerator kEVTG_InputD#
EVTG input D.
-
enumerator kEVTG_InputA#
-
enum _evtg_aoi_index#
EVTG AOI index.
Values:
-
enumerator kEVTG_AOI0#
EVTG AOI index 0.
-
enumerator kEVTG_AOI1#
EVTG AOI index 1.
-
enumerator kEVTG_AOI0#
-
enum _evtg_aoi_product_term#
EVTG AOI product term index.
Values:
-
enumerator kEVTG_ProductTerm0#
EVTG AOI product term index 0.
-
enumerator kEVTG_ProductTerm1#
EVTG AOI product term index 1.
-
enumerator kEVTG_ProductTerm2#
EVTG AOI product term index 2.
-
enumerator kEVTG_ProductTerm3#
EVTG AOI product term index 3.
-
enumerator kEVTG_ProductTerm0#
-
enum _evtg_aoi_input_config#
EVTG input configuration.
Values:
-
enumerator kEVTG_InputLogicZero#
Force input in product term to a logical zero.
-
enumerator kEVTG_InputDirectPass#
Pass input in product term.
-
enumerator kEVTG_InputComplement#
Complement input in product term.
-
enumerator kEVTG_InputLogicOne#
Force input in product term to a logical one.
-
enumerator kEVTG_InputLogicZero#
-
enum _evtg_aoi_outfilter_count#
EVTG AOI Output Filter Sample Count.
Values:
-
enumerator kEVTG_AOIOutFilterSampleCount3#
EVTG AOI output filter sample count is 3.
-
enumerator kEVTG_AOIOutFilterSampleCount4#
EVTG AOI output filter sample count is 4.
-
enumerator kEVTG_AOIOutFilterSampleCount5#
EVTG AOI output filter sample count is 5.
-
enumerator kEVTG_AOIOutFilterSampleCount6#
EVTG AOI output filter sample count is 6.
-
enumerator kEVTG_AOIOutFilterSampleCount7#
EVTG AOI output filter sample count is 7.
-
enumerator kEVTG_AOIOutFilterSampleCount8#
EVTG AOI output filter sample count is 8.
-
enumerator kEVTG_AOIOutFilterSampleCount9#
EVTG AOI output filter sample count is 9.
-
enumerator kEVTG_AOIOutFilterSampleCount10#
EVTG AOI output filter sample count is 10.
-
enumerator kEVTG_AOIOutFilterSampleCount3#
-
enum _evtg_outfdbk_override_input#
EVTG output feedback override control mode. When FF is configured as JK-FF mode, need EVTG_OUTA feedback to EVTG input and replace one of the four inputs.
Values:
-
enumerator kEVTG_OutputOverrideInputA#
Replace input A.
-
enumerator kEVTG_OutputOverrideInputB#
Replace input B.
-
enumerator kEVTG_OutputOverrideInputC#
Replace input C.
-
enumerator kEVTG_OutputOverrideInputD#
Replace input D.
-
enumerator kEVTG_OutputOverrideInputA#
-
enum _evtg_flipflop_mode#
EVTG flip flop mode configuration.
Values:
-
enumerator kEVTG_FFModeBypass#
Bypass mode (default).In this mode, user can choose to enable or disable input sync logic and filter function.
-
enumerator kEVTG_FFModeRSTrigger#
RS trigger mode. In this mode, user can choose to enable or disable input sync logic and filter function.
-
enumerator kEVTG_FFModeTFF#
T-FF mode. In this mode, input sync or filter has to be enabled to remove the possible glitch.
-
enumerator kEVTG_FFModeDFF#
D-FF mode. In this mode, input sync or filter has to be enabled to remove the possible glitch.
-
enumerator kEVTG_FFModeJKFF#
JK-FF mode. In this mode, input sync or filter has to be enabled to remove the possible glitch.
-
enumerator kEVTG_FFModeLatch#
Latch mode. In this mode, input sync or filter has to be enabled to remove the possible glitch.
-
enumerator kEVTG_FFModeBypass#
-
enum _evtg_flipflop_init_output#
EVTG flip-flop initial value.
Values:
-
enumerator kEVTG_FFInitOut0#
Configure the positive output of flip-flop as 0.
-
enumerator kEVTG_FFInitOut1#
Configure the positive output of flip-flop as 1.
-
enumerator kEVTG_FFInitOut0#
-
typedef enum _evtg_index evtg_index_t#
EVTG instance index.
-
typedef enum _evtg_input_index evtg_input_index_t#
EVTG input index.
-
typedef enum _evtg_aoi_index evtg_aoi_index_t#
EVTG AOI index.
-
typedef enum _evtg_aoi_product_term evtg_aoi_product_term_t#
EVTG AOI product term index.
-
typedef enum _evtg_aoi_input_config evtg_aoi_input_config_t#
EVTG input configuration.
-
typedef enum _evtg_aoi_outfilter_count evtg_aoi_outfilter_count_t#
EVTG AOI Output Filter Sample Count.
-
typedef enum _evtg_outfdbk_override_input evtg_outfdbk_override_input_t#
EVTG output feedback override control mode. When FF is configured as JK-FF mode, need EVTG_OUTA feedback to EVTG input and replace one of the four inputs.
-
typedef enum _evtg_flipflop_mode evtg_flipflop_mode_t#
EVTG flip flop mode configuration.
-
typedef enum _evtg_flipflop_init_output evtg_flipflop_init_output_t#
EVTG flip-flop initial value.
-
typedef struct _evtg_aoi_outfilter_config evtg_aoi_outfilter_config_t#
The structure for configuring an AOI output filter sample.
AOI output filter sample count represent the number of consecutive samples that must agree prior to the AOI output filter accepting an transition. AOI output filter sample period represent the sampling period (in IP bus clock cycles) of the AOI output signals. Each AOI output is sampled multiple times at the rate specified by this period.
For the modes with Filter function enabled, filter delay is “(FILT_CNT + 3) x FILT_PER + 2”.
-
typedef struct _evtg_aoi_product_term_config evtg_aoi_product_term_config_t#
The structure for configuring an AOI product term.
-
typedef struct _evtg_aoi_config evtg_aoi_config_t#
EVTG AOI configuration structure.
-
typedef struct _evtg_config evtg_config_t#
EVTG configuration covering all configurable fields.
-
struct _evtg_aoi_outfilter_config#
- #include <fsl_evtg.h>
The structure for configuring an AOI output filter sample.
AOI output filter sample count represent the number of consecutive samples that must agree prior to the AOI output filter accepting an transition. AOI output filter sample period represent the sampling period (in IP bus clock cycles) of the AOI output signals. Each AOI output is sampled multiple times at the rate specified by this period.
For the modes with Filter function enabled, filter delay is “(FILT_CNT + 3) x FILT_PER + 2”.
Public Members
-
evtg_aoi_outfilter_count_t sampleCount#
EVTG AOI output filter sample count. refer to evtg_aoi_outfilter_count_t.
-
uint8_t samplePeriod#
EVTG AOI output filter sample period, within 0~255. If sample period value is 0x00 (default), then the input filter is bypassed.
-
evtg_aoi_outfilter_count_t sampleCount#
-
struct _evtg_aoi_product_term_config#
- #include <fsl_evtg.h>
The structure for configuring an AOI product term.
Public Members
-
evtg_aoi_input_config_t aInput#
Input A configuration.
-
evtg_aoi_input_config_t bInput#
Input B configuration.
-
evtg_aoi_input_config_t cInput#
Input C configuration.
-
evtg_aoi_input_config_t dInput#
Input D configuration.
-
evtg_aoi_input_config_t aInput#
-
struct _evtg_aoi_config#
- #include <fsl_evtg.h>
EVTG AOI configuration structure.
Public Members
-
evtg_aoi_outfilter_config_t aoiOutFilterConfig#
EVTG AOI output filter sample configuration structure.
-
evtg_aoi_product_term_config_t productTerm0#
Configure AOI product term0.
-
evtg_aoi_product_term_config_t productTerm1#
Configure AOI product term1.
-
evtg_aoi_product_term_config_t productTerm2#
Configure AOI product term2.
-
evtg_aoi_product_term_config_t productTerm3#
Configure AOI product term3.
-
evtg_aoi_outfilter_config_t aoiOutFilterConfig#
-
struct _evtg_config#
- #include <fsl_evtg.h>
EVTG configuration covering all configurable fields.
Public Members
-
bool enableInputASync#
Enable/Disable EVTG A input synchronous with bus clk.
-
bool enableInputBSync#
Enable/Disable EVTG B input synchronous with bus clk.
-
bool enableInputCSync#
Enable/Disable EVTG C input synchronous with bus clk.
-
bool enableInputDSync#
Enable/Disable EVTG D input synchronous with bus clk.
-
evtg_outfdbk_override_input_t outfdbkOverideinput#
EVTG output feedback to EVTG input and replace one of the four inputs.
-
evtg_flipflop_mode_t flipflopMode#
Flip-Flop can be configured as one of Bypass mode, RS trigger mode, T-FF mode, D-FF mode, JK-FF mode, Latch mode.
-
bool enableFlipflopInitOutput#
Flip-flop initial output value enable/disable.
-
evtg_flipflop_init_output_t flipflopInitOutputValue#
Flip-flop initial output value configuration.
-
bool enableForceBypassFlipFlopAOI0#
Enable/Disable force bypass Flip-Flop and route the AOI_0(Filter_0) value directly to EVTG_OUTA
-
bool enableForceBypassFlipFlopAOI1#
Enable/Disable force bypass Flip-Flop and route the AOI_1(Filter_1) value directly to EVTG_OUTB
-
evtg_aoi_config_t aoi0Config#
Configure EVTG AOI0.
-
evtg_aoi_config_t aoi1Config#
Configure EVTG AOI1.
-
bool enableInputASync#
EVTG Driver#
-
void EVTG_Init(EVTG_Type *base, evtg_index_t evtgIndex, evtg_config_t *psConfig)#
Initialize EVTG with a user configuration structure.
- Parameters:
base – EVTG base address.
evtgIndex – EVTG instance index.
psConfig – EVTG initial configuration structure pointer.
-
void EVTG_Deinit(EVTG_Type *base)#
De-initialize EVTG.
This function gates the EVTG peripheral clock. It is the counterpart of EVTG_Init().
- Parameters:
base – EVTG base address.
-
void EVTG_GetDefaultConfig(evtg_config_t *psConfig, evtg_flipflop_mode_t flipflopMode)#
Loads default values to the EVTG configuration structure.
The purpose of this API is to initialize the configuration structure to default value for EVTG_Init() to use. The Flip-Flop can be configured as Bypass mode, RS trigger mode, T-FF mode, D-FF mode, JK-FF mode, Latch mode. Please check RM INTC chapter for more details.
- Parameters:
psConfig – EVTG initial configuration structure pointer.
flipflopMode – EVTG flip flop mode. see @ ref _evtg_flipflop_mode
-
static inline void EVTG_ForceFlipflopInitOutput(EVTG_Type *base, evtg_index_t evtgIndex, evtg_flipflop_init_output_t flipflopInitOutputValue)#
Force Flip-flop initial output value to be presented on flip-flop positive output.
- Parameters:
base – EVTG base address.
evtgIndex – EVTG instance index.
flipflopInitOutputValue – EVTG flip-flop initial output control. see evtg_flipflop_init_output_t
-
static inline void EVTG_SetProductTermInput(EVTG_Type *base, evtg_index_t evtgIndex, evtg_aoi_index_t aoiIndex, evtg_aoi_product_term_t productTerm, evtg_input_index_t inputIndex, evtg_aoi_input_config_t input)#
Configure each input value of AOI product term. Each selected input term in each product term can be configured to produce a logical 0 or 1 or pass the true or complement of the selected event input. Adapt to some simple aoi expressions.
- Parameters:
base – EVTG base address.
evtgIndex – EVTG instance index.
aoiIndex – EVTG AOI index. see enum ref evtg_aoi_index_t
productTerm – EVTG product term index.
inputIndex – EVTG input index.
input – EVTG input configuration with enum evtg_aoi_input_config_t.
-
void EVTG_ConfigAOIProductTerm(EVTG_Type *base, evtg_index_t evtgIndex, evtg_aoi_index_t aoiIndex, evtg_aoi_product_term_t productTerm, evtg_aoi_product_term_config_t *psProductTermConfig)#
Configure AOI product term by initializing the product term configuration structure.
- Parameters:
base – EVTG base address.
evtgIndex – EVTG instance index.
aoiIndex – EVTG AOI index. see enum evtg_aoi_index_t
productTerm – EVTG AOI product term index.
psProductTermConfig – Pointer to EVTG product term configuration structure. see ref _evtg_aoi_product_term_config
EWM: External Watchdog Monitor Driver#
-
void EWM_Init(EWM_Type *base, const ewm_config_t *config)#
Initializes the EWM peripheral.
This function is used to initialize the EWM. After calling, the EWM runs immediately according to the configuration. Note that, except for the interrupt enable control bit, other control bits and registers are write once after a CPU reset. Modifying them more than once generates a bus transfer error.
This is an example.
ewm_config_t config; EWM_GetDefaultConfig(&config); config.compareHighValue = 0xAAU; EWM_Init(ewm_base,&config);
- Parameters:
base – EWM peripheral base address
config – The configuration of the EWM
-
void EWM_Deinit(EWM_Type *base)#
Deinitializes the EWM peripheral.
This function is used to shut down the EWM.
- Parameters:
base – EWM peripheral base address
-
void EWM_GetDefaultConfig(ewm_config_t *config)#
Initializes the EWM configuration structure.
This function initializes the EWM configuration structure to default values. The default values are as follows.
ewmConfig->enableEwm = true; ewmConfig->enableEwmInput = false; ewmConfig->setInputAssertLogic = false; ewmConfig->enableInterrupt = false; ewmConfig->ewm_lpo_clock_source_t = kEWM_LpoClockSource0; ewmConfig->prescaler = 0; ewmConfig->compareLowValue = 0; ewmConfig->compareHighValue = 0xFEU;
See also
- Parameters:
config – Pointer to the EWM configuration structure.
-
static inline void EWM_EnableInterrupts(EWM_Type *base, uint32_t mask)#
Enables the EWM interrupt.
This function enables the EWM interrupt.
- Parameters:
base – EWM peripheral base address
mask – The interrupts to enable The parameter can be combination of the following source if defined
kEWM_InterruptEnable
-
static inline void EWM_DisableInterrupts(EWM_Type *base, uint32_t mask)#
Disables the EWM interrupt.
This function enables the EWM interrupt.
- Parameters:
base – EWM peripheral base address
mask – The interrupts to disable The parameter can be combination of the following source if defined
kEWM_InterruptEnable
-
static inline uint32_t EWM_GetStatusFlags(EWM_Type *base)#
Gets all status flags.
This function gets all status flags.
This is an example for getting the running flag.
uint32_t status; status = EWM_GetStatusFlags(ewm_base) & kEWM_RunningFlag;
See also
True: a related status flag has been set.
False: a related status flag is not set.
- Parameters:
base – EWM peripheral base address
- Returns:
State of the status flag: asserted (true) or not-asserted (false).
-
void EWM_Refresh(EWM_Type *base)#
Services the EWM.
This function resets the EWM counter to zero.
- Parameters:
base – EWM peripheral base address
-
FSL_EWM_DRIVER_VERSION#
EWM driver version 2.0.4.
-
enum _ewm_lpo_clock_source#
Describes EWM clock source.
Values:
-
enumerator kEWM_LpoClockSource0#
EWM clock sourced from lpo_clk[0]
-
enumerator kEWM_LpoClockSource1#
EWM clock sourced from lpo_clk[1]
-
enumerator kEWM_LpoClockSource2#
EWM clock sourced from lpo_clk[2]
-
enumerator kEWM_LpoClockSource3#
EWM clock sourced from lpo_clk[3]
-
enumerator kEWM_LpoClockSource0#
-
enum _ewm_interrupt_enable_t#
EWM interrupt configuration structure with default settings all disabled.
This structure contains the settings for all of EWM interrupt configurations.
Values:
-
enumerator kEWM_InterruptEnable#
Enable the EWM to generate an interrupt
-
enumerator kEWM_InterruptEnable#
-
enum _ewm_status_flags_t#
EWM status flags.
This structure contains the constants for the EWM status flags for use in the EWM functions.
Values:
-
enumerator kEWM_RunningFlag#
Running flag, set when EWM is enabled
-
enumerator kEWM_RunningFlag#
-
typedef enum _ewm_lpo_clock_source ewm_lpo_clock_source_t#
Describes EWM clock source.
-
typedef struct _ewm_config ewm_config_t#
Data structure for EWM configuration.
This structure is used to configure the EWM.
-
struct _ewm_config#
- #include <fsl_ewm.h>
Data structure for EWM configuration.
This structure is used to configure the EWM.
Public Members
-
bool enableEwm#
Enable EWM module
-
bool enableEwmInput#
Enable EWM_in input
-
bool setInputAssertLogic#
EWM_in signal assertion state
-
bool enableInterrupt#
Enable EWM interrupt
-
ewm_lpo_clock_source_t clockSource#
Clock source select
-
uint8_t prescaler#
Clock prescaler value
-
uint8_t compareLowValue#
Compare low-register value
-
uint8_t compareHighValue#
Compare high-register value
-
bool enableEwm#
FGPIO Driver#
FlexCAN: Flex Controller Area Network Driver#
FlexCAN Driver#
-
bool FLEXCAN_IsInstanceHasFDMode(CAN_Type *base)#
Determine whether the FlexCAN instance support CAN FD mode at run time.
Note
Use this API only if different soc parts share the SOC part name macro define. Otherwise, a different SOC part name can be used to determine at compile time whether the FlexCAN instance supports CAN FD mode or not. If need use this API to determine if CAN FD mode is supported, the FLEXCAN_Init function needs to be executed first, and then call this API and use the return to value determines whether to supports CAN FD mode, if return true, continue calling FLEXCAN_FDInit to enable CAN FD mode.
- Parameters:
base – FlexCAN peripheral base address.
- Returns:
return TRUE if instance support CAN FD mode, FALSE if instance only support classic CAN (2.0) mode.
-
uint32_t FLEXCAN_GetFDMailboxOffset(CAN_Type *base, uint8_t mbIdx)#
Get Mailbox offset number by dword.
This function gets the offset number of the specified mailbox. Mailbox is not consecutive between memory regions when payload is not 8 bytes so need to calculate the specified mailbox address. For example, in the first memory region, MB[0].CS address is 0x4002_4080. For 32 bytes payload frame, the second mailbox is ((1/12)*512 + 1%12*40)/4 = 10, meaning 10 dword after the 0x4002_4080, which is actually the address of mailbox MB[1].CS.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – Mailbox index.
- Returns:
Mailbox address offset in word.
-
status_t FLEXCAN_EnterFreezeMode(CAN_Type *base)#
Enter FlexCAN Freeze Mode.
This function makes the FlexCAN work under Freeze Mode.
- Parameters:
base – FlexCAN peripheral base address.
- Returns:
kStatus_Success Enter Freeze Mode successful kStatus_Timeout Timeout when wait for Freeze Mode Acknowledge
-
status_t FLEXCAN_ExitFreezeMode(CAN_Type *base)#
Exit FlexCAN Freeze Mode.
This function makes the FlexCAN leave Freeze Mode.
- Parameters:
base – FlexCAN peripheral base address.
- Returns:
kStatus_Success Enter Freeze Mode successful kStatus_Timeout Timeout when wait for Freeze Mode Acknowledge
-
uint32_t FLEXCAN_GetInstance(CAN_Type *base)#
Get the FlexCAN instance from peripheral base address.
- Parameters:
base – FlexCAN peripheral base address.
- Returns:
FlexCAN instance.
-
bool FLEXCAN_CalculateImprovedTimingValues(CAN_Type *base, uint32_t bitRate, uint32_t sourceClock_Hz, flexcan_timing_config_t *pTimingConfig)#
Calculates the improved timing values by specific bit Rates for classical CAN.
This function use to calculates the Classical CAN timing values according to the given bit rate. The Calculated timing values will be set in CTRL1/CBT/ENCBT register. The calculation is based on the recommendation of the CiA 301 v4.2.0 and previous version document.
- Parameters:
base – FlexCAN peripheral base address.
bitRate – The classical CAN speed in bps defined by user, should be less than or equal to 1Mbps.
sourceClock_Hz – The Source clock frequency in Hz.
pTimingConfig – Pointer to the FlexCAN timing configuration structure.
- Returns:
TRUE if timing configuration found, FALSE if failed to find configuration.
-
void FLEXCAN_Init(CAN_Type *base, const flexcan_config_t *pConfig, uint32_t sourceClock_Hz)#
Initializes a FlexCAN instance.
This function initializes the FlexCAN module with user-defined settings. This example shows how to set up the flexcan_config_t parameters and how to call the FLEXCAN_Init function by passing in these parameters.
flexcan_config_t flexcanConfig; flexcanConfig.clkSrc = kFLEXCAN_ClkSrc0; flexcanConfig.bitRate = 1000000U; flexcanConfig.maxMbNum = 16; flexcanConfig.enableLoopBack = false; flexcanConfig.enableSelfWakeup = false; flexcanConfig.enableIndividMask = false; flexcanConfig.enableDoze = false; flexcanConfig.disableSelfReception = false; flexcanConfig.enableListenOnlyMode = false; flexcanConfig.timingConfig = timingConfig; FLEXCAN_Init(CAN0, &flexcanConfig, 40000000UL);
- Parameters:
base – FlexCAN peripheral base address.
pConfig – Pointer to the user-defined configuration structure.
sourceClock_Hz – FlexCAN Protocol Engine clock source frequency in Hz.
-
bool FLEXCAN_FDCalculateImprovedTimingValues(CAN_Type *base, uint32_t bitRate, uint32_t bitRateFD, uint32_t sourceClock_Hz, flexcan_timing_config_t *pTimingConfig)#
Calculates the improved timing values by specific bit rates for CANFD.
This function use to calculates the CANFD timing values according to the given nominal phase bit rate and data phase bit rate. The Calculated timing values will be set in CBT/ENCBT and FDCBT/EDCBT registers. The calculation is based on the recommendation of the CiA 1301 v1.0.0 document.
- Parameters:
base – FlexCAN peripheral base address.
bitRate – The CANFD bus control speed in bps defined by user.
bitRateFD – The CAN FD data phase speed in bps defined by user. Equal to bitRate means disable bit rate switching.
sourceClock_Hz – The Source clock frequency in Hz.
pTimingConfig – Pointer to the FlexCAN timing configuration structure.
- Returns:
TRUE if timing configuration found, FALSE if failed to find configuration
-
void FLEXCAN_FDInit(CAN_Type *base, const flexcan_config_t *pConfig, uint32_t sourceClock_Hz, flexcan_mb_size_t dataSize, bool brs)#
Initializes a FlexCAN instance.
This function initializes the FlexCAN module with user-defined settings. This example shows how to set up the flexcan_config_t parameters and how to call the FLEXCAN_FDInit function by passing in these parameters.
flexcan_config_t flexcanConfig; flexcanConfig.clkSrc = kFLEXCAN_ClkSrc0; flexcanConfig.bitRate = 1000000U; flexcanConfig.bitRateFD = 2000000U; flexcanConfig.maxMbNum = 16; flexcanConfig.enableLoopBack = false; flexcanConfig.enableSelfWakeup = false; flexcanConfig.enableIndividMask = false; flexcanConfig.disableSelfReception = false; flexcanConfig.enableListenOnlyMode = false; flexcanConfig.enableDoze = false; flexcanConfig.timingConfig = timingConfig; FLEXCAN_FDInit(CAN0, &flexcanConfig, 80000000UL, kFLEXCAN_16BperMB, true);
- Parameters:
base – FlexCAN peripheral base address.
pConfig – Pointer to the user-defined configuration structure.
sourceClock_Hz – FlexCAN Protocol Engine clock source frequency in Hz.
dataSize – FlexCAN Message Buffer payload size. The actual transmitted or received CAN FD frame data size needs to be less than or equal to this value.
brs – True if bit rate switch is enabled in FD mode.
-
void FLEXCAN_Deinit(CAN_Type *base)#
De-initializes a FlexCAN instance.
This function disables the FlexCAN module clock and sets all register values to the reset value.
- Parameters:
base – FlexCAN peripheral base address.
-
void FLEXCAN_GetDefaultConfig(flexcan_config_t *pConfig)#
Gets the default configuration structure.
This function initializes the FlexCAN configuration structure to default values. The default values are as follows. flexcanConfig->clkSrc = kFLEXCAN_ClkSrc0; flexcanConfig->bitRate = 1000000U; flexcanConfig->bitRateFD = 2000000U; flexcanConfig->maxMbNum = 16; flexcanConfig->enableLoopBack = false; flexcanConfig->enableSelfWakeup = false; flexcanConfig->enableIndividMask = false; flexcanConfig->disableSelfReception = false; flexcanConfig->enableListenOnlyMode = false; flexcanConfig->enableDoze = false; flexcanConfig->enablePretendedeNetworking = false; flexcanConfig->enableMemoryErrorControl = true; flexcanConfig->enableNonCorrectableErrorEnterFreeze = true; flexcanConfig->enableTransceiverDelayMeasure = true; flexcanConfig->enableRemoteRequestFrameStored = true; flexcanConfig->payloadEndianness = kFLEXCAN_bigEndian; flexcanConfig.timingConfig = timingConfig;
- Parameters:
pConfig – Pointer to the FlexCAN configuration structure.
-
void FLEXCAN_SetTimingConfig(CAN_Type *base, const flexcan_timing_config_t *pConfig)#
Sets the FlexCAN classical CAN protocol timing characteristic.
This function gives user settings to classical CAN or CAN FD nominal phase timing characteristic. The function is for an experienced user. For less experienced users, call the FLEXCAN_SetBitRate() instead.
Note
Calling FLEXCAN_SetTimingConfig() overrides the bit rate set in FLEXCAN_Init() or FLEXCAN_SetBitRate().
- Parameters:
base – FlexCAN peripheral base address.
pConfig – Pointer to the timing configuration structure.
-
status_t FLEXCAN_SetBitRate(CAN_Type *base, uint32_t sourceClock_Hz, uint32_t bitRate_Bps)#
Set bit rate of FlexCAN classical CAN frame or CAN FD frame nominal phase.
This function set the bit rate of classical CAN frame or CAN FD frame nominal phase base on FLEXCAN_CalculateImprovedTimingValues() API calculated timing values.
Note
Calling FLEXCAN_SetBitRate() overrides the bit rate set in FLEXCAN_Init().
- Parameters:
base – FlexCAN peripheral base address.
sourceClock_Hz – Source Clock in Hz.
bitRate_Bps – Bit rate in Bps.
- Returns:
kStatus_Success - Set CAN baud rate (only Nominal phase) successfully.
-
void FLEXCAN_SetFDTimingConfig(CAN_Type *base, const flexcan_timing_config_t *pConfig)#
Sets the FlexCAN CANFD data phase timing characteristic.
This function gives user settings to CANFD data phase timing characteristic. The function is for an experienced user. For less experienced users, call the FLEXCAN_SetFDBitRate() to set both Nominal/Data bit Rate instead.
Note
Calling FLEXCAN_SetFDTimingConfig() overrides the data phase bit rate set in FLEXCAN_FDInit()/FLEXCAN_SetFDBitRate().
- Parameters:
base – FlexCAN peripheral base address.
pConfig – Pointer to the timing configuration structure.
-
status_t FLEXCAN_SetFDBitRate(CAN_Type *base, uint32_t sourceClock_Hz, uint32_t bitRateN_Bps, uint32_t bitRateD_Bps)#
Set bit rate of FlexCAN FD frame.
This function set the baud rate of FLEXCAN FD base on FLEXCAN_FDCalculateImprovedTimingValues() API calculated timing values.
- Parameters:
base – FlexCAN peripheral base address.
sourceClock_Hz – Source Clock in Hz.
bitRateN_Bps – Nominal bit Rate in Bps.
bitRateD_Bps – Data bit Rate in Bps.
- Returns:
kStatus_Success - Set CAN FD bit rate (include Nominal and Data phase) successfully.
-
void FLEXCAN_SetRxMbGlobalMask(CAN_Type *base, uint32_t mask)#
Sets the FlexCAN receive message buffer global mask.
This function sets the global mask for the FlexCAN message buffer in a matching process. The configuration is only effective when the Rx individual mask is disabled in the FLEXCAN_Init().
- Parameters:
base – FlexCAN peripheral base address.
mask – Rx Message Buffer Global Mask value.
-
void FLEXCAN_SetRxFifoGlobalMask(CAN_Type *base, uint32_t mask)#
Sets the FlexCAN receive FIFO global mask.
This function sets the global mask for FlexCAN FIFO in a matching process.
- Parameters:
base – FlexCAN peripheral base address.
mask – Rx Fifo Global Mask value.
-
void FLEXCAN_SetRxIndividualMask(CAN_Type *base, uint8_t maskIdx, uint32_t mask)#
Sets the FlexCAN receive individual mask.
This function sets the individual mask for the FlexCAN matching process. The configuration is only effective when the Rx individual mask is enabled in the FLEXCAN_Init(). If the Rx FIFO is disabled, the individual mask is applied to the corresponding Message Buffer. If the Rx FIFO is enabled, the individual mask for Rx FIFO occupied Message Buffer is applied to the Rx Filter with the same index. Note that only the first 32 individual masks can be used as the Rx FIFO filter mask.
- Parameters:
base – FlexCAN peripheral base address.
maskIdx – The Index of individual Mask.
mask – Rx Individual Mask value.
-
void FLEXCAN_SetTxMbConfig(CAN_Type *base, uint8_t mbIdx, bool enable)#
Configures a FlexCAN transmit message buffer.
This function aborts the previous transmission, cleans the Message Buffer, and configures it as a Transmit Message Buffer.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The Message Buffer index.
enable – Enable/disable Tx Message Buffer.
true: Enable Tx Message Buffer.
false: Disable Tx Message Buffer.
-
void FLEXCAN_SetRxMbConfig(CAN_Type *base, uint8_t mbIdx, const flexcan_rx_mb_config_t *pRxMbConfig, bool enable)#
Configures a FlexCAN Receive Message Buffer.
This function cleans a FlexCAN build-in Message Buffer and configures it as a Receive Message Buffer. User should invoke this API when CTRL2[RRS]=1. When CTRL2[RRS]=1, frame’s ID is compared to the IDs of the receive mailboxes with the CODE field configured as kFLEXCAN_RxMbEmpty, kFLEXCAN_RxMbFull or kFLEXCAN_RxMbOverrun. Message buffer will store the remote frame in the same fashion of a data frame. No automatic remote response frame will be generated. User need to setup another message buffer to respond remote request.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The Message Buffer index.
pRxMbConfig – Pointer to the FlexCAN Message Buffer configuration structure.
enable – Enable/disable Rx Message Buffer.
true: Enable Rx Message Buffer.
false: Disable Rx Message Buffer.
-
static inline void FLEXCAN_SetMbID(CAN_Type *base, uint8_t mbIdx, uint32_t id)#
Configures a FlexCAN Message Buffer identifier.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The Message Buffer index.
id – CAN Message Buffer Identifier, should use FLEXCAN_ID_EXT() or FLEXCAN_ID_STD() macro.
-
void FLEXCAN_SetFDTxMbConfig(CAN_Type *base, uint8_t mbIdx, bool enable)#
Configures a FlexCAN transmit message buffer.
This function aborts the previous transmission, cleans the Message Buffer, and configures it as a Transmit Message Buffer.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The Message Buffer index.
enable – Enable/disable Tx Message Buffer.
true: Enable Tx Message Buffer.
false: Disable Tx Message Buffer.
-
void FLEXCAN_SetFDRxMbConfig(CAN_Type *base, uint8_t mbIdx, const flexcan_rx_mb_config_t *pRxMbConfig, bool enable)#
Configures a FlexCAN Receive Message Buffer.
This function cleans a FlexCAN build-in Message Buffer and configures it as a Receive Message Buffer.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The Message Buffer index.
pRxMbConfig – Pointer to the FlexCAN Message Buffer configuration structure.
enable – Enable/disable Rx Message Buffer.
true: Enable Rx Message Buffer.
false: Disable Rx Message Buffer.
-
static inline void FLEXCAN_SetFDMbID(CAN_Type *base, uint8_t mbIdx, uint32_t id)#
Configures a FlexCAN Message Buffer identifier.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The Message Buffer index.
id – CAN Message Buffer Identifier, should use FLEXCAN_ID_EXT() or FLEXCAN_ID_STD() macro.
-
void FLEXCAN_SetRemoteResponseMbConfig(CAN_Type *base, uint8_t mbIdx, const flexcan_frame_t *pFrame)#
Configures a FlexCAN Remote Response Message Buffer.
User should invoke this API when CTRL2[RRS]=0. When CTRL2[RRS]=0, frame’s ID is compared to the IDs of the receive mailboxes with the CODE field configured as kFLEXCAN_RxMbRanswer. If there is a matching ID, then this mailbox content will be transmitted as response. The received remote request frame is not stored in receive buffer. It is only used to trigger a transmission of a frame in response.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The Message Buffer index.
pFrame – Pointer to CAN message frame structure for response.
-
void FLEXCAN_SetRxFifoConfig(CAN_Type *base, const flexcan_rx_fifo_config_t *pRxFifoConfig, bool enable)#
Configures the FlexCAN Legacy Rx FIFO.
This function configures the FlexCAN Rx FIFO with given configuration.
Note
Legacy Rx FIFO only can receive classic CAN message.
- Parameters:
base – FlexCAN peripheral base address.
pRxFifoConfig – Pointer to the FlexCAN Legacy Rx FIFO configuration structure. Can be NULL when enable parameter is false.
enable – Enable/disable Legacy Rx FIFO.
true: Enable Legacy Rx FIFO.
false: Disable Legacy Rx FIFO.
-
void FLEXCAN_SetEnhancedRxFifoConfig(CAN_Type *base, const flexcan_enhanced_rx_fifo_config_t *pConfig, bool enable)#
Configures the FlexCAN Enhanced Rx FIFO.
This function configures the Enhanced Rx FIFO with given configuration.
Note
Enhanced Rx FIFO support receive classic CAN or CAN FD messages, Legacy Rx FIFO and Enhanced Rx FIFO cannot be enabled at the same time.
- Parameters:
base – FlexCAN peripheral base address.
pConfig – Pointer to the FlexCAN Enhanced Rx FIFO configuration structure. Can be NULL when enable parameter is false.
enable – Enable/disable Enhanced Rx FIFO.
true: Enable Enhanced Rx FIFO.
false: Disable Enhanced Rx FIFO.
-
void FLEXCAN_SetPNConfig(CAN_Type *base, const flexcan_pn_config_t *pConfig)#
Configures the FlexCAN Pretended Networking mode.
This function configures the FlexCAN Pretended Networking mode with given configuration.
- Parameters:
base – FlexCAN peripheral base address.
pConfig – Pointer to the FlexCAN Rx FIFO configuration structure.
-
static inline uint64_t FLEXCAN_GetStatusFlags(CAN_Type *base)#
Gets the FlexCAN module interrupt flags.
This function gets all FlexCAN status flags. The flags are returned as the logical OR value of the enumerators _flexcan_flags. To check the specific status, compare the return value with enumerators in _flexcan_flags.
- Parameters:
base – FlexCAN peripheral base address.
- Returns:
FlexCAN status flags which are ORed by the enumerators in the _flexcan_flags.
-
static inline void FLEXCAN_ClearStatusFlags(CAN_Type *base, uint64_t mask)#
Clears status flags with the provided mask.
This function clears the FlexCAN status flags with a provided mask. An automatically cleared flag can’t be cleared by this function.
- Parameters:
base – FlexCAN peripheral base address.
mask – The status flags to be cleared, it is logical OR value of _flexcan_flags.
-
static inline void FLEXCAN_GetBusErrCount(CAN_Type *base, uint8_t *txErrBuf, uint8_t *rxErrBuf)#
Gets the FlexCAN Bus Error Counter value.
This function gets the FlexCAN Bus Error Counter value for both Tx and Rx direction. These values may be needed in the upper layer error handling.
- Parameters:
base – FlexCAN peripheral base address.
txErrBuf – Buffer to store Tx Error Counter value.
rxErrBuf – Buffer to store Rx Error Counter value.
-
static inline uint64_t FLEXCAN_GetMbStatusFlags(CAN_Type *base, uint64_t mask)#
Gets the FlexCAN low 64 Message Buffer interrupt flags.
This function gets the interrupt flags of a given Message Buffers.
- Parameters:
base – FlexCAN peripheral base address.
mask – The ORed FlexCAN Message Buffer mask.
- Returns:
The status of given Message Buffers.
-
static inline uint64_t FLEXCAN_GetHigh64MbStatusFlags(CAN_Type *base, uint64_t mask)#
Gets the FlexCAN High 64 Message Buffer interrupt flags.
Valid only if the number of available MBs exceeds 64.
- Parameters:
base – FlexCAN peripheral base address.
mask – The ORed FlexCAN Message Buffer mask.
- Returns:
The status of given Message Buffers.
-
static inline void FLEXCAN_ClearMbStatusFlags(CAN_Type *base, uint64_t mask)#
Clears the FlexCAN low 64 Message Buffer interrupt flags.
This function clears the interrupt flags of a given Message Buffers.
- Parameters:
base – FlexCAN peripheral base address.
mask – The ORed FlexCAN Message Buffer mask.
-
static inline void FLEXCAN_ClearHigh64MbStatusFlags(CAN_Type *base, uint64_t mask)#
Clears the FlexCAN High 64 Message Buffer interrupt flags.
Valid only if the number of available MBs exceeds 64.
- Parameters:
base – FlexCAN peripheral base address.
mask – The ORed FlexCAN Message Buffer mask.
-
void FLEXCAN_GetMemoryErrorReportStatus(CAN_Type *base, flexcan_memory_error_report_status_t *errorStatus)#
Gets the FlexCAN Memory Error Report registers status.
This function gets the FlexCAN Memory Error Report registers status.
- Parameters:
base – FlexCAN peripheral base address.
errorStatus – Pointer to FlexCAN Memory Error Report registers status structure.
-
static inline uint8_t FLEXCAN_GetPNMatchCount(CAN_Type *base)#
Gets the FlexCAN Number of Matches when in Pretended Networking.
This function gets the number of times a given message has matched the predefined filtering criteria for ID and/or PL before a wakeup event.
- Parameters:
base – FlexCAN peripheral base address.
- Returns:
The number of received wake up msessages.
-
static inline uint32_t FLEXCAN_GetEnhancedFifoDataCount(CAN_Type *base)#
Gets the number of FlexCAN Enhanced Rx FIFO available frames.
This function gets the number of CAN messages stored in the Enhanced Rx FIFO.
- Parameters:
base – FlexCAN peripheral base address.
- Returns:
The number of available CAN messages stored in the Enhanced Rx FIFO.
-
static inline void FLEXCAN_EnableInterrupts(CAN_Type *base, uint64_t mask)#
Enables FlexCAN interrupts according to the provided mask.
This function enables the FlexCAN interrupts according to the provided mask. The mask is a logical OR of enumeration members, see _flexcan_interrupt_enable.
- Parameters:
base – FlexCAN peripheral base address.
mask – The interrupts to enable. Logical OR of _flexcan_interrupt_enable.
-
static inline void FLEXCAN_DisableInterrupts(CAN_Type *base, uint64_t mask)#
Disables FlexCAN interrupts according to the provided mask.
This function disables the FlexCAN interrupts according to the provided mask. The mask is a logical OR of enumeration members, see _flexcan_interrupt_enable.
- Parameters:
base – FlexCAN peripheral base address.
mask – The interrupts to disable. Logical OR of _flexcan_interrupt_enable.
-
static inline void FLEXCAN_EnableMbInterrupts(CAN_Type *base, uint64_t mask)#
Enables FlexCAN low 64 Message Buffer interrupts.
This function enables the interrupts of given Message Buffers.
- Parameters:
base – FlexCAN peripheral base address.
mask – The ORed FlexCAN Message Buffer mask.
-
static inline void FLEXCAN_EnableHigh64MbInterrupts(CAN_Type *base, uint64_t mask)#
Enables FlexCAN high 64 Message Buffer interrupts.
Valid only if the number of available MBs exceeds 64.
- Parameters:
base – FlexCAN peripheral base address.
mask – The ORed FlexCAN Message Buffer mask.
-
static inline void FLEXCAN_DisableMbInterrupts(CAN_Type *base, uint64_t mask)#
Disables FlexCAN low 64 Message Buffer interrupts.
This function disables the interrupts of given Message Buffers.
- Parameters:
base – FlexCAN peripheral base address.
mask – The ORed FlexCAN Message Buffer mask.
-
static inline void FLEXCAN_DisableHigh64MbInterrupts(CAN_Type *base, uint64_t mask)#
Disables FlexCAN high 64 Message Buffer interrupts.
Valid only if the number of available MBs exceeds 64.
- Parameters:
base – FlexCAN peripheral base address.
mask – The ORed FlexCAN Message Buffer mask.
-
void FLEXCAN_EnableRxFifoDMA(CAN_Type *base, bool enable)#
Enables or disables the FlexCAN Rx FIFO DMA request.
This function enables or disables the DMA feature of FlexCAN build-in Rx FIFO.
- Parameters:
base – FlexCAN peripheral base address.
enable – true to enable, false to disable.
-
static inline uintptr_t FLEXCAN_GetRxFifoHeadAddr(CAN_Type *base)#
Gets the Rx FIFO Head address.
This function returns the FlexCAN Rx FIFO Head address, which is mainly used for the DMA/eDMA use case.
- Parameters:
base – FlexCAN peripheral base address.
- Returns:
FlexCAN Rx FIFO Head address.
-
static inline status_t FLEXCAN_Enable(CAN_Type *base, bool enable)#
Enables or disables the FlexCAN module operation.
This function enables or disables the FlexCAN module.
- Parameters:
base – FlexCAN base pointer.
enable – true to enable, false to disable.
- Returns:
kStatus_Success Enable FlexCAN module successful kStatus_Timeout Timeout when wait for Low-Power Mode Acknowledge
-
status_t FLEXCAN_WriteTxMb(CAN_Type *base, uint8_t mbIdx, const flexcan_frame_t *pTxFrame)#
Writes a FlexCAN Message to the Transmit Message Buffer.
This function writes a CAN Message to the specified Transmit Message Buffer and changes the Message Buffer state to start CAN Message transmit. After that the function returns immediately.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The FlexCAN Message Buffer index.
pTxFrame – Pointer to CAN message frame to be sent.
- Return values:
kStatus_Success – - Write Tx Message Buffer Successfully.
kStatus_Fail – - Tx Message Buffer is currently in use.
-
status_t FLEXCAN_ReadRxMb(CAN_Type *base, uint8_t mbIdx, flexcan_frame_t *pRxFrame)#
Reads a FlexCAN Message from Receive Message Buffer.
This function reads a CAN message from a specified Receive Message Buffer. The function fills a receive CAN message frame structure with just received data and activates the Message Buffer again. The function returns immediately.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The FlexCAN Message Buffer index.
pRxFrame – Pointer to CAN message frame structure for reception.
- Return values:
kStatus_Success – - Rx Message Buffer is full and has been read successfully.
kStatus_FLEXCAN_RxOverflow – - Rx Message Buffer is already overflowed and has been read successfully.
kStatus_Fail – - Rx Message Buffer is empty or inactive.
kStatus_Timeout – - Timeout when wait for Rx Message Buffer busy.
-
status_t FLEXCAN_WriteFDTxMb(CAN_Type *base, uint8_t mbIdx, const flexcan_fd_frame_t *pTxFrame)#
Writes a FlexCAN FD Message to the Transmit Message Buffer.
This function writes a CAN FD Message to the specified Transmit Message Buffer and changes the Message Buffer state to start CAN FD Message transmit. After that the function returns immediately.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The FlexCAN FD Message Buffer index.
pTxFrame – Pointer to CAN FD message frame to be sent.
- Return values:
kStatus_Success – - Write Tx Message Buffer Successfully.
kStatus_Fail – - Tx Message Buffer is currently in use.
-
status_t FLEXCAN_ReadFDRxMb(CAN_Type *base, uint8_t mbIdx, flexcan_fd_frame_t *pRxFrame)#
Reads a FlexCAN FD Message from Receive Message Buffer.
This function reads a CAN FD message from a specified Receive Message Buffer. The function fills a receive CAN FD message frame structure with just received data and activates the Message Buffer again. The function returns immediately.
- Parameters:
base – FlexCAN peripheral base address.
mbIdx – The FlexCAN FD Message Buffer index.
pRxFrame – Pointer to CAN FD message frame structure for reception.
- Return values:
kStatus_Success – - Rx Message Buffer is full and has been read successfully.
kStatus_FLEXCAN_RxOverflow – - Rx Message Buffer is already overflowed and has been read successfully.
kStatus_Fail – - Rx Message Buffer is empty or inactive.
kStatus_Timeout – - Timeout when wait for Rx Message Buffer busy.
-
status_t FLEXCAN_ReadRxFifo(CAN_Type *base, flexcan_frame_t *pRxFrame)#
Reads a FlexCAN Message from Legacy Rx FIFO.
This function reads a CAN message from the FlexCAN Legacy Rx FIFO.
- Parameters:
base – FlexCAN peripheral base address.
pRxFrame – Pointer to CAN message frame structure for reception.
- Return values:
kStatus_Success – - Read Message from Rx FIFO successfully.
kStatus_Fail – - Rx FIFO is not enabled.
-
status_t FLEXCAN_ReadEnhancedRxFifo(CAN_Type *base, flexcan_fd_frame_t *pRxFrame)#
Reads a FlexCAN Message from Enhanced Rx FIFO.
This function reads a CAN or CAN FD message from the FlexCAN Enhanced Rx FIFO.
- Parameters:
base – FlexCAN peripheral base address.
pRxFrame – Pointer to CAN FD message frame structure for reception.
- Return values:
kStatus_Success – - Read Message from Rx FIFO successfully.
kStatus_Fail – - Rx FIFO is not enabled.
-
status_t FLEXCAN_ReadPNWakeUpMB(CAN_Type *base, uint8_t mbIdx, flexcan_frame_t *pRxFrame)#
Reads a FlexCAN Message from Wake Up MB.
This function reads a CAN message from the FlexCAN Wake up Message Buffers. There are four Wake up Message Buffers (WMBs) used to store incoming messages in Pretended Networking mode. The WMB index indicates the arrival order. The last message is stored in WMB3.
- Parameters:
base – FlexCAN peripheral base address.
pRxFrame – Pointer to CAN message frame structure for reception.
mbIdx – The FlexCAN Wake up Message Buffer index. Range in 0x0 ~ 0x3.
- Return values:
kStatus_Success – - Read Message from Wake up Message Buffer successfully.
kStatus_Fail – - Wake up Message Buffer has no valid content.
-
status_t FLEXCAN_TransferFDSendBlocking(CAN_Type *base, uint8_t mbIdx, flexcan_fd_frame_t *pTxFrame)#
Performs a polling send transaction on the CAN bus.
Note
A transfer handle does not need to be created before calling this API.
- Parameters:
base – FlexCAN peripheral base pointer.
mbIdx – The FlexCAN FD Message Buffer index.
pTxFrame – Pointer to CAN FD message frame to be sent.
- Return values:
kStatus_Success – - Write Tx Message Buffer Successfully.
kStatus_Fail – - Tx Message Buffer is currently in use.
kStatus_Timeout – - Failed to send frames within specific time.
-
status_t FLEXCAN_TransferFDReceiveBlocking(CAN_Type *base, uint8_t mbIdx, flexcan_fd_frame_t *pRxFrame)#
Performs a polling receive transaction on the CAN bus.
Note
A transfer handle does not need to be created before calling this API.
- Parameters:
base – FlexCAN peripheral base pointer.
mbIdx – The FlexCAN FD Message Buffer index.
pRxFrame – Pointer to CAN FD message frame structure for reception.
- Return values:
kStatus_Success – - Rx Message Buffer is full and has been read successfully.
kStatus_FLEXCAN_RxOverflow – - Rx Message Buffer is already overflowed and has been read successfully.
kStatus_Fail – - Rx Message Buffer is empty.
kStatus_Timeout – - Failed to receive frames within specific time.
-
status_t FLEXCAN_TransferFDSendNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_mb_transfer_t *pMbXfer)#
Sends a message using IRQ.
This function sends a message using IRQ. This is a non-blocking function, which returns right away. When messages have been sent out, the send callback function is called.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
pMbXfer – FlexCAN FD Message Buffer transfer structure. See the flexcan_mb_transfer_t.
- Return values:
kStatus_Success – Start Tx Message Buffer sending process successfully.
kStatus_Fail – Write Tx Message Buffer failed.
kStatus_FLEXCAN_TxBusy – Tx Message Buffer is in use.
-
status_t FLEXCAN_TransferFDReceiveNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_mb_transfer_t *pMbXfer)#
Receives a message using IRQ.
This function receives a message using IRQ. This is non-blocking function, which returns right away. When the message has been received, the receive callback function is called.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
pMbXfer – FlexCAN FD Message Buffer transfer structure. See the flexcan_mb_transfer_t.
- Return values:
kStatus_Success – - Start Rx Message Buffer receiving process successfully.
kStatus_FLEXCAN_RxBusy – - Rx Message Buffer is in use.
-
void FLEXCAN_TransferFDAbortSend(CAN_Type *base, flexcan_handle_t *handle, uint8_t mbIdx)#
Aborts the interrupt driven message send process.
This function aborts the interrupt driven message send process.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
mbIdx – The FlexCAN FD Message Buffer index.
-
void FLEXCAN_TransferFDAbortReceive(CAN_Type *base, flexcan_handle_t *handle, uint8_t mbIdx)#
Aborts the interrupt driven message receive process.
This function aborts the interrupt driven message receive process.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
mbIdx – The FlexCAN FD Message Buffer index.
-
status_t FLEXCAN_TransferSendBlocking(CAN_Type *base, uint8_t mbIdx, flexcan_frame_t *pTxFrame)#
Performs a polling send transaction on the CAN bus.
Note
A transfer handle does not need to be created before calling this API.
- Parameters:
base – FlexCAN peripheral base pointer.
mbIdx – The FlexCAN Message Buffer index.
pTxFrame – Pointer to CAN message frame to be sent.
- Return values:
kStatus_Success – - Write Tx Message Buffer Successfully.
kStatus_Fail – - Tx Message Buffer is currently in use.
kStatus_Timeout – - Failed to send frames within specific time.
-
status_t FLEXCAN_TransferReceiveBlocking(CAN_Type *base, uint8_t mbIdx, flexcan_frame_t *pRxFrame)#
Performs a polling receive transaction on the CAN bus.
Note
A transfer handle does not need to be created before calling this API.
- Parameters:
base – FlexCAN peripheral base pointer.
mbIdx – The FlexCAN Message Buffer index.
pRxFrame – Pointer to CAN message frame structure for reception.
- Return values:
kStatus_Success – - Rx Message Buffer is full and has been read successfully.
kStatus_FLEXCAN_RxOverflow – - Rx Message Buffer is already overflowed and has been read successfully.
kStatus_Fail – - Rx Message Buffer is empty.
kStatus_Timeout – - Failed to receive frames within specific time.
-
status_t FLEXCAN_TransferReceiveFifoBlocking(CAN_Type *base, flexcan_frame_t *pRxFrame)#
Performs a polling receive transaction from Legacy Rx FIFO on the CAN bus.
Note
A transfer handle does not need to be created before calling this API.
- Parameters:
base – FlexCAN peripheral base pointer.
pRxFrame – Pointer to CAN message frame structure for reception.
- Return values:
kStatus_Success – - Read Message from Rx FIFO successfully.
kStatus_Fail – - Rx FIFO is not enabled.
kStatus_Timeout – - Failed to receive frames within specific time.
-
status_t FLEXCAN_TransferReceiveEnhancedFifoBlocking(CAN_Type *base, flexcan_fd_frame_t *pRxFrame)#
Performs a polling receive transaction from Enhanced Rx FIFO on the CAN bus.
Note
A transfer handle does not need to be created before calling this API.
- Parameters:
base – FlexCAN peripheral base pointer.
pRxFrame – Pointer to CAN FD message frame structure for reception.
- Return values:
kStatus_Success – - Read Message from Rx FIFO successfully.
kStatus_Fail – - Rx FIFO is not enabled.
kStatus_Timeout – - Failed to receive frames within specific time.
-
void FLEXCAN_TransferCreateHandle(CAN_Type *base, flexcan_handle_t *handle, flexcan_transfer_callback_t callback, void *userData)#
Initializes the FlexCAN handle.
This function initializes the FlexCAN handle, which can be used for other FlexCAN transactional APIs. Usually, for a specified FlexCAN instance, call this API once to get the initialized handle.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
callback – The callback function.
userData – The parameter of the callback function.
-
status_t FLEXCAN_TransferSendNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_mb_transfer_t *pMbXfer)#
Sends a message using IRQ.
This function sends a message using IRQ. This is a non-blocking function, which returns right away. When messages have been sent out, the send callback function is called.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
pMbXfer – FlexCAN Message Buffer transfer structure. See the flexcan_mb_transfer_t.
- Return values:
kStatus_Success – Start Tx Message Buffer sending process successfully.
kStatus_Fail – Write Tx Message Buffer failed.
kStatus_FLEXCAN_TxBusy – Tx Message Buffer is in use.
-
status_t FLEXCAN_TransferReceiveNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_mb_transfer_t *pMbXfer)#
Receives a message using IRQ.
This function receives a message using IRQ. This is non-blocking function, which returns right away. When the message has been received, the receive callback function is called.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
pMbXfer – FlexCAN Message Buffer transfer structure. See the flexcan_mb_transfer_t.
- Return values:
kStatus_Success – - Start Rx Message Buffer receiving process successfully.
kStatus_FLEXCAN_RxBusy – - Rx Message Buffer is in use.
-
status_t FLEXCAN_TransferRemoteRequestNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_mb_transfer_t *pMbXfer)#
Sends a remote request frame using IRQ.
This function sends a remote request frame using IRQ. This is a non-blocking function, which returns right away. When the remote request frame has been sent out, the send callback function is called. User should invoke API FLEXCAN_TransferReceiveNonBlocking to receive the response frame. Receive message buffer index should less than send message buffer index.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
pMbXfer – FlexCAN Message Buffer transfer structure. See the flexcan_mb_transfer_t.
- Return values:
kStatus_Success – Start Tx remote request frame sending process successfully.
kStatus_Fail – Write Tx Message Buffer failed.
kStatus_FLEXCAN_TxBusy – Message Buffer is transmitting remote request frame.
-
status_t FLEXCAN_TransferRemoteResponseNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_mb_transfer_t *pMbXfer)#
Configures a FlexCAN Message Buffer for automatic remote response using IRQ.
This function configures a Message Buffer to automatically respond to remote request frames using IRQ. This is a non-blocking function, which returns right away. When a matching remote request frame is received, the configured response frame will be transmitted automatically, and the callback function will be called. User should invoke this API when CTRL2[RRS]=0. When CTRL2[RRS]=0, if a remote request frame is received and matches a mailbox configured with CODE=kFLEXCAN_RxMbRanswer, the mailbox content will be transmitted as a response frame automatically. The received remote request frame is not stored.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
pMbXfer – FlexCAN Message Buffer transfer structure. See the flexcan_mb_transfer_t.
- Return values:
kStatus_Success – Configure remote response Message Buffer successfully.
kStatus_Busy – Message Buffer is waiting for remote request frame or transmitting response frame.
-
status_t FLEXCAN_TransferReceiveFifoNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer)#
Receives a message from Rx FIFO using IRQ.
This function receives a message using IRQ. This is a non-blocking function, which returns right away. When all messages have been received, the receive callback function is called.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
pFifoXfer – FlexCAN Rx FIFO transfer structure. See the flexcan_fifo_transfer_t.
- Return values:
kStatus_Success – - Start Rx FIFO receiving process successfully.
kStatus_FLEXCAN_RxFifoBusy – - Rx FIFO is currently in use.
-
status_t FLEXCAN_TransferGetReceiveFifoCount(CAN_Type *base, flexcan_handle_t *handle, size_t *count)#
Gets the Rx Fifo transfer status during a interrupt non-blocking receive.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
count – Number of CAN messages receive so far by the non-blocking transaction.
- Return values:
kStatus_InvalidArgument – count is Invalid.
kStatus_Success – Successfully return the count.
-
status_t FLEXCAN_TransferReceiveEnhancedFifoNonBlocking(CAN_Type *base, flexcan_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer)#
Receives a message from Enhanced Rx FIFO using IRQ.
This function receives a message using IRQ. This is a non-blocking function, which returns right away. When all messages have been received, the receive callback function is called.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
pFifoXfer – FlexCAN Rx FIFO transfer structure. See the ref flexcan_fifo_transfer_t.@
- Return values:
kStatus_Success – - Start Rx FIFO receiving process successfully.
kStatus_FLEXCAN_RxFifoBusy – - Rx FIFO is currently in use.
-
static inline status_t FLEXCAN_TransferGetReceiveEnhancedFifoCount(CAN_Type *base, flexcan_handle_t *handle, size_t *count)#
Gets the Enhanced Rx Fifo transfer status during a interrupt non-blocking receive.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
count – Number of CAN messages receive so far by the non-blocking transaction.
- Return values:
kStatus_InvalidArgument – count is Invalid.
kStatus_Success – Successfully return the count.
-
uint32_t FLEXCAN_GetTimeStamp(flexcan_handle_t *handle, uint8_t mbIdx)#
Gets the detail index of Mailbox’s Timestamp by handle.
Then function can only be used when calling non-blocking Data transfer (TX/RX) API, After TX/RX data transfer done (User can get the status by handler’s callback function), we can get the detail index of Mailbox’s timestamp by handle, Detail non-blocking data transfer API (TX/RX) contain. -FLEXCAN_TransferSendNonBlocking -FLEXCAN_TransferFDSendNonBlocking -FLEXCAN_TransferReceiveNonBlocking -FLEXCAN_TransferFDReceiveNonBlocking -FLEXCAN_TransferReceiveFifoNonBlocking
- Parameters:
handle – FlexCAN handle pointer.
mbIdx – The FlexCAN Message Buffer index.
- Return values:
the – index of mailbox ‘s timestamp stored in the handle.
-
static inline uint32_t FLEXCAN_GetHighResolutionTimeStamp(CAN_Type *base, uint8_t mbIdx)#
-
void FLEXCAN_TransferAbortSend(CAN_Type *base, flexcan_handle_t *handle, uint8_t mbIdx)#
Aborts the interrupt driven message send process.
This function aborts the interrupt driven message send process.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
mbIdx – The FlexCAN Message Buffer index.
-
void FLEXCAN_TransferAbortReceive(CAN_Type *base, flexcan_handle_t *handle, uint8_t mbIdx)#
Aborts the interrupt driven message receive process.
This function aborts the interrupt driven message receive process.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
mbIdx – The FlexCAN Message Buffer index.
-
void FLEXCAN_TransferAbortReceiveFifo(CAN_Type *base, flexcan_handle_t *handle)#
Aborts the interrupt driven message receive from Rx FIFO process.
This function aborts the interrupt driven message receive from Rx FIFO process.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
-
void FLEXCAN_TransferAbortReceiveEnhancedFifo(CAN_Type *base, flexcan_handle_t *handle)#
Aborts the interrupt driven message receive from Enhanced Rx FIFO process.
This function aborts the interrupt driven message receive from Enhanced Rx FIFO process.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
-
void FLEXCAN_TransferHandleIRQ(CAN_Type *base, flexcan_handle_t *handle)#
FlexCAN IRQ handle function.
This function handles the FlexCAN Error, the Message Buffer, and the Rx FIFO IRQ request.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
-
void FLEXCAN_MbHandleIRQ(CAN_Type *base, flexcan_handle_t *handle, uint32_t startMbIdx, uint32_t endMbIdx)#
FlexCAN Message Buffer IRQ handle function.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
startMbIdx – First Message Buffer to handle.
endMbIdx – Last Message Buffer to handle.
-
void FLEXCAN_EnhancedRxFifoHandleIRQ(CAN_Type *base, flexcan_handle_t *handle)#
FlexCAN Enhanced Rx FIFO IRQ handle function.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
-
void FLEXCAN_BusoffErrorHandleIRQ(CAN_Type *base, flexcan_handle_t *handle)#
FlexCAN Bus Off, Error and Warning IRQ handle function.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
-
void FLEXCAN_PNWakeUpHandleIRQ(CAN_Type *base, flexcan_handle_t *handle)#
FlexCAN Pretended Networking Wake-up IRQ handle function.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
-
void FLEXCAN_MemoryErrorHandleIRQ(CAN_Type *base, flexcan_handle_t *handle)#
FlexCAN Memory Error IRQ handle function.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
-
FSL_FLEXCAN_DRIVER_VERSION#
FlexCAN driver version.
FlexCAN transfer status.
Values:
-
enumerator kStatus_FLEXCAN_TxBusy#
Tx Message Buffer is Busy.
-
enumerator kStatus_FLEXCAN_TxIdle#
Tx Message Buffer is Idle.
-
enumerator kStatus_FLEXCAN_TxSwitchToRx#
Remote Message is send out and Message buffer changed to Receive one.
-
enumerator kStatus_FLEXCAN_RxBusy#
Rx Message Buffer is Busy.
-
enumerator kStatus_FLEXCAN_RxIdle#
Rx Message Buffer is Idle.
-
enumerator kStatus_FLEXCAN_RxOverflow#
Rx Message Buffer is Overflowed.
-
enumerator kStatus_FLEXCAN_RxFifoBusy#
Rx Message FIFO is Busy.
-
enumerator kStatus_FLEXCAN_RxFifoIdle#
Rx Message FIFO is Idle.
-
enumerator kStatus_FLEXCAN_RxFifoOverflow#
Rx Message FIFO is overflowed.
-
enumerator kStatus_FLEXCAN_RxFifoWarning#
Rx Message FIFO is almost overflowed.
-
enumerator kStatus_FLEXCAN_RxFifoDisabled#
Rx Message FIFO is disabled during reading.
-
enumerator kStatus_FLEXCAN_ErrorStatus#
FlexCAN Module Error and Status.
-
enumerator kStatus_FLEXCAN_WakeUp#
FlexCAN is waken up from STOP mode.
-
enumerator kStatus_FLEXCAN_UnHandled#
UnHadled Interrupt asserted.
-
enumerator kStatus_FLEXCAN_RxRemote#
Rx Remote Message Received in Mail box.
-
enumerator kStatus_FLEXCAN_RxFifoUnderflow#
Enhanced Rx Message FIFO is underflow.
-
enumerator kStatus_FLEXCAN_MemoryError#
FlexCAN Memory Error.
-
enumerator kStatus_FLEXCAN_TxBusy#
-
enum _flexcan_frame_format#
FlexCAN frame format.
Values:
-
enumerator kFLEXCAN_FrameFormatStandard#
Standard frame format attribute.
-
enumerator kFLEXCAN_FrameFormatExtend#
Extend frame format attribute.
-
enumerator kFLEXCAN_FrameFormatStandard#
-
enum _flexcan_frame_type#
FlexCAN frame type.
Values:
-
enumerator kFLEXCAN_FrameTypeData#
Data frame type attribute.
-
enumerator kFLEXCAN_FrameTypeRemote#
Remote frame type attribute.
-
enumerator kFLEXCAN_FrameTypeData#
-
enum _flexcan_clock_source#
FlexCAN clock source.
- Deprecated:
Do not use the kFLEXCAN_ClkSrcOs. It has been superceded kFLEXCAN_ClkSrc0
Do not use the kFLEXCAN_ClkSrcPeri. It has been superceded kFLEXCAN_ClkSrc1
Values:
-
enumerator kFLEXCAN_ClkSrcOsc#
FlexCAN Protocol Engine clock from Oscillator.
-
enumerator kFLEXCAN_ClkSrcPeri#
FlexCAN Protocol Engine clock from Peripheral Clock.
-
enumerator kFLEXCAN_ClkSrc0#
FlexCAN Protocol Engine clock selected by user as SRC == 0.
-
enumerator kFLEXCAN_ClkSrc1#
FlexCAN Protocol Engine clock selected by user as SRC == 1.
-
enum _flexcan_wake_up_source#
FlexCAN wake up source.
Values:
-
enumerator kFLEXCAN_WakeupSrcUnfiltered#
FlexCAN uses unfiltered Rx input to detect edge.
-
enumerator kFLEXCAN_WakeupSrcFiltered#
FlexCAN uses filtered Rx input to detect edge.
-
enumerator kFLEXCAN_WakeupSrcUnfiltered#
-
enum _flexcan_endianness#
FlexCAN payload endianness.
Values:
-
enumerator kFLEXCAN_bigEndian#
Transmit frame with MSB first, receive frame with big-endian format.
-
enumerator kFLEXCAN_littleEndian#
Transmit frame with LSB first, receive frame with little-endian format.
-
enumerator kFLEXCAN_bigEndian#
-
enum _flexcan_MB_timestamp_base#
FlexCAN timebase used for capturing 16-bit TIME_STAMP field of message buffer.
Values:
-
enumerator kFLEXCAN_CANTimer#
FlexCAN free-running timer.
-
enumerator kFLEXCAN_Lower16bitsHRTimer#
Lower 16 bits of high-resolution on-chip timer.
-
enumerator kFLEXCAN_Upper16bitsHRTimer#
Upper 16 bits of high-resolution on-chip timer.
-
enumerator kFLEXCAN_CANTimer#
-
enum _flexcan_capture_point#
FlexCAN capture point of 32-bit high resolution timebase during a CAN frame.
Values:
-
enumerator kFLEXCAN_CANFrameID2ndBit#
Second bit of identifier field of any frame is on the CAN bus. HR_TIME_STAMPn register will not capture 32-bit counter value.
-
enumerator kFLEXCAN_CANFrameEnd#
End of the CAN frame.
-
enumerator kFLEXCAN_CANFrameStart#
Start of the CAN frame.
-
enumerator kFLEXCAN_CANFDFrameRes#
Start of frame for classical CAN frames; res bit for CAN FD frames.
-
enumerator kFLEXCAN_CANFrameID2ndBit#
-
enum _flexcan_rx_fifo_filter_type#
FlexCAN Rx Fifo Filter type.
Values:
-
enumerator kFLEXCAN_RxFifoFilterTypeA#
One full ID (standard and extended) per ID Filter element.
-
enumerator kFLEXCAN_RxFifoFilterTypeB#
Two full standard IDs or two partial 14-bit ID slices per ID Filter Table element.
-
enumerator kFLEXCAN_RxFifoFilterTypeC#
Four partial 8-bit Standard or extended ID slices per ID Filter Table element.
-
enumerator kFLEXCAN_RxFifoFilterTypeD#
All frames rejected.
-
enumerator kFLEXCAN_RxFifoFilterTypeA#
-
enum _flexcan_mb_size#
FlexCAN Message Buffer Payload size.
Values:
-
enumerator kFLEXCAN_8BperMB#
Selects 8 bytes per Message Buffer.
-
enumerator kFLEXCAN_16BperMB#
Selects 16 bytes per Message Buffer.
-
enumerator kFLEXCAN_32BperMB#
Selects 32 bytes per Message Buffer.
-
enumerator kFLEXCAN_64BperMB#
Selects 64 bytes per Message Buffer.
-
enumerator kFLEXCAN_8BperMB#
-
enum _flexcan_fd_frame_length#
FlexCAN CAN FD frame supporting data length (available DLC values).
For Tx, when the Data size corresponding to DLC value stored in the MB selected for transmission is larger than the MB Payload size, FlexCAN adds the necessary number of bytes with constant 0xCC pattern to complete the expected DLC. For Rx, when the Data size corresponding to DLC value received from the CAN bus is larger than the MB Payload size, the high order bytes that do not fit the Payload size will lose.
Values:
-
enumerator kFLEXCAN_0BperFrame#
Frame contains 0 valid data bytes.
-
enumerator kFLEXCAN_1BperFrame#
Frame contains 1 valid data bytes.
-
enumerator kFLEXCAN_2BperFrame#
Frame contains 2 valid data bytes.
-
enumerator kFLEXCAN_3BperFrame#
Frame contains 3 valid data bytes.
-
enumerator kFLEXCAN_4BperFrame#
Frame contains 4 valid data bytes.
-
enumerator kFLEXCAN_5BperFrame#
Frame contains 5 valid data bytes.
-
enumerator kFLEXCAN_6BperFrame#
Frame contains 6 valid data bytes.
-
enumerator kFLEXCAN_7BperFrame#
Frame contains 7 valid data bytes.
-
enumerator kFLEXCAN_8BperFrame#
Frame contains 8 valid data bytes.
-
enumerator kFLEXCAN_12BperFrame#
Frame contains 12 valid data bytes.
-
enumerator kFLEXCAN_16BperFrame#
Frame contains 16 valid data bytes.
-
enumerator kFLEXCAN_20BperFrame#
Frame contains 20 valid data bytes.
-
enumerator kFLEXCAN_24BperFrame#
Frame contains 24 valid data bytes.
-
enumerator kFLEXCAN_32BperFrame#
Frame contains 32 valid data bytes.
-
enumerator kFLEXCAN_48BperFrame#
Frame contains 48 valid data bytes.
-
enumerator kFLEXCAN_64BperFrame#
Frame contains 64 valid data bytes.
-
enumerator kFLEXCAN_0BperFrame#
-
enum _flexcan_efifo_dma_per_read_length#
FlexCAN Enhanced Rx Fifo DMA transfer per read length enumerations.
Values:
-
enumerator kFLEXCAN_1WordPerRead#
Transfer 1 32-bit words (CS).
-
enumerator kFLEXCAN_2WordPerRead#
Transfer 2 32-bit words (CS + ID).
-
enumerator kFLEXCAN_3WordPerRead#
Transfer 3 32-bit words (CS + ID + 1~4 bytes data).
-
enumerator kFLEXCAN_4WordPerRead#
Transfer 4 32-bit words (CS + ID + 5~8 bytes data).
-
enumerator kFLEXCAN_5WordPerRead#
Transfer 5 32-bit words (CS + ID + 9~12 bytes data).
-
enumerator kFLEXCAN_6WordPerRead#
Transfer 6 32-bit words (CS + ID + 13~16 bytes data).
-
enumerator kFLEXCAN_7WordPerRead#
Transfer 7 32-bit words (CS + ID + 17~20 bytes data).
-
enumerator kFLEXCAN_8WordPerRead#
Transfer 8 32-bit words (CS + ID + 21~24 bytes data).
-
enumerator kFLEXCAN_9WordPerRead#
Transfer 9 32-bit words (CS + ID + 25~28 bytes data).
-
enumerator kFLEXCAN_10WordPerRead#
Transfer 10 32-bit words (CS + ID + 29~32 bytes data).
-
enumerator kFLEXCAN_11WordPerRead#
Transfer 11 32-bit words (CS + ID + 33~36 bytes data).
-
enumerator kFLEXCAN_12WordPerRead#
Transfer 12 32-bit words (CS + ID + 37~40 bytes data).
-
enumerator kFLEXCAN_13WordPerRead#
Transfer 13 32-bit words (CS + ID + 41~44 bytes data).
-
enumerator kFLEXCAN_14WordPerRead#
Transfer 14 32-bit words (CS + ID + 45~48 bytes data).
-
enumerator kFLEXCAN_15WordPerRead#
Transfer 15 32-bit words (CS + ID + 49~52 bytes data).
-
enumerator kFLEXCAN_16WordPerRead#
Transfer 16 32-bit words (CS + ID + 53~56 bytes data).
-
enumerator kFLEXCAN_17WordPerRead#
Transfer 17 32-bit words (CS + ID + 57~60 bytes data).
-
enumerator kFLEXCAN_18WordPerRead#
Transfer 18 32-bit words (CS + ID + 61~64 bytes data).
-
enumerator kFLEXCAN_19WordPerRead#
Transfer 19 32-bit words (CS + ID + 64 bytes data + ID HIT).
-
enumerator kFLEXCAN_20WordPerRead#
Transfer 20 32-bit words (CS + ID + 64 bytes data + ID HIT + HR timestamp).
-
enumerator kFLEXCAN_1WordPerRead#
-
enum _flexcan_rx_fifo_priority#
FlexCAN Enhanced/Legacy Rx FIFO priority.
The matching process starts from the Rx MB(or Enhanced/Legacy Rx FIFO) with higher priority. If no MB(or Enhanced/Legacy Rx FIFO filter) is satisfied, the matching process goes on with the Enhanced/Legacy Rx FIFO(or Rx MB) with lower priority.
Values:
-
enumerator kFLEXCAN_RxFifoPrioLow#
Matching process start from Rx Message Buffer first.
-
enumerator kFLEXCAN_RxFifoPrioHigh#
Matching process start from Enhanced/Legacy Rx FIFO first.
-
enumerator kFLEXCAN_RxFifoPrioLow#
-
enum _flexcan_interrupt_enable#
FlexCAN interrupt enable enumerations.
This provides constants for the FlexCAN interrupt enable enumerations for use in the FlexCAN functions.
Note
FlexCAN Message Buffers and Legacy Rx FIFO interrupts not included in.
Values:
-
enumerator kFLEXCAN_BusOffInterruptEnable#
Bus Off interrupt, use bit 15.
-
enumerator kFLEXCAN_ErrorInterruptEnable#
CAN Error interrupt, use bit 14.
-
enumerator kFLEXCAN_TxWarningInterruptEnable#
Tx Warning interrupt, use bit 11.
-
enumerator kFLEXCAN_RxWarningInterruptEnable#
Rx Warning interrupt, use bit 10.
-
enumerator kFLEXCAN_FDErrorInterruptEnable#
CAN FD Error interrupt, use bit 31.
-
enumerator kFLEXCAN_PNMatchWakeUpInterruptEnable#
PN Match Wake Up interrupt, use high word bit 17.
-
enumerator kFLEXCAN_PNTimeoutWakeUpInterruptEnable#
PN Timeout Wake Up interrupt, use high word bit 16. Enhanced Rx FIFO Underflow interrupt, use high word bit 31.
-
enumerator kFLEXCAN_ERxFifoUnderflowInterruptEnable#
Enhanced Rx FIFO Overflow interrupt, use high word bit 30.
-
enumerator kFLEXCAN_ERxFifoOverflowInterruptEnable#
Enhanced Rx FIFO Watermark interrupt, use high word bit 29.
-
enumerator kFLEXCAN_ERxFifoWatermarkInterruptEnable#
Enhanced Rx FIFO Data Avilable interrupt, use high word bit 28.
-
enumerator kFLEXCAN_ERxFifoDataAvlInterruptEnable#
-
enumerator kFLEXCAN_HostAccessNCErrorInterruptEnable#
Host Access With Non-Correctable Errors interrupt, use high word bit 0.
-
enumerator kFLEXCAN_FlexCanAccessNCErrorInterruptEnable#
FlexCAN Access With Non-Correctable Errors interrupt, use high word bit 2.
-
enumerator kFLEXCAN_HostOrFlexCanCErrorInterruptEnable#
Host or FlexCAN Access With Correctable Errors interrupt, use high word bit 3.
-
enumerator kFLEXCAN_BusOffInterruptEnable#
-
enum _flexcan_flags#
FlexCAN status flags.
This provides constants for the FlexCAN status flags for use in the FlexCAN functions.
Note
The CPU read action clears the bits corresponding to the FlEXCAN_ErrorFlag macro, therefore user need to read status flags and distinguish which error is occur using _flexcan_error_flags enumerations.
Values:
-
enumerator kFLEXCAN_ErrorOverrunFlag#
Error Overrun Status.
-
enumerator kFLEXCAN_FDErrorIntFlag#
CAN FD Error Interrupt Flag.
-
enumerator kFLEXCAN_BusoffDoneIntFlag#
Bus Off process completed Interrupt Flag.
-
enumerator kFLEXCAN_SynchFlag#
CAN Synchronization Status.
-
enumerator kFLEXCAN_TxWarningIntFlag#
Tx Warning Interrupt Flag.
-
enumerator kFLEXCAN_RxWarningIntFlag#
Rx Warning Interrupt Flag.
-
enumerator kFLEXCAN_IdleFlag#
FlexCAN In IDLE Status.
-
enumerator kFLEXCAN_FaultConfinementFlag#
FlexCAN Fault Confinement State.
-
enumerator kFLEXCAN_TransmittingFlag#
FlexCAN In Transmission Status.
-
enumerator kFLEXCAN_ReceivingFlag#
FlexCAN In Reception Status.
-
enumerator kFLEXCAN_BusOffIntFlag#
Bus Off Interrupt Flag.
-
enumerator kFLEXCAN_ErrorIntFlag#
CAN Error Interrupt Flag.
-
enumerator kFLEXCAN_ErrorFlag#
-
enumerator kFLEXCAN_PNMatchIntFlag#
PN Matching Event Interrupt Flag.
-
enumerator kFLEXCAN_PNTimeoutIntFlag#
PN Timeout Event Interrupt Flag.
-
enumerator kFLEXCAN_ERxFifoUnderflowIntFlag#
Enhanced Rx FIFO underflow Interrupt Flag.
-
enumerator kFLEXCAN_ERxFifoOverflowIntFlag#
Enhanced Rx FIFO overflow Interrupt Flag.
-
enumerator kFLEXCAN_ERxFifoWatermarkIntFlag#
Enhanced Rx FIFO watermark Interrupt Flag.
-
enumerator kFLEXCAN_ERxFifoDataAvlIntFlag#
Enhanced Rx FIFO data available Interrupt Flag.
-
enumerator kFLEXCAN_ERxFifoEmptyFlag#
Enhanced Rx FIFO empty status.
-
enumerator kFLEXCAN_ERxFifoFullFlag#
Enhanced Rx FIFO full status.
-
enumerator kFLEXCAN_HostAccessNonCorrectableErrorIntFlag#
Host Access With Non-Correctable Error Interrupt Flag.
-
enumerator kFLEXCAN_FlexCanAccessNonCorrectableErrorIntFlag#
FlexCAN Access With Non-Correctable Error Interrupt Flag.
-
enumerator kFLEXCAN_CorrectableErrorIntFlag#
Correctable Error Interrupt Flag.
-
enumerator kFLEXCAN_HostAccessNonCorrectableErrorOverrunFlag#
Host Access With Non-Correctable Error Interrupt Overrun Flag.
-
enumerator kFLEXCAN_FlexCanAccessNonCorrectableErrorOverrunFlag#
FlexCAN Access With Non-Correctable Error Interrupt Overrun Flag.
-
enumerator kFLEXCAN_CorrectableErrorOverrunFlag#
Correctable Error Interrupt Overrun Flag.
-
enumerator kFLEXCAN_AllMemoryErrorIntFlag#
All Memory Error Interrupt Flags.
-
enumerator kFLEXCAN_AllMemoryErrorFlag#
All Memory Error Flags.
-
enumerator kFLEXCAN_ErrorOverrunFlag#
-
enum _flexcan_error_flags#
FlexCAN error status flags.
The FlexCAN Error Status enumerations is used to report current error of the FlexCAN bus. This enumerations should be used with KFLEXCAN_ErrorFlag in _flexcan_flags enumerations to ditermine which error is generated.
Values:
-
enumerator kFLEXCAN_FDStuffingError#
Stuffing Error.
-
enumerator kFLEXCAN_FDFormError#
Form Error.
-
enumerator kFLEXCAN_FDCrcError#
Cyclic Redundancy Check Error.
-
enumerator kFLEXCAN_FDBit0Error#
Unable to send dominant bit.
-
enumerator kFLEXCAN_FDBit1Error#
Unable to send recessive bit.
-
enumerator kFLEXCAN_TxErrorWarningFlag#
Tx Error Warning Status.
-
enumerator kFLEXCAN_RxErrorWarningFlag#
Rx Error Warning Status.
-
enumerator kFLEXCAN_StuffingError#
Stuffing Error.
-
enumerator kFLEXCAN_FormError#
Form Error.
-
enumerator kFLEXCAN_CrcError#
Cyclic Redundancy Check Error.
-
enumerator kFLEXCAN_AckError#
Received no ACK on transmission.
-
enumerator kFLEXCAN_Bit0Error#
Unable to send dominant bit.
-
enumerator kFLEXCAN_Bit1Error#
Unable to send recessive bit.
-
enumerator kFLEXCAN_FDStuffingError#
FlexCAN Legacy Rx FIFO status flags.
The FlexCAN Legacy Rx FIFO Status enumerations are used to determine the status of the Rx FIFO. Because Rx FIFO occupy the MB0 ~ MB7 (Rx Fifo filter also occupies more Message Buffer space), Rx FIFO status flags are mapped to the corresponding Message Buffer status flags.
Values:
-
enumerator kFLEXCAN_RxFifoOverflowFlag#
Rx FIFO overflow flag.
-
enumerator kFLEXCAN_RxFifoWarningFlag#
Rx FIFO almost full flag.
-
enumerator kFLEXCAN_RxFifoFrameAvlFlag#
Frames available in Rx FIFO flag.
-
enumerator kFLEXCAN_RxFifoOverflowFlag#
-
enum _flexcan_memory_error_type#
FlexCAN Memory Error Type.
Values:
-
enumerator kFLEXCAN_CorrectableError#
The memory error is correctable which means on bit error.
-
enumerator kFLEXCAN_NonCorrectableError#
The memory error is non-correctable which means two bit errors.
-
enumerator kFLEXCAN_CorrectableError#
-
enum _flexcan_memory_access_type#
FlexCAN Memory Access Type.
Values:
-
enumerator kFLEXCAN_MoveOutFlexCanAccess#
The memory error was detected during move-out FlexCAN access.
-
enumerator kFLEXCAN_MoveInAccess#
The memory error was detected during move-in FlexCAN access.
-
enumerator kFLEXCAN_TxArbitrationAccess#
The memory error was detected during Tx Arbitration FlexCAN access.
-
enumerator kFLEXCAN_RxMatchingAccess#
The memory error was detected during Rx Matching FlexCAN access.
-
enumerator kFLEXCAN_MoveOutHostAccess#
The memory error was detected during Rx Matching Host (CPU) access.
-
enumerator kFLEXCAN_MoveOutFlexCanAccess#
-
enum _flexcan_byte_error_syndrome#
FlexCAN Memory Error Byte Syndrome.
Values:
-
enumerator kFLEXCAN_NoError#
No bit error in this byte.
-
enumerator kFLEXCAN_ParityBits0Error#
Parity bit 0 error in this byte.
-
enumerator kFLEXCAN_ParityBits1Error#
Parity bit 1 error in this byte.
-
enumerator kFLEXCAN_ParityBits2Error#
Parity bit 2 error in this byte.
-
enumerator kFLEXCAN_ParityBits3Error#
Parity bit 3 error in this byte.
-
enumerator kFLEXCAN_ParityBits4Error#
Parity bit 4 error in this byte.
-
enumerator kFLEXCAN_DataBits0Error#
Data bit 0 error in this byte.
-
enumerator kFLEXCAN_DataBits1Error#
Data bit 1 error in this byte.
-
enumerator kFLEXCAN_DataBits2Error#
Data bit 2 error in this byte.
-
enumerator kFLEXCAN_DataBits3Error#
Data bit 3 error in this byte.
-
enumerator kFLEXCAN_DataBits4Error#
Data bit 4 error in this byte.
-
enumerator kFLEXCAN_DataBits5Error#
Data bit 5 error in this byte.
-
enumerator kFLEXCAN_DataBits6Error#
Data bit 6 error in this byte.
-
enumerator kFLEXCAN_DataBits7Error#
Data bit 7 error in this byte.
-
enumerator kFLEXCAN_AllZeroError#
All-zeros non-correctable error in this byte.
-
enumerator kFLEXCAN_AllOneError#
All-ones non-correctable error in this byte.
-
enumerator kFLEXCAN_NonCorrectableErrors#
Non-correctable error in this byte.
-
enumerator kFLEXCAN_NoError#
-
enum _flexcan_pn_match_source#
FlexCAN Pretended Networking match source selection.
Values:
-
enumerator kFLEXCAN_PNMatSrcID#
Message match with ID filtering.
-
enumerator kFLEXCAN_PNMatSrcIDAndData#
Message match with ID filtering and payload filtering.
-
enumerator kFLEXCAN_PNMatSrcID#
-
enum _flexcan_pn_match_mode#
FlexCAN Pretended Networking mode match type.
Values:
-
enumerator kFLEXCAN_PNMatModeEqual#
Match upon ID/Payload contents against an exact target value.
-
enumerator kFLEXCAN_PNMatModeGreater#
Match upon an ID/Payload value greater than or equal to a specified target value.
-
enumerator kFLEXCAN_PNMatModeSmaller#
Match upon an ID/Payload value smaller than or equal to a specified target value.
-
enumerator kFLEXCAN_PNMatModeRange#
Match upon an ID/Payload value inside a range, greater than or equal to a specified lower limit, and smaller than or equal to a specified upper limit
-
enumerator kFLEXCAN_PNMatModeEqual#
-
typedef enum _flexcan_frame_format flexcan_frame_format_t#
FlexCAN frame format.
-
typedef enum _flexcan_frame_type flexcan_frame_type_t#
FlexCAN frame type.
-
typedef enum _flexcan_clock_source flexcan_clock_source_t#
FlexCAN clock source.
- Deprecated:
Do not use the kFLEXCAN_ClkSrcOs. It has been superceded kFLEXCAN_ClkSrc0
Do not use the kFLEXCAN_ClkSrcPeri. It has been superceded kFLEXCAN_ClkSrc1
-
typedef enum _flexcan_wake_up_source flexcan_wake_up_source_t#
FlexCAN wake up source.
-
typedef enum _flexcan_endianness flexcan_endianness_t#
FlexCAN payload endianness.
-
typedef enum _flexcan_MB_timestamp_base flexcan_MB_timestamp_base_t#
FlexCAN timebase used for capturing 16-bit TIME_STAMP field of message buffer.
-
typedef enum _flexcan_capture_point flexcan_capture_point_t#
FlexCAN capture point of 32-bit high resolution timebase during a CAN frame.
-
typedef enum _flexcan_rx_fifo_filter_type flexcan_rx_fifo_filter_type_t#
FlexCAN Rx Fifo Filter type.
-
typedef enum _flexcan_mb_size flexcan_mb_size_t#
FlexCAN Message Buffer Payload size.
-
typedef enum _flexcan_efifo_dma_per_read_length flexcan_efifo_dma_per_read_length_t#
FlexCAN Enhanced Rx Fifo DMA transfer per read length enumerations.
-
typedef enum _flexcan_rx_fifo_priority flexcan_rx_fifo_priority_t#
FlexCAN Enhanced/Legacy Rx FIFO priority.
The matching process starts from the Rx MB(or Enhanced/Legacy Rx FIFO) with higher priority. If no MB(or Enhanced/Legacy Rx FIFO filter) is satisfied, the matching process goes on with the Enhanced/Legacy Rx FIFO(or Rx MB) with lower priority.
-
typedef enum _flexcan_memory_error_type flexcan_memory_error_type_t#
FlexCAN Memory Error Type.
-
typedef enum _flexcan_memory_access_type flexcan_memory_access_type_t#
FlexCAN Memory Access Type.
-
typedef enum _flexcan_byte_error_syndrome flexcan_byte_error_syndrome_t#
FlexCAN Memory Error Byte Syndrome.
-
typedef struct _flexcan_memory_error_report_status flexcan_memory_error_report_status_t#
FlexCAN memory error register status structure.
This structure contains the memory access properties that caused a memory error access. It is used as the parameter of FLEXCAN_GetMemoryErrorReportStatus() function. And user can use FLEXCAN_GetMemoryErrorReportStatus to get the status of the last memory error access.
-
typedef struct _flexcan_frame flexcan_frame_t#
FlexCAN message frame structure.
-
typedef struct _flexcan_fd_frame flexcan_fd_frame_t#
CAN FD message frame structure.
The CAN FD message supporting up to sixty four bytes can be used for a data frame, depending on the length selected for the message buffers. The length should be a enumeration member, see _flexcan_fd_frame_length.
-
typedef struct _flexcan_timing_config flexcan_timing_config_t#
FlexCAN protocol timing characteristic configuration structure.
-
typedef struct _flexcan_config flexcan_config_t#
FlexCAN module configuration structure.
- Deprecated:
Do not use the baudRate. It has been superceded bitRate
Do not use the baudRateFD. It has been superceded bitRateFD
-
typedef struct _flexcan_rx_mb_config flexcan_rx_mb_config_t#
FlexCAN Receive Message Buffer configuration structure.
This structure is used as the parameter of FLEXCAN_SetRxMbConfig() function. The FLEXCAN_SetRxMbConfig() function is used to configure FlexCAN Receive Message Buffer. The function abort previous receiving process, clean the Message Buffer and activate the Rx Message Buffer using given Message Buffer setting.
-
typedef enum _flexcan_pn_match_source flexcan_pn_match_source_t#
FlexCAN Pretended Networking match source selection.
-
typedef enum _flexcan_pn_match_mode flexcan_pn_match_mode_t#
FlexCAN Pretended Networking mode match type.
-
typedef struct _flexcan_pn_config flexcan_pn_config_t#
FlexCAN Pretended Networking configuration structure.
This structure is used as the parameter of FLEXCAN_SetPNConfig() function. The FLEXCAN_SetPNConfig() function is used to configure FlexCAN Networking work mode.
-
typedef struct _flexcan_rx_fifo_config flexcan_rx_fifo_config_t#
FlexCAN Legacy Rx FIFO configuration structure.
-
typedef struct _flexcan_enhanced_rx_fifo_std_id_filter flexcan_enhanced_rx_fifo_std_id_filter_t#
FlexCAN Enhanced Rx FIFO Standard ID filter element structure.
-
typedef struct _flexcan_enhanced_rx_fifo_ext_id_filter flexcan_enhanced_rx_fifo_ext_id_filter_t#
FlexCAN Enhanced Rx FIFO Extended ID filter element structure.
-
typedef struct _flexcan_enhanced_rx_fifo_config flexcan_enhanced_rx_fifo_config_t#
FlexCAN Enhanced Rx FIFO configuration structure.
-
typedef struct _flexcan_mb_transfer flexcan_mb_transfer_t#
FlexCAN Message Buffer transfer.
-
typedef struct _flexcan_fifo_transfer flexcan_fifo_transfer_t#
FlexCAN Rx FIFO transfer.
-
typedef struct _flexcan_handle flexcan_handle_t#
FlexCAN handle structure definition.
-
typedef void (*flexcan_transfer_callback_t)(CAN_Type *base, flexcan_handle_t *handle, status_t status, uint64_t result, void *userData)#
-
FLEXCAN_WAIT_TIMEOUT#
-
FLEXCAN_POLLING_TIMEOUT#
Max loops to wait for polling transfer.
-
FLEXCAN_MODULE_TIMEOUT#
Max loops to wait for FlexCAN register access complete.
-
FLEXCAN_MB_BUSY_TIMEOUT#
Max loops to wait for FlexCAN RX Message Buffer busy.
-
DLC_LENGTH_DECODE(dlc)#
FlexCAN frame length helper macro.
-
FLEXCAN_ID_STD(id)#
FlexCAN Frame ID helper macro.
Standard Frame ID helper macro.
-
FLEXCAN_ID_EXT(id)#
Extend Frame ID helper macro.
-
FLEXCAN_RX_MB_STD_MASK(id, rtr, ide)#
FlexCAN Rx Message Buffer Mask helper macro.
Standard Rx Message Buffer Mask helper macro.
-
FLEXCAN_RX_MB_EXT_MASK(id, rtr, ide)#
Extend Rx Message Buffer Mask helper macro.
-
FLEXCAN_RX_FIFO_STD_MASK_TYPE_A(id, rtr, ide)#
FlexCAN Legacy Rx FIFO Mask helper macro.
Standard Rx FIFO Mask helper macro Type A helper macro.
-
FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_HIGH(id, rtr, ide)#
Standard Rx FIFO Mask helper macro Type B upper part helper macro.
-
FLEXCAN_RX_FIFO_STD_MASK_TYPE_B_LOW(id, rtr, ide)#
Standard Rx FIFO Mask helper macro Type B lower part helper macro.
-
FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_HIGH(id)#
Standard Rx FIFO Mask helper macro Type C upper part helper macro.
-
FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_MID_HIGH(id)#
Standard Rx FIFO Mask helper macro Type C mid-upper part helper macro.
-
FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_MID_LOW(id)#
Standard Rx FIFO Mask helper macro Type C mid-lower part helper macro.
-
FLEXCAN_RX_FIFO_STD_MASK_TYPE_C_LOW(id)#
Standard Rx FIFO Mask helper macro Type C lower part helper macro.
-
FLEXCAN_RX_FIFO_EXT_MASK_TYPE_A(id, rtr, ide)#
Extend Rx FIFO Mask helper macro Type A helper macro.
-
FLEXCAN_RX_FIFO_EXT_MASK_TYPE_B_HIGH(id, rtr, ide)#
Extend Rx FIFO Mask helper macro Type B upper part helper macro.
-
FLEXCAN_RX_FIFO_EXT_MASK_TYPE_B_LOW(id, rtr, ide)#
Extend Rx FIFO Mask helper macro Type B lower part helper macro.
-
FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_HIGH(id)#
Extend Rx FIFO Mask helper macro Type C upper part helper macro.
-
FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_MID_HIGH(id)#
Extend Rx FIFO Mask helper macro Type C mid-upper part helper macro.
-
FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_MID_LOW(id)#
Extend Rx FIFO Mask helper macro Type C mid-lower part helper macro.
-
FLEXCAN_RX_FIFO_EXT_MASK_TYPE_C_LOW(id)#
Extend Rx FIFO Mask helper macro Type C lower part helper macro.
-
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_A(id, rtr, ide)#
FlexCAN Rx FIFO Filter helper macro.
Standard Rx FIFO Filter helper macro Type A helper macro.
-
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_B_HIGH(id, rtr, ide)#
Standard Rx FIFO Filter helper macro Type B upper part helper macro.
-
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_B_LOW(id, rtr, ide)#
Standard Rx FIFO Filter helper macro Type B lower part helper macro.
-
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_C_HIGH(id)#
Standard Rx FIFO Filter helper macro Type C upper part helper macro.
-
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_C_MID_HIGH(id)#
Standard Rx FIFO Filter helper macro Type C mid-upper part helper macro.
-
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_C_MID_LOW(id)#
Standard Rx FIFO Filter helper macro Type C mid-lower part helper macro.
-
FLEXCAN_RX_FIFO_STD_FILTER_TYPE_C_LOW(id)#
Standard Rx FIFO Filter helper macro Type C lower part helper macro.
-
FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_A(id, rtr, ide)#
Extend Rx FIFO Filter helper macro Type A helper macro.
-
FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_B_HIGH(id, rtr, ide)#
Extend Rx FIFO Filter helper macro Type B upper part helper macro.
-
FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_B_LOW(id, rtr, ide)#
Extend Rx FIFO Filter helper macro Type B lower part helper macro.
-
FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_C_HIGH(id)#
Extend Rx FIFO Filter helper macro Type C upper part helper macro.
-
FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_C_MID_HIGH(id)#
Extend Rx FIFO Filter helper macro Type C mid-upper part helper macro.
-
FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_C_MID_LOW(id)#
Extend Rx FIFO Filter helper macro Type C mid-lower part helper macro.
-
FLEXCAN_RX_FIFO_EXT_FILTER_TYPE_C_LOW(id)#
Extend Rx FIFO Filter helper macro Type C lower part helper macro.
-
ENHANCED_RX_FIFO_FSCH(x)#
FlexCAN Enhanced Rx FIFO Filter and Mask helper macro.
-
RTR_STD_HIGH(x)#
-
RTR_STD_LOW(x)#
-
RTR_EXT(x)#
-
ID_STD_LOW(id)#
-
ID_STD_HIGH(id)#
-
ID_EXT(id)#
-
FLEXCAN_ENHANCED_RX_FIFO_STD_MASK_AND_FILTER(id, rtr, id_mask, rtr_mask)#
Standard ID filter element with filter + mask scheme.
-
FLEXCAN_ENHANCED_RX_FIFO_STD_FILTER_WITH_RANGE(id_upper, rtr, id_lower, rtr_mask)#
Standard ID filter element with filter range.
-
FLEXCAN_ENHANCED_RX_FIFO_STD_TWO_FILTERS(id1, rtr1, id2, rtr2)#
Standard ID filter element with two filters without masks.
-
FLEXCAN_ENHANCED_RX_FIFO_EXT_MASK_AND_FILTER_LOW(id, rtr)#
Extended ID filter element with filter + mask scheme low word.
-
FLEXCAN_ENHANCED_RX_FIFO_EXT_MASK_AND_FILTER_HIGH(id_mask, rtr_mask)#
Extended ID filter element with filter + mask scheme high word.
-
FLEXCAN_ENHANCED_RX_FIFO_EXT_FILTER_WITH_RANGE_LOW(id_upper, rtr)#
Extended ID filter element with range scheme low word.
-
FLEXCAN_ENHANCED_RX_FIFO_EXT_FILTER_WITH_RANGE_HIGH(id_lower, rtr_mask)#
Extended ID filter element with range scheme high word.
-
FLEXCAN_ENHANCED_RX_FIFO_EXT_TWO_FILTERS_LOW(id2, rtr2)#
Extended ID filter element with two filters without masks low word.
-
FLEXCAN_ENHANCED_RX_FIFO_EXT_TWO_FILTERS_HIGH(id1, rtr1)#
Extended ID filter element with two filters without masks high word.
-
FLEXCAN_PN_STD_MASK(id, rtr)#
FlexCAN Pretended Networking ID Mask helper macro.
Standard Rx Message Buffer Mask helper macro.
-
FLEXCAN_PN_EXT_MASK(id, rtr)#
Extend Rx Message Buffer Mask helper macro.
-
FLEXCAN_PN_INT_MASK(x)#
FlexCAN interrupt/status flag helper macro.
-
FLEXCAN_PN_INT_UNMASK(x)#
-
FLEXCAN_PN_STATUS_MASK(x)#
-
FLEXCAN_PN_STATUS_UNMASK(x)#
-
FLEXCAN_EFIFO_INT_MASK(x)#
-
FLEXCAN_EFIFO_INT_UNMASK(x)#
-
FLEXCAN_EFIFO_STATUS_MASK(x)#
-
FLEXCAN_EFIFO_STATUS_UNMASK(x)#
-
FLEXCAN_MECR_INT_MASK(x)#
-
FLEXCAN_MECR_INT_UNMASK(x)#
-
FLEXCAN_MECR_STATUS_MASK(x)#
-
FLEXCAN_MECR_STATUS_UNMASK(x)#
-
FLEXCAN_ERROR_AND_STATUS_INT_FLAG#
-
FLEXCAN_PNWAKE_UP_FLAG#
-
FLEXCAN_WAKE_UP_FLAG#
-
FLEXCAN_MEMORY_ERROR_INT_FLAG#
-
FLEXCAN_ENHANCED_RX_FIFO_INT_FLAG#
FlexCAN Enhanced Rx FIFO base address helper macro.
-
E_RX_FIFO(base)#
-
FLEXCAN_CALLBACK(x)#
FlexCAN transfer callback function.
The FlexCAN transfer callback returns a value from the underlying layer. If the status equals to kStatus_FLEXCAN_ErrorStatus, the result parameter is the Content of FlexCAN status register which can be used to get the working status(or error status) of FlexCAN module. If the status equals to other FlexCAN Message Buffer transfer status, the result is the index of Message Buffer that generate transfer event. If the status equals to other FlexCAN Message Buffer transfer status, the result is meaningless and should be Ignored.
-
struct _flexcan_memory_error_report_status#
- #include <fsl_flexcan.h>
FlexCAN memory error register status structure.
This structure contains the memory access properties that caused a memory error access. It is used as the parameter of FLEXCAN_GetMemoryErrorReportStatus() function. And user can use FLEXCAN_GetMemoryErrorReportStatus to get the status of the last memory error access.
Public Members
-
flexcan_memory_error_type_t errorType#
The type of memory error that giving rise to the report.
-
flexcan_memory_access_type_t accessType#
The type of memory access that giving rise to the memory error.
-
uint16_t accessAddress#
The address where memory error detected.
-
uint32_t errorData#
The raw data word read from memory with error.
-
flexcan_memory_error_type_t errorType#
-
struct _flexcan_frame#
- #include <fsl_flexcan.h>
FlexCAN message frame structure.
-
struct _flexcan_fd_frame#
- #include <fsl_flexcan.h>
CAN FD message frame structure.
The CAN FD message supporting up to sixty four bytes can be used for a data frame, depending on the length selected for the message buffers. The length should be a enumeration member, see _flexcan_fd_frame_length.
Public Members
-
uint32_t idhit#
Note
ID HIT offset is changed dynamically according to data length code (DLC), when DLC is 15, they will be located below. Using FLEXCAN_FixEnhancedRxFifoFrameIdHit API is recommended to ensure this idhit value is correct. CAN Enhanced Rx FIFO filter hit id (This value is only used in Enhanced Rx FIFO receive mode).
-
uint32_t hrtimestamp#
Note
HR timestamp offset is changed dynamically according to data length code (DLC). External 32-bit on-chip timer high-resolution timestamp.
-
uint32_t idhit#
-
struct _flexcan_timing_config#
- #include <fsl_flexcan.h>
FlexCAN protocol timing characteristic configuration structure.
Public Members
-
uint32_t preDivider#
Classic CAN or CAN FD nominal phase bit rate prescaler.
-
uint32_t rJumpwidth#
Classic CAN or CAN FD nominal phase Re-sync Jump Width.
-
uint32_t phaseSeg1#
Classic CAN or CAN FD nominal phase Segment 1.
-
uint32_t phaseSeg2#
Classic CAN or CAN FD nominal phase Segment 2.
-
uint32_t propSeg#
Classic CAN or CAN FD nominal phase Propagation Segment.
-
uint32_t fpreDivider#
CAN FD data phase bit rate prescaler.
-
uint32_t frJumpwidth#
CAN FD data phase Re-sync Jump Width.
-
uint32_t fphaseSeg1#
CAN FD data phase Phase Segment 1.
-
uint32_t fphaseSeg2#
CAN FD data phase Phase Segment 2.
-
uint32_t fpropSeg#
CAN FD data phase Propagation Segment.
-
uint32_t preDivider#
-
struct _flexcan_config#
- #include <fsl_flexcan.h>
FlexCAN module configuration structure.
- Deprecated:
Do not use the baudRate. It has been superceded bitRate
Do not use the baudRateFD. It has been superceded bitRateFD
Public Members
-
flexcan_clock_source_t clkSrc#
Clock source for FlexCAN Protocol Engine.
-
flexcan_wake_up_source_t wakeupSrc#
Wake up source selection.
-
uint8_t maxMbNum#
The maximum number of Message Buffers used by user.
-
bool enableLoopBack#
Enable or Disable Loop Back Self Test Mode.
-
bool enableTimerSync#
Enable or Disable Timer Synchronization.
-
bool enableIndividMask#
Enable or Disable Rx Individual Mask and Queue feature.
-
bool disableSelfReception#
Enable or Disable Self Reflection.
-
bool enableListenOnlyMode#
Enable or Disable Listen Only Mode.
-
bool enableDoze#
Enable or Disable Doze Mode.
-
bool enablePretendedeNetworking#
Enable or Disable the Pretended Networking mode.
-
bool enableMemoryErrorControl#
Enable or Disable the memory errors detection and correction mechanism.
-
bool enableNonCorrectableErrorEnterFreeze#
Enable or Disable Non-Correctable Errors In FlexCAN Access Put Device In Freeze Mode.
-
bool enableTransceiverDelayMeasure#
Enable or Disable the transceiver delay measurement, when it is enabled, then the secondary sample point position is determined by the sum of the transceiver delay measurement plus the enhanced TDC offset.
-
bool enableRemoteRequestFrameStored#
true: Store Remote Request Frame in the same fashion of data frame. false: Generate an automatic Remote Response Frame.
-
bool enableThreeSamplingMode#
true: Three samples are used to determine the value of the received bit, providing noise immunity against fast transient changes. false: One sample is used to determine the value of the received bit.
-
bool disableBusOffAutoRecovery#
true: Automatic recovering from Bus-Off state is disabled. false: Automatic recovering from Bus-Off state is enabled according to CAN Specification.
-
uint8_t txArbitrationStartDelay#
Determines how many CAN bits the transmission arbitration process start point can be delayed from the first bit of CRC field on CAN bus, valid range 0-31.
-
bool enableEntireArbitrationCompare#
true: Enable Entire Frame Arbitration Field Comparison for Rx MB. The IDE and RTR fields of the RX MBs are compared to their corresponding bits within the incoming frame (mask bits apply). false: The IDE field of the RX MB filter is always compared and RTR is never compared despite mask bits.
-
flexcan_endianness_t payloadEndianness#
Selects the byte order for the payload of transmit and receive frames, see flexcan_endianness_t.
-
bool enableExternalTimeTick#
true: External time tick clocks the free-running timer. false: FlexCAN bit clock clocks the free-running timer.
-
flexcan_MB_timestamp_base_t captureTimeBase#
Timebase of message buffer 16-bit TIME_STAMP field.
-
flexcan_capture_point_t capturePoint#
Point in time when 32-bit timebase is captured during CAN frame.
-
struct _flexcan_rx_mb_config#
- #include <fsl_flexcan.h>
FlexCAN Receive Message Buffer configuration structure.
This structure is used as the parameter of FLEXCAN_SetRxMbConfig() function. The FLEXCAN_SetRxMbConfig() function is used to configure FlexCAN Receive Message Buffer. The function abort previous receiving process, clean the Message Buffer and activate the Rx Message Buffer using given Message Buffer setting.
Public Members
-
uint32_t id#
CAN Message Buffer Frame Identifier, should be set using FLEXCAN_ID_EXT() or FLEXCAN_ID_STD() macro.
-
flexcan_frame_format_t format#
CAN Frame Identifier format(Standard of Extend).
-
flexcan_frame_type_t type#
CAN Frame Type(Data or Remote for classical CAN only).
-
uint32_t id#
-
struct _flexcan_pn_config#
- #include <fsl_flexcan.h>
FlexCAN Pretended Networking configuration structure.
This structure is used as the parameter of FLEXCAN_SetPNConfig() function. The FLEXCAN_SetPNConfig() function is used to configure FlexCAN Networking work mode.
Public Members
-
bool enableTimeout#
Enable or Disable timeout event trigger wakeup.
-
uint16_t timeoutValue#
The timeout value that generates a wakeup event, the counter timer is incremented based on 64 times the CAN Bit Time unit.
-
bool enableMatch#
Enable or Disable match event trigger wakeup.
-
flexcan_pn_match_source_t matchSrc#
Selects the match source (ID and/or data match) to trigger wakeup.
-
uint8_t matchNum#
The number of times a given message must match the predefined ID and/or data before generating a wakeup event, range in 0x1 ~ 0xFF.
-
flexcan_pn_match_mode_t idMatchMode#
The ID match type.
-
flexcan_pn_match_mode_t dataMatchMode#
The data match type.
-
uint32_t idLower#
The ID target values 1 which used either for ID match “equal to”, “smaller than”, “greater than” comparisons, or as the lower limit value in ID match “range detection”.
-
uint32_t idUpper#
The ID target values 2 which used only as the upper limit value in ID match “range
detection” or used to store the ID mask in “equal to”.
-
uint8_t lengthLower#
The lower limit for length of data bytes which used only in data match “range
detection”. Range in 0x0 ~ 0x8.
-
uint8_t lengthUpper#
The upper limit for length of data bytes which used only in data match “range
detection”. Range in 0x0 ~ 0x8.
-
bool enableTimeout#
-
struct _flexcan_rx_fifo_config#
- #include <fsl_flexcan.h>
FlexCAN Legacy Rx FIFO configuration structure.
Public Members
-
uint32_t *idFilterTable#
Pointer to the FlexCAN Legacy Rx FIFO identifier filter table.
-
uint8_t idFilterNum#
The FlexCAN Legacy Rx FIFO Filter elements quantity.
-
flexcan_rx_fifo_filter_type_t idFilterType#
The FlexCAN Legacy Rx FIFO Filter type.
-
flexcan_rx_fifo_priority_t priority#
The FlexCAN Legacy Rx FIFO receive priority.
-
uint32_t *idFilterTable#
-
struct _flexcan_enhanced_rx_fifo_std_id_filter#
- #include <fsl_flexcan.h>
FlexCAN Enhanced Rx FIFO Standard ID filter element structure.
Public Members
-
uint32_t filterType#
FlexCAN internal Free-Running Counter Time Stamp.
-
uint32_t rtr1#
CAN FD frame data length code (DLC), range see _flexcan_fd_frame_length, When the length <= 8, it equal to the data length, otherwise the number of valid frame data is not equal to the length value. user can use DLC_LENGTH_DECODE(length) macro to get the number of valid data bytes.
-
uint32_t std1#
CAN Frame Type(DATA or REMOTE).
-
uint32_t rtr2#
CAN Frame Identifier(STD or EXT format).
-
uint32_t std2#
Substitute Remote request.
-
uint32_t filterType#
-
struct _flexcan_enhanced_rx_fifo_ext_id_filter#
- #include <fsl_flexcan.h>
FlexCAN Enhanced Rx FIFO Extended ID filter element structure.
Public Members
-
uint32_t filterType#
FlexCAN internal Free-Running Counter Time Stamp.
-
uint32_t rtr1#
CAN FD frame data length code (DLC), range see _flexcan_fd_frame_length, When the length <= 8, it equal to the data length, otherwise the number of valid frame data is not equal to the length value. user can use DLC_LENGTH_DECODE(length) macro to get the number of valid data bytes.
-
uint32_t std1#
CAN Frame Type(DATA or REMOTE).
-
uint32_t rtr2#
CAN Frame Identifier(STD or EXT format).
-
uint32_t std2#
Substitute Remote request.
-
uint32_t filterType#
-
struct _flexcan_enhanced_rx_fifo_config#
- #include <fsl_flexcan.h>
FlexCAN Enhanced Rx FIFO configuration structure.
Public Members
-
uint32_t *idFilterTable#
Pointer to the FlexCAN Enhanced Rx FIFO identifier filter table, each table member occupies 32 bit word, table size should be equal to idFilterNum. There are two types of Enhanced Rx FIFO filter elements that can be stored in table : extended-ID filter element (1 word, occupie 1 table members) and standard-ID filter element (2 words, occupies 2 table members), the extended-ID filter element needs to be placed in front of the table.
-
uint8_t idFilterPairNum#
idFilterPairNum is the Enhanced Rx FIFO identifier filter element pair numbers, each pair of filter elements occupies 2 words and can consist of one extended ID filter element or two standard ID filter elements.
-
uint8_t extendIdFilterNum#
The number of extended ID filter element items in the FlexCAN enhanced Rx FIFO identifier filter table, each extended-ID filter element occupies 2 words, extendIdFilterNum need less than or equal to idFilterPairNum.
-
uint8_t fifoWatermark#
(fifoWatermark + 1) is the minimum number of CAN messages stored in the Enhanced RX FIFO which can trigger FIFO watermark interrupt or a DMA request.
-
flexcan_efifo_dma_per_read_length_t dmaPerReadLength#
Define the length of each read of the Enhanced RX FIFO element by the DAM, see _flexcan_fd_frame_length.
-
flexcan_rx_fifo_priority_t priority#
The FlexCAN Enhanced Rx FIFO receive priority.
-
uint32_t *idFilterTable#
-
struct _flexcan_mb_transfer#
- #include <fsl_flexcan.h>
FlexCAN Message Buffer transfer.
Public Members
-
flexcan_frame_t *frame#
The buffer of CAN Message to be transfer.
-
uint8_t mbIdx#
The index of Message buffer used to transfer Message.
-
flexcan_frame_t *frame#
-
struct _flexcan_fifo_transfer#
- #include <fsl_flexcan.h>
FlexCAN Rx FIFO transfer.
Public Members
-
flexcan_fd_frame_t *framefd#
The buffer of CAN Message to be received from Enhanced Rx FIFO.
-
flexcan_frame_t *frame#
The buffer of CAN Message to be received from Legacy Rx FIFO.
-
size_t frameNum#
Depth of CAN Message receive array of Legacy or Enhanced Rx FIFO.
-
flexcan_fd_frame_t *framefd#
-
struct _flexcan_handle#
- #include <fsl_flexcan.h>
FlexCAN handle structure.
Public Members
-
flexcan_transfer_callback_t callback#
Callback function.
-
void *userData#
FlexCAN callback function parameter.
-
flexcan_frame_t *volatile mbFrameBuf[CAN_WORD1_COUNT]#
The buffer for received CAN data from Message Buffers.
-
flexcan_fd_frame_t *volatile mbFDFrameBuf[CAN_WORD1_COUNT]#
The buffer for received CAN FD data from Message Buffers.
-
flexcan_frame_t *volatile rxFifoFrameBuf#
The buffer for received CAN data from Legacy Rx FIFO.
-
flexcan_fd_frame_t *volatile rxFifoFDFrameBuf#
The buffer for received CAN FD data from Enhanced Rx FIFO.
-
size_t rxFifoFrameNum#
The number of CAN messages remaining to be received from Legacy or Enhanced Rx FIFO.
-
size_t rxFifoTransferTotalNum#
Total CAN Message number need to be received from Legacy or Enhanced Rx FIFO.
-
volatile uint8_t mbState[CAN_WORD1_COUNT]#
Message Buffer transfer state.
-
volatile uint8_t rxFifoState#
Rx FIFO transfer state.
-
volatile uint32_t timestamp[CAN_WORD1_COUNT]#
Mailbox transfer timestamp.
-
flexcan_transfer_callback_t callback#
-
struct byteStatus#
Public Members
-
bool byteIsRead#
The byte n (0~3) was read or not. The type of error and which bit in byte (n) is affected by the error.
-
bool byteIsRead#
-
struct __unnamed30__#
Public Members
-
uint32_t timestamp#
FlexCAN internal Free-Running Counter Time Stamp.
-
uint32_t length#
CAN frame data length in bytes (Range: 0~8).
-
uint32_t type#
CAN Frame Type(DATA or REMOTE).
-
uint32_t format#
CAN Frame Identifier(STD or EXT format).
-
uint32_t __pad0__#
Reserved.
-
uint32_t idhit#
CAN Rx FIFO filter hit id(This value is only used in Rx FIFO receive mode).
-
uint32_t timestamp#
-
struct __unnamed32__#
Public Members
-
uint32_t id#
CAN Frame Identifier, should be set using FLEXCAN_ID_EXT() or FLEXCAN_ID_STD() macro.
-
uint32_t __pad0__#
Reserved.
-
uint32_t id#
-
union __unnamed34__#
Public Members
- struct _flexcan_frame
- struct _flexcan_frame
-
struct __unnamed36__#
-
struct __unnamed38__#
Public Members
-
uint8_t dataByte3#
CAN Frame payload byte3.
-
uint8_t dataByte2#
CAN Frame payload byte2.
-
uint8_t dataByte1#
CAN Frame payload byte1.
-
uint8_t dataByte0#
CAN Frame payload byte0.
-
uint8_t dataByte7#
CAN Frame payload byte7.
-
uint8_t dataByte6#
CAN Frame payload byte6.
-
uint8_t dataByte5#
CAN Frame payload byte5.
-
uint8_t dataByte4#
CAN Frame payload byte4.
-
uint8_t dataByte3#
-
struct __unnamed40__#
Public Members
-
uint32_t timestamp#
FlexCAN internal Free-Running Counter Time Stamp.
-
uint32_t length#
CAN FD frame data length code (DLC), range see _flexcan_fd_frame_length, When the length <= 8, it equal to the data length, otherwise the number of valid frame data is not equal to the length value. user can use DLC_LENGTH_DECODE(length) macro to get the number of valid data bytes.
-
uint32_t type#
CAN Frame Type(DATA only).
-
uint32_t format#
CAN Frame Identifier(STD or EXT format).
-
uint32_t srr#
Substitute Remote request.
-
uint32_t esi#
Error State Indicator.
-
uint32_t brs#
Bit Rate Switch.
-
uint32_t edl#
Extended Data Length.
-
uint32_t timestamp#
-
struct __unnamed42__#
Public Members
-
uint32_t id#
CAN Frame Identifier, should be set using FLEXCAN_ID_EXT() or FLEXCAN_ID_STD() macro.
-
uint32_t __pad0__#
Reserved.
-
uint32_t id#
-
union __unnamed44__#
Public Members
- struct _flexcan_fd_frame
- struct _flexcan_fd_frame
-
struct __unnamed46__#
Public Members
-
uint32_t dataWord[16]#
CAN FD Frame payload, 16 double word maximum.
-
uint32_t dataWord[16]#
-
struct __unnamed48__#
Public Members
-
uint8_t dataByte3#
CAN Frame payload byte3.
-
uint8_t dataByte2#
CAN Frame payload byte2.
-
uint8_t dataByte1#
CAN Frame payload byte1.
-
uint8_t dataByte0#
CAN Frame payload byte0.
-
uint8_t dataByte7#
CAN Frame payload byte7.
-
uint8_t dataByte6#
CAN Frame payload byte6.
-
uint8_t dataByte5#
CAN Frame payload byte5.
-
uint8_t dataByte4#
CAN Frame payload byte4.
-
uint8_t dataByte3#
-
union __unnamed50__#
Public Members
- struct _flexcan_config
- struct _flexcan_config
-
struct __unnamed52__#
-
struct __unnamed54__#
-
union __unnamed56__#
Public Members
- struct _flexcan_pn_config
< The data target values 1 which used either for data match “equal to”, “smaller than”, “greater than” comparisons, or as the lower limit value in data match “range
detection”.
- struct _flexcan_pn_config
-
struct __unnamed60__#
< The data target values 1 which used either for data match “equal to”, “smaller than”, “greater than” comparisons, or as the lower limit value in data match “range
detection”.
-
struct __unnamed62__#
Public Members
-
uint8_t lowerByte3#
CAN Frame payload byte3.
-
uint8_t lowerByte2#
CAN Frame payload byte2.
-
uint8_t lowerByte1#
CAN Frame payload byte1.
-
uint8_t lowerByte0#
CAN Frame payload byte0.
-
uint8_t lowerByte7#
CAN Frame payload byte7.
-
uint8_t lowerByte6#
CAN Frame payload byte6.
-
uint8_t lowerByte5#
CAN Frame payload byte5.
-
uint8_t lowerByte4#
CAN Frame payload byte4.
-
uint8_t lowerByte3#
-
union __unnamed58__#
Public Members
- struct _flexcan_pn_config
< The data target values 2 which used only as the upper limit value in data match “range
detection” or used to store the data mask in “equal to”.
- struct _flexcan_pn_config
-
struct __unnamed64__#
< The data target values 2 which used only as the upper limit value in data match “range
detection” or used to store the data mask in “equal to”.
-
struct __unnamed66__#
Public Members
-
uint8_t upperByte3#
CAN Frame payload byte3.
-
uint8_t upperByte2#
CAN Frame payload byte2.
-
uint8_t upperByte1#
CAN Frame payload byte1.
-
uint8_t upperByte0#
CAN Frame payload byte0.
-
uint8_t upperByte7#
CAN Frame payload byte7.
-
uint8_t upperByte6#
CAN Frame payload byte6.
-
uint8_t upperByte5#
CAN Frame payload byte5.
-
uint8_t upperByte4#
CAN Frame payload byte4.
-
uint8_t upperByte3#
FlexCAN eDMA Driver#
-
void FLEXCAN_TransferCreateHandleEDMA(CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_edma_transfer_callback_t callback, void *userData, edma_handle_t *rxFifoEdmaHandle)#
Initializes the FlexCAN handle, which is used in transactional functions.
- Parameters:
base – FlexCAN peripheral base address.
handle – Pointer to flexcan_edma_handle_t structure.
callback – The callback function.
userData – The parameter of the callback function.
rxFifoEdmaHandle – User-requested DMA handle for Rx FIFO DMA transfer.
-
void FLEXCAN_PrepareTransfConfiguration(CAN_Type *base, flexcan_fifo_transfer_t *pFifoXfer, edma_transfer_config_t *pEdmaConfig)#
Prepares the eDMA transfer configuration for FLEXCAN Legacy RX FIFO.
This function prepares the eDMA transfer configuration structure according to FLEXCAN Legacy RX FIFO.
- Parameters:
base – FlexCAN peripheral base address.
pFifoXfer – FlexCAN Rx FIFO EDMA transfer structure, see flexcan_fifo_transfer_t.
pEdmaConfig – The user configuration structure of type edma_transfer_t.
-
status_t FLEXCAN_StartTransferDatafromRxFIFO(CAN_Type *base, flexcan_edma_handle_t *handle, edma_transfer_config_t *pEdmaConfig)#
Start Transfer Data from the FLEXCAN Legacy Rx FIFO using eDMA.
This function to Update edma transfer confiugration and Start eDMA transfer
- Parameters:
base – FlexCAN peripheral base address.
handle – Pointer to flexcan_edma_handle_t structure.
pEdmaConfig – The user configuration structure of type edma_transfer_t.
- Return values:
kStatus_Success – if succeed, others failed.
kStatus_FLEXCAN_RxFifoBusy – Previous transfer ongoing.
-
status_t FLEXCAN_TransferReceiveFifoEDMA(CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer)#
Receives the CAN Message from the Legacy Rx FIFO using eDMA.
This function receives the CAN Message using eDMA. This is a non-blocking function, which returns right away. After the CAN Message is received, the receive callback function is called.
- Parameters:
base – FlexCAN peripheral base address.
handle – Pointer to flexcan_edma_handle_t structure.
pFifoXfer – FlexCAN Rx FIFO EDMA transfer structure, see flexcan_fifo_transfer_t.
- Return values:
kStatus_Success – if succeed, others failed.
kStatus_FLEXCAN_RxFifoBusy – Previous transfer ongoing.
-
status_t FLEXCAN_TransferGetReceiveFifoCountEMDA(CAN_Type *base, flexcan_edma_handle_t *handle, size_t *count)#
Gets the Legacy Rx Fifo transfer status during a interrupt non-blocking receive.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
count – Number of CAN messages receive so far by the non-blocking transaction.
- Return values:
kStatus_InvalidArgument – count is Invalid.
kStatus_Success – Successfully return the count.
-
void FLEXCAN_TransferAbortReceiveFifoEDMA(CAN_Type *base, flexcan_edma_handle_t *handle)#
Aborts the receive Legacy/Enhanced Rx FIFO process which used eDMA.
This function aborts the receive Legacy/Enhanced Rx FIFO process which used eDMA.
- Parameters:
base – FlexCAN peripheral base address.
handle – Pointer to flexcan_edma_handle_t structure.
-
status_t FLEXCAN_TransferReceiveEnhancedFifoEDMA(CAN_Type *base, flexcan_edma_handle_t *handle, flexcan_fifo_transfer_t *pFifoXfer)#
Receives the CAN FD Message from the Enhanced Rx FIFO using eDMA.
This function receives the CAN FD Message using eDMA. This is a non-blocking function, which returns right away. After the CAN Message is received, the receive callback function is called.
- Parameters:
base – FlexCAN peripheral base address.
handle – Pointer to flexcan_edma_handle_t structure.
pFifoXfer – FlexCAN Rx FIFO EDMA transfer structure, see flexcan_fifo_transfer_t.
- Return values:
kStatus_Success – if succeed, others failed.
kStatus_FLEXCAN_RxFifoBusy – Previous transfer ongoing.
-
static inline status_t FLEXCAN_TransferGetReceiveEnhancedFifoCountEMDA(CAN_Type *base, flexcan_edma_handle_t *handle, size_t *count)#
Gets the Enhanced Rx Fifo transfer status during a interrupt non-blocking receive.
- Parameters:
base – FlexCAN peripheral base address.
handle – FlexCAN handle pointer.
count – Number of CAN messages receive so far by the non-blocking transaction.
- Return values:
kStatus_InvalidArgument – count is Invalid.
kStatus_Success – Successfully return the count.
-
FSL_FLEXCAN_EDMA_DRIVER_VERSION#
FlexCAN EDMA driver version.
-
typedef struct _flexcan_edma_handle flexcan_edma_handle_t#
-
typedef void (*flexcan_edma_transfer_callback_t)(CAN_Type *base, flexcan_edma_handle_t *handle, status_t status, void *userData)#
FlexCAN transfer callback function.
-
struct _flexcan_edma_handle#
- #include <fsl_flexcan_edma.h>
FlexCAN eDMA handle.
Public Members
-
flexcan_edma_transfer_callback_t callback#
Callback function.
-
void *userData#
FlexCAN callback function parameter.
-
edma_handle_t *rxFifoEdmaHandle#
The EDMA handler for Rx FIFO.
-
volatile uint8_t rxFifoState#
Rx FIFO transfer state.
-
size_t frameNum#
The number of messages that need to be received.
-
flexcan_fd_frame_t *framefd#
Point to the buffer of CAN Message to be received from Enhanced Rx FIFO.
-
flexcan_edma_transfer_callback_t callback#
FlexIO: FlexIO Driver#
FlexIO Driver#
-
void FLEXIO_GetDefaultConfig(flexio_config_t *userConfig)#
Gets the default configuration to configure the FlexIO module. The configuration can used directly to call the FLEXIO_Configure().
Example:
flexio_config_t config; FLEXIO_GetDefaultConfig(&config);
- Parameters:
userConfig – pointer to flexio_config_t structure
-
void FLEXIO_Init(FLEXIO_Type *base, const flexio_config_t *userConfig)#
Configures the FlexIO with a FlexIO configuration. The configuration structure can be filled by the user or be set with default values by FLEXIO_GetDefaultConfig().
Example
flexio_config_t config = { .enableFlexio = true, .enableInDoze = false, .enableInDebug = true, .enableFastAccess = false }; FLEXIO_Configure(base, &config);
- Parameters:
base – FlexIO peripheral base address
userConfig – pointer to flexio_config_t structure
-
void FLEXIO_Deinit(FLEXIO_Type *base)#
Gates the FlexIO clock. Call this API to stop the FlexIO clock.
Note
After calling this API, call the FLEXO_Init to use the FlexIO module.
- Parameters:
base – FlexIO peripheral base address
-
uint32_t FLEXIO_GetInstance(FLEXIO_Type *base)#
Get instance number for FLEXIO module.
- Parameters:
base – FLEXIO peripheral base address.
-
void FLEXIO_Reset(FLEXIO_Type *base)#
Resets the FlexIO module.
- Parameters:
base – FlexIO peripheral base address
-
static inline void FLEXIO_Enable(FLEXIO_Type *base, bool enable)#
Enables the FlexIO module operation.
- Parameters:
base – FlexIO peripheral base address
enable – true to enable, false to disable.
-
static inline uint32_t FLEXIO_ReadPinInput(FLEXIO_Type *base)#
Reads the input data on each of the FlexIO pins.
- Parameters:
base – FlexIO peripheral base address
- Returns:
FlexIO pin input data
-
static inline uint8_t FLEXIO_GetShifterState(FLEXIO_Type *base)#
Gets the current state pointer for state mode use.
- Parameters:
base – FlexIO peripheral base address
- Returns:
current State pointer
-
void FLEXIO_SetShifterConfig(FLEXIO_Type *base, uint8_t index, const flexio_shifter_config_t *shifterConfig)#
Configures the shifter with the shifter configuration. The configuration structure covers both the SHIFTCTL and SHIFTCFG registers. To configure the shifter to the proper mode, select which timer controls the shifter to shift, whether to generate start bit/stop bit, and the polarity of start bit and stop bit.
Example
flexio_shifter_config_t config = { .timerSelect = 0, .timerPolarity = kFLEXIO_ShifterTimerPolarityOnPositive, .pinConfig = kFLEXIO_PinConfigOpenDrainOrBidirection, .pinPolarity = kFLEXIO_PinActiveLow, .shifterMode = kFLEXIO_ShifterModeTransmit, .inputSource = kFLEXIO_ShifterInputFromPin, .shifterStop = kFLEXIO_ShifterStopBitHigh, .shifterStart = kFLEXIO_ShifterStartBitLow }; FLEXIO_SetShifterConfig(base, &config);
- Parameters:
base – FlexIO peripheral base address
index – Shifter index
shifterConfig – Pointer to flexio_shifter_config_t structure
-
void FLEXIO_SetTimerConfig(FLEXIO_Type *base, uint8_t index, const flexio_timer_config_t *timerConfig)#
Configures the timer with the timer configuration. The configuration structure covers both the TIMCTL and TIMCFG registers. To configure the timer to the proper mode, select trigger source for timer and the timer pin output and the timing for timer.
Example
flexio_timer_config_t config = { .triggerSelect = FLEXIO_TIMER_TRIGGER_SEL_SHIFTnSTAT(0), .triggerPolarity = kFLEXIO_TimerTriggerPolarityActiveLow, .triggerSource = kFLEXIO_TimerTriggerSourceInternal, .pinConfig = kFLEXIO_PinConfigOpenDrainOrBidirection, .pinSelect = 0, .pinPolarity = kFLEXIO_PinActiveHigh, .timerMode = kFLEXIO_TimerModeDual8BitBaudBit, .timerOutput = kFLEXIO_TimerOutputZeroNotAffectedByReset, .timerDecrement = kFLEXIO_TimerDecSrcOnFlexIOClockShiftTimerOutput, .timerReset = kFLEXIO_TimerResetOnTimerPinEqualToTimerOutput, .timerDisable = kFLEXIO_TimerDisableOnTimerCompare, .timerEnable = kFLEXIO_TimerEnableOnTriggerHigh, .timerStop = kFLEXIO_TimerStopBitEnableOnTimerDisable, .timerStart = kFLEXIO_TimerStartBitEnabled }; FLEXIO_SetTimerConfig(base, &config);
- Parameters:
base – FlexIO peripheral base address
index – Timer index
timerConfig – Pointer to the flexio_timer_config_t structure
-
static inline void FLEXIO_SetClockMode(FLEXIO_Type *base, uint8_t index, flexio_timer_decrement_source_t clocksource)#
This function set the value of the prescaler on flexio channels.
- Parameters:
base – Pointer to the FlexIO simulated peripheral type.
index – Timer index
clocksource – Set clock value
-
static inline void FLEXIO_EnableShifterStatusInterrupts(FLEXIO_Type *base, uint32_t mask)#
Enables the shifter status interrupt. The interrupt generates when the corresponding SSF is set.
Note
For multiple shifter status interrupt enable, for example, two shifter status enable, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
- Parameters:
base – FlexIO peripheral base address
mask – The shifter status mask which can be calculated by (1 << shifter index)
-
static inline void FLEXIO_DisableShifterStatusInterrupts(FLEXIO_Type *base, uint32_t mask)#
Disables the shifter status interrupt. The interrupt won’t generate when the corresponding SSF is set.
Note
For multiple shifter status interrupt enable, for example, two shifter status enable, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
- Parameters:
base – FlexIO peripheral base address
mask – The shifter status mask which can be calculated by (1 << shifter index)
-
static inline void FLEXIO_EnableShifterErrorInterrupts(FLEXIO_Type *base, uint32_t mask)#
Enables the shifter error interrupt. The interrupt generates when the corresponding SEF is set.
Note
For multiple shifter error interrupt enable, for example, two shifter error enable, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
- Parameters:
base – FlexIO peripheral base address
mask – The shifter error mask which can be calculated by (1 << shifter index)
-
static inline void FLEXIO_DisableShifterErrorInterrupts(FLEXIO_Type *base, uint32_t mask)#
Disables the shifter error interrupt. The interrupt won’t generate when the corresponding SEF is set.
Note
For multiple shifter error interrupt enable, for example, two shifter error enable, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
- Parameters:
base – FlexIO peripheral base address
mask – The shifter error mask which can be calculated by (1 << shifter index)
-
static inline void FLEXIO_EnableTimerStatusInterrupts(FLEXIO_Type *base, uint32_t mask)#
Enables the timer status interrupt. The interrupt generates when the corresponding SSF is set.
Note
For multiple timer status interrupt enable, for example, two timer status enable, can calculate the mask by using ((1 << timer index0) | (1 << timer index1))
- Parameters:
base – FlexIO peripheral base address
mask – The timer status mask which can be calculated by (1 << timer index)
-
static inline void FLEXIO_DisableTimerStatusInterrupts(FLEXIO_Type *base, uint32_t mask)#
Disables the timer status interrupt. The interrupt won’t generate when the corresponding SSF is set.
Note
For multiple timer status interrupt enable, for example, two timer status enable, can calculate the mask by using ((1 << timer index0) | (1 << timer index1))
- Parameters:
base – FlexIO peripheral base address
mask – The timer status mask which can be calculated by (1 << timer index)
-
static inline uint32_t FLEXIO_GetShifterStatusFlags(FLEXIO_Type *base)#
Gets the shifter status flags.
- Parameters:
base – FlexIO peripheral base address
- Returns:
Shifter status flags
-
static inline void FLEXIO_ClearShifterStatusFlags(FLEXIO_Type *base, uint32_t mask)#
Clears the shifter status flags.
Note
For clearing multiple shifter status flags, for example, two shifter status flags, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
- Parameters:
base – FlexIO peripheral base address
mask – The shifter status mask which can be calculated by (1 << shifter index)
-
static inline uint32_t FLEXIO_GetShifterErrorFlags(FLEXIO_Type *base)#
Gets the shifter error flags.
- Parameters:
base – FlexIO peripheral base address
- Returns:
Shifter error flags
-
static inline void FLEXIO_ClearShifterErrorFlags(FLEXIO_Type *base, uint32_t mask)#
Clears the shifter error flags.
Note
For clearing multiple shifter error flags, for example, two shifter error flags, can calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
- Parameters:
base – FlexIO peripheral base address
mask – The shifter error mask which can be calculated by (1 << shifter index)
-
static inline uint32_t FLEXIO_GetTimerStatusFlags(FLEXIO_Type *base)#
Gets the timer status flags.
- Parameters:
base – FlexIO peripheral base address
- Returns:
Timer status flags
-
static inline void FLEXIO_ClearTimerStatusFlags(FLEXIO_Type *base, uint32_t mask)#
Clears the timer status flags.
Note
For clearing multiple timer status flags, for example, two timer status flags, can calculate the mask by using ((1 << timer index0) | (1 << timer index1))
- Parameters:
base – FlexIO peripheral base address
mask – The timer status mask which can be calculated by (1 << timer index)
-
static inline void FLEXIO_EnableShifterStatusDMA(FLEXIO_Type *base, uint32_t mask, bool enable)#
Enables/disables the shifter status DMA. The DMA request generates when the corresponding SSF is set.
Note
For multiple shifter status DMA enables, for example, calculate the mask by using ((1 << shifter index0) | (1 << shifter index1))
- Parameters:
base – FlexIO peripheral base address
mask – The shifter status mask which can be calculated by (1 << shifter index)
enable – True to enable, false to disable.
-
uint32_t FLEXIO_GetShifterBufferAddress(FLEXIO_Type *base, flexio_shifter_buffer_type_t type, uint8_t index)#
Gets the shifter buffer address for the DMA transfer usage.
- Parameters:
base – FlexIO peripheral base address
type – Shifter type of flexio_shifter_buffer_type_t
index – Shifter index
- Returns:
Corresponding shifter buffer index
-
status_t FLEXIO_RegisterHandleIRQ(void *base, void *handle, flexio_isr_t isr)#
Registers the handle and the interrupt handler for the FlexIO-simulated peripheral.
- Parameters:
base – Pointer to the FlexIO simulated peripheral type.
handle – Pointer to the handler for FlexIO simulated peripheral.
isr – FlexIO simulated peripheral interrupt handler.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_OutOfRange – The FlexIO type/handle/ISR table out of range.
-
status_t FLEXIO_UnregisterHandleIRQ(void *base)#
Unregisters the handle and the interrupt handler for the FlexIO-simulated peripheral.
- Parameters:
base – Pointer to the FlexIO simulated peripheral type.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_OutOfRange – The FlexIO type/handle/ISR table out of range.
-
static inline void FLEXIO_ClearPortOutput(FLEXIO_Type *base, uint32_t mask)#
Sets the output level of the multiple FLEXIO pins to the logic 0.
- Parameters:
base – FlexIO peripheral base address
mask – FLEXIO pin number mask
-
static inline void FLEXIO_SetPortOutput(FLEXIO_Type *base, uint32_t mask)#
Sets the output level of the multiple FLEXIO pins to the logic 1.
- Parameters:
base – FlexIO peripheral base address
mask – FLEXIO pin number mask
-
static inline void FLEXIO_TogglePortOutput(FLEXIO_Type *base, uint32_t mask)#
Reverses the current output logic of the multiple FLEXIO pins.
- Parameters:
base – FlexIO peripheral base address
mask – FLEXIO pin number mask
-
static inline void FLEXIO_PinWrite(FLEXIO_Type *base, uint32_t pin, uint8_t output)#
Sets the output level of the FLEXIO pins to the logic 1 or 0.
- Parameters:
base – FlexIO peripheral base address
pin – FLEXIO pin number.
output – FLEXIO pin output logic level.
0: corresponding pin output low-logic level.
1: corresponding pin output high-logic level.
-
static inline void FLEXIO_EnablePinOutput(FLEXIO_Type *base, uint32_t pin)#
Enables the FLEXIO output pin function.
- Parameters:
base – FlexIO peripheral base address
pin – FLEXIO pin number.
-
static inline uint32_t FLEXIO_PinRead(FLEXIO_Type *base, uint32_t pin)#
Reads the current input value of the FLEXIO pin.
- Parameters:
base – FlexIO peripheral base address
pin – FLEXIO pin number.
- Return values:
FLEXIO – port input value
0: corresponding pin input low-logic level.
1: corresponding pin input high-logic level.
-
static inline uint32_t FLEXIO_GetPinStatus(FLEXIO_Type *base, uint32_t pin)#
Gets the FLEXIO input pin status.
- Parameters:
base – FlexIO peripheral base address
pin – FLEXIO pin number.
- Return values:
FLEXIO – port input status
0: corresponding pin input capture no status.
1: corresponding pin input capture rising or falling edge.
-
static inline void FLEXIO_SetPinLevel(FLEXIO_Type *base, uint8_t pin, bool level)#
Sets the FLEXIO output pin level.
- Parameters:
base – FlexIO peripheral base address
pin – FlexIO pin number.
level – FlexIO output pin level to set, can be either 0 or 1.
-
static inline bool FLEXIO_GetPinOverride(const FLEXIO_Type *const base, uint8_t pin)#
Gets the enabled status of a FLEXIO output pin.
- Parameters:
base – FlexIO peripheral base address
pin – FlexIO pin number.
- Return values:
FlexIO – port enabled status
0: corresponding output pin is in disabled state.
1: corresponding output pin is in enabled state.
-
static inline void FLEXIO_ConfigPinOverride(FLEXIO_Type *base, uint8_t pin, bool enabled)#
Enables or disables a FLEXIO output pin.
- Parameters:
base – FlexIO peripheral base address
pin – Flexio pin number.
enabled – Enable or disable the FlexIO pin.
-
static inline void FLEXIO_ClearPortStatus(FLEXIO_Type *base, uint32_t mask)#
Clears the multiple FLEXIO input pins status.
- Parameters:
base – FlexIO peripheral base address
mask – FLEXIO pin number mask
-
FSL_FLEXIO_DRIVER_VERSION#
FlexIO driver version.
-
enum _flexio_timer_trigger_polarity#
Define time of timer trigger polarity.
Values:
-
enumerator kFLEXIO_TimerTriggerPolarityActiveHigh#
Active high.
-
enumerator kFLEXIO_TimerTriggerPolarityActiveLow#
Active low.
-
enumerator kFLEXIO_TimerTriggerPolarityActiveHigh#
-
enum _flexio_timer_trigger_source#
Define type of timer trigger source.
Values:
-
enumerator kFLEXIO_TimerTriggerSourceExternal#
External trigger selected.
-
enumerator kFLEXIO_TimerTriggerSourceInternal#
Internal trigger selected.
-
enumerator kFLEXIO_TimerTriggerSourceExternal#
-
enum _flexio_pin_config#
Define type of timer/shifter pin configuration.
Values:
-
enumerator kFLEXIO_PinConfigOutputDisabled#
Pin output disabled.
-
enumerator kFLEXIO_PinConfigOpenDrainOrBidirection#
Pin open drain or bidirectional output enable.
-
enumerator kFLEXIO_PinConfigBidirectionOutputData#
Pin bidirectional output data.
-
enumerator kFLEXIO_PinConfigOutput#
Pin output.
-
enumerator kFLEXIO_PinConfigOutputDisabled#
-
enum _flexio_pin_polarity#
Definition of pin polarity.
Values:
-
enumerator kFLEXIO_PinActiveHigh#
Active high.
-
enumerator kFLEXIO_PinActiveLow#
Active low.
-
enumerator kFLEXIO_PinActiveHigh#
-
enum _flexio_timer_mode#
Define type of timer work mode.
Values:
-
enumerator kFLEXIO_TimerModeDisabled#
Timer Disabled.
-
enumerator kFLEXIO_TimerModeDual8BitBaudBit#
Dual 8-bit counters baud/bit mode.
-
enumerator kFLEXIO_TimerModeDual8BitPWM#
Dual 8-bit counters PWM mode.
-
enumerator kFLEXIO_TimerModeSingle16Bit#
Single 16-bit counter mode.
-
enumerator kFLEXIO_TimerModeDual8BitPWMLow#
Dual 8-bit counters PWM Low mode.
-
enumerator kFLEXIO_TimerModeDisabled#
-
enum _flexio_timer_output#
Define type of timer initial output or timer reset condition.
Values:
-
enumerator kFLEXIO_TimerOutputOneNotAffectedByReset#
Logic one when enabled and is not affected by timer reset.
-
enumerator kFLEXIO_TimerOutputZeroNotAffectedByReset#
Logic zero when enabled and is not affected by timer reset.
-
enumerator kFLEXIO_TimerOutputOneAffectedByReset#
Logic one when enabled and on timer reset.
-
enumerator kFLEXIO_TimerOutputZeroAffectedByReset#
Logic zero when enabled and on timer reset.
-
enumerator kFLEXIO_TimerOutputOneNotAffectedByReset#
-
enum _flexio_timer_decrement_source#
Define type of timer decrement.
Values:
-
enumerator kFLEXIO_TimerDecSrcOnFlexIOClockShiftTimerOutput#
Decrement counter on FlexIO clock, Shift clock equals Timer output.
-
enumerator kFLEXIO_TimerDecSrcOnTriggerInputShiftTimerOutput#
Decrement counter on Trigger input (both edges), Shift clock equals Timer output.
-
enumerator kFLEXIO_TimerDecSrcOnPinInputShiftPinInput#
Decrement counter on Pin input (both edges), Shift clock equals Pin input.
-
enumerator kFLEXIO_TimerDecSrcOnTriggerInputShiftTriggerInput#
Decrement counter on Trigger input (both edges), Shift clock equals Trigger input.
-
enumerator kFLEXIO_TimerDecSrcOnFlexIOClockShiftTimerOutput#
-
enum _flexio_timer_reset_condition#
Define type of timer reset condition.
Values:
-
enumerator kFLEXIO_TimerResetNever#
Timer never reset.
-
enumerator kFLEXIO_TimerResetOnTimerPinEqualToTimerOutput#
Timer reset on Timer Pin equal to Timer Output.
-
enumerator kFLEXIO_TimerResetOnTimerTriggerEqualToTimerOutput#
Timer reset on Timer Trigger equal to Timer Output.
-
enumerator kFLEXIO_TimerResetOnTimerPinRisingEdge#
Timer reset on Timer Pin rising edge.
-
enumerator kFLEXIO_TimerResetOnTimerTriggerRisingEdge#
Timer reset on Trigger rising edge.
-
enumerator kFLEXIO_TimerResetOnTimerTriggerBothEdge#
Timer reset on Trigger rising or falling edge.
-
enumerator kFLEXIO_TimerResetNever#
-
enum _flexio_timer_disable_condition#
Define type of timer disable condition.
Values:
-
enumerator kFLEXIO_TimerDisableNever#
Timer never disabled.
-
enumerator kFLEXIO_TimerDisableOnPreTimerDisable#
Timer disabled on Timer N-1 disable.
-
enumerator kFLEXIO_TimerDisableOnTimerCompare#
Timer disabled on Timer compare.
-
enumerator kFLEXIO_TimerDisableOnTimerCompareTriggerLow#
Timer disabled on Timer compare and Trigger Low.
-
enumerator kFLEXIO_TimerDisableOnPinBothEdge#
Timer disabled on Pin rising or falling edge.
-
enumerator kFLEXIO_TimerDisableOnPinBothEdgeTriggerHigh#
Timer disabled on Pin rising or falling edge provided Trigger is high.
-
enumerator kFLEXIO_TimerDisableOnTriggerFallingEdge#
Timer disabled on Trigger falling edge.
-
enumerator kFLEXIO_TimerDisableNever#
-
enum _flexio_timer_enable_condition#
Define type of timer enable condition.
Values:
-
enumerator kFLEXIO_TimerEnabledAlways#
Timer always enabled.
-
enumerator kFLEXIO_TimerEnableOnPrevTimerEnable#
Timer enabled on Timer N-1 enable.
-
enumerator kFLEXIO_TimerEnableOnTriggerHigh#
Timer enabled on Trigger high.
-
enumerator kFLEXIO_TimerEnableOnTriggerHighPinHigh#
Timer enabled on Trigger high and Pin high.
-
enumerator kFLEXIO_TimerEnableOnPinRisingEdge#
Timer enabled on Pin rising edge.
-
enumerator kFLEXIO_TimerEnableOnPinRisingEdgeTriggerHigh#
Timer enabled on Pin rising edge and Trigger high.
-
enumerator kFLEXIO_TimerEnableOnTriggerRisingEdge#
Timer enabled on Trigger rising edge.
-
enumerator kFLEXIO_TimerEnableOnTriggerBothEdge#
Timer enabled on Trigger rising or falling edge.
-
enumerator kFLEXIO_TimerEnabledAlways#
-
enum _flexio_timer_stop_bit_condition#
Define type of timer stop bit generate condition.
Values:
-
enumerator kFLEXIO_TimerStopBitDisabled#
Stop bit disabled.
-
enumerator kFLEXIO_TimerStopBitEnableOnTimerCompare#
Stop bit is enabled on timer compare.
-
enumerator kFLEXIO_TimerStopBitEnableOnTimerDisable#
Stop bit is enabled on timer disable.
-
enumerator kFLEXIO_TimerStopBitEnableOnTimerCompareDisable#
Stop bit is enabled on timer compare and timer disable.
-
enumerator kFLEXIO_TimerStopBitDisabled#
-
enum _flexio_timer_start_bit_condition#
Define type of timer start bit generate condition.
Values:
-
enumerator kFLEXIO_TimerStartBitDisabled#
Start bit disabled.
-
enumerator kFLEXIO_TimerStartBitEnabled#
Start bit enabled.
-
enumerator kFLEXIO_TimerStartBitDisabled#
-
enum _flexio_timer_output_state#
FlexIO as PWM channel output state.
Values:
-
enumerator kFLEXIO_PwmLow#
The output state of PWM channel is low
-
enumerator kFLEXIO_PwmHigh#
The output state of PWM channel is high
-
enumerator kFLEXIO_PwmLow#
-
enum _flexio_shifter_timer_polarity#
Define type of timer polarity for shifter control.
Values:
-
enumerator kFLEXIO_ShifterTimerPolarityOnPositive#
Shift on positive edge of shift clock.
-
enumerator kFLEXIO_ShifterTimerPolarityOnNegitive#
Shift on negative edge of shift clock.
-
enumerator kFLEXIO_ShifterTimerPolarityOnPositive#
-
enum _flexio_shifter_mode#
Define type of shifter working mode.
Values:
-
enumerator kFLEXIO_ShifterDisabled#
Shifter is disabled.
-
enumerator kFLEXIO_ShifterModeReceive#
Receive mode.
-
enumerator kFLEXIO_ShifterModeTransmit#
Transmit mode.
-
enumerator kFLEXIO_ShifterModeMatchStore#
Match store mode.
-
enumerator kFLEXIO_ShifterModeMatchContinuous#
Match continuous mode.
-
enumerator kFLEXIO_ShifterModeState#
SHIFTBUF contents are used for storing programmable state attributes.
-
enumerator kFLEXIO_ShifterModeLogic#
SHIFTBUF contents are used for implementing programmable logic look up table.
-
enumerator kFLEXIO_ShifterDisabled#
-
enum _flexio_shifter_input_source#
Define type of shifter input source.
Values:
-
enumerator kFLEXIO_ShifterInputFromPin#
Shifter input from pin.
-
enumerator kFLEXIO_ShifterInputFromNextShifterOutput#
Shifter input from Shifter N+1.
-
enumerator kFLEXIO_ShifterInputFromPin#
-
enum _flexio_shifter_stop_bit#
Define of STOP bit configuration.
Values:
-
enumerator kFLEXIO_ShifterStopBitDisable#
Disable shifter stop bit.
-
enumerator kFLEXIO_ShifterStopBitLow#
Set shifter stop bit to logic low level.
-
enumerator kFLEXIO_ShifterStopBitHigh#
Set shifter stop bit to logic high level.
-
enumerator kFLEXIO_ShifterStopBitDisable#
-
enum _flexio_shifter_start_bit#
Define type of START bit configuration.
Values:
-
enumerator kFLEXIO_ShifterStartBitDisabledLoadDataOnEnable#
Disable shifter start bit, transmitter loads data on enable.
-
enumerator kFLEXIO_ShifterStartBitDisabledLoadDataOnShift#
Disable shifter start bit, transmitter loads data on first shift.
-
enumerator kFLEXIO_ShifterStartBitLow#
Set shifter start bit to logic low level.
-
enumerator kFLEXIO_ShifterStartBitHigh#
Set shifter start bit to logic high level.
-
enumerator kFLEXIO_ShifterStartBitDisabledLoadDataOnEnable#
-
enum _flexio_shifter_buffer_type#
Define FlexIO shifter buffer type.
Values:
-
enumerator kFLEXIO_ShifterBuffer#
Shifter Buffer N Register.
-
enumerator kFLEXIO_ShifterBufferBitSwapped#
Shifter Buffer N Bit Byte Swapped Register.
-
enumerator kFLEXIO_ShifterBufferByteSwapped#
Shifter Buffer N Byte Swapped Register.
-
enumerator kFLEXIO_ShifterBufferBitByteSwapped#
Shifter Buffer N Bit Swapped Register.
-
enumerator kFLEXIO_ShifterBufferNibbleByteSwapped#
Shifter Buffer N Nibble Byte Swapped Register.
-
enumerator kFLEXIO_ShifterBufferHalfWordSwapped#
Shifter Buffer N Half Word Swapped Register.
-
enumerator kFLEXIO_ShifterBufferNibbleSwapped#
Shifter Buffer N Nibble Swapped Register.
-
enumerator kFLEXIO_ShifterBuffer#
-
enum _flexio_gpio_direction#
FLEXIO gpio direction definition.
Values:
-
enumerator kFLEXIO_DigitalInput#
Set current pin as digital input
-
enumerator kFLEXIO_DigitalOutput#
Set current pin as digital output
-
enumerator kFLEXIO_DigitalInput#
-
enum _flexio_pin_input_config#
FLEXIO gpio input config.
Values:
-
enumerator kFLEXIO_InputInterruptDisabled#
Interrupt request is disabled.
-
enumerator kFLEXIO_InputInterruptEnable#
Interrupt request is enable.
-
enumerator kFLEXIO_FlagRisingEdgeEnable#
Input pin flag on rising edge.
-
enumerator kFLEXIO_FlagFallingEdgeEnable#
Input pin flag on falling edge.
-
enumerator kFLEXIO_InputInterruptDisabled#
-
typedef enum _flexio_timer_trigger_polarity flexio_timer_trigger_polarity_t#
Define time of timer trigger polarity.
-
typedef enum _flexio_timer_trigger_source flexio_timer_trigger_source_t#
Define type of timer trigger source.
-
typedef enum _flexio_pin_config flexio_pin_config_t#
Define type of timer/shifter pin configuration.
-
typedef enum _flexio_pin_polarity flexio_pin_polarity_t#
Definition of pin polarity.
-
typedef enum _flexio_timer_mode flexio_timer_mode_t#
Define type of timer work mode.
-
typedef enum _flexio_timer_output flexio_timer_output_t#
Define type of timer initial output or timer reset condition.
-
typedef enum _flexio_timer_decrement_source flexio_timer_decrement_source_t#
Define type of timer decrement.
-
typedef enum _flexio_timer_reset_condition flexio_timer_reset_condition_t#
Define type of timer reset condition.
-
typedef enum _flexio_timer_disable_condition flexio_timer_disable_condition_t#
Define type of timer disable condition.
-
typedef enum _flexio_timer_enable_condition flexio_timer_enable_condition_t#
Define type of timer enable condition.
-
typedef enum _flexio_timer_stop_bit_condition flexio_timer_stop_bit_condition_t#
Define type of timer stop bit generate condition.
-
typedef enum _flexio_timer_start_bit_condition flexio_timer_start_bit_condition_t#
Define type of timer start bit generate condition.
-
typedef enum _flexio_timer_output_state flexio_timer_output_state_t#
FlexIO as PWM channel output state.
-
typedef enum _flexio_shifter_timer_polarity flexio_shifter_timer_polarity_t#
Define type of timer polarity for shifter control.
-
typedef enum _flexio_shifter_mode flexio_shifter_mode_t#
Define type of shifter working mode.
-
typedef enum _flexio_shifter_input_source flexio_shifter_input_source_t#
Define type of shifter input source.
-
typedef enum _flexio_shifter_stop_bit flexio_shifter_stop_bit_t#
Define of STOP bit configuration.
-
typedef enum _flexio_shifter_start_bit flexio_shifter_start_bit_t#
Define type of START bit configuration.
-
typedef enum _flexio_shifter_buffer_type flexio_shifter_buffer_type_t#
Define FlexIO shifter buffer type.
-
typedef struct _flexio_config_ flexio_config_t#
Define FlexIO user configuration structure.
-
typedef struct _flexio_timer_config flexio_timer_config_t#
Define FlexIO timer configuration structure.
-
typedef struct _flexio_shifter_config flexio_shifter_config_t#
Define FlexIO shifter configuration structure.
-
typedef enum _flexio_gpio_direction flexio_gpio_direction_t#
FLEXIO gpio direction definition.
-
typedef enum _flexio_pin_input_config flexio_pin_input_config_t#
FLEXIO gpio input config.
-
typedef struct _flexio_gpio_config flexio_gpio_config_t#
The FLEXIO pin configuration structure.
Each pin can only be configured as either an output pin or an input pin at a time. If configured as an input pin, use inputConfig param. If configured as an output pin, use outputLogic.
-
typedef void (*flexio_isr_t)(void *base, void *handle)#
typedef for FlexIO simulated driver interrupt handler.
-
FLEXIO_Type *const s_flexioBases[]#
Pointers to flexio bases for each instance.
-
const clock_ip_name_t s_flexioClocks[]#
Pointers to flexio clocks for each instance.
-
void FLEXIO_SetPinConfig(FLEXIO_Type *base, uint32_t pin, flexio_gpio_config_t *config)#
Configure a FLEXIO pin used by the board.
To Config the FLEXIO PIN, define a pin configuration, as either input or output, in the user file. Then, call the FLEXIO_SetPinConfig() function.
This is an example to define an input pin or an output pin configuration.
Define a digital input pin configuration, flexio_gpio_config_t config = { kFLEXIO_DigitalInput, 0U, kFLEXIO_FlagRisingEdgeEnable | kFLEXIO_InputInterruptEnable, } Define a digital output pin configuration, flexio_gpio_config_t config = { kFLEXIO_DigitalOutput, 0U, 0U }
- Parameters:
base – FlexIO peripheral base address
pin – FLEXIO pin number.
config – FLEXIO pin configuration pointer.
-
FLEXIO_TIMER_TRIGGER_SEL_PININPUT(x)#
Calculate FlexIO timer trigger.
-
FLEXIO_TIMER_TRIGGER_SEL_SHIFTnSTAT(x)#
-
FLEXIO_TIMER_TRIGGER_SEL_TIMn(x)#
-
struct _flexio_config_#
- #include <fsl_flexio.h>
Define FlexIO user configuration structure.
Public Members
-
bool enableFlexio#
Enable/disable FlexIO module
-
bool enableInDoze#
Enable/disable FlexIO operation in doze mode
-
bool enableInDebug#
Enable/disable FlexIO operation in debug mode
-
bool enableFastAccess#
Enable/disable fast access to FlexIO registers, fast access requires the FlexIO clock to be at least twice the frequency of the bus clock.
-
bool enableFlexio#
-
struct _flexio_timer_config#
- #include <fsl_flexio.h>
Define FlexIO timer configuration structure.
Public Members
-
uint32_t triggerSelect#
The internal trigger selection number using MACROs.
-
flexio_timer_trigger_polarity_t triggerPolarity#
Trigger Polarity.
-
flexio_timer_trigger_source_t triggerSource#
Trigger Source, internal (see ‘trgsel’) or external.
-
flexio_pin_config_t pinConfig#
Timer Pin Configuration.
-
uint32_t pinSelect#
Timer Pin number Select.
-
flexio_pin_polarity_t pinPolarity#
Timer Pin Polarity.
-
flexio_timer_mode_t timerMode#
Timer work Mode.
-
flexio_timer_output_t timerOutput#
Configures the initial state of the Timer Output and whether it is affected by the Timer reset.
-
flexio_timer_decrement_source_t timerDecrement#
Configures the source of the Timer decrement and the source of the Shift clock.
-
flexio_timer_reset_condition_t timerReset#
Configures the condition that causes the timer counter (and optionally the timer output) to be reset.
-
flexio_timer_disable_condition_t timerDisable#
Configures the condition that causes the Timer to be disabled and stop decrementing.
-
flexio_timer_enable_condition_t timerEnable#
Configures the condition that causes the Timer to be enabled and start decrementing.
-
flexio_timer_stop_bit_condition_t timerStop#
Timer STOP Bit generation.
-
flexio_timer_start_bit_condition_t timerStart#
Timer STRAT Bit generation.
-
uint32_t timerCompare#
Value for Timer Compare N Register.
-
uint32_t triggerSelect#
-
struct _flexio_shifter_config#
- #include <fsl_flexio.h>
Define FlexIO shifter configuration structure.
Public Members
-
uint32_t timerSelect#
Selects which Timer is used for controlling the logic/shift register and generating the Shift clock.
-
flexio_shifter_timer_polarity_t timerPolarity#
Timer Polarity.
-
flexio_pin_config_t pinConfig#
Shifter Pin Configuration.
-
uint32_t pinSelect#
Shifter Pin number Select.
-
flexio_pin_polarity_t pinPolarity#
Shifter Pin Polarity.
-
flexio_shifter_mode_t shifterMode#
Configures the mode of the Shifter.
-
uint32_t parallelWidth#
Configures the parallel width when using parallel mode.
-
flexio_shifter_input_source_t inputSource#
Selects the input source for the shifter.
-
flexio_shifter_stop_bit_t shifterStop#
Shifter STOP bit.
-
flexio_shifter_start_bit_t shifterStart#
Shifter START bit.
-
uint32_t timerSelect#
-
struct _flexio_gpio_config#
- #include <fsl_flexio.h>
The FLEXIO pin configuration structure.
Each pin can only be configured as either an output pin or an input pin at a time. If configured as an input pin, use inputConfig param. If configured as an output pin, use outputLogic.
Public Members
-
flexio_gpio_direction_t pinDirection#
FLEXIO pin direction, input or output
-
uint8_t outputLogic#
Set a default output logic, which has no use in input
-
uint8_t inputConfig#
Set an input config
-
flexio_gpio_direction_t pinDirection#
FlexIO eDMA I2S Driver#
-
void FLEXIO_I2S_TransferTxCreateHandleEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle)#
Initializes the FlexIO I2S eDMA handle.
This function initializes the FlexIO I2S master DMA handle which can be used for other FlexIO I2S master transactional APIs. Usually, for a specified FlexIO I2S instance, call this API once to get the initialized handle.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S eDMA handle pointer.
callback – FlexIO I2S eDMA callback function called while finished a block.
userData – User parameter for callback.
dmaHandle – eDMA handle for FlexIO I2S. This handle is a static value allocated by users.
-
void FLEXIO_I2S_TransferRxCreateHandleEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle)#
Initializes the FlexIO I2S Rx eDMA handle.
This function initializes the FlexIO I2S slave DMA handle which can be used for other FlexIO I2S master transactional APIs. Usually, for a specified FlexIO I2S instance, call this API once to get the initialized handle.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S eDMA handle pointer.
callback – FlexIO I2S eDMA callback function called while finished a block.
userData – User parameter for callback.
dmaHandle – eDMA handle for FlexIO I2S. This handle is a static value allocated by users.
-
void FLEXIO_I2S_TransferSetFormatEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_format_t *format, uint32_t srcClock_Hz)#
Configures the FlexIO I2S Tx audio format.
Audio format can be changed in run-time of FlexIO I2S. This function configures the sample rate and audio data format to be transferred. This function also sets the eDMA parameter according to format.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S eDMA handle pointer
format – Pointer to FlexIO I2S audio data format structure.
srcClock_Hz – FlexIO I2S clock source frequency in Hz, it should be 0 while in slave mode.
-
status_t FLEXIO_I2S_TransferSendEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_transfer_t *xfer)#
Performs a non-blocking FlexIO I2S transfer using DMA.
Note
This interface returned immediately after transfer initiates. Users should call FLEXIO_I2S_GetTransferStatus to poll the transfer status and check whether the FlexIO I2S transfer is finished.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S DMA handle pointer.
xfer – Pointer to DMA transfer structure.
- Return values:
kStatus_Success – Start a FlexIO I2S eDMA send successfully.
kStatus_InvalidArgument – The input arguments is invalid.
kStatus_TxBusy – FlexIO I2S is busy sending data.
-
status_t FLEXIO_I2S_TransferReceiveEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_transfer_t *xfer)#
Performs a non-blocking FlexIO I2S receive using eDMA.
Note
This interface returned immediately after transfer initiates. Users should call FLEXIO_I2S_GetReceiveRemainingBytes to poll the transfer status and check whether the FlexIO I2S transfer is finished.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S DMA handle pointer.
xfer – Pointer to DMA transfer structure.
- Return values:
kStatus_Success – Start a FlexIO I2S eDMA receive successfully.
kStatus_InvalidArgument – The input arguments is invalid.
kStatus_RxBusy – FlexIO I2S is busy receiving data.
-
void FLEXIO_I2S_TransferAbortSendEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle)#
Aborts a FlexIO I2S transfer using eDMA.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S DMA handle pointer.
-
void FLEXIO_I2S_TransferAbortReceiveEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle)#
Aborts a FlexIO I2S receive using eDMA.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S DMA handle pointer.
-
status_t FLEXIO_I2S_TransferGetSendCountEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, size_t *count)#
Gets the remaining bytes to be sent.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S DMA handle pointer.
count – Bytes sent.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
status_t FLEXIO_I2S_TransferGetReceiveCountEDMA(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, size_t *count)#
Get the remaining bytes to be received.
- Parameters:
base – FlexIO I2S peripheral base address.
handle – FlexIO I2S DMA handle pointer.
count – Bytes received.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
FSL_FLEXIO_I2S_EDMA_DRIVER_VERSION#
FlexIO I2S EDMA driver version 2.1.9.
-
typedef struct _flexio_i2s_edma_handle flexio_i2s_edma_handle_t#
-
typedef void (*flexio_i2s_edma_callback_t)(FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, status_t status, void *userData)#
FlexIO I2S eDMA transfer callback function for finish and error.
-
struct _flexio_i2s_edma_handle#
- #include <fsl_flexio_i2s_edma.h>
FlexIO I2S DMA transfer handle, users should not touch the content of the handle.
Public Members
-
edma_handle_t *dmaHandle#
DMA handler for FlexIO I2S send
-
uint8_t bytesPerFrame#
Bytes in a frame
-
uint8_t nbytes#
eDMA minor byte transfer count initially configured.
-
uint32_t state#
Internal state for FlexIO I2S eDMA transfer
-
flexio_i2s_edma_callback_t callback#
Callback for users while transfer finish or error occurred
-
void *userData#
User callback parameter
-
edma_tcd_t tcd[(4U) + 1U]#
TCD pool for eDMA transfer.
-
flexio_i2s_transfer_t queue[(4U)]#
Transfer queue storing queued transfer.
-
size_t transferSize[(4U)]#
Data bytes need to transfer
-
volatile uint8_t queueUser#
Index for user to queue transfer.
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
edma_handle_t *dmaHandle#
FlexIO eDMA SPI Driver#
-
status_t FLEXIO_SPI_MasterTransferCreateHandleEDMA(FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle, flexio_spi_master_edma_transfer_callback_t callback, void *userData, edma_handle_t *txHandle, edma_handle_t *rxHandle)#
Initializes the FlexIO SPI master eDMA handle.
This function initializes the FlexIO SPI master eDMA handle which can be used for other FlexIO SPI master transactional APIs. For a specified FlexIO SPI instance, call this API once to get the initialized handle.
- Parameters:
base – Pointer to FLEXIO_SPI_Type structure.
handle – Pointer to flexio_spi_master_edma_handle_t structure to store the transfer state.
callback – SPI callback, NULL means no callback.
userData – callback function parameter.
txHandle – User requested eDMA handle for FlexIO SPI RX eDMA transfer.
rxHandle – User requested eDMA handle for FlexIO SPI TX eDMA transfer.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_OutOfRange – The FlexIO SPI eDMA type/handle table out of range.
-
status_t FLEXIO_SPI_MasterTransferEDMA(FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle, flexio_spi_transfer_t *xfer)#
Performs a non-blocking FlexIO SPI transfer using eDMA.
Note
This interface returns immediately after transfer initiates. Call FLEXIO_SPI_MasterGetTransferCountEDMA to poll the transfer status and check whether the FlexIO SPI transfer is finished.
- Parameters:
base – Pointer to FLEXIO_SPI_Type structure.
handle – Pointer to flexio_spi_master_edma_handle_t structure to store the transfer state.
xfer – Pointer to FlexIO SPI transfer structure.
- Return values:
kStatus_Success – Successfully start a transfer.
kStatus_InvalidArgument – Input argument is invalid.
kStatus_FLEXIO_SPI_Busy – FlexIO SPI is not idle, is running another transfer.
-
void FLEXIO_SPI_MasterTransferAbortEDMA(FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle)#
Aborts a FlexIO SPI transfer using eDMA.
- Parameters:
base – Pointer to FLEXIO_SPI_Type structure.
handle – FlexIO SPI eDMA handle pointer.
-
status_t FLEXIO_SPI_MasterTransferGetCountEDMA(FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle, size_t *count)#
Gets the number of bytes transferred so far using FlexIO SPI master eDMA.
- Parameters:
base – Pointer to FLEXIO_SPI_Type structure.
handle – FlexIO SPI eDMA handle pointer.
count – Number of bytes transferred so far by the non-blocking transaction.
-
static inline void FLEXIO_SPI_SlaveTransferCreateHandleEDMA(FLEXIO_SPI_Type *base, flexio_spi_slave_edma_handle_t *handle, flexio_spi_slave_edma_transfer_callback_t callback, void *userData, edma_handle_t *txHandle, edma_handle_t *rxHandle)#
Initializes the FlexIO SPI slave eDMA handle.
This function initializes the FlexIO SPI slave eDMA handle.
- Parameters:
base – Pointer to FLEXIO_SPI_Type structure.
handle – Pointer to flexio_spi_slave_edma_handle_t structure to store the transfer state.
callback – SPI callback, NULL means no callback.
userData – callback function parameter.
txHandle – User requested eDMA handle for FlexIO SPI TX eDMA transfer.
rxHandle – User requested eDMA handle for FlexIO SPI RX eDMA transfer.
-
status_t FLEXIO_SPI_SlaveTransferEDMA(FLEXIO_SPI_Type *base, flexio_spi_slave_edma_handle_t *handle, flexio_spi_transfer_t *xfer)#
Performs a non-blocking FlexIO SPI transfer using eDMA.
Note
This interface returns immediately after transfer initiates. Call FLEXIO_SPI_SlaveGetTransferCountEDMA to poll the transfer status and check whether the FlexIO SPI transfer is finished.
- Parameters:
base – Pointer to FLEXIO_SPI_Type structure.
handle – Pointer to flexio_spi_slave_edma_handle_t structure to store the transfer state.
xfer – Pointer to FlexIO SPI transfer structure.
- Return values:
kStatus_Success – Successfully start a transfer.
kStatus_InvalidArgument – Input argument is invalid.
kStatus_FLEXIO_SPI_Busy – FlexIO SPI is not idle, is running another transfer.
-
static inline void FLEXIO_SPI_SlaveTransferAbortEDMA(FLEXIO_SPI_Type *base, flexio_spi_slave_edma_handle_t *handle)#
Aborts a FlexIO SPI transfer using eDMA.
- Parameters:
base – Pointer to FLEXIO_SPI_Type structure.
handle – Pointer to flexio_spi_slave_edma_handle_t structure to store the transfer state.
-
static inline status_t FLEXIO_SPI_SlaveTransferGetCountEDMA(FLEXIO_SPI_Type *base, flexio_spi_slave_edma_handle_t *handle, size_t *count)#
Gets the number of bytes transferred so far using FlexIO SPI slave eDMA.
- Parameters:
base – Pointer to FLEXIO_SPI_Type structure.
handle – FlexIO SPI eDMA handle pointer.
count – Number of bytes transferred so far by the non-blocking transaction.
-
FSL_FLEXIO_SPI_EDMA_DRIVER_VERSION#
FlexIO SPI EDMA driver version.
-
typedef struct _flexio_spi_master_edma_handle flexio_spi_master_edma_handle_t#
typedef for flexio_spi_master_edma_handle_t in advance.
-
typedef flexio_spi_master_edma_handle_t flexio_spi_slave_edma_handle_t#
Slave handle is the same with master handle.
-
typedef void (*flexio_spi_master_edma_transfer_callback_t)(FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle, status_t status, void *userData)#
FlexIO SPI master callback for finished transmit.
-
typedef void (*flexio_spi_slave_edma_transfer_callback_t)(FLEXIO_SPI_Type *base, flexio_spi_slave_edma_handle_t *handle, status_t status, void *userData)#
FlexIO SPI slave callback for finished transmit.
-
struct _flexio_spi_master_edma_handle#
- #include <fsl_flexio_spi_edma.h>
FlexIO SPI eDMA transfer handle, users should not touch the content of the handle.
Public Members
-
size_t transferSize#
Total bytes to be transferred.
-
uint8_t nbytes#
eDMA minor byte transfer count initially configured.
-
bool txInProgress#
Send transfer in progress
-
bool rxInProgress#
Receive transfer in progress
-
edma_handle_t *txHandle#
DMA handler for SPI send
-
edma_handle_t *rxHandle#
DMA handler for SPI receive
-
flexio_spi_master_edma_transfer_callback_t callback#
Callback for SPI DMA transfer
-
void *userData#
User Data for SPI DMA callback
-
size_t transferSize#
FlexIO eDMA UART Driver#
-
status_t FLEXIO_UART_TransferCreateHandleEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, flexio_uart_edma_transfer_callback_t callback, void *userData, edma_handle_t *txEdmaHandle, edma_handle_t *rxEdmaHandle)#
Initializes the UART handle which is used in transactional functions.
- Parameters:
base – Pointer to FLEXIO_UART_Type.
handle – Pointer to flexio_uart_edma_handle_t structure.
callback – The callback function.
userData – The parameter of the callback function.
rxEdmaHandle – User requested DMA handle for RX DMA transfer.
txEdmaHandle – User requested DMA handle for TX DMA transfer.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_OutOfRange – The FlexIO SPI eDMA type/handle table out of range.
-
status_t FLEXIO_UART_TransferSendEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, flexio_uart_transfer_t *xfer)#
Sends data using eDMA.
This function sends data using eDMA. This is a non-blocking function, which returns right away. When all data is sent out, the send callback function is called.
- Parameters:
base – Pointer to FLEXIO_UART_Type
handle – UART handle pointer.
xfer – UART eDMA transfer structure, see flexio_uart_transfer_t.
- Return values:
kStatus_Success – if succeed, others failed.
kStatus_FLEXIO_UART_TxBusy – Previous transfer on going.
-
status_t FLEXIO_UART_TransferReceiveEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, flexio_uart_transfer_t *xfer)#
Receives data using eDMA.
This function receives data using eDMA. This is a non-blocking function, which returns right away. When all data is received, the receive callback function is called.
- Parameters:
base – Pointer to FLEXIO_UART_Type
handle – Pointer to flexio_uart_edma_handle_t structure
xfer – UART eDMA transfer structure, see flexio_uart_transfer_t.
- Return values:
kStatus_Success – if succeed, others failed.
kStatus_UART_RxBusy – Previous transfer on going.
-
void FLEXIO_UART_TransferAbortSendEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle)#
Aborts the sent data which using eDMA.
This function aborts sent data which using eDMA.
- Parameters:
base – Pointer to FLEXIO_UART_Type
handle – Pointer to flexio_uart_edma_handle_t structure
-
void FLEXIO_UART_TransferAbortReceiveEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle)#
Aborts the receive data which using eDMA.
This function aborts the receive data which using eDMA.
- Parameters:
base – Pointer to FLEXIO_UART_Type
handle – Pointer to flexio_uart_edma_handle_t structure
-
status_t FLEXIO_UART_TransferGetSendCountEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, size_t *count)#
Gets the number of bytes sent out.
This function gets the number of bytes sent out.
- Parameters:
base – Pointer to FLEXIO_UART_Type
handle – Pointer to flexio_uart_edma_handle_t structure
count – Number of bytes sent so far by the non-blocking transaction.
- Return values:
kStatus_NoTransferInProgress – transfer has finished or no transfer in progress.
kStatus_Success – Successfully return the count.
-
status_t FLEXIO_UART_TransferGetReceiveCountEDMA(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, size_t *count)#
Gets the number of bytes received.
This function gets the number of bytes received.
- Parameters:
base – Pointer to FLEXIO_UART_Type
handle – Pointer to flexio_uart_edma_handle_t structure
count – Number of bytes received so far by the non-blocking transaction.
- Return values:
kStatus_NoTransferInProgress – transfer has finished or no transfer in progress.
kStatus_Success – Successfully return the count.
-
FSL_FLEXIO_UART_EDMA_DRIVER_VERSION#
FlexIO UART EDMA driver version.
-
typedef struct _flexio_uart_edma_handle flexio_uart_edma_handle_t#
-
typedef void (*flexio_uart_edma_transfer_callback_t)(FLEXIO_UART_Type *base, flexio_uart_edma_handle_t *handle, status_t status, void *userData)#
UART transfer callback function.
-
struct _flexio_uart_edma_handle#
- #include <fsl_flexio_uart_edma.h>
UART eDMA handle.
Public Members
-
flexio_uart_edma_transfer_callback_t callback#
Callback function.
-
void *userData#
UART callback function parameter.
-
size_t txDataSizeAll#
Total bytes to be sent.
-
size_t rxDataSizeAll#
Total bytes to be received.
-
edma_handle_t *txEdmaHandle#
The eDMA TX channel used.
-
edma_handle_t *rxEdmaHandle#
The eDMA RX channel used.
-
uint8_t nbytes#
eDMA minor byte transfer count initially configured.
-
volatile uint8_t txState#
TX transfer state.
-
volatile uint8_t rxState#
RX transfer state
-
flexio_uart_edma_transfer_callback_t callback#
FlexIO I2C Master Driver#
-
status_t FLEXIO_I2C_CheckForBusyBus(FLEXIO_I2C_Type *base)#
Make sure the bus isn’t already pulled down.
Check the FLEXIO pin status to see whether either of SDA and SCL pin is pulled down.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure..
- Return values:
kStatus_Success –
kStatus_FLEXIO_I2C_Busy –
-
status_t FLEXIO_I2C_MasterInit(FLEXIO_I2C_Type *base, flexio_i2c_master_config_t *masterConfig, uint32_t srcClock_Hz)#
Ungates the FlexIO clock, resets the FlexIO module, and configures the FlexIO I2C hardware configuration.
Example
FLEXIO_I2C_Type base = { .flexioBase = FLEXIO, .SDAPinIndex = 0, .SCLPinIndex = 1, .shifterIndex = {0,1}, .timerIndex = {0,1} }; flexio_i2c_master_config_t config = { .enableInDoze = false, .enableInDebug = true, .enableFastAccess = false, .baudRate_Bps = 100000 }; FLEXIO_I2C_MasterInit(base, &config, srcClock_Hz);
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
masterConfig – Pointer to flexio_i2c_master_config_t structure.
srcClock_Hz – FlexIO source clock in Hz.
- Return values:
kStatus_Success – Initialization successful
kStatus_InvalidArgument – The source clock exceed upper range limitation
-
void FLEXIO_I2C_MasterDeinit(FLEXIO_I2C_Type *base)#
De-initializes the FlexIO I2C master peripheral. Calling this API Resets the FlexIO I2C master shifer and timer config, module can’t work unless the FLEXIO_I2C_MasterInit is called.
- Parameters:
base – pointer to FLEXIO_I2C_Type structure.
-
void FLEXIO_I2C_MasterGetDefaultConfig(flexio_i2c_master_config_t *masterConfig)#
Gets the default configuration to configure the FlexIO module. The configuration can be used directly for calling the FLEXIO_I2C_MasterInit().
Example:
flexio_i2c_master_config_t config; FLEXIO_I2C_MasterGetDefaultConfig(&config);
- Parameters:
masterConfig – Pointer to flexio_i2c_master_config_t structure.
-
static inline void FLEXIO_I2C_MasterEnable(FLEXIO_I2C_Type *base, bool enable)#
Enables/disables the FlexIO module operation.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
enable – Pass true to enable module, false does not have any effect.
-
uint32_t FLEXIO_I2C_MasterGetStatusFlags(FLEXIO_I2C_Type *base)#
Gets the FlexIO I2C master status flags.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure
- Returns:
Status flag, use status flag to AND _flexio_i2c_master_status_flags can get the related status.
-
void FLEXIO_I2C_MasterClearStatusFlags(FLEXIO_I2C_Type *base, uint32_t mask)#
Clears the FlexIO I2C master status flags.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
mask – Status flag. The parameter can be any combination of the following values:
kFLEXIO_I2C_RxFullFlag
kFLEXIO_I2C_ReceiveNakFlag
-
void FLEXIO_I2C_MasterEnableInterrupts(FLEXIO_I2C_Type *base, uint32_t mask)#
Enables the FlexIO i2c master interrupt requests.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
mask – Interrupt source. Currently only one interrupt request source:
kFLEXIO_I2C_TransferCompleteInterruptEnable
-
void FLEXIO_I2C_MasterDisableInterrupts(FLEXIO_I2C_Type *base, uint32_t mask)#
Disables the FlexIO I2C master interrupt requests.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
mask – Interrupt source.
-
void FLEXIO_I2C_MasterSetBaudRate(FLEXIO_I2C_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz)#
Sets the FlexIO I2C master transfer baudrate.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure
baudRate_Bps – the baud rate value in HZ
srcClock_Hz – source clock in HZ
-
void FLEXIO_I2C_MasterStart(FLEXIO_I2C_Type *base, uint8_t address, flexio_i2c_direction_t direction)#
Sends START + 7-bit address to the bus.
Note
This API should be called when the transfer configuration is ready to send a START signal and 7-bit address to the bus. This is a non-blocking API, which returns directly after the address is put into the data register but the address transfer is not finished on the bus. Ensure that the kFLEXIO_I2C_RxFullFlag status is asserted before calling this API.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
address – 7-bit address.
direction – transfer direction. This parameter is one of the values in flexio_i2c_direction_t:
kFLEXIO_I2C_Write: Transmit
kFLEXIO_I2C_Read: Receive
-
void FLEXIO_I2C_MasterStop(FLEXIO_I2C_Type *base)#
Sends the stop signal on the bus.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
-
void FLEXIO_I2C_MasterRepeatedStart(FLEXIO_I2C_Type *base)#
Sends the repeated start signal on the bus.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
-
void FLEXIO_I2C_MasterAbortStop(FLEXIO_I2C_Type *base)#
Sends the stop signal when transfer is still on-going.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
-
void FLEXIO_I2C_MasterEnableAck(FLEXIO_I2C_Type *base, bool enable)#
Configures the sent ACK/NAK for the following byte.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
enable – True to configure send ACK, false configure to send NAK.
-
status_t FLEXIO_I2C_MasterSetTransferCount(FLEXIO_I2C_Type *base, uint16_t count)#
Sets the number of bytes to be transferred from a start signal to a stop signal.
Note
Call this API before a transfer begins because the timer generates a number of clocks according to the number of bytes that need to be transferred.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
count – Number of bytes need to be transferred from a start signal to a re-start/stop signal
- Return values:
kStatus_Success – Successfully configured the count.
kStatus_InvalidArgument – Input argument is invalid.
-
static inline void FLEXIO_I2C_MasterWriteByte(FLEXIO_I2C_Type *base, uint32_t data)#
Writes one byte of data to the I2C bus.
Note
This is a non-blocking API, which returns directly after the data is put into the data register but the data transfer is not finished on the bus. Ensure that the TxEmptyFlag is asserted before calling this API.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
data – a byte of data.
-
static inline uint8_t FLEXIO_I2C_MasterReadByte(FLEXIO_I2C_Type *base)#
Reads one byte of data from the I2C bus.
Note
This is a non-blocking API, which returns directly after the data is read from the data register. Ensure that the data is ready in the register.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
- Returns:
data byte read.
-
status_t FLEXIO_I2C_MasterWriteBlocking(FLEXIO_I2C_Type *base, const uint8_t *txBuff, uint8_t txSize)#
Sends a buffer of data in bytes.
Note
This function blocks via polling until all bytes have been sent.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
txBuff – The data bytes to send.
txSize – The number of data bytes to send.
- Return values:
kStatus_Success – Successfully write data.
kStatus_FLEXIO_I2C_Nak – Receive NAK during writing data.
kStatus_FLEXIO_I2C_Timeout – Timeout polling status flags.
-
status_t FLEXIO_I2C_MasterReadBlocking(FLEXIO_I2C_Type *base, uint8_t *rxBuff, uint8_t rxSize)#
Receives a buffer of bytes.
Note
This function blocks via polling until all bytes have been received.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
rxBuff – The buffer to store the received bytes.
rxSize – The number of data bytes to be received.
- Return values:
kStatus_Success – Successfully read data.
kStatus_FLEXIO_I2C_Timeout – Timeout polling status flags.
-
status_t FLEXIO_I2C_MasterTransferBlocking(FLEXIO_I2C_Type *base, flexio_i2c_master_transfer_t *xfer)#
Performs a master polling transfer on the I2C bus.
Note
The API does not return until the transfer succeeds or fails due to receiving NAK.
- Parameters:
base – pointer to FLEXIO_I2C_Type structure.
xfer – pointer to flexio_i2c_master_transfer_t structure.
- Returns:
status of status_t.
-
status_t FLEXIO_I2C_MasterTransferCreateHandle(FLEXIO_I2C_Type *base, flexio_i2c_master_handle_t *handle, flexio_i2c_master_transfer_callback_t callback, void *userData)#
Initializes the I2C handle which is used in transactional functions.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
handle – Pointer to flexio_i2c_master_handle_t structure to store the transfer state.
callback – Pointer to user callback function.
userData – User param passed to the callback function.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_OutOfRange – The FlexIO type/handle/isr table out of range.
-
status_t FLEXIO_I2C_MasterTransferNonBlocking(FLEXIO_I2C_Type *base, flexio_i2c_master_handle_t *handle, flexio_i2c_master_transfer_t *xfer)#
Performs a master interrupt non-blocking transfer on the I2C bus.
Note
The API returns immediately after the transfer initiates. Call FLEXIO_I2C_MasterTransferGetCount to poll the transfer status to check whether the transfer is finished. If the return status is not kStatus_FLEXIO_I2C_Busy, the transfer is finished.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure
handle – Pointer to flexio_i2c_master_handle_t structure which stores the transfer state
xfer – pointer to flexio_i2c_master_transfer_t structure
- Return values:
kStatus_Success – Successfully start a transfer.
kStatus_FLEXIO_I2C_Busy – FlexIO I2C is not idle, is running another transfer.
-
status_t FLEXIO_I2C_MasterTransferGetCount(FLEXIO_I2C_Type *base, flexio_i2c_master_handle_t *handle, size_t *count)#
Gets the master transfer status during a interrupt non-blocking transfer.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure.
handle – Pointer to flexio_i2c_master_handle_t structure which stores the transfer state.
count – Number of bytes transferred so far by the non-blocking transaction.
- Return values:
kStatus_InvalidArgument – count is Invalid.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
kStatus_Success – Successfully return the count.
-
void FLEXIO_I2C_MasterTransferAbort(FLEXIO_I2C_Type *base, flexio_i2c_master_handle_t *handle)#
Aborts an interrupt non-blocking transfer early.
Note
This API can be called at any time when an interrupt non-blocking transfer initiates to abort the transfer early.
- Parameters:
base – Pointer to FLEXIO_I2C_Type structure
handle – Pointer to flexio_i2c_master_handle_t structure which stores the transfer state
-
void FLEXIO_I2C_MasterTransferHandleIRQ(void *i2cType, void *i2cHandle)#
Master interrupt handler.
- Parameters:
i2cType – Pointer to FLEXIO_I2C_Type structure
i2cHandle – Pointer to flexio_i2c_master_transfer_t structure
-
FSL_FLEXIO_I2C_MASTER_DRIVER_VERSION#
FlexIO I2C transfer status.
Values:
-
enumerator kStatus_FLEXIO_I2C_Busy#
I2C is busy doing transfer.
-
enumerator kStatus_FLEXIO_I2C_Idle#
I2C is busy doing transfer.
-
enumerator kStatus_FLEXIO_I2C_Nak#
NAK received during transfer.
-
enumerator kStatus_FLEXIO_I2C_Timeout#
Timeout polling status flags.
-
enumerator kStatus_FLEXIO_I2C_Busy#
-
enum _flexio_i2c_master_interrupt#
Define FlexIO I2C master interrupt mask.
Values:
-
enumerator kFLEXIO_I2C_TxEmptyInterruptEnable#
Tx buffer empty interrupt enable.
-
enumerator kFLEXIO_I2C_RxFullInterruptEnable#
Rx buffer full interrupt enable.
-
enumerator kFLEXIO_I2C_TxEmptyInterruptEnable#
-
enum _flexio_i2c_master_status_flags#
Define FlexIO I2C master status mask.
Values:
-
enumerator kFLEXIO_I2C_TxEmptyFlag#
Tx shifter empty flag.
-
enumerator kFLEXIO_I2C_RxFullFlag#
Rx shifter full/Transfer complete flag.
-
enumerator kFLEXIO_I2C_ReceiveNakFlag#
Receive NAK flag.
-
enumerator kFLEXIO_I2C_TxEmptyFlag#
-
enum _flexio_i2c_direction#
Direction of master transfer.
Values:
-
enumerator kFLEXIO_I2C_Write#
Master send to slave.
-
enumerator kFLEXIO_I2C_Read#
Master receive from slave.
-
enumerator kFLEXIO_I2C_Write#
-
typedef enum _flexio_i2c_direction flexio_i2c_direction_t#
Direction of master transfer.
-
typedef struct _flexio_i2c_type FLEXIO_I2C_Type#
Define FlexIO I2C master access structure typedef.
-
typedef struct _flexio_i2c_master_config flexio_i2c_master_config_t#
Define FlexIO I2C master user configuration structure.
-
typedef struct _flexio_i2c_master_transfer flexio_i2c_master_transfer_t#
Define FlexIO I2C master transfer structure.
-
typedef struct _flexio_i2c_master_handle flexio_i2c_master_handle_t#
FlexIO I2C master handle typedef.
-
typedef void (*flexio_i2c_master_transfer_callback_t)(FLEXIO_I2C_Type *base, flexio_i2c_master_handle_t *handle, status_t status, void *userData)#
FlexIO I2C master transfer callback typedef.
-
I2C_RETRY_TIMES#
Retry times for waiting flag.
-
struct _flexio_i2c_type#
- #include <fsl_flexio_i2c_master.h>
Define FlexIO I2C master access structure typedef.
Public Members
-
FLEXIO_Type *flexioBase#
FlexIO base pointer.
-
uint8_t SDAPinIndex#
Pin select for I2C SDA.
-
uint8_t SCLPinIndex#
Pin select for I2C SCL.
-
uint8_t shifterIndex[2]#
Shifter index used in FlexIO I2C.
-
uint8_t timerIndex[3]#
Timer index used in FlexIO I2C.
-
uint32_t baudrate#
Master transfer baudrate, used to calculate delay time.
-
FLEXIO_Type *flexioBase#
-
struct _flexio_i2c_master_config#
- #include <fsl_flexio_i2c_master.h>
Define FlexIO I2C master user configuration structure.
Public Members
-
bool enableMaster#
Enables the FlexIO I2C peripheral at initialization time.
-
bool enableInDoze#
Enable/disable FlexIO operation in doze mode.
-
bool enableInDebug#
Enable/disable FlexIO operation in debug mode.
-
bool enableFastAccess#
Enable/disable fast access to FlexIO registers, fast access requires the FlexIO clock to be at least twice the frequency of the bus clock.
-
uint32_t baudRate_Bps#
Baud rate in Bps.
-
bool enableMaster#
-
struct _flexio_i2c_master_transfer#
- #include <fsl_flexio_i2c_master.h>
Define FlexIO I2C master transfer structure.
Public Members
-
uint32_t flags#
Transfer flag which controls the transfer, reserved for FlexIO I2C.
-
uint8_t slaveAddress#
7-bit slave address.
-
flexio_i2c_direction_t direction#
Transfer direction, read or write.
-
uint32_t subaddress#
Sub address. Transferred MSB first.
-
uint8_t subaddressSize#
Size of sub address.
-
uint8_t volatile *data#
Transfer buffer.
-
volatile size_t dataSize#
Transfer size.
-
uint32_t flags#
-
struct _flexio_i2c_master_handle#
- #include <fsl_flexio_i2c_master.h>
Define FlexIO I2C master handle structure.
Public Members
-
flexio_i2c_master_transfer_t transfer#
FlexIO I2C master transfer copy.
-
size_t transferSize#
Total bytes to be transferred.
-
uint8_t state#
Transfer state maintained during transfer.
-
flexio_i2c_master_transfer_callback_t completionCallback#
Callback function called at transfer event. Callback function called at transfer event.
-
void *userData#
Callback parameter passed to callback function.
-
bool needRestart#
Whether master needs to send re-start signal.
-
flexio_i2c_master_transfer_t transfer#
FlexIO I2S Driver#
-
void FLEXIO_I2S_Init(FLEXIO_I2S_Type *base, const flexio_i2s_config_t *config)#
Initializes the FlexIO I2S.
This API configures FlexIO pins and shifter to I2S and configures the FlexIO I2S with a configuration structure. The configuration structure can be filled by the user, or be set with default values by FLEXIO_I2S_GetDefaultConfig().
Note
This API should be called at the beginning of the application to use the FlexIO I2S driver. Otherwise, any access to the FlexIO I2S module can cause hard fault because the clock is not enabled.
- Parameters:
base – FlexIO I2S base pointer
config – FlexIO I2S configure structure.
-
void FLEXIO_I2S_GetDefaultConfig(flexio_i2s_config_t *config)#
Sets the FlexIO I2S configuration structure to default values.
The purpose of this API is to get the configuration structure initialized for use in FLEXIO_I2S_Init(). Users may use the initialized structure unchanged in FLEXIO_I2S_Init() or modify some fields of the structure before calling FLEXIO_I2S_Init().
- Parameters:
config – pointer to master configuration structure
-
void FLEXIO_I2S_Deinit(FLEXIO_I2S_Type *base)#
De-initializes the FlexIO I2S.
Calling this API resets the FlexIO I2S shifter and timer config. After calling this API, call the FLEXO_I2S_Init to use the FlexIO I2S module.
- Parameters:
base – FlexIO I2S base pointer
-
static inline void FLEXIO_I2S_Enable(FLEXIO_I2S_Type *base, bool enable)#
Enables/disables the FlexIO I2S module operation.
- Parameters:
base – Pointer to FLEXIO_I2S_Type
enable – True to enable, false dose not have any effect.
-
uint32_t FLEXIO_I2S_GetStatusFlags(FLEXIO_I2S_Type *base)#
Gets the FlexIO I2S status flags.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure
- Returns:
Status flag, which are ORed by the enumerators in the _flexio_i2s_status_flags.
-
void FLEXIO_I2S_EnableInterrupts(FLEXIO_I2S_Type *base, uint32_t mask)#
Enables the FlexIO I2S interrupt.
This function enables the FlexIO UART interrupt.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure
mask – interrupt source
-
void FLEXIO_I2S_DisableInterrupts(FLEXIO_I2S_Type *base, uint32_t mask)#
Disables the FlexIO I2S interrupt.
This function enables the FlexIO UART interrupt.
- Parameters:
base – pointer to FLEXIO_I2S_Type structure
mask – interrupt source
-
static inline void FLEXIO_I2S_TxEnableDMA(FLEXIO_I2S_Type *base, bool enable)#
Enables/disables the FlexIO I2S Tx DMA requests.
- Parameters:
base – FlexIO I2S base pointer
enable – True means enable DMA, false means disable DMA.
-
static inline void FLEXIO_I2S_RxEnableDMA(FLEXIO_I2S_Type *base, bool enable)#
Enables/disables the FlexIO I2S Rx DMA requests.
- Parameters:
base – FlexIO I2S base pointer
enable – True means enable DMA, false means disable DMA.
-
static inline uint32_t FLEXIO_I2S_TxGetDataRegisterAddress(FLEXIO_I2S_Type *base)#
Gets the FlexIO I2S send data register address.
This function returns the I2S data register address, mainly used by DMA/eDMA.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure
- Returns:
FlexIO i2s send data register address.
-
static inline uint32_t FLEXIO_I2S_RxGetDataRegisterAddress(FLEXIO_I2S_Type *base)#
Gets the FlexIO I2S receive data register address.
This function returns the I2S data register address, mainly used by DMA/eDMA.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure
- Returns:
FlexIO i2s receive data register address.
-
void FLEXIO_I2S_MasterSetFormat(FLEXIO_I2S_Type *base, flexio_i2s_format_t *format, uint32_t srcClock_Hz)#
Configures the FlexIO I2S audio format in master mode.
Audio format can be changed in run-time of FlexIO I2S. This function configures the sample rate and audio data format to be transferred.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure
format – Pointer to FlexIO I2S audio data format structure.
srcClock_Hz – I2S master clock source frequency in Hz.
-
void FLEXIO_I2S_SlaveSetFormat(FLEXIO_I2S_Type *base, flexio_i2s_format_t *format)#
Configures the FlexIO I2S audio format in slave mode.
Audio format can be changed in run-time of FlexIO I2S. This function configures the sample rate and audio data format to be transferred.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure
format – Pointer to FlexIO I2S audio data format structure.
-
status_t FLEXIO_I2S_WriteBlocking(FLEXIO_I2S_Type *base, uint8_t bitWidth, uint8_t *txData, size_t size)#
Sends data using a blocking method.
Note
This function blocks via polling until data is ready to be sent.
- Parameters:
base – FlexIO I2S base pointer.
bitWidth – How many bits in a audio word, usually 8/16/24/32 bits.
txData – Pointer to the data to be written.
size – Bytes to be written.
- Return values:
kStatus_Success – Successfully write data.
kStatus_FLEXIO_I2C_Timeout – Timeout polling status flags.
-
static inline void FLEXIO_I2S_WriteData(FLEXIO_I2S_Type *base, uint8_t bitWidth, uint32_t data)#
Writes data into a data register.
- Parameters:
base – FlexIO I2S base pointer.
bitWidth – How many bits in a audio word, usually 8/16/24/32 bits.
data – Data to be written.
-
status_t FLEXIO_I2S_ReadBlocking(FLEXIO_I2S_Type *base, uint8_t bitWidth, uint8_t *rxData, size_t size)#
Receives a piece of data using a blocking method.
Note
This function blocks via polling until data is ready to be sent.
- Parameters:
base – FlexIO I2S base pointer
bitWidth – How many bits in a audio word, usually 8/16/24/32 bits.
rxData – Pointer to the data to be read.
size – Bytes to be read.
- Return values:
kStatus_Success – Successfully read data.
kStatus_FLEXIO_I2C_Timeout – Timeout polling status flags.
-
static inline uint32_t FLEXIO_I2S_ReadData(FLEXIO_I2S_Type *base)#
Reads a data from the data register.
- Parameters:
base – FlexIO I2S base pointer
- Returns:
Data read from data register.
-
void FLEXIO_I2S_TransferTxCreateHandle(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle, flexio_i2s_callback_t callback, void *userData)#
Initializes the FlexIO I2S handle.
This function initializes the FlexIO I2S handle which can be used for other FlexIO I2S transactional APIs. Call this API once to get the initialized handle.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure
handle – Pointer to flexio_i2s_handle_t structure to store the transfer state.
callback – FlexIO I2S callback function, which is called while finished a block.
userData – User parameter for the FlexIO I2S callback.
-
void FLEXIO_I2S_TransferSetFormat(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle, flexio_i2s_format_t *format, uint32_t srcClock_Hz)#
Configures the FlexIO I2S audio format.
Audio format can be changed at run-time of FlexIO I2S. This function configures the sample rate and audio data format to be transferred.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure.
handle – FlexIO I2S handle pointer.
format – Pointer to audio data format structure.
srcClock_Hz – FlexIO I2S bit clock source frequency in Hz. This parameter should be 0 while in slave mode.
-
void FLEXIO_I2S_TransferRxCreateHandle(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle, flexio_i2s_callback_t callback, void *userData)#
Initializes the FlexIO I2S receive handle.
This function initializes the FlexIO I2S handle which can be used for other FlexIO I2S transactional APIs. Call this API once to get the initialized handle.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure.
handle – Pointer to flexio_i2s_handle_t structure to store the transfer state.
callback – FlexIO I2S callback function, which is called while finished a block.
userData – User parameter for the FlexIO I2S callback.
-
status_t FLEXIO_I2S_TransferSendNonBlocking(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle, flexio_i2s_transfer_t *xfer)#
Performs an interrupt non-blocking send transfer on FlexIO I2S.
Note
The API returns immediately after transfer initiates. Call FLEXIO_I2S_GetRemainingBytes to poll the transfer status and check whether the transfer is finished. If the return status is 0, the transfer is finished.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure.
handle – Pointer to flexio_i2s_handle_t structure which stores the transfer state
xfer – Pointer to flexio_i2s_transfer_t structure
- Return values:
kStatus_Success – Successfully start the data transmission.
kStatus_FLEXIO_I2S_TxBusy – Previous transmission still not finished, data not all written to TX register yet.
kStatus_InvalidArgument – The input parameter is invalid.
-
status_t FLEXIO_I2S_TransferReceiveNonBlocking(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle, flexio_i2s_transfer_t *xfer)#
Performs an interrupt non-blocking receive transfer on FlexIO I2S.
Note
The API returns immediately after transfer initiates. Call FLEXIO_I2S_GetRemainingBytes to poll the transfer status to check whether the transfer is finished. If the return status is 0, the transfer is finished.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure.
handle – Pointer to flexio_i2s_handle_t structure which stores the transfer state
xfer – Pointer to flexio_i2s_transfer_t structure
- Return values:
kStatus_Success – Successfully start the data receive.
kStatus_FLEXIO_I2S_RxBusy – Previous receive still not finished.
kStatus_InvalidArgument – The input parameter is invalid.
-
void FLEXIO_I2S_TransferAbortSend(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle)#
Aborts the current send.
Note
This API can be called at any time when interrupt non-blocking transfer initiates to abort the transfer in a early time.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure.
handle – Pointer to flexio_i2s_handle_t structure which stores the transfer state
-
void FLEXIO_I2S_TransferAbortReceive(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle)#
Aborts the current receive.
Note
This API can be called at any time when interrupt non-blocking transfer initiates to abort the transfer in a early time.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure.
handle – Pointer to flexio_i2s_handle_t structure which stores the transfer state
-
status_t FLEXIO_I2S_TransferGetSendCount(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle, size_t *count)#
Gets the remaining bytes to be sent.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure.
handle – Pointer to flexio_i2s_handle_t structure which stores the transfer state
count – Bytes sent.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
status_t FLEXIO_I2S_TransferGetReceiveCount(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle, size_t *count)#
Gets the remaining bytes to be received.
- Parameters:
base – Pointer to FLEXIO_I2S_Type structure.
handle – Pointer to flexio_i2s_handle_t structure which stores the transfer state
count – Bytes recieved.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
- Returns:
count Bytes received.
-
void FLEXIO_I2S_TransferTxHandleIRQ(void *i2sBase, void *i2sHandle)#
Tx interrupt handler.
- Parameters:
i2sBase – Pointer to FLEXIO_I2S_Type structure.
i2sHandle – Pointer to flexio_i2s_handle_t structure
-
void FLEXIO_I2S_TransferRxHandleIRQ(void *i2sBase, void *i2sHandle)#
Rx interrupt handler.
- Parameters:
i2sBase – Pointer to FLEXIO_I2S_Type structure.
i2sHandle – Pointer to flexio_i2s_handle_t structure.
-
FSL_FLEXIO_I2S_DRIVER_VERSION#
FlexIO I2S driver version 2.2.3.
FlexIO I2S transfer status.
Values:
-
enumerator kStatus_FLEXIO_I2S_Idle#
FlexIO I2S is in idle state
-
enumerator kStatus_FLEXIO_I2S_TxBusy#
FlexIO I2S Tx is busy
-
enumerator kStatus_FLEXIO_I2S_RxBusy#
FlexIO I2S Tx is busy
-
enumerator kStatus_FLEXIO_I2S_Error#
FlexIO I2S error occurred
-
enumerator kStatus_FLEXIO_I2S_QueueFull#
FlexIO I2S transfer queue is full.
-
enumerator kStatus_FLEXIO_I2S_Timeout#
FlexIO I2S timeout polling status flags.
-
enumerator kStatus_FLEXIO_I2S_Idle#
-
enum _flexio_i2s_master_slave#
Master or slave mode.
Values:
-
enumerator kFLEXIO_I2S_Master#
Master mode
-
enumerator kFLEXIO_I2S_Slave#
Slave mode
-
enumerator kFLEXIO_I2S_Master#
_flexio_i2s_interrupt_enable Define FlexIO FlexIO I2S interrupt mask.
Values:
-
enumerator kFLEXIO_I2S_TxDataRegEmptyInterruptEnable#
Transmit buffer empty interrupt enable.
-
enumerator kFLEXIO_I2S_RxDataRegFullInterruptEnable#
Receive buffer full interrupt enable.
-
enumerator kFLEXIO_I2S_TxDataRegEmptyInterruptEnable#
_flexio_i2s_status_flags Define FlexIO FlexIO I2S status mask.
Values:
-
enumerator kFLEXIO_I2S_TxDataRegEmptyFlag#
Transmit buffer empty flag.
-
enumerator kFLEXIO_I2S_RxDataRegFullFlag#
Receive buffer full flag.
-
enumerator kFLEXIO_I2S_TxDataRegEmptyFlag#
-
enum _flexio_i2s_sample_rate#
Audio sample rate.
Values:
-
enumerator kFLEXIO_I2S_SampleRate8KHz#
Sample rate 8000Hz
-
enumerator kFLEXIO_I2S_SampleRate11025Hz#
Sample rate 11025Hz
-
enumerator kFLEXIO_I2S_SampleRate12KHz#
Sample rate 12000Hz
-
enumerator kFLEXIO_I2S_SampleRate16KHz#
Sample rate 16000Hz
-
enumerator kFLEXIO_I2S_SampleRate22050Hz#
Sample rate 22050Hz
-
enumerator kFLEXIO_I2S_SampleRate24KHz#
Sample rate 24000Hz
-
enumerator kFLEXIO_I2S_SampleRate32KHz#
Sample rate 32000Hz
-
enumerator kFLEXIO_I2S_SampleRate44100Hz#
Sample rate 44100Hz
-
enumerator kFLEXIO_I2S_SampleRate48KHz#
Sample rate 48000Hz
-
enumerator kFLEXIO_I2S_SampleRate96KHz#
Sample rate 96000Hz
-
enumerator kFLEXIO_I2S_SampleRate8KHz#
-
enum _flexio_i2s_word_width#
Audio word width.
Values:
-
enumerator kFLEXIO_I2S_WordWidth8bits#
Audio data width 8 bits
-
enumerator kFLEXIO_I2S_WordWidth16bits#
Audio data width 16 bits
-
enumerator kFLEXIO_I2S_WordWidth24bits#
Audio data width 24 bits
-
enumerator kFLEXIO_I2S_WordWidth32bits#
Audio data width 32 bits
-
enumerator kFLEXIO_I2S_WordWidth8bits#
-
typedef struct _flexio_i2s_type FLEXIO_I2S_Type#
Define FlexIO I2S access structure typedef.
-
typedef enum _flexio_i2s_master_slave flexio_i2s_master_slave_t#
Master or slave mode.
-
typedef struct _flexio_i2s_config flexio_i2s_config_t#
FlexIO I2S configure structure.
-
typedef struct _flexio_i2s_format flexio_i2s_format_t#
FlexIO I2S audio format, FlexIO I2S only support the same format in Tx and Rx.
-
typedef enum _flexio_i2s_sample_rate flexio_i2s_sample_rate_t#
Audio sample rate.
-
typedef enum _flexio_i2s_word_width flexio_i2s_word_width_t#
Audio word width.
-
typedef struct _flexio_i2s_transfer flexio_i2s_transfer_t#
Define FlexIO I2S transfer structure.
-
typedef struct _flexio_i2s_handle flexio_i2s_handle_t#
-
typedef void (*flexio_i2s_callback_t)(FLEXIO_I2S_Type *base, flexio_i2s_handle_t *handle, status_t status, void *userData)#
FlexIO I2S xfer callback prototype.
-
I2S_RETRY_TIMES#
Retry times for waiting flag.
-
FLEXIO_I2S_XFER_QUEUE_SIZE#
FlexIO I2S transfer queue size, user can refine it according to use case.
-
struct _flexio_i2s_type#
- #include <fsl_flexio_i2s.h>
Define FlexIO I2S access structure typedef.
Public Members
-
FLEXIO_Type *flexioBase#
FlexIO base pointer
-
uint8_t txPinIndex#
Tx data pin index in FlexIO pins
-
uint8_t rxPinIndex#
Rx data pin index
-
uint8_t bclkPinIndex#
Bit clock pin index
-
uint8_t fsPinIndex#
Frame sync pin index
-
uint8_t txShifterIndex#
Tx data shifter index
-
uint8_t rxShifterIndex#
Rx data shifter index
-
uint8_t bclkTimerIndex#
Bit clock timer index
-
uint8_t fsTimerIndex#
Frame sync timer index
-
FLEXIO_Type *flexioBase#
-
struct _flexio_i2s_config#
- #include <fsl_flexio_i2s.h>
FlexIO I2S configure structure.
Public Members
-
bool enableI2S#
Enable FlexIO I2S
-
flexio_i2s_master_slave_t masterSlave#
Master or slave
-
flexio_pin_polarity_t txPinPolarity#
Tx data pin polarity, active high or low
-
flexio_pin_polarity_t rxPinPolarity#
Rx data pin polarity
-
flexio_pin_polarity_t bclkPinPolarity#
Bit clock pin polarity
-
flexio_pin_polarity_t fsPinPolarity#
Frame sync pin polarity
-
flexio_shifter_timer_polarity_t txTimerPolarity#
Tx data valid on bclk rising or falling edge
-
flexio_shifter_timer_polarity_t rxTimerPolarity#
Rx data valid on bclk rising or falling edge
-
bool enableI2S#
-
struct _flexio_i2s_format#
- #include <fsl_flexio_i2s.h>
FlexIO I2S audio format, FlexIO I2S only support the same format in Tx and Rx.
-
struct _flexio_i2s_transfer#
- #include <fsl_flexio_i2s.h>
Define FlexIO I2S transfer structure.
-
struct _flexio_i2s_handle#
- #include <fsl_flexio_i2s.h>
Define FlexIO I2S handle structure.
Public Members
-
uint32_t state#
Internal state
-
flexio_i2s_callback_t callback#
Callback function called at transfer event
-
void *userData#
Callback parameter passed to callback function
-
uint8_t bitWidth#
Bit width for transfer, 8/16/24/32bits
-
flexio_i2s_transfer_t queue[(4U)]#
Transfer queue storing queued transfer
-
size_t transferSize[(4U)]#
Data bytes need to transfer
-
volatile uint8_t queueUser#
Index for user to queue transfer
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
uint32_t state#
FlexIO SPI Driver#
-
void FLEXIO_SPI_MasterInit(FLEXIO_SPI_Type *base, flexio_spi_master_config_t *masterConfig, uint32_t srcClock_Hz)#
Ungates the FlexIO clock, resets the FlexIO module, configures the FlexIO SPI master hardware, and configures the FlexIO SPI with FlexIO SPI master configuration. The configuration structure can be filled by the user, or be set with default values by the FLEXIO_SPI_MasterGetDefaultConfig().
Example
FLEXIO_SPI_Type spiDev = { .flexioBase = FLEXIO, .SDOPinIndex = 0, .SDIPinIndex = 1, .SCKPinIndex = 2, .CSnPinIndex = 3, .shifterIndex = {0,1}, .timerIndex = {0,1} }; flexio_spi_master_config_t config = { .enableMaster = true, .enableInDoze = false, .enableInDebug = true, .enableFastAccess = false, .baudRate_Bps = 500000, .phase = kFLEXIO_SPI_ClockPhaseFirstEdge, .direction = kFLEXIO_SPI_MsbFirst, .dataMode = kFLEXIO_SPI_8BitMode }; FLEXIO_SPI_MasterInit(&spiDev, &config, srcClock_Hz);
Note
1.FlexIO SPI master only support CPOL = 0, which means clock inactive low. 2.For FlexIO SPI master, the input valid time is 1.5 clock cycles, for slave the output valid time is 2.5 clock cycles. So if FlexIO SPI master communicates with other spi IPs, the maximum baud rate is FlexIO clock frequency divided by 2*2=4. If FlexIO SPI master communicates with FlexIO SPI slave, the maximum baud rate is FlexIO clock frequency divided by (1.5+2.5)*2=8.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
masterConfig – Pointer to the flexio_spi_master_config_t structure.
srcClock_Hz – FlexIO source clock in Hz.
-
void FLEXIO_SPI_MasterDeinit(FLEXIO_SPI_Type *base)#
Resets the FlexIO SPI timer and shifter config.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type.
-
void FLEXIO_SPI_MasterGetDefaultConfig(flexio_spi_master_config_t *masterConfig)#
Gets the default configuration to configure the FlexIO SPI master. The configuration can be used directly by calling the FLEXIO_SPI_MasterConfigure(). Example:
flexio_spi_master_config_t masterConfig; FLEXIO_SPI_MasterGetDefaultConfig(&masterConfig);
- Parameters:
masterConfig – Pointer to the flexio_spi_master_config_t structure.
-
void FLEXIO_SPI_SlaveInit(FLEXIO_SPI_Type *base, flexio_spi_slave_config_t *slaveConfig)#
Ungates the FlexIO clock, resets the FlexIO module, configures the FlexIO SPI slave hardware configuration, and configures the FlexIO SPI with FlexIO SPI slave configuration. The configuration structure can be filled by the user, or be set with default values by the FLEXIO_SPI_SlaveGetDefaultConfig().
Note
1.Only one timer is needed in the FlexIO SPI slave. As a result, the second timer index is ignored. 2.FlexIO SPI slave only support CPOL = 0, which means clock inactive low. 3.For FlexIO SPI master, the input valid time is 1.5 clock cycles, for slave the output valid time is 2.5 clock cycles. So if FlexIO SPI slave communicates with other spi IPs, the maximum baud rate is FlexIO clock frequency divided by 3*2=6. If FlexIO SPI slave communicates with FlexIO SPI master, the maximum baud rate is FlexIO clock frequency divided by (1.5+2.5)*2=8. Example
FLEXIO_SPI_Type spiDev = { .flexioBase = FLEXIO, .SDOPinIndex = 0, .SDIPinIndex = 1, .SCKPinIndex = 2, .CSnPinIndex = 3, .shifterIndex = {0,1}, .timerIndex = {0} }; flexio_spi_slave_config_t config = { .enableSlave = true, .enableInDoze = false, .enableInDebug = true, .enableFastAccess = false, .phase = kFLEXIO_SPI_ClockPhaseFirstEdge, .direction = kFLEXIO_SPI_MsbFirst, .dataMode = kFLEXIO_SPI_8BitMode }; FLEXIO_SPI_SlaveInit(&spiDev, &config);
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
slaveConfig – Pointer to the flexio_spi_slave_config_t structure.
-
void FLEXIO_SPI_SlaveDeinit(FLEXIO_SPI_Type *base)#
Gates the FlexIO clock.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type.
-
void FLEXIO_SPI_SlaveGetDefaultConfig(flexio_spi_slave_config_t *slaveConfig)#
Gets the default configuration to configure the FlexIO SPI slave. The configuration can be used directly for calling the FLEXIO_SPI_SlaveConfigure(). Example:
flexio_spi_slave_config_t slaveConfig; FLEXIO_SPI_SlaveGetDefaultConfig(&slaveConfig);
- Parameters:
slaveConfig – Pointer to the flexio_spi_slave_config_t structure.
-
uint32_t FLEXIO_SPI_GetStatusFlags(FLEXIO_SPI_Type *base)#
Gets FlexIO SPI status flags.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
- Returns:
status flag; Use the status flag to AND the following flag mask and get the status.
kFLEXIO_SPI_TxEmptyFlag
kFLEXIO_SPI_RxEmptyFlag
-
void FLEXIO_SPI_ClearStatusFlags(FLEXIO_SPI_Type *base, uint32_t mask)#
Clears FlexIO SPI status flags.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
mask – status flag The parameter can be any combination of the following values:
kFLEXIO_SPI_TxEmptyFlag
kFLEXIO_SPI_RxEmptyFlag
-
void FLEXIO_SPI_EnableInterrupts(FLEXIO_SPI_Type *base, uint32_t mask)#
Enables the FlexIO SPI interrupt.
This function enables the FlexIO SPI interrupt.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
mask – interrupt source. The parameter can be any combination of the following values:
kFLEXIO_SPI_RxFullInterruptEnable
kFLEXIO_SPI_TxEmptyInterruptEnable
-
void FLEXIO_SPI_DisableInterrupts(FLEXIO_SPI_Type *base, uint32_t mask)#
Disables the FlexIO SPI interrupt.
This function disables the FlexIO SPI interrupt.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
mask – interrupt source The parameter can be any combination of the following values:
kFLEXIO_SPI_RxFullInterruptEnable
kFLEXIO_SPI_TxEmptyInterruptEnable
-
void FLEXIO_SPI_EnableDMA(FLEXIO_SPI_Type *base, uint32_t mask, bool enable)#
Enables/disables the FlexIO SPI transmit DMA. This function enables/disables the FlexIO SPI Tx DMA, which means that asserting the kFLEXIO_SPI_TxEmptyFlag does/doesn’t trigger the DMA request.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
mask – SPI DMA source.
enable – True means enable DMA, false means disable DMA.
-
static inline uint32_t FLEXIO_SPI_GetTxDataRegisterAddress(FLEXIO_SPI_Type *base, flexio_spi_shift_direction_t direction)#
Gets the FlexIO SPI transmit data register address for MSB first transfer.
This function returns the SPI data register address, which is mainly used by DMA/eDMA.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
direction – Shift direction of MSB first or LSB first.
- Returns:
FlexIO SPI transmit data register address.
-
static inline uint32_t FLEXIO_SPI_GetRxDataRegisterAddress(FLEXIO_SPI_Type *base, flexio_spi_shift_direction_t direction)#
Gets the FlexIO SPI receive data register address for the MSB first transfer.
This function returns the SPI data register address, which is mainly used by DMA/eDMA.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
direction – Shift direction of MSB first or LSB first.
- Returns:
FlexIO SPI receive data register address.
-
static inline void FLEXIO_SPI_Enable(FLEXIO_SPI_Type *base, bool enable)#
Enables/disables the FlexIO SPI module operation.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type.
enable – True to enable, false does not have any effect.
-
void FLEXIO_SPI_MasterSetBaudRate(FLEXIO_SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClockHz)#
Sets baud rate for the FlexIO SPI transfer, which is only used for the master.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
baudRate_Bps – Baud Rate needed in Hz.
srcClockHz – SPI source clock frequency in Hz.
-
static inline void FLEXIO_SPI_WriteData(FLEXIO_SPI_Type *base, flexio_spi_shift_direction_t direction, uint32_t data)#
Writes one byte of data, which is sent using the MSB method.
Note
This is a non-blocking API, which returns directly after the data is put into the data register but the data transfer is not finished on the bus. Ensure that the TxEmptyFlag is asserted before calling this API.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
direction – Shift direction of MSB first or LSB first.
data – 8/16/32 bit data.
-
static inline uint32_t FLEXIO_SPI_ReadData(FLEXIO_SPI_Type *base, flexio_spi_shift_direction_t direction)#
Reads 8 bit/16 bit data.
Note
This is a non-blocking API, which returns directly after the data is read from the data register. Ensure that the RxFullFlag is asserted before calling this API.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
direction – Shift direction of MSB first or LSB first.
- Returns:
8 bit/16 bit data received.
-
status_t FLEXIO_SPI_WriteBlocking(FLEXIO_SPI_Type *base, flexio_spi_shift_direction_t direction, const uint8_t *buffer, size_t size)#
Sends a buffer of data bytes.
Note
This function blocks using the polling method until all bytes have been sent.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
direction – Shift direction of MSB first or LSB first.
buffer – The data bytes to send.
size – The number of data bytes to send.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_FLEXIO_SPI_Timeout – The transfer timed out and was aborted.
-
status_t FLEXIO_SPI_ReadBlocking(FLEXIO_SPI_Type *base, flexio_spi_shift_direction_t direction, uint8_t *buffer, size_t size)#
Receives a buffer of bytes.
Note
This function blocks using the polling method until all bytes have been received.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
direction – Shift direction of MSB first or LSB first.
buffer – The buffer to store the received bytes.
size – The number of data bytes to be received.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_FLEXIO_SPI_Timeout – The transfer timed out and was aborted.
-
status_t FLEXIO_SPI_MasterTransferBlocking(FLEXIO_SPI_Type *base, flexio_spi_transfer_t *xfer)#
Receives a buffer of bytes.
Note
This function blocks via polling until all bytes have been received.
- Parameters:
base – pointer to FLEXIO_SPI_Type structure
xfer – FlexIO SPI transfer structure, see flexio_spi_transfer_t.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_FLEXIO_SPI_Timeout – The transfer timed out and was aborted.
-
void FLEXIO_SPI_FlushShifters(FLEXIO_SPI_Type *base)#
Flush tx/rx shifters.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
-
status_t FLEXIO_SPI_MasterTransferCreateHandle(FLEXIO_SPI_Type *base, flexio_spi_master_handle_t *handle, flexio_spi_master_transfer_callback_t callback, void *userData)#
Initializes the FlexIO SPI Master handle, which is used in transactional functions.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
handle – Pointer to the flexio_spi_master_handle_t structure to store the transfer state.
callback – The callback function.
userData – The parameter of the callback function.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_OutOfRange – The FlexIO type/handle/ISR table out of range.
-
status_t FLEXIO_SPI_MasterTransferNonBlocking(FLEXIO_SPI_Type *base, flexio_spi_master_handle_t *handle, flexio_spi_transfer_t *xfer)#
Master transfer data using IRQ.
This function sends data using IRQ. This is a non-blocking function, which returns right away. When all data is sent out/received, the callback function is called.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
handle – Pointer to the flexio_spi_master_handle_t structure to store the transfer state.
xfer – FlexIO SPI transfer structure. See flexio_spi_transfer_t.
- Return values:
kStatus_Success – Successfully start a transfer.
kStatus_InvalidArgument – Input argument is invalid.
kStatus_FLEXIO_SPI_Busy – SPI is not idle, is running another transfer.
-
void FLEXIO_SPI_MasterTransferAbort(FLEXIO_SPI_Type *base, flexio_spi_master_handle_t *handle)#
Aborts the master data transfer, which used IRQ.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
handle – Pointer to the flexio_spi_master_handle_t structure to store the transfer state.
-
status_t FLEXIO_SPI_MasterTransferGetCount(FLEXIO_SPI_Type *base, flexio_spi_master_handle_t *handle, size_t *count)#
Gets the data transfer status which used IRQ.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
handle – Pointer to the flexio_spi_master_handle_t structure to store the transfer state.
count – Number of bytes transferred so far by the non-blocking transaction.
- Return values:
kStatus_InvalidArgument – count is Invalid.
kStatus_Success – Successfully return the count.
-
void FLEXIO_SPI_MasterTransferHandleIRQ(void *spiType, void *spiHandle)#
FlexIO SPI master IRQ handler function.
- Parameters:
spiType – Pointer to the FLEXIO_SPI_Type structure.
spiHandle – Pointer to the flexio_spi_master_handle_t structure to store the transfer state.
-
status_t FLEXIO_SPI_SlaveTransferCreateHandle(FLEXIO_SPI_Type *base, flexio_spi_slave_handle_t *handle, flexio_spi_slave_transfer_callback_t callback, void *userData)#
Initializes the FlexIO SPI Slave handle, which is used in transactional functions.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
handle – Pointer to the flexio_spi_slave_handle_t structure to store the transfer state.
callback – The callback function.
userData – The parameter of the callback function.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_OutOfRange – The FlexIO type/handle/ISR table out of range.
-
status_t FLEXIO_SPI_SlaveTransferNonBlocking(FLEXIO_SPI_Type *base, flexio_spi_slave_handle_t *handle, flexio_spi_transfer_t *xfer)#
Slave transfer data using IRQ.
This function sends data using IRQ. This is a non-blocking function, which returns right away. When all data is sent out/received, the callback function is called.
- Parameters:
handle – Pointer to the flexio_spi_slave_handle_t structure to store the transfer state.
base – Pointer to the FLEXIO_SPI_Type structure.
xfer – FlexIO SPI transfer structure. See flexio_spi_transfer_t.
- Return values:
kStatus_Success – Successfully start a transfer.
kStatus_InvalidArgument – Input argument is invalid.
kStatus_FLEXIO_SPI_Busy – SPI is not idle; it is running another transfer.
-
static inline void FLEXIO_SPI_SlaveTransferAbort(FLEXIO_SPI_Type *base, flexio_spi_slave_handle_t *handle)#
Aborts the slave data transfer which used IRQ, share same API with master.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
handle – Pointer to the flexio_spi_slave_handle_t structure to store the transfer state.
-
static inline status_t FLEXIO_SPI_SlaveTransferGetCount(FLEXIO_SPI_Type *base, flexio_spi_slave_handle_t *handle, size_t *count)#
Gets the data transfer status which used IRQ, share same API with master.
- Parameters:
base – Pointer to the FLEXIO_SPI_Type structure.
handle – Pointer to the flexio_spi_slave_handle_t structure to store the transfer state.
count – Number of bytes transferred so far by the non-blocking transaction.
- Return values:
kStatus_InvalidArgument – count is Invalid.
kStatus_Success – Successfully return the count.
-
void FLEXIO_SPI_SlaveTransferHandleIRQ(void *spiType, void *spiHandle)#
FlexIO SPI slave IRQ handler function.
- Parameters:
spiType – Pointer to the FLEXIO_SPI_Type structure.
spiHandle – Pointer to the flexio_spi_slave_handle_t structure to store the transfer state.
-
FSL_FLEXIO_SPI_DRIVER_VERSION#
FlexIO SPI driver version.
Error codes for the FlexIO SPI driver.
Values:
-
enumerator kStatus_FLEXIO_SPI_Busy#
FlexIO SPI is busy.
-
enumerator kStatus_FLEXIO_SPI_Idle#
SPI is idle
-
enumerator kStatus_FLEXIO_SPI_Error#
FlexIO SPI error.
-
enumerator kStatus_FLEXIO_SPI_Timeout#
FlexIO SPI timeout polling status flags.
-
enumerator kStatus_FLEXIO_SPI_Busy#
-
enum _flexio_spi_clock_phase#
FlexIO SPI clock phase configuration.
Values:
-
enumerator kFLEXIO_SPI_ClockPhaseFirstEdge#
First edge on SPSCK occurs at the middle of the first cycle of a data transfer.
-
enumerator kFLEXIO_SPI_ClockPhaseSecondEdge#
First edge on SPSCK occurs at the start of the first cycle of a data transfer.
-
enumerator kFLEXIO_SPI_ClockPhaseFirstEdge#
-
enum _flexio_spi_shift_direction#
FlexIO SPI data shifter direction options.
Values:
-
enumerator kFLEXIO_SPI_MsbFirst#
Data transfers start with most significant bit.
-
enumerator kFLEXIO_SPI_LsbFirst#
Data transfers start with least significant bit.
-
enumerator kFLEXIO_SPI_MsbFirst#
-
enum _flexio_spi_data_bitcount_mode#
FlexIO SPI data length mode options.
Values:
-
enumerator kFLEXIO_SPI_8BitMode#
8-bit data transmission mode.
-
enumerator kFLEXIO_SPI_16BitMode#
16-bit data transmission mode.
-
enumerator kFLEXIO_SPI_32BitMode#
32-bit data transmission mode.
-
enumerator kFLEXIO_SPI_8BitMode#
-
enum _flexio_spi_interrupt_enable#
Define FlexIO SPI interrupt mask.
Values:
-
enumerator kFLEXIO_SPI_TxEmptyInterruptEnable#
Transmit buffer empty interrupt enable.
-
enumerator kFLEXIO_SPI_RxFullInterruptEnable#
Receive buffer full interrupt enable.
-
enumerator kFLEXIO_SPI_TxEmptyInterruptEnable#
-
enum _flexio_spi_status_flags#
Define FlexIO SPI status mask.
Values:
-
enumerator kFLEXIO_SPI_TxBufferEmptyFlag#
Transmit buffer empty flag.
-
enumerator kFLEXIO_SPI_RxBufferFullFlag#
Receive buffer full flag.
-
enumerator kFLEXIO_SPI_TxBufferEmptyFlag#
-
enum _flexio_spi_dma_enable#
Define FlexIO SPI DMA mask.
Values:
-
enumerator kFLEXIO_SPI_TxDmaEnable#
Tx DMA request source
-
enumerator kFLEXIO_SPI_RxDmaEnable#
Rx DMA request source
-
enumerator kFLEXIO_SPI_DmaAllEnable#
All DMA request source
-
enumerator kFLEXIO_SPI_TxDmaEnable#
-
enum _flexio_spi_transfer_flags#
Define FlexIO SPI transfer flags.
Note
Use kFLEXIO_SPI_csContinuous and one of the other flags to OR together to form the transfer flag.
Values:
-
enumerator kFLEXIO_SPI_8bitMsb#
FlexIO SPI 8-bit MSB first
-
enumerator kFLEXIO_SPI_8bitLsb#
FlexIO SPI 8-bit LSB first
-
enumerator kFLEXIO_SPI_16bitMsb#
FlexIO SPI 16-bit MSB first
-
enumerator kFLEXIO_SPI_16bitLsb#
FlexIO SPI 16-bit LSB first
-
enumerator kFLEXIO_SPI_32bitMsb#
FlexIO SPI 32-bit MSB first
-
enumerator kFLEXIO_SPI_32bitLsb#
FlexIO SPI 32-bit LSB first
-
enumerator kFLEXIO_SPI_csContinuous#
Enable the CS signal continuous mode
-
enumerator kFLEXIO_SPI_8bitMsb#
-
typedef enum _flexio_spi_clock_phase flexio_spi_clock_phase_t#
FlexIO SPI clock phase configuration.
-
typedef enum _flexio_spi_shift_direction flexio_spi_shift_direction_t#
FlexIO SPI data shifter direction options.
-
typedef enum _flexio_spi_data_bitcount_mode flexio_spi_data_bitcount_mode_t#
FlexIO SPI data length mode options.
-
typedef struct _flexio_spi_type FLEXIO_SPI_Type#
Define FlexIO SPI access structure typedef.
-
typedef struct _flexio_spi_master_config flexio_spi_master_config_t#
Define FlexIO SPI master configuration structure.
-
typedef struct _flexio_spi_slave_config flexio_spi_slave_config_t#
Define FlexIO SPI slave configuration structure.
-
typedef struct _flexio_spi_transfer flexio_spi_transfer_t#
Define FlexIO SPI transfer structure.
-
typedef struct _flexio_spi_master_handle flexio_spi_master_handle_t#
typedef for flexio_spi_master_handle_t in advance.
-
typedef flexio_spi_master_handle_t flexio_spi_slave_handle_t#
Slave handle is the same with master handle.
-
typedef void (*flexio_spi_master_transfer_callback_t)(FLEXIO_SPI_Type *base, flexio_spi_master_handle_t *handle, status_t status, void *userData)#
FlexIO SPI master callback for finished transmit.
-
typedef void (*flexio_spi_slave_transfer_callback_t)(FLEXIO_SPI_Type *base, flexio_spi_slave_handle_t *handle, status_t status, void *userData)#
FlexIO SPI slave callback for finished transmit.
-
FLEXIO_SPI_DUMMYDATA#
FlexIO SPI dummy transfer data, the data is sent while txData is NULL.
-
SPI_RETRY_TIMES#
Retry times for waiting flag.
-
FLEXIO_SPI_XFER_DATA_FORMAT(flag)#
Get the transfer data format of width and bit order.
-
struct _flexio_spi_type#
- #include <fsl_flexio_spi.h>
Define FlexIO SPI access structure typedef.
Public Members
-
FLEXIO_Type *flexioBase#
FlexIO base pointer.
-
uint8_t SDOPinIndex#
Pin select for data output. To set SDO pin in Hi-Z state, user needs to mux the pin as GPIO input and disable all pull up/down in application.
-
uint8_t SDIPinIndex#
Pin select for data input.
-
uint8_t SCKPinIndex#
Pin select for clock.
-
uint8_t CSnPinIndex#
Pin select for enable.
-
uint8_t shifterIndex[2]#
Shifter index used in FlexIO SPI.
-
uint8_t timerIndex[2]#
Timer index used in FlexIO SPI.
-
FLEXIO_Type *flexioBase#
-
struct _flexio_spi_master_config#
- #include <fsl_flexio_spi.h>
Define FlexIO SPI master configuration structure.
Public Members
-
bool enableMaster#
Enable/disable FlexIO SPI master after configuration.
-
bool enableInDoze#
Enable/disable FlexIO operation in doze mode.
-
bool enableInDebug#
Enable/disable FlexIO operation in debug mode.
-
bool enableFastAccess#
Enable/disable fast access to FlexIO registers, fast access requires the FlexIO clock to be at least twice the frequency of the bus clock.
-
uint32_t baudRate_Bps#
Baud rate in Bps.
-
flexio_spi_clock_phase_t phase#
Clock phase.
-
flexio_spi_data_bitcount_mode_t dataMode#
8bit or 16bit mode.
-
bool enableMaster#
-
struct _flexio_spi_slave_config#
- #include <fsl_flexio_spi.h>
Define FlexIO SPI slave configuration structure.
Public Members
-
bool enableSlave#
Enable/disable FlexIO SPI slave after configuration.
-
bool enableInDoze#
Enable/disable FlexIO operation in doze mode.
-
bool enableInDebug#
Enable/disable FlexIO operation in debug mode.
-
bool enableFastAccess#
Enable/disable fast access to FlexIO registers, fast access requires the FlexIO clock to be at least twice the frequency of the bus clock.
-
flexio_spi_clock_phase_t phase#
Clock phase.
-
flexio_spi_data_bitcount_mode_t dataMode#
8bit or 16bit mode.
-
bool enableSlave#
-
struct _flexio_spi_transfer#
- #include <fsl_flexio_spi.h>
Define FlexIO SPI transfer structure.
-
struct _flexio_spi_master_handle#
- #include <fsl_flexio_spi.h>
Define FlexIO SPI handle structure.
Public Members
-
const uint8_t *txData#
Transfer buffer.
-
uint8_t *rxData#
Receive buffer.
-
size_t transferSize#
Total bytes to be transferred.
-
volatile size_t txRemainingBytes#
Send data remaining in bytes.
-
volatile size_t rxRemainingBytes#
Receive data remaining in bytes.
-
volatile uint32_t state#
FlexIO SPI internal state.
-
uint8_t bytePerFrame#
SPI mode, 2bytes or 1byte in a frame
-
flexio_spi_shift_direction_t direction#
Shift direction.
-
flexio_spi_master_transfer_callback_t callback#
FlexIO SPI callback.
-
void *userData#
Callback parameter.
-
bool isCsContinuous#
Is current transfer using CS continuous mode.
-
uint32_t timer1Cfg#
TIMER1 TIMCFG regiser value backup.
-
const uint8_t *txData#
FlexIO UART Driver#
-
status_t FLEXIO_UART_Init(FLEXIO_UART_Type *base, const flexio_uart_config_t *userConfig, uint32_t srcClock_Hz)#
Ungates the FlexIO clock, resets the FlexIO module, configures FlexIO UART hardware, and configures the FlexIO UART with FlexIO UART configuration. The configuration structure can be filled by the user or be set with default values by FLEXIO_UART_GetDefaultConfig().
Example
FLEXIO_UART_Type base = { .flexioBase = FLEXIO, .TxPinIndex = 0, .RxPinIndex = 1, .shifterIndex = {0,1}, .timerIndex = {0,1} }; flexio_uart_config_t config = { .enableInDoze = false, .enableInDebug = true, .enableFastAccess = false, .baudRate_Bps = 115200U, .bitCountPerChar = 8 }; FLEXIO_UART_Init(base, &config, srcClock_Hz);
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
userConfig – Pointer to the flexio_uart_config_t structure.
srcClock_Hz – FlexIO source clock in Hz.
- Return values:
kStatus_Success – Configuration success.
kStatus_FLEXIO_UART_BaudrateNotSupport – Baudrate is not supported for current clock source frequency.
-
void FLEXIO_UART_Deinit(FLEXIO_UART_Type *base)#
Resets the FlexIO UART shifter and timer config.
Note
After calling this API, call the FLEXO_UART_Init to use the FlexIO UART module.
- Parameters:
base – Pointer to FLEXIO_UART_Type structure
-
void FLEXIO_UART_GetDefaultConfig(flexio_uart_config_t *userConfig)#
Gets the default configuration to configure the FlexIO UART. The configuration can be used directly for calling the FLEXIO_UART_Init(). Example:
flexio_uart_config_t config; FLEXIO_UART_GetDefaultConfig(&userConfig);
- Parameters:
userConfig – Pointer to the flexio_uart_config_t structure.
-
uint32_t FLEXIO_UART_GetStatusFlags(FLEXIO_UART_Type *base)#
Gets the FlexIO UART status flags.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
- Returns:
FlexIO UART status flags.
-
void FLEXIO_UART_ClearStatusFlags(FLEXIO_UART_Type *base, uint32_t mask)#
Gets the FlexIO UART status flags.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
mask – Status flag. The parameter can be any combination of the following values:
kFLEXIO_UART_TxDataRegEmptyFlag
kFLEXIO_UART_RxEmptyFlag
kFLEXIO_UART_RxOverRunFlag
-
void FLEXIO_UART_EnableInterrupts(FLEXIO_UART_Type *base, uint32_t mask)#
Enables the FlexIO UART interrupt.
This function enables the FlexIO UART interrupt.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
mask – Interrupt source.
-
void FLEXIO_UART_DisableInterrupts(FLEXIO_UART_Type *base, uint32_t mask)#
Disables the FlexIO UART interrupt.
This function disables the FlexIO UART interrupt.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
mask – Interrupt source.
-
static inline uint32_t FLEXIO_UART_GetTxDataRegisterAddress(FLEXIO_UART_Type *base)#
Gets the FlexIO UARt transmit data register address.
This function returns the UART data register address, which is mainly used by DMA/eDMA.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
- Returns:
FlexIO UART transmit data register address.
-
static inline uint32_t FLEXIO_UART_GetRxDataRegisterAddress(FLEXIO_UART_Type *base)#
Gets the FlexIO UART receive data register address.
This function returns the UART data register address, which is mainly used by DMA/eDMA.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
- Returns:
FlexIO UART receive data register address.
-
static inline void FLEXIO_UART_EnableTxDMA(FLEXIO_UART_Type *base, bool enable)#
Enables/disables the FlexIO UART transmit DMA. This function enables/disables the FlexIO UART Tx DMA, which means asserting the kFLEXIO_UART_TxDataRegEmptyFlag does/doesn’t trigger the DMA request.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
enable – True to enable, false to disable.
-
static inline void FLEXIO_UART_EnableRxDMA(FLEXIO_UART_Type *base, bool enable)#
Enables/disables the FlexIO UART receive DMA. This function enables/disables the FlexIO UART Rx DMA, which means asserting kFLEXIO_UART_RxDataRegFullFlag does/doesn’t trigger the DMA request.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
enable – True to enable, false to disable.
-
static inline void FLEXIO_UART_Enable(FLEXIO_UART_Type *base, bool enable)#
Enables/disables the FlexIO UART module operation.
- Parameters:
base – Pointer to the FLEXIO_UART_Type.
enable – True to enable, false does not have any effect.
-
static inline void FLEXIO_UART_WriteByte(FLEXIO_UART_Type *base, const uint8_t *buffer)#
Writes one byte of data.
Note
This is a non-blocking API, which returns directly after the data is put into the data register. Ensure that the TxEmptyFlag is asserted before calling this API.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
buffer – The data bytes to send.
-
static inline void FLEXIO_UART_ReadByte(FLEXIO_UART_Type *base, uint8_t *buffer)#
Reads one byte of data.
Note
This is a non-blocking API, which returns directly after the data is read from the data register. Ensure that the RxFullFlag is asserted before calling this API.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
buffer – The buffer to store the received bytes.
-
status_t FLEXIO_UART_WriteBlocking(FLEXIO_UART_Type *base, const uint8_t *txData, size_t txSize)#
Sends a buffer of data bytes.
Note
This function blocks using the polling method until all bytes have been sent.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
txData – The data bytes to send.
txSize – The number of data bytes to send.
- Return values:
kStatus_FLEXIO_UART_Timeout – Transmission timed out and was aborted.
kStatus_Success – Successfully wrote all data.
-
status_t FLEXIO_UART_ReadBlocking(FLEXIO_UART_Type *base, uint8_t *rxData, size_t rxSize)#
Receives a buffer of bytes.
Note
This function blocks using the polling method until all bytes have been received.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
rxData – The buffer to store the received bytes.
rxSize – The number of data bytes to be received.
- Return values:
kStatus_FLEXIO_UART_Timeout – Transmission timed out and was aborted.
kStatus_Success – Successfully received all data.
-
status_t FLEXIO_UART_TransferCreateHandle(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, flexio_uart_transfer_callback_t callback, void *userData)#
Initializes the UART handle.
This function initializes the FlexIO UART handle, which can be used for other FlexIO UART transactional APIs. Call this API once to get the initialized handle.
The UART driver supports the “background” receiving, which means that users can set up a RX ring buffer optionally. Data received is stored into the ring buffer even when the user doesn’t call the FLEXIO_UART_TransferReceiveNonBlocking() API. If there is already data received in the ring buffer, users can get the received data from the ring buffer directly. The ring buffer is disabled if passing NULL as
ringBuffer.- Parameters:
base – to FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
callback – The callback function.
userData – The parameter of the callback function.
- Return values:
kStatus_Success – Successfully create the handle.
kStatus_OutOfRange – The FlexIO type/handle/ISR table out of range.
-
void FLEXIO_UART_TransferStartRingBuffer(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)#
Sets up the RX ring buffer.
This function sets up the RX ring buffer to a specific UART handle.
When the RX ring buffer is used, data received is stored into the ring buffer even when the user doesn’t call the UART_ReceiveNonBlocking() API. If there is already data received in the ring buffer, users can get the received data from the ring buffer directly.
Note
When using the RX ring buffer, one byte is reserved for internal use. In other words, if
ringBufferSizeis 32, only 31 bytes are used for saving data.- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
ringBuffer – Start address of ring buffer for background receiving. Pass NULL to disable the ring buffer.
ringBufferSize – Size of the ring buffer.
-
void FLEXIO_UART_TransferStopRingBuffer(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle)#
Aborts the background transfer and uninstalls the ring buffer.
This function aborts the background transfer and uninstalls the ring buffer.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
-
status_t FLEXIO_UART_TransferSendNonBlocking(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, flexio_uart_transfer_t *xfer)#
Transmits a buffer of data using the interrupt method.
This function sends data using an interrupt method. This is a non-blocking function, which returns directly without waiting for all data to be written to the TX register. When all data is written to the TX register in ISR, the FlexIO UART driver calls the callback function and passes the kStatus_FLEXIO_UART_TxIdle as status parameter.
Note
The kStatus_FLEXIO_UART_TxIdle is passed to the upper layer when all data is written to the TX register. However, it does not ensure that all data is sent out.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
xfer – FlexIO UART transfer structure. See flexio_uart_transfer_t.
- Return values:
kStatus_Success – Successfully starts the data transmission.
kStatus_UART_TxBusy – Previous transmission still not finished, data not written to the TX register.
-
void FLEXIO_UART_TransferAbortSend(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle)#
Aborts the interrupt-driven data transmit.
This function aborts the interrupt-driven data sending. Get the remainBytes to find out how many bytes are still not sent out.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
-
status_t FLEXIO_UART_TransferGetSendCount(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, size_t *count)#
Gets the number of bytes sent.
This function gets the number of bytes sent driven by interrupt.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
count – Number of bytes sent so far by the non-blocking transaction.
- Return values:
kStatus_NoTransferInProgress – transfer has finished or no transfer in progress.
kStatus_Success – Successfully return the count.
-
status_t FLEXIO_UART_TransferReceiveNonBlocking(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, flexio_uart_transfer_t *xfer, size_t *receivedBytes)#
Receives a buffer of data using the interrupt method.
This function receives data using the interrupt method. This is a non-blocking function, which returns without waiting for all data to be received. If the RX ring buffer is used and not empty, the data in ring buffer is copied and the parameter
receivedBytesshows how many bytes are copied from the ring buffer. After copying, if the data in ring buffer is not enough to read, the receive request is saved by the UART driver. When new data arrives, the receive request is serviced first. When all data is received, the UART driver notifies the upper layer through a callback function and passes the status parameter kStatus_UART_RxIdle. For example, if the upper layer needs 10 bytes but there are only 5 bytes in the ring buffer, the 5 bytes are copied to xfer->data. This function returns with the parameterreceivedBytesset to 5. For the last 5 bytes, newly arrived data is saved from the xfer->data[5]. When 5 bytes are received, the UART driver notifies upper layer. If the RX ring buffer is not enabled, this function enables the RX and RX interrupt to receive data to xfer->data. When all data is received, the upper layer is notified.- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
xfer – UART transfer structure. See flexio_uart_transfer_t.
receivedBytes – Bytes received from the ring buffer directly.
- Return values:
kStatus_Success – Successfully queue the transfer into the transmit queue.
kStatus_FLEXIO_UART_RxBusy – Previous receive request is not finished.
-
void FLEXIO_UART_TransferAbortReceive(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle)#
Aborts the receive data which was using IRQ.
This function aborts the receive data which was using IRQ.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
-
status_t FLEXIO_UART_TransferGetReceiveCount(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, size_t *count)#
Gets the number of bytes received.
This function gets the number of bytes received driven by interrupt.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
handle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
count – Number of bytes received so far by the non-blocking transaction.
- Return values:
kStatus_NoTransferInProgress – transfer has finished or no transfer in progress.
kStatus_Success – Successfully return the count.
-
void FLEXIO_UART_TransferHandleIRQ(void *uartType, void *uartHandle)#
FlexIO UART IRQ handler function.
This function processes the FlexIO UART transmit and receives the IRQ request.
- Parameters:
uartType – Pointer to the FLEXIO_UART_Type structure.
uartHandle – Pointer to the flexio_uart_handle_t structure to store the transfer state.
-
void FLEXIO_UART_FlushShifters(FLEXIO_UART_Type *base)#
Flush tx/rx shifters.
- Parameters:
base – Pointer to the FLEXIO_UART_Type structure.
-
FSL_FLEXIO_UART_DRIVER_VERSION#
FlexIO UART driver version.
Error codes for the UART driver.
Values:
-
enumerator kStatus_FLEXIO_UART_TxBusy#
Transmitter is busy.
-
enumerator kStatus_FLEXIO_UART_RxBusy#
Receiver is busy.
-
enumerator kStatus_FLEXIO_UART_TxIdle#
UART transmitter is idle.
-
enumerator kStatus_FLEXIO_UART_RxIdle#
UART receiver is idle.
-
enumerator kStatus_FLEXIO_UART_ERROR#
ERROR happens on UART.
-
enumerator kStatus_FLEXIO_UART_RxRingBufferOverrun#
UART RX software ring buffer overrun.
-
enumerator kStatus_FLEXIO_UART_RxHardwareOverrun#
UART RX receiver overrun.
-
enumerator kStatus_FLEXIO_UART_Timeout#
UART times out.
-
enumerator kStatus_FLEXIO_UART_BaudrateNotSupport#
Baudrate is not supported in current clock source
-
enumerator kStatus_FLEXIO_UART_TxBusy#
-
enum _flexio_uart_bit_count_per_char#
FlexIO UART bit count per char.
Values:
-
enumerator kFLEXIO_UART_7BitsPerChar#
7-bit data characters
-
enumerator kFLEXIO_UART_8BitsPerChar#
8-bit data characters
-
enumerator kFLEXIO_UART_9BitsPerChar#
9-bit data characters
-
enumerator kFLEXIO_UART_7BitsPerChar#
-
enum _flexio_uart_interrupt_enable#
Define FlexIO UART interrupt mask.
Values:
-
enumerator kFLEXIO_UART_TxDataRegEmptyInterruptEnable#
Transmit buffer empty interrupt enable.
-
enumerator kFLEXIO_UART_RxDataRegFullInterruptEnable#
Receive buffer full interrupt enable.
-
enumerator kFLEXIO_UART_TxDataRegEmptyInterruptEnable#
-
enum _flexio_uart_status_flags#
Define FlexIO UART status mask.
Values:
-
enumerator kFLEXIO_UART_TxDataRegEmptyFlag#
Transmit buffer empty flag.
-
enumerator kFLEXIO_UART_RxDataRegFullFlag#
Receive buffer full flag.
-
enumerator kFLEXIO_UART_RxOverRunFlag#
Receive buffer over run flag.
-
enumerator kFLEXIO_UART_TxDataRegEmptyFlag#
-
typedef enum _flexio_uart_bit_count_per_char flexio_uart_bit_count_per_char_t#
FlexIO UART bit count per char.
-
typedef struct _flexio_uart_type FLEXIO_UART_Type#
Define FlexIO UART access structure typedef.
-
typedef struct _flexio_uart_config flexio_uart_config_t#
Define FlexIO UART user configuration structure.
-
typedef struct _flexio_uart_transfer flexio_uart_transfer_t#
Define FlexIO UART transfer structure.
-
typedef struct _flexio_uart_handle flexio_uart_handle_t#
-
typedef void (*flexio_uart_transfer_callback_t)(FLEXIO_UART_Type *base, flexio_uart_handle_t *handle, status_t status, void *userData)#
FlexIO UART transfer callback function.
-
UART_RETRY_TIMES#
Retry times for waiting flag.
-
struct _flexio_uart_type#
- #include <fsl_flexio_uart.h>
Define FlexIO UART access structure typedef.
-
struct _flexio_uart_config#
- #include <fsl_flexio_uart.h>
Define FlexIO UART user configuration structure.
Public Members
-
bool enableUart#
Enable/disable FlexIO UART TX & RX.
-
bool enableInDoze#
Enable/disable FlexIO operation in doze mode
-
bool enableInDebug#
Enable/disable FlexIO operation in debug mode
-
bool enableFastAccess#
Enable/disable fast access to FlexIO registers, fast access requires the FlexIO clock to be at least twice the frequency of the bus clock.
-
uint32_t baudRate_Bps#
Baud rate in Bps.
-
flexio_uart_bit_count_per_char_t bitCountPerChar#
number of bits, 7/8/9 -bit
-
bool enableUart#
-
struct _flexio_uart_transfer#
- #include <fsl_flexio_uart.h>
Define FlexIO UART transfer structure.
Public Members
-
size_t dataSize#
Transfer size
-
size_t dataSize#
-
struct _flexio_uart_handle#
- #include <fsl_flexio_uart.h>
Define FLEXIO UART handle structure.
Public Members
-
const uint8_t *volatile txData#
Address of remaining data to send.
-
volatile size_t txDataSize#
Size of the remaining data to send.
-
uint8_t *volatile rxData#
Address of remaining data to receive.
-
volatile size_t rxDataSize#
Size of the remaining data to receive.
-
size_t txDataSizeAll#
Total bytes to be sent.
-
size_t rxDataSizeAll#
Total bytes to be received.
-
uint8_t *rxRingBuffer#
Start address of the receiver ring buffer.
-
size_t rxRingBufferSize#
Size of the ring buffer.
-
volatile uint16_t rxRingBufferHead#
Index for the driver to store received data into ring buffer.
-
volatile uint16_t rxRingBufferTail#
Index for the user to get data from the ring buffer.
-
flexio_uart_transfer_callback_t callback#
Callback function.
-
void *userData#
UART callback function parameter.
-
volatile uint8_t txState#
TX transfer state.
-
volatile uint8_t rxState#
RX transfer state
-
const uint8_t *volatile txData#
-
union __unnamed136__#
FlexPWM: Enhanced Flex Pulse Width Modulator#
-
void FLEXPWM_GetDefaultSubmoduleConfig(flexpwm_submodule_config_t *config)#
Get default configuration for FlexPWM submodule.
This function initializes the FlexPWM submodule configuration structure with safe default values. The default configuration can be used directly or modified before calling FLEXPWM_ConfigSubmodule().
Default values:
Clock source: IPBus clock (kFLEXPWM_ClockSource_IPBusClock)
Prescaler: Divide by 1 (no prescaling)
Counter initial value: 0
Counter modulo value: 0xFFFF (maximum range)
Initialization source: Local sync
Load mode: Opportunity (load at PWM reload opportunity)
Load frequency: 0 (every PWM cycle)
Half-cycle reload: Disabled
Full-cycle reload: Enabled
Reload source: Local reload
Half-cycle value: 0
Debug mode: Disabled (PWM stops in Debug mode)
Wait mode: Disabled (PWM stops in Wait mode)
- Parameters:
config – Pointer to the submodule configuration structure.
-
void FLEXPWM_ConfigSubmodule(PWM_Type *base, uint8_t submodule, const flexpwm_submodule_config_t *config)#
Configure a FlexPWM submodule.
This function configures the basic parameters of a FlexPWM submodule, including:
Clock source and prescaler (CTRL2[CLK_SEL], CTRL[PRSC])
Counter initialization and modulo values (INIT, VAL1)
Counter initialization source (CTRL2[INIT_SEL])
Register reload mode, frequency, and timing (CTRL[LDMOD, LDFQ, HALF, FULL], CTRL2[RELOAD_SEL])
Half-cycle reload point (VAL0)
Debug and Wait mode behavior (CTRL2[DBGEN, WAITEN])
Note
Configuration write behavior:
This function writes configuration values to buffered registers.
The configuration does NOT take effect immediately.
After calling this function, you must set MCTRL[LDOK] bit using a separate function to transfer buffered register values to active registers.
The actual transfer timing depends on the configured reload mode and reload opportunities.
Note
This function does NOT:
Set the MCTRL[LDOK] bit (you must call a separate LDOK function)
Start the PWM counter (use a separate start API)
Configure PWM waveform parameters (VAL2-VAL5, deadtime, polarity, etc.)
Configure fault protection or capture functionality
Configure FORCE_OUT behavior (use FLEXPWM_ConfigForceOut)
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
config – Pointer to the submodule configuration structure.
-
void FLEXPWM_ConfigPWM(PWM_Type *base, uint8_t submodule, const flexpwm_pwm_config_t *config)#
Configure PWM output for a FlexPWM submodule.
This function configures the PWM output parameters for a FlexPWM submodule, including:
Compare values (VAL2, VAL3, VAL4, VAL5)
Output polarity (POLA, POLB)
Initial values (PWM23_INIT, PWM45_INIT)
Operating mode: independent or complementary (INDEP)
Complementary mode source selection (MCTRL[IPOL]) - only in complementary mode
Note
For complementary mode (complementary = true):
Only the selected channel compare values (pwma if ipolSource=kFLEXPWM_IPOL_PWM23, or pwmb if ipolSource=kFLEXPWM_IPOL_PWM45) needs to be configured.
But polarity still needs to be set for the complementary output to work correctly.
The unselected channel will be ignored by the hardware.
MCTRL[IPOL] will be set according to ipolSource parameter.
Note
For independent mode (complementary = false):
Both pwma and pwmb must be fully configured.
INDEP bit will be set to 1 in SMxCTRL2.
MCTRL[IPOL] is ignored by the hardware in this mode.
Note
This function does NOT:
Set the MCTRL[LDOK] bit (you must call a separate LDOK function)
Trigger FORCE_OUT events (in complementary mode, MCTRL[IPOL] requires FORCE_OUT to take effect)
Enable PWM_A Output or PWM_B Output (use a separate API to enable outputs)
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
config – Pointer to the PWM configuration structure.
-
void FLEXPWM_ConfigPWMChannelX(PWM_Type *base, uint8_t submodule, const flexpwm_pwm_channel_config_t *pwmx)#
Configure PWM_X output for a FlexPWM submodule.
This function configures the PWM_X output parameters for a FlexPWM submodule, including:
Compare values (VAL0, VAL1)
Output polarity (POLX)
Initial values (PWMX_INIT)
Note
When submodule works in local sync mode, PWM_X polarity is inverted, because VAL1 determines both counter modulo and PWM_X turn-off edge. VAL0 determines PWM_X turn-on edge. Recommend setting submodule counter works in master sync mode if you want to use the PWM_X output, then both VAL0 and VAL1 can be used to control PWM_X waveform shape and polarity is normal.
Note
This function does NOT:
Set the MCTRL[LDOK] bit (you must call a separate LDOK function)
Enable PWM_X Output (use a separate API to enable outputs)
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
pwmx – Pointer to the PWM_X configuration structure.
-
void FLEXPWM_GetDefaultForceOutConfig(flexpwm_force_out_config_t *config)#
Get default configuration for force output.
This function initializes the force output configuration structure with safe default values. The default configuration can be used directly or modified before calling FLEXPWM_ConfigForceOut().
Default values:
FORCE_OUT trigger source: Local software force (kFLEXPWM_ForceOutputSource_LocalForce)
Counter initialization on FORCE_OUT: Disabled (false)
PWM_A source: Generated PWM signal (kFLEXPWM_ForcePwmSource_Generated)
PWM_A software value: Logic 0 (false)
PWM_B source: Generated PWM signal (kFLEXPWM_ForcePwmSource_Generated)
PWM_B software value: Logic 0 (false)
- Parameters:
config – Pointer to the force output configuration structure.
-
void FLEXPWM_ConfigForceOut(PWM_Type *base, uint8_t submodule, const flexpwm_force_out_config_t *config)#
Configure FORCE_OUT for a FlexPWM submodule.
This function configures the FORCE_OUT event parameters for a FlexPWM submodule, including:
FORCE_OUT trigger source (CTRL2[FORCE_SEL]): software, master, external, sync signals, etc.
Counter initialization triggered by FORCE_OUT (CTRL2[FRCEN])
PWM source selection for deadtime logic (DTSRCSEL[SMxSEL23/45]): generated, inverted, software-controlled, or external signals
Software-controlled output values (SWCOUT[SMxOUT23/45]) when source is software-controlled
Note
Configuration write behavior:
This function performs read-modify-write operations on global registers (DTSRCSEL, SWCOUT) to protect other submodules’ configurations.
Register writes are immediate and take effect when the corresponding FORCE_OUT event occurs.
SWCOUT and DTSRCSEL are NOT affected by MCTRL[LDOK]; they are independent double-buffered registers that update on FORCE_OUT events.
Note
FORCE_OUT event effects: When a FORCE_OUT event occurs, the following updated values take effect simultaneously:
PWM source routing from DTSRCSEL
Software-controlled output values from SWCOUT
Counter may be reinitialized if FRCEN is enabled
Note
This function does NOT:
Trigger FORCE_OUT events (DTSRCSEL and SWCOUT settings require FORCE_OUT event to take effect)
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
config – Pointer to the force output configuration structure.
-
void FLEXPWM_GetDefaultFaultConfig(flexpwm_fault_config_t *config)#
Get default configuration for fault protection.
This function initializes the fault protection configuration structure with safe default values. The default configuration can be used directly or modified before calling FLEXPWM_ConfigFaultProtection().
Default values:
Fault Input Active Level (faultInputActiveLevel): Active high (true)
Fault Clearing Mode (faultClearingMode): Automatic fault clearing
Safety Mode (enableSafetyMode): Enabled (safe mode)
Full Cycle Recovery (enableFullCycleRecovery): Enabled
Half Cycle Recovery (enableHalfCycleRecovery): Disabled
Combinational Path (enableCombinatorialPath): Enabled (allow combinational path for fastest response)
- Parameters:
config – Pointer to the fault protection configuration structure.
-
void FLEXPWM_GetDefaultFaultSubmoduleConfig(flexpwm_fault_submodule_config_t *config)#
Get default configuration for fault submodule protection.
This function initializes the fault submodule configuration structure with safe default values. The default configuration can be used directly or modified before calling FLEXPWM_ConfigFaultSubmodule().
Default values:
Disable Mask: All faults (0x0F) affect each output
Output Behavior: High-Z (high impedance) for all outputs
For single-channel platforms: disableMask_ch0 = 0x0F For dual-channel platforms: disableMask_ch0 = 0x0F, disableMask_ch1 = 0x0F
- Parameters:
config – Pointer to the fault submodule configuration structure.
-
void FLEXPWM_GetDefaultFaultFilterConfig(flexpwm_fault_filter_config_t *config)#
Get default configuration for fault filter.
This function initializes the fault filter configuration structure with safe default values. The default configuration provides moderate debouncing suitable for typical applications.
Default values:
Filter Period (FILT_PER): 0x08 (8 IPBus clock cycles)
Filter Count (FILT_CNT): 0x04 (7 consecutive samples = 4+3)
Glitch Stretching (GSTR): Enabled
Effective debounce window: ~56 IPBus clock cycles
- Parameters:
config – Pointer to the fault filter configuration structure.
-
void FLEXPWM_ConfigFaultProtection(PWM_Type *base, uint8_t faultChannel, const flexpwm_fault_config_t *config, uint16_t faultMask)#
Configure fault protection for a FlexPWM fault channel.
This function configures global fault protection parameters for one fault channel, including fault input active level, clearing mode, safety mode, and fault recovery timing.
Configuration details:
Fault input active level (faultInputActiveLevel): Selects whether fault is triggered by high or low
Fault clearing mode (faultClearingMode): Controls how and when PWM outputs are re-enabled
Safety mode (enableSafetyMode): Adds extra requirement that fault input be de-asserted before re-enable
Fault recovery timing (enableFullCycleRecovery, enableHalfCycleRecovery): Specifies during which PWM cycle phase outputs re-enable
Combinational path (enableCombinatorialPath): Trades off response speed vs. latency
Note
Configuration applies to the entire fault channel (all submodules that reference it). For platforms with dual fault channels, call this function separately for each channel.
Note
For platforms with dual fault channels:
faultChannel 0: Configures FAULT0-3 (FCTRL/FSTS/FFILT at offset 0x18C)
faultChannel 1: Configures FAULT4-7 (FCTRL/FSTS/FFILT at offset 0x198)
- Parameters:
base – FlexPWM peripheral base address.
faultChannel – Fault channel number (0 or 1 for dual-channel platforms).
config – Pointer to the fault protection configuration structure.
faultMask – Fault input selection mask for the channel. Each bit corresponds to one fault input:
bit[0] = FAULT0 (or FAULT4 for channel 1)
bit[1] = FAULT1 (or FAULT5 for channel 1)
bit[2] = FAULT2 (or FAULT6 for channel 1)
bit[3] = FAULT3 (or FAULT7 for channel 1) Example: 0x05 = configure FAULT0 and FAULT2 with the same settings. Can use flexpwm_fault_mask_t enum values (kFLEXPWM_FaultMask_0/1/2/3) and OR them together for multiple faults: (kFLEXPWM_FaultMask_0 | kFLEXPWM_FaultMask_2) = 0x05.
-
void FLEXPWM_ConfigFaultSubmodule(PWM_Type *base, uint8_t submodule, const flexpwm_fault_submodule_config_t *config)#
Configure fault submodule protection for a FlexPWM submodule.
This function configures fault-to-PWM-output mapping and output behavior for all three PWM outputs (PWM_A, PWM_B, PWM_X) of a single submodule. Each output can independently select which faults affect it and how it responds during a fault.
Configuration per output:
Disable Mask: Selects which fault inputs can disable this output
disableMask_ch0: Bits [0-3] for FAULT0-3
disableMask_ch1: Bits [0-3] for FAULT4-7 (dual-channel platforms only)
Output Behavior: Specifies pin state during fault (Force 0, Force 1, or High-Z)
Note
Configuration applies to SMxDISMAP and SMxOCTRL registers. These registers are not affected by LDOK or FORCE_OUT; configuration takes effect immediately upon register write.
Note
For dual-channel platforms, specify disableMask_ch0 and disableMask_ch1 to control which faults (from either channel) can disable each output.
Note
For single-channel platforms, only disableMask_ch0 is used; disableMask_ch1 is conditionally compiled out.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
config – Pointer to the fault submodule configuration structure.
-
void FLEXPWM_ConfigFaultFilter(PWM_Type *base, uint8_t faultChannel, const flexpwm_fault_filter_config_t *config)#
Configure fault filter for a FlexPWM fault channel.
This function configures the input filter for fault protection pins, including sampling period, sample count requirement, and glitch stretching logic.
The filter helps reject electrical noise and false fault triggers by requiring the FAULTx signal to be stable for N consecutive samples before a fault is reported. With GSTR enabled, narrow fault glitches (< 2 IPBus cycles) are automatically stretched.
Note
Configuration applies to the entire fault channel (FFILT register). For platforms with dual fault channels, call this function separately for each channel.
Note
Filter delay calculation:
Without GSTR: delay = FILT_PER * (FILT_CNT + 3) IPBus cycles
With GSTR: may be reduced due to glitch stretching logic
Note
To disable filtering:
Set filterPeriod = 0 (sampling disabled, filter bypassed)
- Parameters:
base – FlexPWM peripheral base address.
faultChannel – Fault channel number (0 or 1 for dual-channel platforms).
config – Pointer to the fault filter configuration structure.
-
void FLEXPWM_GetDefaultOutputTriggerConfig(flexpwm_output_trigger_config_t *config)#
Get default configuration for output trigger.
This function initializes the output trigger configuration structure with safe default values:
outTriggerEnable: 0 (all triggers disabled)
triggerFrequency: kFLEXPWM_TriggerFrequency_EveryCycle (trigger every PWM cycle)
muxTrig0Source: kFLEXPWM_TriggerMuxSource_GeneratedTrigger (use PWM_OUT_TRIG0)
muxTrig1Source: kFLEXPWM_TriggerMuxSource_GeneratedTrigger (use PWM_OUT_TRIG1)
stretchPrescaler: kFLEXPWM_StretchPrescaler_None (no prescaling, if supported)
After calling this function, the user should modify the fields as needed before calling FLEXPWM_ConfigOutputTrigger().
-
void FLEXPWM_ConfigOutputTrigger(PWM_Type *base, uint8_t submodule, const flexpwm_output_trigger_config_t *config)#
Configure output trigger for a FlexPWM submodule.
This function configures the output trigger parameters for a FlexPWM submodule, including:
Trigger source mapping from VAL0-5 register matches (SMxTCTRL[OUT_TRIG_EN])
Trigger output frequency control (SMxTCTRL[TRGFRQ])
PWM_MUX_TRIG0 port source selection (SMxTCTRL[PWAOT0])
PWM_MUX_TRIG1 port source selection (SMxTCTRL[PWBOT1])
The output trigger mechanism allows PWM events (counter matches with VAL registers) to trigger external modules such as ADC, DMA, or other peripherals for synchronized operation.
Note
Trigger source mapping:
VAL0, VAL2, VAL4 matches generate PWM_OUT_TRIG0
VAL1, VAL3, VAL5 matches generate PWM_OUT_TRIG1 Multiple sources can be enabled simultaneously (OR logic).
Note
Trigger frequency control (TRGFRQ): This setting only takes effect when CTRL[LDFQ] is non-zero (reload frequency divider active).
false: Trigger outputs every PWM cycle regardless of reload occurrence
true: Trigger outputs only on the last PWM cycle before a reload opportunity
Note
Port routing: PWM_MUX_TRIG0/1 ports can be routed to either:
Generated trigger signals (PWM_OUT_TRIG0/1) from VAL register matches
Direct PWM outputs (PWM_A/PWM_B) for waveform monitoring Both ports are independently configurable.
Note
Configuration takes effect immediately upon register write. This function does NOT require setting MCTRL[LDOK].
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
config – Pointer to the output trigger configuration structure.
-
void FLEXPWM_GetDefaultInputCaptureConfig(flexpwm_input_capture_config_t *config)#
Get default configuration for input capture.
This function initializes the input capture configuration structure with safe default values. The default values are:
All channels (A/B/X):
edge0 = kFLEXPWM_CaptureEdge_Disabled
edge1 = kFLEXPWM_CaptureEdge_Disabled
oneshot = false (free running mode)
inputSelect = kFLEXPWM_CaptureInput_RawSignal
edgeCompareValue = 0
fifoWatermark = kFLEXPWM_CaptureFifoWatermark_1
After calling this function, the user should modify the fields as needed before calling FLEXPWM_ConfigInputCapture().
- Parameters:
config – Pointer to the input capture configuration structure.
-
void FLEXPWM_GetDefaultCaptureFilterConfig(flexpwm_capture_filter_config_t *config)#
Get default configuration for capture filter.
This function initializes the capture filter configuration structure with safe default values. The default values are:
All channels (A/B/X):
filterPeriod = 0 (filter bypassed, sampling disabled)
filterCount = 0 (requires 3 consecutive samples)
After calling this function, the user should modify the fields as needed before calling FLEXPWM_ConfigInputCaptureFilter().
- Parameters:
config – Pointer to the capture filter configuration structure.
-
void FLEXPWM_ConfigInputCapture(PWM_Type *base, uint8_t submodule, const flexpwm_input_capture_config_t *config)#
Configure input capture for a FlexPWM submodule.
This function configures the input capture parameters for up to three capture channels (Capture_A, Capture_B, Capture_X) of a FlexPWM submodule, including:
Edge detection configuration for two edge detectors per channel (SMxCAPTCTRLA/B/X[EDGx0/1])
One-shot or free-running mode (SMxCAPTCTRLA/B/X[ONESHOTx])
Input source selection: raw signal or edge counter output (SMxCAPTCTRLA/B/X[INP_SELx])
Edge counter compare value (SMxCAPTCOMPA/B/X[EDGCMPx])
FIFO watermark level (SMxCAPTCTRLA/B/X[CFxWM])
Note
Edge counter behavior:
When inputSelect = kFLEXPWM_CaptureInput_EdgeCounter, the edge counter is automatically enabled (EDGCNTx_EN = 1) by this function.
When inputSelect = kFLEXPWM_CaptureInput_RawSignal, the edge counter remains disabled.
Note
Capture enable control:
This function does NOT control the capture enable bits (ARMA/ARMB/ARMX).
After calling this function, use a separate enable API to start capture operation.
Note
CVAL register mapping (NON-INTUITIVE):
Capture_X: Edge0 -> CVAL0, Edge1 -> CVAL1
Capture_A: Edge0 -> CVAL2, Edge1 -> CVAL3
Capture_B: Edge0 -> CVAL4, Edge1 -> CVAL5
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
config – Pointer to the input capture configuration structure.
-
void FLEXPWM_ConfigInputCaptureFilter(PWM_Type *base, uint8_t submodule, const flexpwm_capture_filter_config_t *config)#
Configure input capture filter for a FlexPWM submodule.
This function configures the digital filter parameters for the three capture channels (Capture_A, Capture_B, Capture_X) of a FlexPWM submodule. The filter settings include:
Filter sampling period (SMxCAPTFILTA/B/X[CAPTx_FILT_PER])
Number of consecutive samples required (SMxCAPTFILTA/B/X[CAPTx_FILT_CNT])
The digital filter can eliminate glitches and noise on the capture input signals.
Note
Filter bypassing:
Set filterPeriod = 0 to bypass the filter (no sampling, filter disabled).
Note
Filter delay calculation:
Delay = filterPeriod * (filterCount + 3) IPBus clock cycles
Example: filterPeriod=5, filterCount=2 -> delay = 5*(2+3) = 25 cycles
Note
Hardware behavior:
This function always writes 0 to the filter register first, then writes the configuration value. This ensures correct behavior per hardware requirements.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
config – Pointer to the capture filter configuration structure.
-
uint16_t FLEXPWM_GetInputCaptureValue(PWM_Type *base, uint8_t submodule, flexpwm_capture_index_t captureIndex)#
Read captured value from a FlexPWM capture channel.
This function reads the captured counter value from one of the six capture value registers (CVAL0-5) for the specified capture channel and edge detector.
Note
CVAL register mapping (NON-INTUITIVE):
kFLEXPWM_Capture_X_Edge0 -> CVAL0
kFLEXPWM_Capture_X_Edge1 -> CVAL1
kFLEXPWM_Capture_A_Edge0 -> CVAL2
kFLEXPWM_Capture_A_Edge1 -> CVAL3
kFLEXPWM_Capture_B_Edge0 -> CVAL4
kFLEXPWM_Capture_B_Edge1 -> CVAL5
Warning
Destructive read:
Reading a CVAL register decrements the FIFO count by 1.
If the FIFO is empty, the read value is undefined.
Check the FIFO empty flag (CFx) before reading to avoid invalid data.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
captureIndex – Capture channel and edge detector index (use flexpwm_capture_index_t enum).
- Returns:
The captured counter value (16-bit).
-
uint16_t FLEXPWM_GetInputCaptureCycle(PWM_Type *base, uint8_t submodule, flexpwm_capture_index_t captureIndex)#
Read captured cycle counter value from a FlexPWM capture channel.
This function reads the captured cycle counter value from one of the six capture cycle registers (CCYC0-5) for the specified capture channel and edge detector. The cycle counter value represents the upper part of the extended timestamp when a capture event occurs.
Note
CCYC register mapping (matches CVAL mapping):
kFLEXPWM_Capture_X_Edge0 -> CCYC0
kFLEXPWM_Capture_X_Edge1 -> CCYC1
kFLEXPWM_Capture_A_Edge0 -> CCYC2
kFLEXPWM_Capture_A_Edge1 -> CCYC3
kFLEXPWM_Capture_B_Edge0 -> CCYC4
kFLEXPWM_Capture_B_Edge1 -> CCYC5
Note
Combined timestamp:
The full timestamp is {CCYC, CVAL} (cycle counter as upper 16 bits, capture value as lower 16 bits), forming a 32-bit extended timestamp.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
captureIndex – Capture channel and edge detector index (use flexpwm_capture_index_t enum).
- Returns:
The captured cycle counter value (16-bit).
-
void FLEXPWM_EnableInputCapture(PWM_Type *base, uint8_t submodule, flexpwm_capture_channel_t channel)#
Enable input capture for a FlexPWM capture channel.
This function enables input capture operation for the specified capture channel by setting the corresponding ARM bit (ARMA/ARMB/ARMX) in the capture control register.
Note
ARM bit behavior in one-shot mode: When the capture channel is configured for one-shot mode (ONESHOT = 1), the ARM bit automatically clears after two capture events complete.
Note
Prerequisites: Before enabling capture, ensure:
Capture channel is configured (FLEXPWM_ConfigInputCapture)
Edge detectors are configured (EDGA0/EDGA1, EDGB0/EDGB1, or EDGX0/EDGX1)
Counter is running (FLEXPWM_EnableSubmoduleCounter)
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
channel – Capture channel selection (use flexpwm_capture_channel_t enum).
-
void FLEXPWM_DisableInputCapture(PWM_Type *base, uint8_t submodule, flexpwm_capture_channel_t channel)#
Disable input capture for a FlexPWM capture channel.
This function disables input capture operation for the specified capture channel by clearing the corresponding ARM bit (ARMA/ARMB/ARMX) in the capture control register.
Note
FIFO handling: Disabling capture does not flush the FIFO. Any previously captured values remain readable. Clear the capture flags (CFx0/CFx1) separately if needed.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
channel – Capture channel selection (use flexpwm_capture_channel_t enum).
-
static inline void FLEXPWM_SetINIT(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the INIT register value for a FlexPWM submodule.
This function directly writes a value to the INIT register (initial count register). The INIT register defines the starting value of the counter when it is initialized.
Note
This function is intended for use in runtime scenarios such as interrupt handlers to dynamically adjust PWM parameters. It performs a direct register write without checking or managing MCTRL[LDOK]. Users are responsible for:
Ensuring LDOK is clear before calling this function
Setting LDOK after updating registers to trigger reload
Managing reload timing and synchronization
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the INIT register (16-bit).
-
static inline void FLEXPWM_SetVAL0(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the VAL0 register value for a FlexPWM submodule.
This function directly writes a value to the VAL0 register. VAL0 defines the half-cycle reload point for the PWM counter.
Note
This function is intended for use in runtime scenarios such as interrupt handlers to dynamically adjust PWM parameters. It performs a direct register write without checking or managing MCTRL[LDOK]. Users are responsible for reload timing.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the VAL0 register (16-bit).
-
static inline void FLEXPWM_SetVAL1(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the VAL1 register value for a FlexPWM submodule.
This function directly writes a value to the VAL1 register. VAL1 defines the modulo (period) value for the PWM counter.
Note
This function is intended for use in runtime scenarios such as interrupt handlers to dynamically adjust PWM period. It performs a direct register write without checking or managing MCTRL[LDOK]. Users are responsible for reload timing.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the VAL1 register (16-bit).
-
static inline void FLEXPWM_SetVAL2(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the VAL2 register value for a FlexPWM submodule.
This function directly writes a value to the VAL2 register. VAL2 defines the count value at which PWM23 (PWM_A) is set high, controlling the turn-on edge of PWM_A output.
Note
This function is intended for use in runtime scenarios such as interrupt handlers to dynamically adjust PWM_A duty cycle. It performs a direct register write without checking or managing MCTRL[LDOK]. Users are responsible for reload timing.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the VAL2 register (16-bit).
-
static inline void FLEXPWM_SetVAL3(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the VAL3 register value for a FlexPWM submodule.
This function directly writes a value to the VAL3 register. VAL3 defines the count value at which PWM23 (PWM_A) is set low, controlling the turn-off edge of PWM_A output.
Note
This function is intended for use in runtime scenarios such as interrupt handlers to dynamically adjust PWM_A duty cycle. It performs a direct register write without checking or managing MCTRL[LDOK]. Users are responsible for reload timing.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the VAL3 register (16-bit).
-
static inline void FLEXPWM_SetVAL4(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the VAL4 register value for a FlexPWM submodule.
This function directly writes a value to the VAL4 register. VAL4 defines the count value at which PWM45 (PWM_B) is set high, controlling the turn-on edge of PWM_B output.
Note
This function is intended for use in runtime scenarios such as interrupt handlers to dynamically adjust PWM_B duty cycle. It performs a direct register write without checking or managing MCTRL[LDOK]. Users are responsible for reload timing.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the VAL4 register (16-bit).
-
static inline void FLEXPWM_SetVAL5(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the VAL5 register value for a FlexPWM submodule.
This function directly writes a value to the VAL5 register. VAL5 defines the count value at which PWM45 (PWM_B) is set low, controlling the turn-off edge of PWM_B output.
Note
This function is intended for use in runtime scenarios such as interrupt handlers to dynamically adjust PWM_B duty cycle. It performs a direct register write without checking or managing MCTRL[LDOK]. Users are responsible for reload timing.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the VAL5 register (16-bit).
-
static inline void FLEXPWM_SetDTCNT0(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the DTCNT0 register value for a FlexPWM submodule.
This function directly writes a value to the DTCNT0 register (deadtime count register 0). DTCNT0 specifies the number of IPBus clock cycles for deadtime delay insertion, independent of the PWM clock prescaler settings (CTRL[PRSC] and CTRL2[CLK_SEL]). DTCNT0 inserts software-selectable activation delays at PWM_A turn-on edge.
Note
DTCNT0 is an 11-bit register with valid range 0-0x7FF. Values exceeding this range will be masked to 11 bits.
Note
This function applies only to complementary PWM mode.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the DTCNT0 register (11-bit, range: 0-0x7FF).
-
static inline void FLEXPWM_SetDTCNT1(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the DTCNT1 register value for a FlexPWM submodule.
This function directly writes a value to the DTCNT1 register (deadtime count register 1). DTCNT1 specifies the number of IPBus clock cycles for deadtime delay insertion, independent of the PWM clock prescaler settings (CTRL[PRSC] and CTRL2[CLK_SEL]). DTCNT1 inserts software-selectable activation delays at PWM_B turn-on edge.
Note
DTCNT1 is an 11-bit register with valid range 0-0x7FF. Values exceeding this range will be masked to 11 bits.
Note
This function applies only to complementary PWM mode.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
value – The value to write to the DTCNT1 register (11-bit, range: 0-0x7FF).
-
static inline void FLEXPWM_SetPhaseDelay(PWM_Type *base, uint8_t submodule, uint16_t value)#
Set the Phase Delay register value for a FlexPWM submodule.
This function directly writes a value to the PHASEDLY register (phase delay register). PHASEDLY defines the time delay from the master sync signal (from submodule 0) to when this submodule recognizes the master sync, specified in PWM clock cycles.
Setting this register to a non-zero value and using the master sync signal as the initialization source allows this submodule’s output to be delayed by a fixed number of cycles relative to submodule 0, enabling phase-shifted PWM outputs.
Note
PHASEDLY is only valid for submodules 1-3. Submodule 0 is the master sync source and cannot have a phase delay relative to itself.
Note
This function is intended for use in runtime scenarios such as interrupt handlers to dynamically adjust phase delay. It performs a direct register write without checking or managing MCTRL[LDOK]. Users are responsible for reload timing.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (1-3, must NOT be 0).
value – The value to write to the PHASEDLY register (16-bit).
-
static inline void FLEXPWM_SetCompareMode(PWM_Type *base, uint8_t submodule, flexpwm_compare_mode_t compareMode)#
Set Compare Mode for a FlexPWM submodule.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
compareMode – The compare mode to set for the submodule.
-
static inline void FLEXPWM_MaskPWMOutput(PWM_Type *base, uint16_t aMask, uint16_t bMask, uint16_t xMask)#
Mask PWM_A, PWM_B, PWM_X outputs for specified submodules.
This function sets the MASK register bits to mask (disable) PWM outputs by forcing them to logic 0 before output polarity is applied. The mask takes effect when a FORCE_OUT event occurs on the corresponding submodule, unless immediate update is enabled.
Note
MASK register characteristics:
Double-buffered register: writes take effect on next FORCE_OUT event
Use FLEXPWM_EnableUpdateMaskImmediately() to bypass FORCE_OUT requirement
Masking forces output to logic 0 before polarity inversion
Note
This function performs read-modify-write to preserve:
Mask settings for other submodules not specified in parameters
UPDATE_MASK bits (on platforms with FSL_FEATURE_PWM_MASK_HAS_UPDATE_MASK_BITFIELD)
- Parameters:
base – FlexPWM peripheral base address.
aMask – Submodule mask for PWM_A outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
bMask – Submodule mask for PWM_B outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
xMask – Submodule mask for PWM_X outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_UnMaskPWMOutput(PWM_Type *base, uint16_t aMask, uint16_t bMask, uint16_t xMask)#
Unmask PWM_A, PWM_B, PWM_X outputs for specified submodules.
This function clears the MASK register bits to unmask (enable) PWM outputs. The unmask takes effect when a FORCE_OUT event occurs on the corresponding submodule, unless immediate update is enabled.
- Parameters:
base – FlexPWM peripheral base address.
aMask – Submodule mask for PWM_A outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
bMask – Submodule mask for PWM_B outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
xMask – Submodule mask for PWM_X outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_EnableUpdateMaskImmediately(PWM_Type *base, uint16_t submoduleMask)#
Enable immediate MASK register update for specified submodules.
This function configures the specified submodules to update their MASK register values immediately, bypassing the FORCE_OUT event requirement. This is useful for emergency stop or fault protection scenarios where immediate output masking is required.
Note
MASK[UPDATE_MASK] register characteristics:
Setting a bit to 1 enables immediate MASK update for that submodule
Once enabled, MASK updates take effect immediately without waiting for FORCE_OUT
- Parameters:
base – FlexPWM peripheral base address.
submoduleMask – Submodule selection mask (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_SetPWMSource23(PWM_Type *base, uint8_t submodule, uint16_t source)#
Set PWM source for PWM23 (PWM_A) of a submodule.
This function selects the signal source that feeds into the deadtime insertion logic for PWM23 (PWM_A) output by configuring the DTSRCSEL register. The setting takes effect when a FORCE_OUT event occurs on the submodule.
Available sources:
Generated PWM: Normal PWM signal from PWM generator
Inverted PWM: Inverted version of generated PWM
Software: Software-controlled value from SWCOUT register
External: External input signal
Note
DTSRCSEL register characteristics:
Double-buffered: Changes take effect on next FORCE_OUT event
NOT affected by MCTRL[LDOK]: Independent of reload mechanism
Global register: This function performs read-modify-write to protect other submodules
Note
When source is set to kFLEXPWM_ForcePwmSource_Software, use FLEXPWM_SetSoftwareControlOutput23() to set the output value.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
source – PWM source selection (use flexpwm_force_pwm_source_t enum).
-
static inline void FLEXPWM_SetPWMSource45(PWM_Type *base, uint8_t submodule, uint16_t source)#
Set PWM source for PWM45 (PWM_B) of a submodule.
This function selects the signal source that feeds into the deadtime insertion logic for PWM45 (PWM_B) output by configuring the DTSRCSEL register. The setting takes effect when a FORCE_OUT event occurs on the submodule.
Note
See FLEXPWM_SetPWMSource23() documentation for detailed information about source selection, register characteristics, and usage notes.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
source – PWM source selection (use flexpwm_force_pwm_source_t enum).
-
static inline void FLEXPWM_SetSoftwareControlOutput23(PWM_Type *base, uint8_t submodule, uint16_t softwareValue)#
Set software-controlled output value for PWM23 (PWM_A) of a submodule.
This function sets the software-controlled PWM output value in the SWCOUT register. This value is used as the PWM source when DTSRCSEL is configured to select software control (kFLEXPWM_ForcePwmSource_Software). The setting takes effect when a FORCE_OUT event occurs on the submodule.
Note
SWCOUT register characteristics:
Double-buffered: Changes take effect on next FORCE_OUT event
NOT affected by MCTRL[LDOK]: Independent of reload mechanism
Global register: This function performs read-modify-write to protect other submodules
Note
Typical usage sequence:
Call FLEXPWM_SetPWMSource23(base, kFLEXPWM_ForcePwmSource_Software, submodule)
Call FLEXPWM_SetSoftwareControlOutput23(base, value, submodule)
Trigger FORCE_OUT event to make both settings take effect
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
softwareValue – Software control output value (0 or 1).
0: Logic 0 provided to deadtime logic instead of PWM23
1: Logic 1 provided to deadtime logic instead of PWM23
-
static inline void FLEXPWM_SetSoftwareControlOutput45(PWM_Type *base, uint8_t submodule, uint16_t softwareValue)#
Set software-controlled output value for PWM45 (PWM_B) of a submodule.
This function sets the software-controlled PWM output value in the SWCOUT register. This value is used as the PWM source when DTSRCSEL is configured to select software control (kFLEXPWM_ForcePwmSource_Software).
Note
See FLEXPWM_SetSoftwareControlOutput23() documentation for detailed information about register characteristics, usage sequence, and notes.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
softwareValue – Software control output value (0 or 1).
0: Logic 0 provided to deadtime logic instead of PWM45
1: Logic 1 provided to deadtime logic instead of PWM45
-
static inline void FLEXPWM_SetComplementaryPWMSource23(PWM_Type *base, uint16_t submoduleMask)#
Select PWM23 (PWM_A) as complementary PWM source for specified submodules.
This function configures the MCTRL[IPOL] register to select PWM23 (PWM_A) as the source for generating complementary PWM pair outputs in complementary mode. The setting takes effect when a FORCE_OUT event occurs on the submodule.
In complementary mode:
PWM_A output: PWM23 signal (non-inverted)
PWM_B output: ~PWM23 signal (inverted complement)
Note
MCTRL[IPOL] register characteristics:
Takes effect on FORCE_OUT event (double-buffered behavior)
Only applies when submodule is in complementary mode (INDEP = 0)
Ignored in independent mode (INDEP = 1)
Note
This function clears IPOL bits for specified submodules (IPOL = 0 selects PWM23).
- Parameters:
base – FlexPWM peripheral base address.
submoduleMask – Submodule selection mask (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_SetComplementaryPWMSource45(PWM_Type *base, uint16_t submoduleMask)#
Select PWM45 (PWM_B) as complementary PWM source for specified submodules.
This function configures the MCTRL[IPOL] register to select PWM45 (PWM_B) as the source for generating complementary PWM pair outputs in complementary mode. The setting takes effect when a FORCE_OUT event occurs on the submodule.
In complementary mode:
PWM_A output: ~PWM45 signal (inverted complement)
PWM_B output: PWM45 signal (non-inverted)
Note
See FLEXPWM_SetComplementaryPWMSource23() documentation for detailed information about MCTRL[IPOL] characteristics and complementary mode operation.
Note
This function sets IPOL bits for specified submodules (IPOL = 1 selects PWM45).
- Parameters:
base – FlexPWM peripheral base address.
submoduleMask – Submodule selection mask (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_SetLoadOkay(PWM_Type *base, uint16_t submoduleMask)#
Set Load Okay (LDOK) for specified submodules.
This function sets the MCTRL[LDOK] bits to enable register reload for the specified submodules. When LDOK is set, buffered register values will be transferred to active registers according to the reload mode and timing configured in CTRL[LDMOD, LDFQ, HALF, FULL].
Note
LDOK behavior:
Can only be set when the corresponding LDOK bit is currently 0
Automatically cleared by hardware after reload completes
Can be manually cleared using FLEXPWM_ClearLoadOkay()
While LDOK=1, writes to buffered registers are blocked
Note
Typical usage flow:
Modify buffered registers (VAL0-5, INIT, etc.) using FLEXPWM_SetVALx() or similar
Call FLEXPWM_SetLoadOkay() to trigger reload
Hardware transfers buffered values at the configured reload opportunity
LDOK automatically clears after reload completes
- Parameters:
base – FlexPWM peripheral base address.
submoduleMask – Submodule selection mask (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_ClearLoadOkay(PWM_Type *base, uint16_t submoduleMask)#
Clear Load Okay (LDOK) for specified submodules.
This function clears the MCTRL[LDOK] bits by writing to MCTRL[CLDOK] bits. This cancels a pending reload operation for the specified submodules.
Note
MCTRL[CLDOK] (Clear LDOK) mechanism:
Writing 1 to CLDOK[x] clears the corresponding LDOK[x] bit
CLDOK is write-only; reading always returns 0
Use this when you need to cancel a pending reload
- Parameters:
base – FlexPWM peripheral base address.
submoduleMask – Submodule selection mask (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline uint16_t FLEXPWM_GetLoadOkay(PWM_Type *base)#
Get Load Okay (LDOK) status.
This function reads the MCTRL[LDOK] bits to check which submodules have pending reload operations.
Note
Return value format:
Bit[0]: Submodule 0 LDOK status
Bit[1]: Submodule 1 LDOK status
Bit[2]: Submodule 2 LDOK status
Bit[3]: Submodule 3 LDOK status
Note
Usage example:
uint16_t ldokStatus = FLEXPWM_GetLoadOkay(PWM0); if (ldokStatus & kFLEXPWM_SubmoduleMask_0) { }
- Parameters:
base – FlexPWM peripheral base address.
- Returns:
LDOK status bits (bit[3:0] correspond to submodules 3-0). Use flexpwm_submodule_mask_t enum values to check specific submodules.
-
static inline void FLEXPWM_SetLocalForceOut(PWM_Type *base, uint8_t submodule)#
Set local FORCE_OUT event for a submodule.
This function sets the SMxCTRL2[FORCE] bit to trigger a local FORCE_OUT event. When a FORCE_OUT event occurs, several double-buffered registers immediately update:
DTSRCSEL (PWM source selection)
SWCOUT (software-controlled output values)
MASK (output masking)
MCTRL[IPOL] (complementary PWM source selection)
Additionally, if CTRL2[FRCEN] is enabled and the counter is running, the counter will be initialized to the INIT register value.
Note
FORCE_OUT trigger source: This function triggers a local FORCE_OUT event by setting CTRL2[FORCE]. The FORCE_OUT event only occurs if CTRL2[FORCE_SEL] = 0 (local force selected). If FORCE_SEL selects a different source, setting FORCE has no effect.
Note
Counter initialization: The counter is reinitialized only if:
CTRL2[FRCEN] = 1 (force initialization enabled), AND
MCTRL[RUN] = 1 (counter running) OR CTRL2[CLK_SEL] = 2 (submodule 0 aux clock)
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
-
static inline void FLEXPWM_SetCounterForceInitialization(PWM_Type *base, uint8_t submodule, bool enable)#
Enable or disable counter initialization on FORCE_OUT event.
This function controls whether FORCE_OUT events can trigger counter initialization by configuring the CTRL2[FRCEN] bit. When enabled, the counter will be reset to the INIT register value when local software forced event occurs.
Note
Counter initialization conditions: The counter is reinitialized only when ALL of the following conditions are met:
CTRL2[FRCEN] = 1 (enabled via this function), AND
A local FORCE_OUT event occurs (CTRL2[FORCE_SEL] = 0, CTRL2[FORCE] = 1)
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
enable – Enable or disable counter force initialization:
true: FORCE_OUT events can trigger counter initialization (FRCEN = 1)
false: FORCE_OUT events do not affect counter initialization (FRCEN = 0)
-
static inline void FLEXPWM_EnableSubmoduleCounter(PWM_Type *base, uint16_t submoduleMask)#
Enable PWM counter for specified submodules.
This function enables the PWM counters for the specified submodules by setting MCTRL[RUN] bits. When enabled, the counters start running and generating PWM waveforms.
Note
Effects of enabling counter (RUN=1):
Counter begins incrementing/decrementing according to configuration
PWM generation starts (if outputs are also enabled)
Reload events can occur at configured opportunities
FORCE_OUT can trigger counter initialization (if FRCEN enabled)
- Parameters:
base – FlexPWM peripheral base address.
submoduleMask – Submodule selection mask (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_DisableSubmoduleCounter(PWM_Type *base, uint16_t submoduleMask)#
Disable PWM counter for specified submodules.
This function disables the PWM counters for the specified submodules by clearing MCTRL[RUN] bits. When disabled, the counters stop running but retain their configuration.
Note
Effects of disabling counter (RUN=0):
Counter stops incrementing/decrementing
PWM generation ceases (outputs hold last state or go to fault state)
Configuration registers remain intact
Fault clearing behavior changes (see fault protection documentation)
- Parameters:
base – FlexPWM peripheral base address.
submoduleMask – Submodule selection mask (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_EnablePWMOutput(PWM_Type *base, uint16_t aMask, uint16_t bMask, uint16_t xMask)#
Enable PWM_A, PWM_B, PWM_X outputs for specified submodules.
This function enables PWM outputs by setting the corresponding bits in the OUTEN register. Each output (PWM_A, PWM_B, PWM_X) can be independently enabled for each submodule.
Note
OUTEN register layout (same as MASK register):
bit[11:8]: PWMA_EN - PWM_A output enable for submodules 3-0
bit[7:4]: PWMB_EN - PWM_B output enable for submodules 3-0
bit[3:0]: PWMX_EN - PWM_X output enable for submodules 3-0
Note
Prerequisites: Before enabling outputs, ensure:
PWM waveform is configured (FLEXPWM_ConfigPWM)
Counter is running (FLEXPWM_EnableSubmoduleCounter)
Outputs are not masked (check MASK register)
- Parameters:
base – FlexPWM peripheral base address.
aMask – Submodule mask for PWM_A outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
bMask – Submodule mask for PWM_B outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
xMask – Submodule mask for PWM_X outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_DisablePWMOutput(PWM_Type *base, uint16_t aMask, uint16_t bMask, uint16_t xMask)#
Disable PWM_A, PWM_B, PWM_X outputs for specified submodules.
This function disables PWM outputs by clearing the corresponding bits in the OUTEN register. When an output is disabled, the pin is released from FlexPWM control and may be controlled by other peripherals or GPIO.
Note
Output disable effects:
Pin is tri-stated or controlled by GPIO/other peripherals
PWM waveform generation continues internally
Re-enabling the output will resume PWM operation seamlessly
- Parameters:
base – FlexPWM peripheral base address.
aMask – Submodule mask for PWM_A outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
bMask – Submodule mask for PWM_B outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
xMask – Submodule mask for PWM_X outputs (OR’ed combination of flexpwm_submodule_mask_t). bit[0]=SM0, bit[1]=SM1, bit[2]=SM2, bit[3]=SM3.
-
static inline void FLEXPWM_SetWriteProtection(PWM_Type *base, flexpwm_write_protect_t config)#
Set FlexPWM write protection mode.
This function configures the write protection for FlexPWM registers by setting MCTRL2[WRPROT]. Write protection prevents accidental modification of critical PWM configuration registers.
Note
Write protection modes:
kFLEXPWM_WriteProtect_Off: Write protection is disabled (default after reset)
kFLEXPWM_WriteProtect_On: Write protection is enabled but can be disabled
kFLEXPWM_WriteProtect_OffLocked: Write protection is disabled and locked until chip reset
kFLEXPWM_WriteProtect_OnLocked: Write protection is enabled and locked until chip reset
Note
Once a locked mode is set (OffLocked or OnLocked), the write protection state cannot be changed until the next chip reset. Use locked modes for safety-critical applications.
- Parameters:
base – FlexPWM peripheral base address.
config – Write protection mode selection.
-
static inline void FLEXPWM_EnableSubmoduleInterrupts(PWM_Type *base, uint8_t submodule, uint16_t mask)#
Enable FlexPWM submodule interrupts.
This function enables the specified interrupt sources for a FlexPWM submodule by setting the corresponding bits in the SMxINTEN register.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
mask – Interrupt enable mask (OR’ed combination of _flexpwm_submodule_interrupt_enable flags).
-
static inline void FLEXPWM_DisableSubmoduleInterrupts(PWM_Type *base, uint8_t submodule, uint16_t mask)#
Disable FlexPWM submodule interrupts.
This function disables the specified interrupt sources for a FlexPWM submodule by clearing the corresponding bits in the SMxINTEN register.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
mask – Interrupt disable mask (OR’ed combination of _flexpwm_submodule_interrupt_enable flags).
-
static inline uint16_t FLEXPWM_GetSubmoduleStatusFlags(PWM_Type *base, uint8_t submodule)#
Get FlexPWM submodule status flags.
This function returns the current status flags from the SMxSTS register.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
- Returns:
Current status flags (combination of _flexpwm_submodule_status_flag values).
-
static inline void FLEXPWM_ClearSubmoduleStatusFlags(PWM_Type *base, uint8_t submodule, uint16_t mask)#
Clear FlexPWM submodule status flags.
This function clears the specified status flags in the SMxSTS register using the write-1-to-clear (W1C) mechanism.
Note
Do not attempt to clear kFLEXPWM_RegisterUpdatedFlag (RUF) as it is read-only.
- Parameters:
base – FlexPWM peripheral base address.
submodule – Submodule number (0-3).
mask – Status flag clear mask (OR’ed combination of _flexpwm_submodule_status_flag values). To clear a flag, set the corresponding bit to 1 in the mask.
-
static inline void FLEXPWM_EnableFaultInterrupts(PWM_Type *base, uint8_t faultChannel, uint16_t mask)#
Enable FlexPWM fault interrupts.
This function enables the specified fault interrupt sources by setting the corresponding bits in the FCTRL[FIE] field.
Note
For dual-channel platforms (FSL_FEATURE_PWM_FAULT_CH_COUNT > 1): The same mask bit values are used for both fault channels. The faultChannel parameter determines which set of fault inputs is controlled:
faultChannel = 0: Controls FAULT0-3 interrupts
faultChannel = 1: Controls FAULT4-7 interrupts
- Parameters:
base – FlexPWM peripheral base address.
faultChannel – Fault channel number:
0: Fault channel 0 (FAULT0-3)
1: Fault channel 1 (FAULT4-7, if supported)
mask – Fault interrupt enable mask (OR’ed combination of _flexpwm_fault_interrupt_enable flags).
-
static inline void FLEXPWM_DisableFaultInterrupts(PWM_Type *base, uint8_t faultChannel, uint16_t mask)#
Disable FlexPWM fault interrupts.
This function disables the specified fault interrupt sources by clearing the corresponding bits in the FCTRL[FIE] field.
- Parameters:
base – FlexPWM peripheral base address.
faultChannel – Fault channel number:
0: Fault channel 0 (FAULT0-3)
1: Fault channel 1 (FAULT4-7, if supported)
mask – Fault interrupt disable mask (OR’ed combination of _flexpwm_fault_interrupt_enable flags).
-
static inline uint16_t FLEXPWM_GetFaultStatusFlags(PWM_Type *base, uint8_t faultChannel)#
Get FlexPWM fault status flags.
This function returns the current fault status flags (FFLAG bits) from the FSTS register. These are latched flags that indicate a fault event has occurred.
Note
To check real-time hardware pin status (rather than latched flags), use FLEXPWM_GetFaultFilteredPinStatusFlags() instead.
- Parameters:
base – FlexPWM peripheral base address.
faultChannel – Fault channel number:
0: Fault channel 0 (FAULT0-3)
1: Fault channel 1 (FAULT4-7, if supported)
- Returns:
Current fault flags (combination of _flexpwm_fault_status_flag values).
-
static inline void FLEXPWM_ClearFaultStatusFlags(PWM_Type *base, uint8_t faultChannel, uint16_t mask)#
Clear FlexPWM fault status flags.
This function clears the specified fault status flags (FFLAG bits) in the FSTS register using the write-1-to-clear (W1C) mechanism.
Note
Clearing FFLAG does not automatically re-enable PWM outputs. The re-enable timing depends on fault clearing mode (FAUTO), safety mode (FSAFE), recovery timing (FHALF/FFULL), and the state of FFPIN (filtered pin status).
- Parameters:
base – FlexPWM peripheral base address.
faultChannel – Fault channel number:
0: Fault channel 0 (FAULT0-3)
1: Fault channel 1 (FAULT4-7, if supported)
mask – Fault flag clear mask (OR’ed combination of _flexpwm_fault_status_flag values). To clear a flag, set the corresponding bit to 1 in the mask.
-
static inline uint16_t FLEXPWM_GetFaultFilteredPinStatusFlags(PWM_Type *base, uint8_t faultChannel)#
Get FlexPWM filtered fault pin status.
This function returns the real-time status of fault pins after filtering (FFPIN bits) from the FSTS register. These are read-only hardware status bits that reflect the current state of external fault signals.
Note
Key differences:
FFLAG: Software-clearable latched flag (historical event - “a fault occurred”)
FFPIN: Read-only real-time status (current state - “fault is active now”)
- Parameters:
base – FlexPWM peripheral base address.
faultChannel – Fault channel number:
0: Fault channel 0 (FAULT0-3 pins)
1: Fault channel 1 (FAULT4-7 pins, if supported)
- Returns:
Current filtered fault pin status (combination of _flexpwm_fault_pin_status values).
-
void FLEXPWM_ConfigDMA(PWM_Type *base, uint8_t submodule, const flexpwm_dma_config_t *config)#
Configures the DMA control strategy for a FlexPWM submodule.
This function configures the DMA trigger source and FIFO watermark logic. These settings define the DMA request generation strategy and should typically be configured once during initialization.
Note
This function only configures CAPTDE[7:6] and FAND bits in SMxDMAEN register. To enable/disable individual DMA channels at runtime, use FLEXPWM_EnableDMA() and FLEXPWM_DisableDMA().
Note
Prerequisites: Before calling this function, ensure:
FIFO watermark levels are configured in FLEXPWM_ConfigInputCapture()
Capture channels are properly configured if using capture DMA
- Parameters:
base – FlexPWM peripheral base address
submodule – FlexPWM submodule number (0-3)
config – Pointer to DMA configuration structure
-
static inline void FLEXPWM_EnableDMA(PWM_Type *base, uint8_t submodule, uint16_t mask)#
Enable FlexPWM submodule DMA requests.
This function enables DMA request generation for the specified channels. It controls the VALDE bit (VALx/FRACVALx write) and capture channel enables (CX0DE, CX1DE, CB0DE, CB1DE, CA0DE, CA1DE).
Note
Before calling this function, ensure FLEXPWM_ConfigDMA() has been called to set up the DMA trigger strategy.
- Parameters:
base – FlexPWM peripheral base address
submodule – FlexPWM submodule number (0-3)
mask – Bit mask of DMA enable flags (OR’ed combination of _flexpwm_dma_enable)
-
static inline void FLEXPWM_DisableDMA(PWM_Type *base, uint8_t submodule, uint16_t mask)#
Disable FlexPWM submodule DMA requests.
This function disables DMA request generation for the specified channels.
- Parameters:
base – FlexPWM peripheral base address
submodule – FlexPWM submodule number (0-3)
mask – Bit mask of DMA enable flags (OR’ed combination of _flexpwm_dma_enable)
-
FSL_FLEXPWM_DRIVER_VERSION#
Version 2.0.0
-
enum _flexpwm_clock_source#
FlexPWM clock source selection.
Values:
-
enumerator kFLEXPWM_ClockSource_IPBusClock#
IPBus clock
-
enumerator kFLEXPWM_ClockSource_ExtClock#
External clock (EXT_CLK)
-
enumerator kFLEXPWM_ClockSource_Submodule0Clock#
Submodule 0 auxiliary clock
-
enumerator kFLEXPWM_ClockSource_IPBusClock#
-
enum _flexpwm_prescaler#
FlexPWM clock prescaler selection.
Values:
-
enumerator kFLEXPWM_Prescale_Divide_1#
Divide by 1
-
enumerator kFLEXPWM_Prescale_Divide_2#
Divide by 2
-
enumerator kFLEXPWM_Prescale_Divide_4#
Divide by 4
-
enumerator kFLEXPWM_Prescale_Divide_8#
Divide by 8
-
enumerator kFLEXPWM_Prescale_Divide_16#
Divide by 16
-
enumerator kFLEXPWM_Prescale_Divide_32#
Divide by 32
-
enumerator kFLEXPWM_Prescale_Divide_64#
Divide by 64
-
enumerator kFLEXPWM_Prescale_Divide_128#
Divide by 128
-
enumerator kFLEXPWM_Prescale_Divide_1#
-
enum _flexpwm_load_mode#
FlexPWM load mode selection.
Values:
-
enumerator kFLEXPWM_LoadMode_Opportunity#
Load at PWM reload opportunity
-
enumerator kFLEXPWM_LoadMode_Immediate#
Load immediately after LDOK is set
-
enumerator kFLEXPWM_LoadMode_Opportunity#
-
enum _flexpwm_reload_source#
FlexPWM reload source selection.
Values:
-
enumerator kFLEXPWM_ReloadSource_LocalReload#
Local reload signal
-
enumerator kFLEXPWM_ReloadSource_MasterReload#
Master reload signal from submodule 0
-
enumerator kFLEXPWM_ReloadSource_LocalReload#
-
enum _flexpwm_init_source#
FlexPWM counter initialization source selection.
Values:
-
enumerator kFLEXPWM_InitSource_LocalSync#
Local sync signal
-
enumerator kFLEXPWM_InitSource_MasterReload#
Master reload signal from submodule 0
-
enumerator kFLEXPWM_InitSource_MasterSync#
Master sync signal from submodule 0
-
enumerator kFLEXPWM_InitSource_ExtSync#
External sync signal (EXT_SYNC)
-
enumerator kFLEXPWM_InitSource_LocalSync#
-
enum _flexpwm_compare_mode#
FlexPWM PWM compare mode selection.
Values:
-
enumerator kFLEXPWM_CompareMode_Equal#
Compare when counter equals compare value
-
enumerator kFLEXPWM_CompareMode_EqualGreater#
Compare when counter is equal or greater than compare value
-
enumerator kFLEXPWM_CompareMode_Equal#
-
enum _flexpwm_submodule_mask#
FlexPWM submodule mask for multi-submodule operations.
These flags can be OR’ed together to specify multiple submodules simultaneously. Used with functions that operate on multiple submodules at once.
Values:
-
enumerator kFLEXPWM_SubmoduleMask_0#
Submodule 0
-
enumerator kFLEXPWM_SubmoduleMask_1#
Submodule 1
-
enumerator kFLEXPWM_SubmoduleMask_2#
Submodule 2
-
enumerator kFLEXPWM_SubmoduleMask_0#
-
enum _flexpwm_pwm_polarity#
FlexPWM PWM output polarity selection.
Values:
-
enumerator kFLEXPWM_Polarity_ActiveHigh#
PWM signal is normal (active high)
-
enumerator kFLEXPWM_Polarity_ActiveLow#
PWM signal is inverted (active low)
-
enumerator kFLEXPWM_Polarity_ActiveHigh#
-
enum _flexpwm_ipol_source#
FlexPWM PWM output source selection for complementary mode.
Values:
-
enumerator kFLEXPWM_IPOL_PWM23#
Use PWM23 (PWM_A) as complementary PWM source
-
enumerator kFLEXPWM_IPOL_PWM45#
Use PWM45 (PWM_B) as complementary PWM source
-
enumerator kFLEXPWM_IPOL_PWM23#
-
enum _flexpwm_force_output_source#
FlexPWM FORCE_OUT event source selection.
Values:
-
enumerator kFLEXPWM_ForceOutputSource_LocalForce#
Local software forced event
-
enumerator kFLEXPWM_ForceOutputSource_MasterForce#
Master force signal from submodule 0
-
enumerator kFLEXPWM_ForceOutputSource_LocalReload#
Local reload signal
-
enumerator kFLEXPWM_ForceOutputSource_MasterReload#
Master reload signal from submodule 0
-
enumerator kFLEXPWM_ForceOutputSource_LocalSync#
Local sync signal
-
enumerator kFLEXPWM_ForceOutputSource_MasterSync#
Master sync signal from submodule 0
-
enumerator kFLEXPWM_ForceOutputSource_ExtForce#
External force signal (EXT_FORCE)
-
enumerator kFLEXPWM_ForceOutputSource_ExtSync#
External sync signal (EXT_SYNC)
-
enumerator kFLEXPWM_ForceOutputSource_LocalForce#
-
enum _flexpwm_force_pwm_source#
FlexPWM PWM source selection for deadtime logic (DTSRCSEL)
Values:
-
enumerator kFLEXPWM_ForcePwmSource_Generated#
Generated PWM signal
-
enumerator kFLEXPWM_ForcePwmSource_Inverted#
Inverted PWM signal
-
enumerator kFLEXPWM_ForcePwmSource_Software#
Software controlled output (SWCOUT)
-
enumerator kFLEXPWM_ForcePwmSource_External#
External signal
-
enumerator kFLEXPWM_ForcePwmSource_Generated#
-
enum _flexpwm_fault_output_behavior#
FlexPWM fault output behavior during fault condition.
Defines how PWM outputs respond when a fault is detected. Values map directly to SMxOCTRL[PWMAFS/PWMBFS/PWMXFS] bitfields.
Values:
-
enumerator kFLEXPWM_FaultOutput_Force0#
0b00 - Force output to logic 0
-
enumerator kFLEXPWM_FaultOutput_Force1#
0b01 - Force output to logic 1
-
enumerator kFLEXPWM_FaultOutput_HighZ#
0b10/0b11 - High impedance (3-state) output
-
enumerator kFLEXPWM_FaultOutput_Force0#
-
enum _flexpwm_fault_mask#
FlexPWM fault input mask for fault protection configuration.
These flags can be OR’ed together to configure multiple fault inputs simultaneously with the same protection parameters. Used with FLEXPWM_ConfigFaultProtection() function.
Note
For dual-channel platforms (FSL_FEATURE_PWM_FAULT_CH_COUNT > 1):
When faultChannel = 0: Use kFLEXPWM_FaultMask_0/1/2/3 for FAULT0-3
When faultChannel = 1: Use kFLEXPWM_FaultMask_0/1/2/3 for FAULT4-7 The enum values are the same, but the channel parameter determines which physical fault inputs are configured.
Values:
-
enumerator kFLEXPWM_FaultMask_0#
FAULT0 (ch0) or FAULT4 (ch1)
-
enumerator kFLEXPWM_FaultMask_1#
FAULT1 (ch0) or FAULT5 (ch1)
-
enumerator kFLEXPWM_FaultMask_2#
FAULT2 (ch0) or FAULT6 (ch1)
-
enumerator kFLEXPWM_FaultMask_3#
FAULT3 (ch0) or FAULT7 (ch1)
-
enum _flexpwm_fault_clearing_mode#
FlexPWM fault clearing mode selection.
Defines how fault conditions are cleared after a fault event.
Values:
-
enumerator kFLEXPWM_FaultClearingMode_Manual#
Manual clearing - software must clear FSTS[FFLAGx]
-
enumerator kFLEXPWM_FaultClearingMode_Automatic#
Automatic clearing when FAULTx de-asserts
-
enumerator kFLEXPWM_FaultClearingMode_Manual#
-
enum _flexpwm_write_protect#
FlexPWM write protection mode selection.
Values:
-
enumerator kFLEXPWM_WriteProtect_Off#
Write protection off (default)
-
enumerator kFLEXPWM_WriteProtect_On#
Write protection on
-
enumerator kFLEXPWM_WriteProtect_OffLocked#
Write protection off and locked until chip reset
-
enumerator kFLEXPWM_WriteProtect_OnLocked#
Write protection on and locked until chip reset
-
enumerator kFLEXPWM_WriteProtect_Off#
-
enum _flexpwm_stretch_prescaler#
FlexPWM trigger signal stretch prescaler selection.
Stretch IPBus clock count prescaler for trigger signals including: mux0_trig, mux1_trig, out0_trig, out1_trig, pwma_trig, pwmb_trig
Values:
-
enumerator kFLEXPWM_StretchPrescaler_None#
No stretch
-
enumerator kFLEXPWM_StretchPrescaler_2Clocks#
Stretch for 2 IPBus clock periods
-
enumerator kFLEXPWM_StretchPrescaler_4Clocks#
Stretch for 4 IPBus clock periods
-
enumerator kFLEXPWM_StretchPrescaler_8Clocks#
Stretch for 8 IPBus clock periods
-
enumerator kFLEXPWM_StretchPrescaler_None#
-
enum _flexpwm_trigger_mux_source#
FlexPWM output trigger source selection for PWM_MUX_TRIG0/1 ports.
Selects which signal is routed to the PWM_MUX_TRIG0/1 output ports.
Values:
-
enumerator kFLEXPWM_TriggerMuxSource_GeneratedTrigger#
Use PWM_OUT_TRIG0/1 (generated trigger signal)
-
enumerator kFLEXPWM_TriggerMuxSource_PWMOutput#
Use PWM_A/PWM_B output directly
-
enumerator kFLEXPWM_TriggerMuxSource_GeneratedTrigger#
-
enum _flexpwm_trigger_frequency#
FlexPWM output trigger frequency selection.
Controls the trigger output frequency when CTRL[LDFQ] is non-zero. Only takes effect when reload frequency divider is active (LDFQ > 0).
Values:
-
enumerator kFLEXPWM_TriggerFrequency_EveryCycle#
Trigger every PWM cycle even if reload doesn’t occur
-
enumerator kFLEXPWM_TriggerFrequency_OnReload#
Trigger only on last cycle before reload opportunity
-
enumerator kFLEXPWM_TriggerFrequency_EveryCycle#
-
enum _flexpwm_output_trigger_mask#
FlexPWM output trigger enable mask.
These flags can be OR’ed together to enable multiple trigger sources simultaneously. Used with outTriggerEnable field in flexpwm_output_trigger_config_t structure.
Values:
-
enumerator kFLEXPWM_OutputTriggerMask_VAL0#
VAL0 match triggers PWM_OUT_TRIG0
-
enumerator kFLEXPWM_OutputTriggerMask_VAL1#
VAL1 match triggers PWM_OUT_TRIG1
-
enumerator kFLEXPWM_OutputTriggerMask_VAL2#
VAL2 match triggers PWM_OUT_TRIG0
-
enumerator kFLEXPWM_OutputTriggerMask_VAL3#
VAL3 match triggers PWM_OUT_TRIG1
-
enumerator kFLEXPWM_OutputTriggerMask_VAL4#
VAL4 match triggers PWM_OUT_TRIG0
-
enumerator kFLEXPWM_OutputTriggerMask_VAL5#
VAL5 match triggers PWM_OUT_TRIG1
-
enumerator kFLEXPWM_OutputTriggerMask_VAL0#
-
enum _flexpwm_capture_edge#
FlexPWM input capture edge selection.
This enumeration defines the edge detection modes for input capture. The enum values directly map to hardware register bit values.
Values:
-
enumerator kFLEXPWM_CaptureEdge_Disabled#
Disable capture (register bit value: 00b)
-
enumerator kFLEXPWM_CaptureEdge_Falling#
Capture on falling edge (register bit value: 01b)
-
enumerator kFLEXPWM_CaptureEdge_Rising#
Capture on rising edge (register bit value: 10b)
-
enumerator kFLEXPWM_CaptureEdge_Both#
Capture on any edge (register bit value: 11b)
-
enumerator kFLEXPWM_CaptureEdge_Disabled#
-
enum _flexpwm_capture_fifo_watermark#
FlexPWM capture FIFO watermark selection.
This enumeration defines the FIFO watermark levels that determine when a watermark interrupt is triggered based on the number of valid samples in the FIFO.
Values:
-
enumerator kFLEXPWM_CaptureFifoWatermark_1#
Trigger when FIFO has 1 or more samples (00b)
-
enumerator kFLEXPWM_CaptureFifoWatermark_2#
Trigger when FIFO has 2 or more samples (01b)
-
enumerator kFLEXPWM_CaptureFifoWatermark_3#
Trigger when FIFO has 3 or more samples (10b)
-
enumerator kFLEXPWM_CaptureFifoWatermark_4#
Trigger when FIFO is full with 4 samples (11b)
-
enumerator kFLEXPWM_CaptureFifoWatermark_1#
-
enum _flexpwm_capture_input_select#
FlexPWM capture input source selection.
This enumeration selects the source signal for input capture.
Values:
-
enumerator kFLEXPWM_CaptureInput_RawSignal#
Use raw PWM input signal (register bit value: 0)
-
enumerator kFLEXPWM_CaptureInput_EdgeCounter#
Use edge counter output (register bit value: 1). Used to reduce capture frequency by counting N edges
-
enumerator kFLEXPWM_CaptureInput_RawSignal#
-
enum _flexpwm_capture_index#
FlexPWM capture value index.
This enumeration defines the index for accessing capture value registers (CVAL0-5).
Note
Capture channel to CVAL register mapping (non-intuitive hardware mapping):
Capture_X Edge0/Edge1 -> CVAL0/CVAL1 (and CVAL0CYC/CVAL1CYC)
Capture_A Edge0/Edge1 -> CVAL2/CVAL3 (and CVAL2CYC/CVAL3CYC)
Capture_B Edge0/Edge1 -> CVAL4/CVAL5 (and CVAL4CYC/CVAL5CYC)
Values:
-
enumerator kFLEXPWM_Capture_X_Edge0#
CVAL0 - Capture_X Edge0
-
enumerator kFLEXPWM_Capture_X_Edge1#
CVAL1 - Capture_X Edge1
-
enumerator kFLEXPWM_Capture_A_Edge0#
CVAL2 - Capture_A Edge0
-
enumerator kFLEXPWM_Capture_A_Edge1#
CVAL3 - Capture_A Edge1
-
enumerator kFLEXPWM_Capture_B_Edge0#
CVAL4 - Capture_B Edge0
-
enumerator kFLEXPWM_Capture_B_Edge1#
CVAL5 - Capture_B Edge1
-
enum _flexpwm_capture_channel#
FlexPWM capture channel selection.
This enumeration defines the capture channel for enable/disable operations.
Values:
-
enumerator kFLEXPWM_Capture_A#
Capture channel A (PWM_A)
-
enumerator kFLEXPWM_Capture_B#
Capture channel B (PWM_B)
-
enumerator kFLEXPWM_Capture_X#
Capture channel X (PWM_X)
-
enumerator kFLEXPWM_Capture_A#
-
enum _flexpwm_submodule_interrupt_enable#
FlexPWM submodule interrupt enable flags.
These flags can be OR’ed together to enable multiple interrupt sources simultaneously. Use with FLEXPWM_EnableSubmoduleInterrupts() and FLEXPWM_DisableSubmoduleInterrupts().
Values:
-
enumerator kFLEXPWM_Compare0InterruptEnable#
VAL0 compare interrupt
-
enumerator kFLEXPWM_Compare1InterruptEnable#
VAL1 compare interrupt
-
enumerator kFLEXPWM_Compare2InterruptEnable#
VAL2 compare interrupt
-
enumerator kFLEXPWM_Compare3InterruptEnable#
VAL3 compare interrupt
-
enumerator kFLEXPWM_Compare4InterruptEnable#
VAL4 compare interrupt
-
enumerator kFLEXPWM_Compare5InterruptEnable#
VAL5 compare interrupt
-
enumerator kFLEXPWM_CaptureX0InterruptEnable#
Capture X0 interrupt
-
enumerator kFLEXPWM_CaptureX1InterruptEnable#
Capture X1 interrupt
-
enumerator kFLEXPWM_CaptureB0InterruptEnable#
Capture B0 interrupt
-
enumerator kFLEXPWM_CaptureB1InterruptEnable#
Capture B1 interrupt
-
enumerator kFLEXPWM_CaptureA0InterruptEnable#
Capture A0 interrupt
-
enumerator kFLEXPWM_CaptureA1InterruptEnable#
Capture A1 interrupt
-
enumerator kFLEXPWM_ReloadInterruptEnable#
Reload interrupt
-
enumerator kFLEXPWM_ReloadErrorInterruptEnable#
Reload error interrupt
-
enumerator kFLEXPWM_Compare0InterruptEnable#
-
enum _flexpwm_submodule_status_flag#
FlexPWM submodule status flags.
These flags represent the status of various events in a FlexPWM submodule. Use with FLEXPWM_GetSubmoduleStatusFlags() and FLEXPWM_ClearSubmoduleStatusFlags().
Note
kFLEXPWM_RegisterUpdatedFlag is read-only and cannot be cleared by software.
Values:
-
enumerator kFLEXPWM_Compare0Flag#
VAL0 compare flag
-
enumerator kFLEXPWM_Compare1Flag#
VAL1 compare flag
-
enumerator kFLEXPWM_Compare2Flag#
VAL2 compare flag
-
enumerator kFLEXPWM_Compare3Flag#
VAL3 compare flag
-
enumerator kFLEXPWM_Compare4Flag#
VAL4 compare flag
-
enumerator kFLEXPWM_Compare5Flag#
VAL5 compare flag
-
enumerator kFLEXPWM_CaptureX0Flag#
Capture X0 flag
-
enumerator kFLEXPWM_CaptureX1Flag#
Capture X1 flag
-
enumerator kFLEXPWM_CaptureB0Flag#
Capture B0 flag
-
enumerator kFLEXPWM_CaptureB1Flag#
Capture B1 flag
-
enumerator kFLEXPWM_CaptureA0Flag#
Capture A0 flag
-
enumerator kFLEXPWM_CaptureA1Flag#
Capture A1 flag
-
enumerator kFLEXPWM_ReloadFlag#
Reload flag
-
enumerator kFLEXPWM_ReloadErrorFlag#
Reload error flag
-
enumerator kFLEXPWM_RegisterUpdatedFlag#
Register updated flag (read-only)
-
enumerator kFLEXPWM_Compare0Flag#
-
enum _flexpwm_fault_interrupt_enable#
FlexPWM fault interrupt enable flags.
These flags can be OR’ed together to enable multiple fault interrupt sources. Use with FLEXPWM_EnableFaultInterrupts() and FLEXPWM_DisableFaultInterrupts().
Note
For dual-channel platforms (FSL_FEATURE_PWM_FAULT_CH_COUNT > 1): The same bit mask values are used for both fault channels:
faultChannel = 0: Controls FAULT0-3
faultChannel = 1: Controls FAULT4-7 The bit positions are the same, but the function parameter determines which fault channel is configured.
Values:
-
enumerator kFLEXPWM_Fault0InterruptEnable#
FAULT0 (ch0) or FAULT4 (ch1) interrupt
-
enumerator kFLEXPWM_Fault1InterruptEnable#
FAULT1 (ch0) or FAULT5 (ch1) interrupt
-
enumerator kFLEXPWM_Fault2InterruptEnable#
FAULT2 (ch0) or FAULT6 (ch1) interrupt
-
enumerator kFLEXPWM_Fault3InterruptEnable#
FAULT3 (ch0) or FAULT7 (ch1) interrupt
-
enum _flexpwm_fault_status_flag#
FlexPWM fault status flags (FFLAG)
These flags represent the latched fault status (FFLAG bits in FSTS register). Use with FLEXPWM_GetFaultStatusFlags() and FLEXPWM_ClearFaultStatusFlags().
Note
FFLAG characteristics:
Write-1-to-clear: Software must write 1 to clear each flag
Latched event: Set within 2 CPU cycles after FAULTx pin transitions to active state
Historical record: Indicates a fault event has occurred (not current pin state)
Interrupt capable: Can generate CPU interrupt requests when enabled
Manual clearing: Does not auto-clear; requires explicit software action
Note
To check the real-time, filtered hardware pin status (not the latched event), use FLEXPWM_GetFaultFilteredPinStatusFlags() to read FFPIN instead.
Note
For dual-channel platforms: The same bit mask values apply to both channels.
faultChannel = 0: FAULT0-3 flags
faultChannel = 1: FAULT4-7 flags
Values:
-
enumerator kFLEXPWM_Fault0Flag#
FAULT0 (ch0) or FAULT4 (ch1) flag
-
enumerator kFLEXPWM_Fault1Flag#
FAULT1 (ch0) or FAULT5 (ch1) flag
-
enumerator kFLEXPWM_Fault2Flag#
FAULT2 (ch0) or FAULT6 (ch1) flag
-
enumerator kFLEXPWM_Fault3Flag#
FAULT3 (ch0) or FAULT7 (ch1) flag
-
enum _flexpwm_fault_pin_status#
FlexPWM filtered fault pin status (FFPIN - read-only)
These flags represent the real-time status of fault pins after filtering (FFPIN bits in FSTS register). Use with FLEXPWM_GetFaultFilteredPinStatusFlags() to check if external fault signals are currently active.
Note
FFPIN characteristics:
Read-only: Cannot be written or cleared by software
Real-time status: Reflects current state of filtered FAULTx pin (not historical)
Polarity converted: Always shows active-high logic (1 = fault present)
Filter output: Shows fault filter output, not raw pin state
No interrupt: Does not directly generate interrupts (use FFLAG for interrupts)
Filter delay: May remain high briefly after raw pin clears due to filter latency
Note
Key differences from FFLAG:
FFLAG: Software-clearable latched flag (historical event - “a fault occurred”)
FFPIN: Read-only real-time status (current state - “fault is active now”)
Note
For dual-channel platforms: The same bit positions apply to both channels.
faultChannel = 0: FAULT0-3 pin status
faultChannel = 1: FAULT4-7 pin status
Values:
-
enumerator kFLEXPWM_Fault0PinActive#
FAULT0/4 pin active (filtered)
-
enumerator kFLEXPWM_Fault1PinActive#
FAULT1/5 pin active (filtered)
-
enumerator kFLEXPWM_Fault2PinActive#
FAULT2/6 pin active (filtered)
-
enumerator kFLEXPWM_Fault3PinActive#
FAULT3/7 pin active (filtered)
-
enum _flexpwm_dma_capture_source#
FlexPWM DMA capture source selection.
This enumeration defines the trigger source for DMA read requests from capture FIFOs.
Values:
-
enumerator kFLEXPWM_DMADisable#
Read DMA requests disabled
-
enumerator kFLEXPWM_DMAFIFOWatermark#
Exceeding FIFO watermark sets read DMA request
-
enumerator kFLEXPWM_DMALocalSync#
Local sync sets read DMA request
-
enumerator kFLEXPWM_DMALocalReload#
Local reload sets read DMA request
-
enumerator kFLEXPWM_DMADisable#
-
enum _flexpwm_dma_enable#
FlexPWM DMA enable flags.
These flags are used with FLEXPWM_EnableDMA() and FLEXPWM_DisableDMA() to control individual DMA channel enables. Multiple flags can be ORed together.
Values:
-
enumerator kFLEXPWM_DMA_CaptureX0Enable#
Capture X0 FIFO DMA enable (CX0DE)
-
enumerator kFLEXPWM_DMA_CaptureX1Enable#
Capture X1 FIFO DMA enable (CX1DE)
-
enumerator kFLEXPWM_DMA_CaptureB0Enable#
Capture B0 FIFO DMA enable (CB0DE)
-
enumerator kFLEXPWM_DMA_CaptureB1Enable#
Capture B1 FIFO DMA enable (CB1DE)
-
enumerator kFLEXPWM_DMA_CaptureA0Enable#
Capture A0 FIFO DMA enable (CA0DE)
-
enumerator kFLEXPWM_DMA_CaptureA1Enable#
Capture A1 FIFO DMA enable (CA1DE)
-
enumerator kFLEXPWM_DMA_ValueWriteEnable#
Value registers DMA write enable (VALDE)
-
enumerator kFLEXPWM_DMA_CaptureX0Enable#
-
typedef enum _flexpwm_clock_source flexpwm_clock_source_t#
FlexPWM clock source selection.
-
typedef enum _flexpwm_prescaler flexpwm_prescaler_t#
FlexPWM clock prescaler selection.
-
typedef enum _flexpwm_load_mode flexpwm_load_mode_t#
FlexPWM load mode selection.
-
typedef enum _flexpwm_reload_source flexpwm_reload_source_t#
FlexPWM reload source selection.
-
typedef enum _flexpwm_init_source flexpwm_init_source_t#
FlexPWM counter initialization source selection.
-
typedef enum _flexpwm_compare_mode flexpwm_compare_mode_t#
FlexPWM PWM compare mode selection.
-
typedef enum _flexpwm_submodule_mask flexpwm_submodule_mask_t#
FlexPWM submodule mask for multi-submodule operations.
These flags can be OR’ed together to specify multiple submodules simultaneously. Used with functions that operate on multiple submodules at once.
-
typedef struct _flexpwm_counter_config flexpwm_counter_config_t#
FlexPWM counter configuration structure.
-
typedef struct _flexpwm_reload_config flexpwm_reload_config_t#
FlexPWM reload configuration structure.
-
typedef struct _flexpwm_submodule_config flexpwm_submodule_config_t#
FlexPWM submodule configuration structure.
This structure defines the basic configuration parameters for a FlexPWM submodule, including clock source, prescaler, counter behavior, reload mechanism, and operating modes.
Note
This configuration writes to buffered registers. After calling FLEXPWM_ConfigSubmodule(), you must set MCTRL[LDOK] using a separate function to transfer the configuration to active registers.
Note
This function does not start the PWM counter. Use a separate API to enable the counter.
-
typedef enum _flexpwm_pwm_polarity flexpwm_pwm_polarity_t#
FlexPWM PWM output polarity selection.
-
typedef enum _flexpwm_ipol_source flexpwm_ipol_source_t#
FlexPWM PWM output source selection for complementary mode.
-
typedef struct _flexpwm_pwm_channel_config flexpwm_pwm_channel_config_t#
FlexPWM PWM channel configuration structure.
This structure defines the configuration for a PWM channel pair (PWM_A or PWM_B), including compare values, output polarity, and initial value.
-
typedef struct _flexpwm_pwm_config flexpwm_pwm_config_t#
FlexPWM PWM configuration structure.
This structure defines the PWM output configuration for a FlexPWM submodule, including compare values, polarity, and operating mode (independent or complementary).
Note
For complementary mode: Only the selected channel (specified by ipolSource) needs to be configured. The other channel will be ignored by the hardware. For example, if ipolSource = kFLEXPWM_IPOL_PWM23, only pwma will be used.
Note
For independent mode: Both pwma and pwmb must be configured separately. The ipolSource field is ignored when complementary = false.
-
typedef enum _flexpwm_force_output_source flexpwm_force_output_source_t#
FlexPWM FORCE_OUT event source selection.
-
typedef enum _flexpwm_force_pwm_source flexpwm_force_pwm_source_t#
FlexPWM PWM source selection for deadtime logic (DTSRCSEL)
-
typedef struct _flexpwm_force_out_channel_config flexpwm_force_out_channel_config_t#
FlexPWM PWM channel force output configuration structure.
This structure defines the force output configuration for a PWM channel (PWM_A or PWM_B), including the source selection and software-controlled output value.
-
typedef struct _flexpwm_force_out_config flexpwm_force_out_config_t#
FlexPWM force output configuration structure.
This structure defines the force output (FORCE_OUT event) configuration for a FlexPWM submodule, including the trigger source, PWM logical initial value, and PWM source selection.
-
typedef enum _flexpwm_fault_output_behavior flexpwm_fault_output_behavior_t#
FlexPWM fault output behavior during fault condition.
Defines how PWM outputs respond when a fault is detected. Values map directly to SMxOCTRL[PWMAFS/PWMBFS/PWMXFS] bitfields.
-
typedef enum _flexpwm_fault_mask flexpwm_fault_mask_t#
FlexPWM fault input mask for fault protection configuration.
These flags can be OR’ed together to configure multiple fault inputs simultaneously with the same protection parameters. Used with FLEXPWM_ConfigFaultProtection() function.
Note
For dual-channel platforms (FSL_FEATURE_PWM_FAULT_CH_COUNT > 1):
When faultChannel = 0: Use kFLEXPWM_FaultMask_0/1/2/3 for FAULT0-3
When faultChannel = 1: Use kFLEXPWM_FaultMask_0/1/2/3 for FAULT4-7 The enum values are the same, but the channel parameter determines which physical fault inputs are configured.
-
typedef struct _flexpwm_fault_output_config flexpwm_fault_output_config_t#
FlexPWM fault output configuration structure.
Configures fault protection for a single PWM output (PWM_A, PWM_B, or PWM_X). Supports both single-channel (FAULT0-3 only) and dual-channel (FAULT0-3 and FAULT4-7) platforms via conditional compilation. Can use flexpwm_fault_mask_t enum values (kFLEXPWM_FaultMask_0/1/2/3) and OR them together for multiple faults.
-
typedef struct _flexpwm_fault_submodule_config flexpwm_fault_submodule_config_t#
FlexPWM fault submodule configuration structure.
Configures fault protection for all three PWM outputs (PWM_A, PWM_B, PWM_X) of a FlexPWM submodule. Includes fault disable mapping and output behavior for each output.
-
typedef enum _flexpwm_fault_clearing_mode flexpwm_fault_clearing_mode_t#
FlexPWM fault clearing mode selection.
Defines how fault conditions are cleared after a fault event.
-
typedef struct _flexpwm_fault_config flexpwm_fault_config_t#
FlexPWM fault protection configuration structure.
Configures global fault protection parameters for one fault channel. These settings apply to all submodules and their outputs that reference this channel. For platforms with dual fault channels (FAULT0-3 and FAULT4-7), configure each channel separately using FLEXPWM_ConfigFaultProtection().
-
typedef struct _flexpwm_fault_filter_config flexpwm_fault_filter_config_t#
FlexPWM fault filter configuration structure.
Configures input filter for fault protection pins to debounce electrical noise. The filter requires the input signal to be stable for N consecutive samples (where each sample is taken every T IPBus clock cycles) before reporting a fault. Helps avoid false fault triggers from noise on FAULTx pins.
-
typedef enum _flexpwm_write_protect flexpwm_write_protect_t#
FlexPWM write protection mode selection.
-
typedef enum _flexpwm_stretch_prescaler flexpwm_stretch_prescaler_t#
FlexPWM trigger signal stretch prescaler selection.
Stretch IPBus clock count prescaler for trigger signals including: mux0_trig, mux1_trig, out0_trig, out1_trig, pwma_trig, pwmb_trig
-
typedef enum _flexpwm_trigger_mux_source flexpwm_trigger_mux_source_t#
FlexPWM output trigger source selection for PWM_MUX_TRIG0/1 ports.
Selects which signal is routed to the PWM_MUX_TRIG0/1 output ports.
-
typedef enum _flexpwm_trigger_frequency flexpwm_trigger_frequency_t#
FlexPWM output trigger frequency selection.
Controls the trigger output frequency when CTRL[LDFQ] is non-zero. Only takes effect when reload frequency divider is active (LDFQ > 0).
-
typedef enum _flexpwm_output_trigger_mask flexpwm_output_trigger_mask_t#
FlexPWM output trigger enable mask.
These flags can be OR’ed together to enable multiple trigger sources simultaneously. Used with outTriggerEnable field in flexpwm_output_trigger_config_t structure.
-
typedef struct _flexpwm_output_trigger_config flexpwm_output_trigger_config_t#
FlexPWM output trigger configuration structure.
This structure defines the output trigger configuration for a FlexPWM submodule, including trigger source mapping from VAL registers, trigger frequency control, and output port routing.
Note
outTriggerEnable is a 6-bit mask corresponding to OUT_TRIG_EN[5:0], where each bit enables a trigger source from VAL0-5 register matches:
bit[0]: VAL0 match triggers PWM_OUT_TRIG0
bit[1]: VAL1 match triggers PWM_OUT_TRIG1
bit[2]: VAL2 match triggers PWM_OUT_TRIG0
bit[3]: VAL3 match triggers PWM_OUT_TRIG1
bit[4]: VAL4 match triggers PWM_OUT_TRIG0
bit[5]: VAL5 match triggers PWM_OUT_TRIG1 Multiple bits can be set to combine trigger sources (OR logic).
Note
triggerFrequency only takes effect when CTRL[LDFQ] is non-zero.
false: Triggers output every PWM cycle even if reload doesn’t occur
true: Triggers output only on the last PWM cycle before a reload opportunity
-
typedef enum _flexpwm_capture_edge flexpwm_capture_edge_t#
FlexPWM input capture edge selection.
This enumeration defines the edge detection modes for input capture. The enum values directly map to hardware register bit values.
-
typedef enum _flexpwm_capture_fifo_watermark flexpwm_capture_fifo_watermark_t#
FlexPWM capture FIFO watermark selection.
This enumeration defines the FIFO watermark levels that determine when a watermark interrupt is triggered based on the number of valid samples in the FIFO.
-
typedef enum _flexpwm_capture_input_select flexpwm_capture_input_select_t#
FlexPWM capture input source selection.
This enumeration selects the source signal for input capture.
-
typedef enum _flexpwm_capture_index flexpwm_capture_index_t#
FlexPWM capture value index.
This enumeration defines the index for accessing capture value registers (CVAL0-5).
Note
Capture channel to CVAL register mapping (non-intuitive hardware mapping):
Capture_X Edge0/Edge1 -> CVAL0/CVAL1 (and CVAL0CYC/CVAL1CYC)
Capture_A Edge0/Edge1 -> CVAL2/CVAL3 (and CVAL2CYC/CVAL3CYC)
Capture_B Edge0/Edge1 -> CVAL4/CVAL5 (and CVAL4CYC/CVAL5CYC)
-
typedef enum _flexpwm_capture_channel flexpwm_capture_channel_t#
FlexPWM capture channel selection.
This enumeration defines the capture channel for enable/disable operations.
-
typedef struct _flexpwm_capture_channel_config flexpwm_capture_channel_config_t#
FlexPWM single capture channel configuration structure.
This structure defines the configuration parameters for a single input capture channel.
-
typedef struct _flexpwm_input_capture_config flexpwm_input_capture_config_t#
FlexPWM input capture configuration structure.
This structure contains the configuration for three independent input capture channels. Users can configure only the channels they need; unused channels should be left at default values.
Note
Capture channel to CVAL/CVALxCYC register mapping (important for reading capture values):
captureA -> CVAL2/CVAL3 (CVAL2CYC/CVAL3CYC)
captureB -> CVAL4/CVAL5 (CVAL4CYC/CVAL5CYC)
captureX -> CVAL0/CVAL1 (CVAL0CYC/CVAL1CYC)
-
typedef struct _flexpwm_capture_filter_channel_config flexpwm_capture_filter_channel_config_t#
FlexPWM capture filter channel configuration structure.
This structure defines the digital filter parameters for a single capture input pin.
-
typedef struct _flexpwm_capture_filter_config flexpwm_capture_filter_config_t#
FlexPWM input capture filter configuration structure.
This structure contains the filter configuration for three independent capture input pins.
Note
Capture filter to register mapping:
captureA -> SMxCAPTFILTA register
captureB -> SMxCAPTFILTB register
captureX -> SMxCAPTFILTX register
-
typedef enum _flexpwm_dma_capture_source flexpwm_dma_capture_source_t#
FlexPWM DMA capture source selection.
This enumeration defines the trigger source for DMA read requests from capture FIFOs.
-
typedef struct _flexpwm_dma_config flexpwm_dma_config_t#
FlexPWM DMA configuration structure.
This structure holds the DMA control strategy configuration. These settings should be configured during initialization and typically do not need to be modified at runtime.
-
uint32_t FLEXPWM_GetInstance(PWM_Type *base)#
Get the instance for FlexPWM module.
- Parameters:
base – FlexPWM base address
- Returns:
Instance number if valid base address is provided, otherwise returns ARRAY_SIZE(s_flexpwmBases)
-
status_t FLEXPWM_Init(PWM_Type *base)#
Initialize the FlexPWM module.
This function initializes the FlexPWM peripheral by:
Enabling clocks for all submodules (SM0-SM3)
Releasing peripheral reset (if supported by platform)
After calling this function, the FlexPWM module is ready for configuration. Additional configuration functions (FLEXPWM_ConfigSubmodule, FLEXPWM_ConfigPWM, etc.) should be called to set up the desired PWM behavior.
Note
This function does not configure any PWM parameters. It only enables the peripheral.
Note
This function does not start PWM generation. Use FLEXPWM_EnableSubmoduleCounter() and FLEXPWM_EnablePWMOutput() to start PWM output.
- Parameters:
base – FlexPWM peripheral base address.
- Returns:
kStatus_Success if initialization is successful. kStatus_InvalidArgument if the base address is invalid.
-
status_t FLEXPWM_DeInit(PWM_Type *base)#
Deinitialize the FlexPWM module.
This function deinitializes the FlexPWM peripheral by:
Disabling clocks for all submodules (SM0-SM3)
Asserting peripheral reset (if supported by platform)
After calling this function, all FlexPWM registers are reset.
Note
To re-enable PWM operation, call FLEXPWM_Init() again.
- Parameters:
base – FlexPWM peripheral base address.
- Returns:
kStatus_Success if deinitialization is successful. kStatus_InvalidArgument if the base address is invalid.
-
FLEXPWM_GET_FCTRL_REG(base, ch)#
-
FLEXPWM_GET_FSTS_REG(base, ch)#
-
FLEXPWM_GET_FFILT_REG(base, ch)#
-
FLEXPWM_GET_FCTRL2_REG(base, ch)#
-
struct _flexpwm_counter_config#
- #include <fsl_flexpwm.h>
FlexPWM counter configuration structure.
Public Members
-
uint16_t initValue#
Counter initial value (INIT register).
-
uint16_t modValue#
Counter modulo value (VAL1 register). Defines the PWM period upper limit.
-
flexpwm_init_source_t initSource#
Counter initialization source selection. Determines when the counter resets to initValue.
-
uint16_t initValue#
-
struct _flexpwm_reload_config#
- #include <fsl_flexpwm.h>
FlexPWM reload configuration structure.
Public Members
-
flexpwm_load_mode_t loadMode#
Register load mode selection.
kFLEXPWM_LoadMode_Opportunity: Load at next reload opportunity (PWM cycle)
kFLEXPWM_LoadMode_Immediate: Load immediately after LDOK is set
-
uint8_t loadFrequency#
Load frequency divider (LDFQ field, 0-15). Buffered registers reload every (loadFrequency + 1) PWM cycles.
0: Every PWM cycle
1: Every 2 PWM cycles
15: Every 16 PWM cycles
-
bool enableHalfCycleReload#
Enable reload at half-cycle point (VAL0 match).
true: Reload can occur at VAL0 match
false: No reload at half-cycle
-
bool enableFullCycleReload#
Enable reload at full-cycle point (VAL1 match).
true: Reload can occur at VAL1 match
false: No reload at full-cycle
-
flexpwm_reload_source_t reloadSource#
Reload signal source selection.
kFLEXPWM_ReloadSource_LocalReload: Use local reload signal
kFLEXPWM_ReloadSource_MasterReload: Use master reload from submodule 0
-
uint16_t halfCycleValue#
Half-cycle reload point (VAL0 register). This value determines when half-cycle reload occurs. Note: Does not need to be exactly half the PWM period.
-
flexpwm_load_mode_t loadMode#
-
struct _flexpwm_submodule_config#
- #include <fsl_flexpwm.h>
FlexPWM submodule configuration structure.
This structure defines the basic configuration parameters for a FlexPWM submodule, including clock source, prescaler, counter behavior, reload mechanism, and operating modes.
Note
This configuration writes to buffered registers. After calling FLEXPWM_ConfigSubmodule(), you must set MCTRL[LDOK] using a separate function to transfer the configuration to active registers.
Note
This function does not start the PWM counter. Use a separate API to enable the counter.
Public Members
-
flexpwm_clock_source_t clockSource#
Clock source for the submodule PWM counter.
-
flexpwm_prescaler_t prescaler#
Clock prescaler divider.
-
flexpwm_counter_config_t counterConfig#
Counter initialization and behavior configuration.
-
flexpwm_reload_config_t reloadConfig#
Register reload mechanism configuration.
-
bool enableDebugMode#
PWM behavior in Debug mode.
true: PWM continues running when MCU enters Debug mode
false: PWM stops when MCU enters Debug mode
-
flexpwm_clock_source_t clockSource#
-
struct _flexpwm_pwm_channel_config#
- #include <fsl_flexpwm.h>
FlexPWM PWM channel configuration structure.
This structure defines the configuration for a PWM channel pair (PWM_A or PWM_B), including compare values, output polarity, and initial value.
Public Members
-
uint16_t compareValue_ON#
Compare value that defines the PWM turn-on edge (in normal polarity). Mapping per channel:
PWM_A: written to VAL2
PWM_B: written to VAL4
PWM_X: written to VAL0
-
uint16_t compareValue_OFF#
Compare value that defines the PWM turn-off edge (in normal polarity). Mapping per channel:
PWM_A: written to VAL3
PWM_B: written to VAL5
PWM_X: written to VAL1
-
flexpwm_pwm_polarity_t polarity#
Output polarity.
kFLEXPWM_Polarity_ActiveLow: PWM signal is inverted (active low)
kFLEXPWM_Polarity_ActiveHigh: PWM signal is normal (active high)
-
uint16_t compareValue_ON#
-
struct _flexpwm_pwm_config#
- #include <fsl_flexpwm.h>
FlexPWM PWM configuration structure.
This structure defines the PWM output configuration for a FlexPWM submodule, including compare values, polarity, and operating mode (independent or complementary).
Note
For complementary mode: Only the selected channel (specified by ipolSource) needs to be configured. The other channel will be ignored by the hardware. For example, if ipolSource = kFLEXPWM_IPOL_PWM23, only pwma will be used.
Note
For independent mode: Both pwma and pwmb must be configured separately. The ipolSource field is ignored when complementary = false.
Public Members
-
flexpwm_pwm_channel_config_t pwma#
PWM_A (PWM23) channel configuration
-
flexpwm_pwm_channel_config_t pwmb#
PWM_B (PWM45) channel configuration
-
bool complementary#
Operating mode.
true: Complementary mode (PWM_A and PWM_B form a complementary pair)
false: Independent mode (PWM_A and PWM_B are independent channels)
-
flexpwm_ipol_source_t ipolSource#
MCTRL[IPOL] - Select which channel pair as complementary source. Only used when complementary = true.
kFLEXPWM_IPOL_PWM23: Use PWM23 as source
kFLEXPWM_IPOL_PWM45: Use PWM45 as source
-
flexpwm_pwm_channel_config_t pwma#
-
struct _flexpwm_force_out_channel_config#
- #include <fsl_flexpwm.h>
FlexPWM PWM channel force output configuration structure.
This structure defines the force output configuration for a PWM channel (PWM_A or PWM_B), including the source selection and software-controlled output value.
Public Members
-
flexpwm_force_pwm_source_t source#
PWM source selection for this channel (DTSRCSEL).
-
bool softwareValue#
When source=kFLEXPWM_ForcePwmSource_Software, this value (0 or 1) is output to deadtime logic (SWCOUT).
-
flexpwm_force_pwm_source_t source#
-
struct _flexpwm_force_out_config#
- #include <fsl_flexpwm.h>
FlexPWM force output configuration structure.
This structure defines the force output (FORCE_OUT event) configuration for a FlexPWM submodule, including the trigger source, PWM logical initial value, and PWM source selection.
Public Members
-
flexpwm_force_output_source_t forceSource#
FORCE_OUT trigger source (CTRL2[FORCE_SEL]).
-
flexpwm_force_out_channel_config_t pwma#
PWM_A (PWM23) force output configuration.
-
flexpwm_force_out_channel_config_t pwmb#
PWM_B (PWM45) force output configuration.
-
bool pwma_initialValue#
PWM_A (PWM23) logical initial value in normal polarity.
true: PWM_A output starts at logic 1
false: PWM_A output starts at logic 0
-
bool pwmb_initialValue#
PWM_B (PWM45) logical initial value in normal polarity.
true: PWM_B output starts at logic 1
false: PWM_B output starts at logic 0
-
bool pwmx_initialValue#
PWM_X logical initial value in normal polarity.
true: PWM_X output starts at logic 1
false: PWM_X output starts at logic 0
-
flexpwm_force_output_source_t forceSource#
-
struct _flexpwm_fault_output_config#
- #include <fsl_flexpwm.h>
FlexPWM fault output configuration structure.
Configures fault protection for a single PWM output (PWM_A, PWM_B, or PWM_X). Supports both single-channel (FAULT0-3 only) and dual-channel (FAULT0-3 and FAULT4-7) platforms via conditional compilation. Can use flexpwm_fault_mask_t enum values (kFLEXPWM_FaultMask_0/1/2/3) and OR them together for multiple faults.
Public Members
-
uint16_t disableMask_ch0#
Fault disable mask for channel 0 (FAULT0-3). Each bit selects one fault input:
bit[0] = FAULT0
bit[1] = FAULT1
bit[2] = FAULT2
bit[3] = FAULT3 Maps to SMxDISMAP[0] register.
-
flexpwm_fault_output_behavior_t outputBehavior#
Output behavior when fault is detected Maps to SMxOCTRL[PWMAFS/PWMBFS/PWMXFS].
-
uint16_t disableMask_ch0#
-
struct _flexpwm_fault_submodule_config#
- #include <fsl_flexpwm.h>
FlexPWM fault submodule configuration structure.
Configures fault protection for all three PWM outputs (PWM_A, PWM_B, PWM_X) of a FlexPWM submodule. Includes fault disable mapping and output behavior for each output.
Public Members
-
flexpwm_fault_output_config_t pwma#
PWM_A (PWM23) fault configuration. Controls which faults disable PWM_A output and how PWM_A behaves during fault.
-
flexpwm_fault_output_config_t pwmb#
PWM_B (PWM45) fault configuration. Controls which faults disable PWM_B output and how PWM_B behaves during fault.
-
flexpwm_fault_output_config_t pwmx#
PWM_X fault configuration. Controls which faults disable PWM_X output and how PWM_X behaves during fault.
-
flexpwm_fault_output_config_t pwma#
-
struct _flexpwm_fault_config#
- #include <fsl_flexpwm.h>
FlexPWM fault protection configuration structure.
Configures global fault protection parameters for one fault channel. These settings apply to all submodules and their outputs that reference this channel. For platforms with dual fault channels (FAULT0-3 and FAULT4-7), configure each channel separately using FLEXPWM_ConfigFaultProtection().
Public Members
-
bool faultInputActiveLevel#
FAULTx input active level (FCTRL[FLVL])
false: Logic 0 on FAULTx indicates fault (active low)
true: Logic 1 on FAULTx indicates fault (active high)
-
flexpwm_fault_clearing_mode_t faultClearingMode#
Fault clearing mode (FCTRL[FAUTO])
-
bool enableSafetyMode#
Safety Mode (FCTRL[FSAFE]) Only useful for Manual fault clearing mode
false: Normal mode (PWM outputs enabled when FFLAG clears)
true: Safe mode (PWM outputs enabled only when both FFLAG and FFPIN are clear)
-
bool enableFullCycleRecovery#
Full Cycle Recovery (FSTS[FFULL])
true: PWM outputs can be re-enabled at PWM full cycle start
false: No re-enable at full cycle
-
bool enableHalfCycleRecovery#
Half Cycle Recovery (FSTS[FHALF])
true: PWM outputs can be re-enabled at PWM half cycle start
false: No re-enable at half cycle
-
bool enableCombinatorialPath#
Combinational Path Control (FCTRL2[NOCOMB])
true: Combinational path active - fault input directly disables PWM outputs (fastest response)
false: Combinational path disabled - only latched fault signal disables PWM outputs (adds latency)
-
bool faultInputActiveLevel#
-
struct _flexpwm_fault_filter_config#
- #include <fsl_flexpwm.h>
FlexPWM fault filter configuration structure.
Configures input filter for fault protection pins to debounce electrical noise. The filter requires the input signal to be stable for N consecutive samples (where each sample is taken every T IPBus clock cycles) before reporting a fault. Helps avoid false fault triggers from noise on FAULTx pins.
Public Members
-
uint8_t filterPeriod#
Fault Filter Period (FFILT[FILT_PER]) Sampling period in IPBus clock cycles. Range: 0-255
0: Input filter bypassed
N: FAULTx sampled every N IPBus cycles
-
uint8_t filterCount#
Fault Filter Count (FFILT[FILT_CNT]) Number of consecutive stable samples required to accept input transition. Range: 0-7 (actual samples = value + 3)
0: 3 samples
1: 4 samples
7: 10 samples
-
bool enableGlitchStretch#
Fault Glitch Stretching (FFILT[GSTR])
false: Glitch stretching disabled
true: Input fault signals stretched to min 2 IPBus cycles Prevents false triggers from narrow glitches
-
uint8_t filterPeriod#
-
struct _flexpwm_output_trigger_config#
- #include <fsl_flexpwm.h>
FlexPWM output trigger configuration structure.
This structure defines the output trigger configuration for a FlexPWM submodule, including trigger source mapping from VAL registers, trigger frequency control, and output port routing.
Note
outTriggerEnable is a 6-bit mask corresponding to OUT_TRIG_EN[5:0], where each bit enables a trigger source from VAL0-5 register matches:
bit[0]: VAL0 match triggers PWM_OUT_TRIG0
bit[1]: VAL1 match triggers PWM_OUT_TRIG1
bit[2]: VAL2 match triggers PWM_OUT_TRIG0
bit[3]: VAL3 match triggers PWM_OUT_TRIG1
bit[4]: VAL4 match triggers PWM_OUT_TRIG0
bit[5]: VAL5 match triggers PWM_OUT_TRIG1 Multiple bits can be set to combine trigger sources (OR logic).
Note
triggerFrequency only takes effect when CTRL[LDFQ] is non-zero.
false: Triggers output every PWM cycle even if reload doesn’t occur
true: Triggers output only on the last PWM cycle before a reload opportunity
Public Members
-
uint16_t outTriggerEnable#
Output trigger enable mask (OUT_TRIG_EN[5:0]). Bit mask for VAL0-5 trigger sources. OR’ed combination of flexpwm_output_trigger_mask_t Example: 0x05 enables VAL0 and VAL2 for TRIG0.
-
flexpwm_trigger_mux_source_t muxTrig0Source#
PWM_MUX_TRIG0 port source selection (PWAOT0).
kFLEXPWM_TriggerMuxSource_GeneratedTrigger: Route PWM_OUT_TRIG0 signal
kFLEXPWM_TriggerMuxSource_PWMOutput: Route PWM_A output directly
-
flexpwm_trigger_mux_source_t muxTrig1Source#
PWM_MUX_TRIG1 port source selection (PWBOT1).
kFLEXPWM_TriggerMuxSource_GeneratedTrigger: Route PWM_OUT_TRIG1 signal
kFLEXPWM_TriggerMuxSource_PWMOutput: Route PWM_B output directly
-
flexpwm_trigger_frequency_t triggerFrequency#
Trigger frequency control (TRGFRQ). Controls trigger output frequency when CTRL[LDFQ] > 0.
kFLEXPWM_TriggerFrequency_EveryCycle: Trigger every PWM cycle
kFLEXPWM_TriggerFrequency_OnReload: Trigger only on last cycle before reload
-
flexpwm_stretch_prescaler_t stretchPrescaler#
Trigger signal stretch prescaler (MCTRL2[STRETCH_CNT_PRSC]). Stretches trigger signal pulse width by specified IPBus clock cycles.
-
struct _flexpwm_capture_channel_config#
- #include <fsl_flexpwm.h>
FlexPWM single capture channel configuration structure.
This structure defines the configuration parameters for a single input capture channel.
Public Members
-
flexpwm_capture_edge_t edge0#
Edge0 capture edge selection
-
flexpwm_capture_edge_t edge1#
Edge1 capture edge selection
-
bool oneshot#
Capture mode.
true: One-shot mode
false: Free-running mode
-
flexpwm_capture_input_select_t inputSelect#
Input signal source selection.
kFLEXPWM_CaptureInput_RawSignal: Raw PWM input
kFLEXPWM_CaptureInput_EdgeCounter: Edge counter output
-
bool enableEdgeCounter#
Edge counter enable control.
true: Enable edge counter (EDGCNT_EN = 1)
false: Disable edge counter (EDGCNT_EN = 0)
-
uint8_t edgeCompareValue#
Edge counter compare value (0-255). Capture occurs when edge count reaches this value. Only valid when enableEdgeCounter = true
-
flexpwm_capture_fifo_watermark_t fifoWatermark#
FIFO watermark level
-
flexpwm_capture_edge_t edge0#
-
struct _flexpwm_input_capture_config#
- #include <fsl_flexpwm.h>
FlexPWM input capture configuration structure.
This structure contains the configuration for three independent input capture channels. Users can configure only the channels they need; unused channels should be left at default values.
Note
Capture channel to CVAL/CVALxCYC register mapping (important for reading capture values):
captureA -> CVAL2/CVAL3 (CVAL2CYC/CVAL3CYC)
captureB -> CVAL4/CVAL5 (CVAL4CYC/CVAL5CYC)
captureX -> CVAL0/CVAL1 (CVAL0CYC/CVAL1CYC)
Public Members
-
flexpwm_capture_channel_config_t captureA#
Capture_A (PWM_A) channel configuration
-
flexpwm_capture_channel_config_t captureB#
Capture_B (PWM_B) channel configuration
-
flexpwm_capture_channel_config_t captureX#
Capture_X (PWM_X) channel configuration
-
struct _flexpwm_capture_filter_channel_config#
- #include <fsl_flexpwm.h>
FlexPWM capture filter channel configuration structure.
This structure defines the digital filter parameters for a single capture input pin.
Public Members
-
uint8_t filterPeriod#
Filter sampling period in IPBus clock cycles (0-255).
0: Bypass filter (default)
Non-zero: Enable filter with specified sampling period
-
uint8_t filterCount#
Number of consecutive consistent samples required (0-7). Actual sample count = filterCount + 3 (i.e., 3-10 samples)
-
uint8_t filterPeriod#
-
struct _flexpwm_capture_filter_config#
- #include <fsl_flexpwm.h>
FlexPWM input capture filter configuration structure.
This structure contains the filter configuration for three independent capture input pins.
Note
Capture filter to register mapping:
captureA -> SMxCAPTFILTA register
captureB -> SMxCAPTFILTB register
captureX -> SMxCAPTFILTX register
Public Members
-
flexpwm_capture_filter_channel_config_t captureA#
Capture_A filter configuration
-
flexpwm_capture_filter_channel_config_t captureB#
Capture_B filter configuration
-
flexpwm_capture_filter_channel_config_t captureX#
Capture_X filter configuration
-
struct _flexpwm_dma_config#
- #include <fsl_flexpwm.h>
FlexPWM DMA configuration structure.
This structure holds the DMA control strategy configuration. These settings should be configured during initialization and typically do not need to be modified at runtime.
Public Members
-
flexpwm_dma_capture_source_t captureSource#
Capture DMA enable source selection (CAPTDE[7:6])
-
bool fifoWatermarkAND#
FIFO watermark AND/OR control (FAND).
true: Selected FIFO watermarks are ANDed
false: Selected FIFO watermarks are ORed
-
flexpwm_dma_capture_source_t captureSource#
FLEXSPI_FLR: Flexible Serial Peripheral Interface Follower Driver#
IO mode enumeration of FLEXSPI FOLLOWER.
Values:
-
enumerator kFLEXSPI_SLV_IOMODE_SDRx4#
-
enumerator kFLEXSPI_SLV_IOMODE_SDRx8#
-
enumerator kFLEXSPI_SLV_IOMODE_DDRx4#
-
enumerator kFLEXSPI_SLV_IOMODE_DDRx8#
-
enumerator kFLEXSPI_SLV_IOMODE_SDRx4#
The read fetch size enumeration of FLEXSPI FOLLOWER.
Values:
-
enumerator kFLEXSPI_SLV_Read_Fetch_256Bytes#
-
enumerator kFLEXSPI_SLV_Read_Fetch_512Bytes#
-
enumerator kFLEXSPI_SLV_Read_Fetch_1KBytes#
-
enumerator kFLEXSPI_SLV_Read_Fetch_2KBytes#
-
enumerator kFLEXSPI_SLV_Read_Fetch_256Bytes#
The write watermark enumeration of FLEXSPI FOLLOWER.
Values:
-
enumerator kFLEXSPI_SLV_Write_Watermark_32Bytes#
-
enumerator kFLEXSPI_SLV_Write_Watermark_64Bytes#
-
enumerator kFLEXSPI_SLV_Write_Watermark_128Bytes#
-
enumerator kFLEXSPI_SLV_Write_Watermark_256Bytes#
-
enumerator kFLEXSPI_SLV_Write_Watermark_32Bytes#
Interrupt status flags of FLEXSPI FOLLOWER.
Values:
-
enumerator kFLEXSPI_SLV_WriteOverflowFlag#
An IO RX FIFO overflow occurred during command/address/write data phase.
-
enumerator kFLEXSPI_SLV_ReadUnderflowFlag#
IO TX FIFO underflow has occurred during a read command.
-
enumerator kFLEXSPI_SLV_ErrorCommandFlag#
An unknown command has been received from the SPI bus.
-
enumerator kFLEXSPI_SLV_MailInterruptFlag#
Mailbox interrupt.
-
enumerator kFLEXSPI_SLV_AllInterruptFlags#
All flags.
-
enumerator kFLEXSPI_SLV_WriteOverflowFlag#
-
typedef struct _flexspi_slv_config flexspi_slv_config_t#
FLEXSPI FOLLOWER configuration structure.
-
typedef struct _flexspi_slv_handle flexspi_slv_handle_t#
-
typedef void (*flexspi_slv_callback_t)(FLEXSPI_SLV_Type *base, flexspi_slv_handle_t *handle)#
FLEXSPI FOLLOWER interrupt callback function.
-
FSL_FLEXSPI_SLV_DRIVER_VERSION#
FLEXSPI FOLLOWER driver version.
-
FLEXSPI_SLV_CMD_DDR(x)#
-
uint32_t FLEXSPI_SLV_GetInstance(FLEXSPI_SLV_Type *base)#
Get the instance number for FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER base pointer.
-
void FLEXSPI_SLV_Init(FLEXSPI_SLV_Type *base, const flexspi_slv_config_t *config)#
Initializes the FLEXSPI FOLLOWER module and internal state.
This function enables the clock for FLEXSPI FOLLOWER and also configures the FLEXSPI FOLLOWER with the input configure parameters. Users should call this function before any FLEXSPI FOLLOWER operations.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
config – FLEXSPI FOLLOWER configure structure.
-
void FLEXSPI_SLV_GetDefaultConfig(flexspi_slv_config_t *config)#
Gets default settings for FLEXSPI FOLLOWER.
- Parameters:
config – FLEXSPI FOLLOWER configuration structure.
-
void FLEXSPI_SLV_Deinit(FLEXSPI_SLV_Type *base)#
Deinitializes the FLEXSPI FOLLOWER module.
Clears the FLEXSPI FOLLOWER state and FLEXSPI FOLLOWER module registers.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
-
static inline void FLEXSPI_SLV_SoftwareReset(FLEXSPI_SLV_Type *base)#
Software reset for the FLEXSPI FOLLOWER logic.
This function does software reset for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
-
static inline void FLEXSPI_SLV_SetIOMode(FLEXSPI_SLV_Type *base, uint32_t ioMode)#
Set IO mode for the FLEXSPI FOLLOWER module.
This function sets the IO mode flags for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
ioMode – Set IO Mode for FLEXSPI FOLLOWER
-
static inline void FLEXSPI_SLV_UpdateRWCmdBaseRange(FLEXSPI_SLV_Type *base)#
Update RW CMD base address and range value for the FLEXSPI FOLLOWER module.
This function updates RW CMD base address and range value for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
-
static inline void FLEXSPI_SLV_SetRWCmdBaseAddr(FLEXSPI_SLV_Type *base, uint32_t addr1, uint32_t addr2)#
Set RW command base address1 for the FLEXSPI FOLLOWER module.
This function sets the RW command base address1 for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
addr1 – The high 16-bit base address of the RW command0.
addr2 – The high 16-bit base address of the RW command1.
-
static inline void FLEXSPI_SLV_SetAddrRange(FLEXSPI_SLV_Type *base, uint32_t index, uint32_t val)#
Set address1/2 range for the FLEXSPI FOLLOWER module.
This function sets the address1/2 range for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
index – The index of RW command, 0 or 1.
val – The size of the memory range in 1KB units.
-
static inline void FLEXSPI_SLV_SetReadWatermark(FLEXSPI_SLV_Type *base, uint32_t rxWatermark, bool enable)#
Set read water mark level for the FLEXSPI FOLLOWER module.
This function sets read water mark level for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
val – Read watermark level in bytes
-
static inline void FLEXSPI_SLV_SetReadFetchSize(FLEXSPI_SLV_Type *base, uint32_t rxFetchSize)#
Sets the maximum read size triggered by a single read command.
This function sets the maximum read size for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
rxFetchSize – The maximum read size triggered by a single read command.
-
static inline void FLEXSPI_SLV_SetWriteWatermark(FLEXSPI_SLV_Type *base, uint32_t txWatermark)#
Set write water mark level for the FLEXSPI FOLLOWER module.
This function sets write water mark level for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
txWatermark – Write watermark level
-
static inline void FLEXSPI_SLV_MaskChipSelect(FLEXSPI_SLV_Type *base, uint32_t mask)#
Set CS mask value for the FLEXSPI FOLLOWER module.
This function sets CS mask value for the FLEXSPI FOLLOWER.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
mask – 0 - Not masked, 1 - Masked.
-
static inline void FLEXSPI_SLV_EnableInterrupts(FLEXSPI_SLV_Type *base, uint32_t mask)#
Enables the FLEXSPI FOLLOWER interrupts.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
mask – FLEXSPI FOLLOWER interrupt source.
-
static inline void FLEXSPI_SLV_DisableInterrupts(FLEXSPI_SLV_Type *base, uint32_t mask)#
Disable the FLEXSPI FOLLOWER interrupts.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
mask – FLEXSPI FOLLOWER interrupt source.
-
static inline uint32_t FLEXSPI_SLV_GetEnabledInterrupts(FLEXSPI_SLV_Type *base)#
Get the FLEXSPI FOLLOWER enabled interrupts.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
-
static inline void FLEXSPI_SLV_EnableMailInterrupt(FLEXSPI_SLV_Type *base, bool enable)#
Enable the FLEXSPI FOLLOWER mailbox interrupts.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
enable – Whether enable the mailbox interrupt.
-
static inline bool FLEXSPI_SLV_GetEnabledMailInterrupt(FLEXSPI_SLV_Type *base)#
Return whether the FLEXSPI FOLLOWER enables the mailbox interrupt.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
-
static inline void FLEXSPI_SLV_GetOutOfRangeCounts(FLEXSPI_SLV_Type *base, size_t *rdCount, size_t *wrCount)#
Gets the SPI leader read/write out-of-allowed-range count.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
rdCount – [out] Pointer through which the current number in the read out-of-allowed-range counter is returned. Pass NULL if this value is not required.
wrCount – [out] Pointer through which the current number in the write out-of-allowed-range counter is returned Pass NULL if this value is not required.
-
static inline uint32_t FLEXSPI_SLV_GetInterruptStatusFlags(FLEXSPI_SLV_Type *base)#
Get the FLEXSPI FOLLOWER interrupt status flags.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
- Return values:
Interrupt – status flag, use status flag to AND the bit mask could get the related status.
-
static inline uint32_t FLEXSPI_SLV_GetMailboxData(FLEXSPI_SLV_Type *base, uint32_t index)#
Get the FLEXSPI FOLLOWER mailbox data.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
index – The index of the mail interrupt register
- Returns:
Return the FLEXSPI FOLLOWER mailbox data
-
static inline void FLEXSPI_SLV_ClearInterruptStatusFlags(FLEXSPI_SLV_Type *base, uint32_t mask)#
Clear the FLEXSPI FOLLOWER interrupt status flags.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
mask – FLEXSPI FOLLOWER interrupt source.
-
static inline void FLEXSPI_SLV_ClearMailInterruptFlag(FLEXSPI_SLV_Type *base)#
Clear the FLEXSPI FOLLOWER mailbox interrupt flag.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
-
static inline bool FLEXSPI_SLV_GetAXIWriteBusyStatus(FLEXSPI_SLV_Type *base)#
Returns whether the current AXI write leader is busy with a write command.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
- Return values:
true – The current AXI write leader is busy.
false – The current AXI write leader is not busy.
-
static inline bool FLEXSPI_SLV_GetAXIReadIdleStatus(FLEXSPI_SLV_Type *base)#
Returns whether the AXI read leader is busy with a read request or else idle with no pending AXI read request.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
- Return values:
true – The current AXI read leader is idle.
false – The current AXI read leader is busy.
-
static inline bool FLEXSPI_SLV_GetRegReadWriteIdleStatus(FLEXSPI_SLV_Type *base)#
Returns whether the SPI to read/write register queue is idle.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
- Return values:
true – The SPI to read/write register queue is idle.
false – The SPI to read/write register queue is busy.
-
static inline bool FLEXSPI_SLV_GetSEQIdleStatus(FLEXSPI_SLV_Type *base)#
Returns whether the SEQ control logic is idle or else busy with an ongoing SPI request.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
- Return values:
true – The SEQ control logic is idle.
false – The SEQ control logic is busy.
-
static inline bool FLEXSPI_SLV_GetModuleBusyStatus(FLEXSPI_SLV_Type *base)#
Returns whether the FLEXSPI FOLLOWER module is busy.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
- Return values:
true – The SEQ control logic is busy.
false – The SEQ control logic is idle.
-
static inline void FLEXSPI_SLV_SetReadMemCommand(FLEXSPI_SLV_Type *base, uint32_t index, uint16_t command, uint16_t dummyCycle)#
Sets the read memory command.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
index – The read command setting register index.
command – The read command value.
dummyCycle – The dummy cycle value of the read command.
-
static inline void FLEXSPI_SLV_SetWriteMemCommand(FLEXSPI_SLV_Type *base, uint32_t index, uint32_t command)#
Sets the write memory command.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
index – The write command setting register index.
command – The write command value.
-
static inline void FLEXSPI_SLV_SetReadRegCommand(FLEXSPI_SLV_Type *base, uint16_t command, uint16_t dummyCycle)#
Sets the read register command.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address
command – The read command value.
dummyCycle – The dummy cycle value of the read command.
-
static inline void FLEXSPI_SLV_SetWriteRegCommand(FLEXSPI_SLV_Type *base, uint32_t command)#
Sets the write register command.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
command – The write register command value.
-
void FLEXSPI_SLV_InterruptCreateHandle(FLEXSPI_SLV_Type *base, flexspi_slv_handle_t *handle, flexspi_slv_callback_t callback, uint32_t interruptMask)#
Initializes the FLEXSPI FOLLOWER handle which is used in transactional functions.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
handle – Pointer to flexspi_slv_handle_t structure to store the interrupt state.
callback – Pointer to user callback function.
interruptMask – Interrupt mask to enable during handle creation. Use enumeration values ORed.
-
void FLEXSPI_SLV_HandleIRQ(FLEXSPI_SLV_Type *base, flexspi_slv_handle_t *handle)#
Master interrupt handler.
- Parameters:
base – FLEXSPI FOLLOWER peripheral base address.
handle – Pointer to flexspi_slv_handle_t structure.
-
uint32_t baseAddr1#
Read/Write CMD1 Base Address.
-
uint32_t baseAddr2#
Read/Write CMD2 Base Address.
-
uint32_t addrRange1#
Read/Write CMD1 Addr Range.
-
uint32_t addrRange2#
Read/Write CMD2 Addr Range.
-
uint8_t ioMode#
IO mode control - SDRx4, SDRx8, DDRx4, DDRx8.
-
uint8_t rxFetchSize#
Specifies the maximum read size triggered by a single read command.
-
uint8_t rxWatermark#
Triggers a new AXI read to fetch more data through the IP AXI header.
-
uint8_t txWatermark#
Specifies the watermark value. During the write command, if pending write data equals or exceeds the watermark level, it triggers a new AXI write.
-
uint16_t readRegCmd#
Read register command.
-
uint16_t readRegDummyCycle#
Read register dymmy cycle.
-
uint16_t writeRegCmd#
Write register command.
-
uint16_t readMemCmd1#
Read memory command1.
-
uint16_t readMemDummyCycle1#
Read memory dymmy cycle1.
-
uint16_t readMemCmd2#
Read memory command2.
-
uint16_t readMemDummyCycle2#
Read memory dymmy cycle2.
-
uint16_t writeMemCmd1#
Write memory command1.
-
uint16_t writeMemCmd2#
Write memory command2.
-
uint32_t intrMask#
Interrupt state for FLEXSPI FOLLOWER.
-
flexspi_slv_callback_t callback#
Callback for users while mailbox received or error occurred.
-
struct _flexspi_slv_config#
- #include <fsl_flexspi_flr.h>
FLEXSPI FOLLOWER configuration structure.
-
struct _flexspi_slv_handle#
- #include <fsl_flexspi_flr.h>
Interrupt handle structure for FLEXSPI FOLLOWER.
FREQME: Frequency Measurement#
GPIO: General-Purpose Input/Output Driver#
-
FSL_GPIO_DRIVER_VERSION#
GPIO driver version.
-
enum _gpio_pin_direction#
GPIO direction definition.
Values:
-
enumerator kGPIO_DigitalInput#
Set current pin as digital input
-
enumerator kGPIO_DigitalOutput#
Set current pin as digital output
-
enumerator kGPIO_DigitalInput#
-
enum _gpio_checker_attribute#
GPIO checker attribute.
Values:
-
enumerator kGPIO_UsernonsecureRWUsersecureRWPrivilegedsecureRW#
User nonsecure:Read+Write; User Secure:Read+Write; Privileged Secure:Read+Write
-
enumerator kGPIO_UsernonsecureRUsersecureRWPrivilegedsecureRW#
User nonsecure:Read; User Secure:Read+Write; Privileged Secure:Read+Write
-
enumerator kGPIO_UsernonsecureNUsersecureRWPrivilegedsecureRW#
User nonsecure:None; User Secure:Read+Write; Privileged Secure:Read+Write
-
enumerator kGPIO_UsernonsecureRUsersecureRPrivilegedsecureRW#
User nonsecure:Read; User Secure:Read; Privileged Secure:Read+Write
-
enumerator kGPIO_UsernonsecureNUsersecureRPrivilegedsecureRW#
User nonsecure:None; User Secure:Read; Privileged Secure:Read+Write
-
enumerator kGPIO_UsernonsecureNUsersecureNPrivilegedsecureRW#
User nonsecure:None; User Secure:None; Privileged Secure:Read+Write
-
enumerator kGPIO_UsernonsecureNUsersecureNPrivilegedsecureR#
User nonsecure:None; User Secure:None; Privileged Secure:Read
-
enumerator kGPIO_UsernonsecureNUsersecureNPrivilegedsecureN#
User nonsecure:None; User Secure:None; Privileged Secure:None
-
enumerator kGPIO_IgnoreAttributeCheck#
Ignores the attribute check
-
enumerator kGPIO_UsernonsecureRWUsersecureRWPrivilegedsecureRW#
-
enum _gpio_interrupt_config#
Configures the interrupt generation condition.
Values:
-
enumerator kGPIO_InterruptStatusFlagDisabled#
Interrupt status flag is disabled.
-
enumerator kGPIO_DMARisingEdge#
ISF flag and DMA request on rising edge.
-
enumerator kGPIO_DMAFallingEdge#
ISF flag and DMA request on falling edge.
-
enumerator kGPIO_DMAEitherEdge#
ISF flag and DMA request on either edge.
-
enumerator kGPIO_FlagRisingEdge#
Flag sets on rising edge.
-
enumerator kGPIO_FlagFallingEdge#
Flag sets on falling edge.
-
enumerator kGPIO_FlagEitherEdge#
Flag sets on either edge.
-
enumerator kGPIO_InterruptLogicZero#
Interrupt when logic zero.
-
enumerator kGPIO_InterruptRisingEdge#
Interrupt on rising edge.
-
enumerator kGPIO_InterruptFallingEdge#
Interrupt on falling edge.
-
enumerator kGPIO_InterruptEitherEdge#
Interrupt on either edge.
-
enumerator kGPIO_InterruptLogicOne#
Interrupt when logic one.
-
enumerator kGPIO_ActiveHighTriggerOutputEnable#
Enable active high-trigger output.
-
enumerator kGPIO_ActiveLowTriggerOutputEnable#
Enable active low-trigger output.
-
enumerator kGPIO_InterruptStatusFlagDisabled#
-
enum _gpio_interrupt_selection#
Configures the selection of interrupt/DMA request/trigger output.
Values:
-
enumerator kGPIO_InterruptOutput0#
Interrupt/DMA request/trigger output 0.
-
enumerator kGPIO_InterruptOutput1#
Interrupt/DMA request/trigger output 1.
-
enumerator kGPIO_InterruptOutput0#
-
enum gpio_pin_interrupt_control_t#
GPIO pin and interrupt control.
Values:
-
enumerator kGPIO_PinControlNonSecure#
Pin Control Non-Secure.
-
enumerator kGPIO_InterruptControlNonSecure#
Interrupt Control Non-Secure.
-
enumerator kGPIO_PinControlNonPrivilege#
Pin Control Non-Privilege.
-
enumerator kGPIO_InterruptControlNonPrivilege#
Interrupt Control Non-Privilege.
-
enumerator kGPIO_PinControlNonSecure#
-
typedef enum _gpio_pin_direction gpio_pin_direction_t#
GPIO direction definition.
-
typedef enum _gpio_checker_attribute gpio_checker_attribute_t#
GPIO checker attribute.
-
typedef struct _gpio_pin_config gpio_pin_config_t#
The GPIO pin configuration structure.
Each pin can only be configured as either an output pin or an input pin at a time. If configured as an input pin, leave the outputConfig unused. Note that in some use cases, the corresponding port property should be configured in advance with the PORT_SetPinConfig().
-
typedef enum _gpio_interrupt_config gpio_interrupt_config_t#
Configures the interrupt generation condition.
-
typedef enum _gpio_interrupt_selection gpio_interrupt_selection_t#
Configures the selection of interrupt/DMA request/trigger output.
-
typedef struct _gpio_version_info gpio_version_info_t#
GPIO version information.
-
typedef struct _gpio_handle gpio_handle_t#
Forward declaration of the GPIO interrupt handle.
-
typedef void (*gpio_pin_callback_t)(GPIO_Type *base, gpio_handle_t *handle, uint32_t pinMask, void *userData)#
GPIO interrupt callback prototype.
Invoked by GPIO_DriverIRQHandler() with the bitmask of pins that fired for this entry. The mask matches the hardware interrupt status register layout, so a consumer that watches several pins is notified once with all of them set instead of once per pin.
- Param base:
GPIO peripheral base pointer of the controller that fired.
- Param handle:
GPIO handle the callback is registered on.
- Param pinMask:
Bitmask of pins whose interrupt flag was pending for this entry (bit n == pin n).
- Param userData:
User data pointer supplied at registration time.
-
typedef struct _gpio_callback_entry gpio_callback_entry_t#
One callback entry: a pin bitmask bound to a callback and its user data.
-
GPIO_FIT_REG(value)#
-
GPIO_PIN_CALLBACK_COUNT#
Number of independent callback entries tracked per GPIO handle.
Each entry binds a pin bitmask to one callback, so the count is the number of distinct consumers that can share a single GPIO controller, not the number of pins. A consumer that cares about several pins at once occupies a single entry (compare Zephyr’s gpio_callback, which also keys on a pin mask). The default keeps the handle small; override it if a board needs more independent consumers on one controller.
-
struct _gpio_pin_config#
- #include <fsl_gpio.h>
The GPIO pin configuration structure.
Each pin can only be configured as either an output pin or an input pin at a time. If configured as an input pin, leave the outputConfig unused. Note that in some use cases, the corresponding port property should be configured in advance with the PORT_SetPinConfig().
Public Members
-
gpio_pin_direction_t pinDirection#
GPIO direction, input or output
-
uint8_t outputLogic#
Set a default output logic, which has no use in input
-
gpio_pin_direction_t pinDirection#
-
struct _gpio_version_info#
- #include <fsl_gpio.h>
GPIO version information.
-
struct _gpio_callback_entry#
- #include <fsl_gpio.h>
One callback entry: a pin bitmask bound to a callback and its user data.
Public Members
-
uint32_t pinMask#
Pins this entry watches (bit n == pin n). 0 marks an empty slot.
-
gpio_pin_callback_t callback#
Callback for the watched pins, NULL if the slot is empty.
-
void *userData#
User data passed back to the callback.
-
uint32_t pinMask#
-
struct _gpio_handle#
- #include <fsl_gpio.h>
GPIO handle.
Public Members
-
gpio_callback_entry_t entries[4U]#
Pin-mask callback entries.
-
gpio_callback_entry_t entries[4U]#
GPIO Driver#
-
uint32_t GPIO_GetInstance(GPIO_Type *base)#
Gets the GPIO instance according to the GPIO base.
- Parameters:
base – GPIO peripheral base pointer.
- Return values:
GPIO – instance
-
void GPIO_PortInit(GPIO_Type *base)#
Initializes the GPIO peripheral.
This function ungates the GPIO clock.
- Parameters:
base – GPIO peripheral base pointer.
-
void GPIO_PortDenit(GPIO_Type *base)#
Denitializes the GPIO peripheral.
- Parameters:
base – GPIO peripheral base pointer.
-
void GPIO_PinInit(GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config)#
Initializes a GPIO pin used by the board.
To initialize the GPIO, define a pin configuration, as either input or output, in the user file. Then, call the GPIO_PinInit() function.
This is an example to define an input pin or an output pin configuration.
Define a digital input pin configuration, gpio_pin_config_t config = { kGPIO_DigitalInput, 0, } Define a digital output pin configuration, gpio_pin_config_t config = { kGPIO_DigitalOutput, 0, }
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
pin – GPIO port pin number
config – GPIO pin configuration pointer
-
void GPIO_GetVersionInfo(GPIO_Type *base, gpio_version_info_t *verInfo)#
Get GPIO version information.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
verInfo – GPIO version information
-
static inline void GPIO_SecurePrivilegeLock(GPIO_Type *base, gpio_pin_interrupt_control_t mask)#
lock or unlock secure privilege.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – pin or interrupt macro
-
static inline void GPIO_EnablePinControlNonSecure(GPIO_Type *base, uint32_t mask)#
Enable Pin Control Non-Secure.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_DisablePinControlNonSecure(GPIO_Type *base, uint32_t mask)#
Disable Pin Control Non-Secure.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_EnablePinControlNonPrivilege(GPIO_Type *base, uint32_t mask)#
Enable Pin Control Non-Privilege.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_DisablePinControlNonPrivilege(GPIO_Type *base, uint32_t mask)#
Disable Pin Control Non-Privilege.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_EnableInterruptControlNonSecure(GPIO_Type *base, uint32_t mask)#
Enable Interrupt Control Non-Secure.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_DisableInterruptControlNonSecure(GPIO_Type *base, uint32_t mask)#
Disable Interrupt Control Non-Secure.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_EnableInterruptControlNonPrivilege(GPIO_Type *base, uint32_t mask)#
Enable Interrupt Control Non-Privilege.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_DisableInterruptControlNonPrivilege(GPIO_Type *base, uint32_t mask)#
Disable Interrupt Control Non-Privilege.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_PortInputEnable(GPIO_Type *base, uint32_t mask)#
Enable port input.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_PortInputDisable(GPIO_Type *base, uint32_t mask)#
Disable port input.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_PinWrite(GPIO_Type *base, uint32_t pin, uint8_t output)#
Sets the output level of the multiple GPIO pins to the logic 1 or 0.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
pin – GPIO pin number
output – GPIO pin output logic level.
0: corresponding pin output low-logic level.
1: corresponding pin output high-logic level.
-
static inline void GPIO_PortSet(GPIO_Type *base, uint32_t mask)#
Sets the output level of the multiple GPIO pins to the logic 1.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_PortClear(GPIO_Type *base, uint32_t mask)#
Sets the output level of the multiple GPIO pins to the logic 0.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline void GPIO_PortToggle(GPIO_Type *base, uint32_t mask)#
Reverses the current output logic of the multiple GPIO pins.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
static inline uint32_t GPIO_PinRead(GPIO_Type *base, uint32_t pin)#
Reads the current input value of the GPIO port.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
pin – GPIO pin number
- Return values:
GPIO – port input value
0: corresponding pin input low-logic level.
1: corresponding pin input high-logic level.
-
static inline void GPIO_SetPinInterruptConfig(GPIO_Type *base, uint32_t pin, gpio_interrupt_config_t config)#
Configures the gpio pin interrupt/DMA request.
- Parameters:
base – GPIO peripheral base pointer.
pin – GPIO pin number.
config – GPIO pin interrupt configuration.
kGPIO_InterruptStatusFlagDisabled: Interrupt/DMA request disabled.
kGPIO_DMARisingEdge : DMA request on rising edge(if the DMA requests exit).
kGPIO_DMAFallingEdge: DMA request on falling edge(if the DMA requests exit).
kGPIO_DMAEitherEdge : DMA request on either edge(if the DMA requests exit).
kGPIO_FlagRisingEdge : Flag sets on rising edge(if the Flag states exit).
kGPIO_FlagFallingEdge : Flag sets on falling edge(if the Flag states exit).
kGPIO_FlagEitherEdge : Flag sets on either edge(if the Flag states exit).
kGPIO_InterruptLogicZero : Interrupt when logic zero.
kGPIO_InterruptRisingEdge : Interrupt on rising edge.
kGPIO_InterruptFallingEdge: Interrupt on falling edge.
kGPIO_InterruptEitherEdge : Interrupt on either edge.
kGPIO_InterruptLogicOne : Interrupt when logic one.
kGPIO_ActiveHighTriggerOutputEnable : Enable active high-trigger output (if the trigger states exit).
kGPIO_ActiveLowTriggerOutputEnable : Enable active low-trigger output (if the trigger states exit).
-
static inline void GPIO_SetPinInterruptChannel(GPIO_Type *base, uint32_t pin, gpio_interrupt_selection_t selection)#
Configures the gpio pin interrupt/DMA request/trigger output channel selection.
- Parameters:
base – GPIO peripheral base pointer.
pin – GPIO pin number.
selection – GPIO pin interrupt output selection.
kGPIO_InterruptOutput0: Interrupt/DMA request/trigger output 0.
kGPIO_InterruptOutput1 : Interrupt/DMA request/trigger output 1.
-
uint32_t GPIO_GpioGetInterruptFlags(GPIO_Type *base)#
Read the GPIO interrupt status flags.
- Parameters:
base – GPIO peripheral base pointer. (GPIOA, GPIOB, GPIOC, and so on.)
- Returns:
The current GPIO’s interrupt status flag. ‘1’ means the related pin’s flag is set, ‘0’ means the related pin’s flag not set. For example, the return value 0x00010001 means the pin 0 and 17 have the interrupt pending.
-
uint32_t GPIO_GpioGetInterruptChannelFlags(GPIO_Type *base, uint32_t channel)#
Read the GPIO interrupt status flags based on selected interrupt channel(IRQS).
- Parameters:
base – GPIO peripheral base pointer. (GPIOA, GPIOB, GPIOC, and so on.)
channel – ‘0’ means selete interrupt channel 0, ‘1’ means selete interrupt channel 1.
- Returns:
The current GPIO’s interrupt status flag based on the selected interrupt channel. ‘1’ means the related pin’s flag is set, ‘0’ means the related pin’s flag not set. For example, the return value 0x00010001 means the pin 0 and 17 have the interrupt pending.
-
uint8_t GPIO_PinGetInterruptFlag(GPIO_Type *base, uint32_t pin)#
Read individual pin’s interrupt status flag.
- Parameters:
base – GPIO peripheral base pointer. (GPIOA, GPIOB, GPIOC, and so on)
pin – GPIO specific pin number.
- Returns:
The current selected pin’s interrupt status flag.
-
void GPIO_GpioClearInterruptFlags(GPIO_Type *base, uint32_t mask)#
Clears GPIO pin interrupt status flags.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
-
void GPIO_GpioClearInterruptChannelFlags(GPIO_Type *base, uint32_t mask, uint32_t channel)#
Clears GPIO pin interrupt status flags based on selected interrupt channel(IRQS).
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
mask – GPIO pin number macro
channel – ‘0’ means selete interrupt channel 0, ‘1’ means selete interrupt channel 1.
-
void GPIO_PinClearInterruptFlag(GPIO_Type *base, uint32_t pin)#
Clear GPIO individual pin’s interrupt status flag.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on).
pin – GPIO specific pin number.
-
static inline void GPIO_SetMultipleInterruptPinsConfig(GPIO_Type *base, uint32_t mask, gpio_interrupt_config_t config)#
Sets the GPIO interrupt configuration in PCR register for multiple pins.
- Parameters:
base – GPIO peripheral base pointer.
mask – GPIO pin number macro.
config – GPIO pin interrupt configuration.
kGPIO_InterruptStatusFlagDisabled: Interrupt disabled.
kGPIO_DMARisingEdge : DMA request on rising edge(if the DMA requests exit).
kGPIO_DMAFallingEdge: DMA request on falling edge(if the DMA requests exit).
kGPIO_DMAEitherEdge : DMA request on either edge(if the DMA requests exit).
kGPIO_FlagRisingEdge : Flag sets on rising edge(if the Flag states exit).
kGPIO_FlagFallingEdge : Flag sets on falling edge(if the Flag states exit).
kGPIO_FlagEitherEdge : Flag sets on either edge(if the Flag states exit).
kGPIO_InterruptLogicZero : Interrupt when logic zero.
kGPIO_InterruptRisingEdge : Interrupt on rising edge.
kGPIO_InterruptFallingEdge: Interrupt on falling edge.
kGPIO_InterruptEitherEdge : Interrupt on either edge.
kGPIO_InterruptLogicOne : Interrupt when logic one.
kGPIO_ActiveHighTriggerOutputEnable : Enable active high-trigger output (if the trigger states exit).
kGPIO_ActiveLowTriggerOutputEnable : Enable active low-trigger output (if the trigger states exit)..
-
void GPIO_CheckAttributeBytes(GPIO_Type *base, gpio_checker_attribute_t attribute)#
brief The GPIO module supports a device-specific number of data ports, organized as 32-bit words/8-bit Bytes. Each 32-bit/8-bit data port includes a GACR register, which defines the byte-level attributes required for a successful access to the GPIO programming model. If the GPIO module’s GACR register organized as 32-bit words, the attribute controls for the 4 data bytes in the GACR follow a standard little endian data convention.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.)
attribute – GPIO checker attribute
-
GPIO_PortGetInterruptFlags(base)#
-
GPIO_PortClearInterruptFlags(base, mask)#
-
void GPIO_CreateHandle(GPIO_Type *base, gpio_handle_t *handle)#
Initializes a GPIO interrupt handle and registers it for the controller.
Clears the handle’s per-pin callback table and stores the handle in the driver’s instance-indexed table so the shared dispatcher GPIO_DriverIRQHandler(instance) can find it from the controller instance alone. Call once before registering any pin callback.
- Parameters:
base – GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on).
handle – Pointer to the caller-owned GPIO interrupt handle.
-
status_t GPIO_SetPinCallback(gpio_handle_t *handle, uint32_t pinMask, gpio_pin_callback_t callback, void *userData)#
Registers a pin-mask interrupt callback in the handle.
Binds a bitmask of pins to one callback. The callback is later invoked by GPIO_DriverIRQHandler() with the subset of pinMask that is actually pending, so a single consumer can service several pins in one call. If an existing entry already watches exactly pinMask, it is replaced; otherwise the first free entry is used. Passing a NULL callback clears any entry that watches exactly pinMask.
Note
Matching is by exact pinMask, not by overlap. Registering masks that share a pin (for example 0x3 then 0x1) creates two separate entries, and both callbacks run when the shared pin fires. Register each pin under a single mask if only one callback should service it.
- Parameters:
handle – Pointer to the GPIO interrupt handle.
pinMask – Bitmask of pins to register the callback for (bit n == pin n).
callback – Callback to invoke for the watched pins. Passing NULL removes the matching entry.
userData – User data pointer passed back to the callback.
- Return values:
kStatus_Success – Callback stored (or removed when callback is NULL).
kStatus_InvalidArgument – pinMask is 0.
kStatus_OutOfRange – No free entry is available to store a new callback.
-
status_t GPIO_ClearPinCallback(gpio_handle_t *handle, uint32_t pinMask)#
Clears a pin-mask interrupt callback in the handle.
Removes the entry that watches exactly pinMask. After this call the dispatcher no longer invokes the previously-registered callback for those pins.
- Parameters:
handle – Pointer to the GPIO interrupt handle.
pinMask – Bitmask of pins whose callback entry is removed (bit n == pin n).
- Return values:
kStatus_Success – Callback cleared.
kStatus_InvalidArgument – pinMask is 0.
kStatus_OutOfRange – No entry watches exactly pinMask.
-
void GPIO_DriverIRQHandler(uint32_t instance)#
Unified GPIO interrupt dispatcher.
Looks up the handle registered for instance via GPIO_CreateHandle(), reads the controller’s pending interrupt flags, and for each callback entry whose watched pins intersect the pending flags: clears those flags first, then invokes the callback once with the pending subset as a pin bitmask. After the entries are serviced, any pending flags not claimed by a registered entry are cleared as well, so a pin whose interrupt is enabled in hardware but has no callback cannot keep re-firing (interrupt storm).
- Parameters:
instance – GPIO peripheral instance number, can get by GPIO_GetInstance.
I3C: I3C Driver#
-
FSL_I3C_DRIVER_VERSION#
I3C driver version.
I3C status return codes.
Values:
-
enumerator kStatus_I3C_Busy#
The master is already performing a transfer.
-
enumerator kStatus_I3C_Idle#
The slave driver is idle.
-
enumerator kStatus_I3C_Nak#
The slave device sent a NAK in response to an address.
-
enumerator kStatus_I3C_WriteAbort#
The slave device sent a NAK in response to a write.
-
enumerator kStatus_I3C_Term#
The master terminates slave read.
-
enumerator kStatus_I3C_HdrParityError#
Parity error from DDR read.
-
enumerator kStatus_I3C_CrcError#
CRC error from DDR read.
-
enumerator kStatus_I3C_ReadFifoError#
Read from M/SRDATAB register when FIFO empty.
-
enumerator kStatus_I3C_WriteFifoError#
Write to M/SWDATAB register when FIFO full.
-
enumerator kStatus_I3C_MsgError#
Message SDR/DDR mismatch or read/write message in wrong state
-
enumerator kStatus_I3C_InvalidReq#
Invalid use of request.
-
enumerator kStatus_I3C_Timeout#
The module has stalled too long in a frame.
-
enumerator kStatus_I3C_SlaveCountExceed#
The I3C slave count has exceed the definition in I3C_MAX_DEVCNT.
-
enumerator kStatus_I3C_IBIWon#
The I3C slave event IBI or MR or HJ won the arbitration on a header address.
-
enumerator kStatus_I3C_OverrunError#
Slave internal from-bus buffer/FIFO overrun.
-
enumerator kStatus_I3C_UnderrunError#
Master/Slave internal to-bus buffer/FIFO underrun
-
enumerator kStatus_I3C_UnderrunNak#
Slave internal from-bus buffer/FIFO underrun and NACK error
-
enumerator kStatus_I3C_InvalidStart#
Slave invalid start flag
-
enumerator kStatus_I3C_SdrParityError#
SDR parity error
-
enumerator kStatus_I3C_S0S1Error#
S0 or S1 error
-
enumerator kStatus_I3C_Busy#
-
enum _i3c_hdr_mode#
I3C HDR modes.
Values:
-
enumerator kI3C_HDRModeNone#
-
enumerator kI3C_HDRModeDDR#
-
enumerator kI3C_HDRModeTSP#
-
enumerator kI3C_HDRModeTSL#
-
enumerator kI3C_HDRModeNone#
-
typedef enum _i3c_hdr_mode i3c_hdr_mode_t#
I3C HDR modes.
-
typedef struct _i3c_device_info i3c_device_info_t#
I3C device information.
-
I3C_RETRY_TIMES#
Max loops to wait for I3C operation status complete.
This is the maximum number of loops to wait for I3C operation status complete. If set to 0, it will wait indefinitely.
-
FSL_I3C_RDTERM_MAX#
Max read-terminate size supported by MCTRL.RDTERM.
-
I3C_MAX_DEVCNT#
-
I3C_IBI_BUFF_SIZE#
-
struct _i3c_device_info#
- #include <fsl_i3c.h>
I3C device information.
Public Members
-
uint8_t dynamicAddr#
Device dynamic address.
-
uint8_t staticAddr#
Static address.
-
uint8_t dcr#
Device characteristics register information.
-
uint8_t bcr#
Bus characteristics register information.
-
uint16_t vendorID#
Device vendor ID(manufacture ID).
-
uint32_t partNumber#
Device part number info
-
uint16_t maxReadLength#
Maximum read length.
-
uint16_t maxWriteLength#
Maximum write length.
-
uint8_t hdrMode#
Support hdr mode, could be OR logic in i3c_hdr_mode.
-
uint8_t dynamicAddr#
I3C Common Driver#
-
typedef struct _i3c_config i3c_config_t#
Structure with settings to initialize the I3C module, could both initialize master and slave functionality.
This structure holds configuration settings for the I3C peripheral. To initialize this structure to reasonable defaults, call the I3C_GetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
-
uint32_t I3C_GetInstance(I3C_Type *base)#
Get which instance current I3C is used.
- Parameters:
base – The I3C peripheral base address.
-
void I3C_GetDefaultConfig(i3c_config_t *config)#
Provides a default configuration for the I3C peripheral, the configuration covers both master functionality and slave functionality.
This function provides the following default configuration for I3C:
config->enableMaster = kI3C_MasterCapable; config->disableTimeout = false; config->hKeep = kI3C_MasterHighKeeperNone; config->enableOpenDrainStop = true; config->enableOpenDrainHigh = true; config->baudRate_Hz.i2cBaud = 400000U; config->baudRate_Hz.i3cPushPullBaud = 12500000U; config->baudRate_Hz.i3cOpenDrainBaud = 2500000U; config->masterDynamicAddress = 0x0AU; config->slowClock_Hz = 1000000U; config->enableSlave = true; config->vendorID = 0x11BU; config->enableRandomPart = false; config->partNumber = 0; config->dcr = 0; config->bcr = 0; config->hdrMode = (uint8_t)kI3C_HDRModeDDR; config->nakAllRequest = false; config->ignoreS0S1Error = false; config->offline = false; config->matchSlaveStartStop = false;
After calling this function, you can override any settings in order to customize the configuration, prior to initializing the common I3C driver with I3C_Init().
- Parameters:
config – [out] User provided configuration structure for default values. Refer to i3c_config_t.
-
void I3C_Init(I3C_Type *base, const i3c_config_t *config, uint32_t sourceClock_Hz)#
Initializes the I3C peripheral. This function enables the peripheral clock and initializes the I3C peripheral as described by the user provided configuration. This will initialize both the master peripheral and slave peripheral so that I3C module could work as pure master, pure slave or secondary master, etc. A software reset is performed prior to configuration.
- Parameters:
base – The I3C peripheral base address.
config – User provided peripheral configuration. Use I3C_GetDefaultConfig() to get a set of defaults that you can override.
sourceClock_Hz – Frequency in Hertz of the I3C functional clock. Used to calculate the baud rate divisors, filter widths, and timeout periods.
-
struct _i3c_config#
- #include <fsl_i3c.h>
Structure with settings to initialize the I3C module, could both initialize master and slave functionality.
This structure holds configuration settings for the I3C peripheral. To initialize this structure to reasonable defaults, call the I3C_GetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
Public Members
-
i3c_master_enable_t enableMaster#
Enable master mode.
-
bool disableTimeout#
Whether to disable timeout to prevent the ERRWARN.
-
i3c_master_hkeep_t hKeep#
High keeper mode setting.
-
bool enableOpenDrainStop#
Whether to emit open-drain speed STOP.
-
bool enableOpenDrainHigh#
Enable Open-Drain High to be 1 PPBAUD count for i3c messages, or 1 ODBAUD.
-
i3c_baudrate_hz_t baudRate_Hz#
Desired baud rate settings.
-
i3c_start_scl_delay_t startSclDelay#
I3C SCL delay after START.
-
i3c_start_scl_delay_t restartSclDelay#
I3C SCL delay after Repeated START.
-
uint8_t masterDynamicAddress#
Main master dynamic address configuration.
-
uint32_t maxWriteLength#
Maximum write length.
-
uint32_t maxReadLength#
Maximum read length.
-
bool enableSlave#
Whether to enable slave.
-
uint8_t staticAddr#
Static address.
-
uint16_t vendorID#
Device vendor ID(manufacture ID).
-
uint32_t partNumber#
Device part number info
-
uint8_t dcr#
Device characteristics register information.
-
uint8_t bcr#
Bus characteristics register information.
-
uint8_t hdrMode#
Support hdr mode, could be OR logic in enumeration:i3c_hdr_mode_t.
-
bool nakAllRequest#
Whether to reply NAK to all requests except broadcast CCC.
-
bool ignoreS0S1Error#
Whether to ignore S0/S1 error in SDR mode.
-
bool offline#
Whether to wait 60 us of bus quiet or HDR request to ensure slave track SDR mode safely.
-
bool matchSlaveStartStop#
Whether to assert start/stop status only the time slave is addressed.
-
i3c_master_enable_t enableMaster#
I3C Master Driver#
-
void I3C_MasterGetDefaultConfig(i3c_master_config_t *masterConfig)#
Provides a default configuration for the I3C master peripheral.
This function provides the following default configuration for the I3C master peripheral:
masterConfig->enableMaster = kI3C_MasterOn; masterConfig->disableTimeout = false; masterConfig->hKeep = kI3C_MasterHighKeeperNone; masterConfig->enableOpenDrainStop = true; masterConfig->enableOpenDrainHigh = true; masterConfig->baudRate_Hz = 100000U; masterConfig->busType = kI3C_TypeI2C;
After calling this function, you can override any settings in order to customize the configuration, prior to initializing the master driver with I3C_MasterInit().
- Parameters:
masterConfig – [out] User provided configuration structure for default values. Refer to i3c_master_config_t.
-
void I3C_MasterInit(I3C_Type *base, const i3c_master_config_t *masterConfig, uint32_t sourceClock_Hz)#
Initializes the I3C master peripheral.
This function enables the peripheral clock and initializes the I3C master peripheral as described by the user provided configuration. A software reset is performed prior to configuration.
- Parameters:
base – The I3C peripheral base address.
masterConfig – User provided peripheral configuration. Use I3C_MasterGetDefaultConfig() to get a set of defaults that you can override.
sourceClock_Hz – Frequency in Hertz of the I3C functional clock. Used to calculate the baud rate divisors, filter widths, and timeout periods.
-
void I3C_MasterDeinit(I3C_Type *base)#
Deinitializes the I3C master peripheral.
This function disables the I3C master peripheral and gates the clock. It also performs a software reset to restore the peripheral to reset conditions.
- Parameters:
base – The I3C peripheral base address.
-
static inline void I3C_MasterEnable(I3C_Type *base, i3c_master_enable_t enable)#
Set I3C module master mode.
- Parameters:
base – The I3C peripheral base address.
enable – Enable master mode.
-
void I3C_SlaveGetDefaultConfig(i3c_slave_config_t *slaveConfig)#
Provides a default configuration for the I3C slave peripheral.
This function provides the following default configuration for the I3C slave peripheral:
slaveConfig->enableslave = true;
After calling this function, you can override any settings in order to customize the configuration, prior to initializing the slave driver with I3C_SlaveInit().
- Parameters:
slaveConfig – [out] User provided configuration structure for default values. Refer to i3c_slave_config_t.
-
void I3C_SlaveInit(I3C_Type *base, const i3c_slave_config_t *slaveConfig, uint32_t slowClock_Hz)#
Initializes the I3C slave peripheral.
This function enables the peripheral clock and initializes the I3C slave peripheral as described by the user provided configuration.
- Parameters:
base – The I3C peripheral base address.
slaveConfig – User provided peripheral configuration. Use I3C_SlaveGetDefaultConfig() to get a set of defaults that you can override.
slowClock_Hz – Frequency in Hertz of the I3C slow clock. Used to calculate the bus match condition values. If FSL_FEATURE_I3C_HAS_NO_SCONFIG_BAMATCH defines as 1, this parameter is useless.
-
void I3C_SlaveDeinit(I3C_Type *base)#
Deinitializes the I3C slave peripheral.
This function disables the I3C slave peripheral and gates the clock.
- Parameters:
base – The I3C peripheral base address.
-
static inline void I3C_SlaveEnable(I3C_Type *base, bool isEnable)#
Enable/Disable Slave.
- Parameters:
base – The I3C peripheral base address.
isEnable – Enable or disable.
-
static inline uint32_t I3C_MasterGetStatusFlags(I3C_Type *base)#
Gets the I3C master status flags.
A bit mask with the state of all I3C master status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
See also
- Parameters:
base – The I3C peripheral base address.
- Returns:
State of the status flags:
1: related status flag is set.
0: related status flag is not set.
-
static inline void I3C_MasterClearStatusFlags(I3C_Type *base, uint32_t statusMask)#
Clears the I3C master status flag state.
The following status register flags can be cleared:
Attempts to clear other flags has no effect.
See also
- Parameters:
base – The I3C peripheral base address.
statusMask – A bitmask of status flags that are to be cleared. The mask is composed of _i3c_master_flags enumerators OR’d together. You may pass the result of a previous call to I3C_MasterGetStatusFlags().
-
static inline uint32_t I3C_MasterGetErrorStatusFlags(I3C_Type *base)#
Gets the I3C master error status flags.
A bit mask with the state of all I3C master error status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
See also
- Parameters:
base – The I3C peripheral base address.
- Returns:
State of the error status flags:
1: related status flag is set.
0: related status flag is not set.
-
static inline void I3C_MasterClearErrorStatusFlags(I3C_Type *base, uint32_t statusMask)#
Clears the I3C master error status flag state.
See also
- Parameters:
base – The I3C peripheral base address.
statusMask – A bitmask of error status flags that are to be cleared. The mask is composed of _i3c_master_error_flags enumerators OR’d together. You may pass the result of a previous call to I3C_MasterGetStatusFlags().
-
i3c_master_state_t I3C_MasterGetState(I3C_Type *base)#
Gets the I3C master state.
- Parameters:
base – The I3C peripheral base address.
- Returns:
I3C master state.
-
static inline uint32_t I3C_SlaveGetStatusFlags(I3C_Type *base)#
Gets the I3C slave status flags.
A bit mask with the state of all I3C slave status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
See also
- Parameters:
base – The I3C peripheral base address.
- Returns:
State of the status flags:
1: related status flag is set.
0: related status flag is not set.
-
static inline void I3C_SlaveClearStatusFlags(I3C_Type *base, uint32_t statusMask)#
Clears the I3C slave status flag state.
The following status register flags can be cleared:
Attempts to clear other flags has no effect.
See also
- Parameters:
base – The I3C peripheral base address.
statusMask – A bitmask of status flags that are to be cleared. The mask is composed of _i3c_slave_flags enumerators OR’d together. You may pass the result of a previous call to I3C_SlaveGetStatusFlags().
-
static inline uint32_t I3C_SlaveGetErrorStatusFlags(I3C_Type *base)#
Gets the I3C slave error status flags.
A bit mask with the state of all I3C slave error status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
See also
- Parameters:
base – The I3C peripheral base address.
- Returns:
State of the error status flags:
1: related status flag is set.
0: related status flag is not set.
-
static inline void I3C_SlaveClearErrorStatusFlags(I3C_Type *base, uint32_t statusMask)#
Clears the I3C slave error status flag state.
See also
- Parameters:
base – The I3C peripheral base address.
statusMask – A bitmask of error status flags that are to be cleared. The mask is composed of _i3c_slave_error_flags enumerators OR’d together. You may pass the result of a previous call to I3C_SlaveGetErrorStatusFlags().
-
i3c_slave_activity_state_t I3C_SlaveGetActivityState(I3C_Type *base)#
Gets the I3C slave state.
- Parameters:
base – The I3C peripheral base address.
- Returns:
I3C slave activity state, refer i3c_slave_activity_state_t.
-
static inline void I3C_MasterEnableInterrupts(I3C_Type *base, uint32_t interruptMask)#
Enables the I3C master interrupt requests.
All flags except kI3C_MasterBetweenFlag and kI3C_MasterNackDetectFlag can be enabled as interrupts.
- Parameters:
base – The I3C peripheral base address.
interruptMask – Bit mask of interrupts to enable. See _i3c_master_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline void I3C_MasterDisableInterrupts(I3C_Type *base, uint32_t interruptMask)#
Disables the I3C master interrupt requests.
All flags except kI3C_MasterBetweenFlag and kI3C_MasterNackDetectFlag can be enabled as interrupts.
- Parameters:
base – The I3C peripheral base address.
interruptMask – Bit mask of interrupts to disable. See _i3c_master_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline uint32_t I3C_MasterGetEnabledInterrupts(I3C_Type *base)#
Returns the set of currently enabled I3C master interrupt requests.
- Parameters:
base – The I3C peripheral base address.
- Returns:
A bitmask composed of _i3c_master_flags enumerators OR’d together to indicate the set of enabled interrupts.
-
static inline uint32_t I3C_MasterGetPendingInterrupts(I3C_Type *base)#
Returns the set of pending I3C master interrupt requests.
- Parameters:
base – The I3C peripheral base address.
- Returns:
A bitmask composed of _i3c_master_flags enumerators OR’d together to indicate the set of pending interrupts.
-
static inline void I3C_SlaveEnableInterrupts(I3C_Type *base, uint32_t interruptMask)#
Enables the I3C slave interrupt requests.
Only below flags can be enabled as interrupts.
- Parameters:
base – The I3C peripheral base address.
interruptMask – Bit mask of interrupts to enable. See _i3c_slave_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline void I3C_SlaveDisableInterrupts(I3C_Type *base, uint32_t interruptMask)#
Disables the I3C slave interrupt requests.
Only below flags can be disabled as interrupts.
- Parameters:
base – The I3C peripheral base address.
interruptMask – Bit mask of interrupts to disable. See _i3c_slave_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline uint32_t I3C_SlaveGetEnabledInterrupts(I3C_Type *base)#
Returns the set of currently enabled I3C slave interrupt requests.
- Parameters:
base – The I3C peripheral base address.
- Returns:
A bitmask composed of _i3c_slave_flags enumerators OR’d together to indicate the set of enabled interrupts.
-
static inline uint32_t I3C_SlaveGetPendingInterrupts(I3C_Type *base)#
Returns the set of pending I3C slave interrupt requests.
- Parameters:
base – The I3C peripheral base address.
- Returns:
A bitmask composed of _i3c_slave_flags enumerators OR’d together to indicate the set of pending interrupts.
-
static inline void I3C_MasterEnableDMA(I3C_Type *base, bool enableTx, bool enableRx, uint32_t width)#
Enables or disables I3C master DMA requests.
- Parameters:
base – The I3C peripheral base address.
enableTx – Enable flag for transmit DMA request. Pass true for enable, false for disable.
enableRx – Enable flag for receive DMA request. Pass true for enable, false for disable.
width – DMA read/write unit in bytes.
-
static inline uint32_t I3C_MasterGetTxFifoAddress(I3C_Type *base, uint32_t width)#
Gets I3C master transmit data register address for DMA transfer.
- Parameters:
base – The I3C peripheral base address.
width – DMA read/write unit in bytes.
- Returns:
The I3C Master Transmit Data Register address.
-
static inline uint32_t I3C_MasterGetRxFifoAddress(I3C_Type *base, uint32_t width)#
Gets I3C master receive data register address for DMA transfer.
- Parameters:
base – The I3C peripheral base address.
width – DMA read/write unit in bytes.
- Returns:
The I3C Master Receive Data Register address.
-
static inline void I3C_SlaveEnableDMA(I3C_Type *base, bool enableTx, bool enableRx, uint32_t width)#
Enables or disables I3C slave DMA requests.
- Parameters:
base – The I3C peripheral base address.
enableTx – Enable flag for transmit DMA request. Pass true for enable, false for disable.
enableRx – Enable flag for receive DMA request. Pass true for enable, false for disable.
width – DMA read/write unit in bytes.
-
static inline uint32_t I3C_SlaveGetTxFifoAddress(I3C_Type *base, uint32_t width)#
Gets I3C slave transmit data register address for DMA transfer.
- Parameters:
base – The I3C peripheral base address.
width – DMA read/write unit in bytes.
- Returns:
The I3C Slave Transmit Data Register address.
-
static inline uint32_t I3C_SlaveGetRxFifoAddress(I3C_Type *base, uint32_t width)#
Gets I3C slave receive data register address for DMA transfer.
- Parameters:
base – The I3C peripheral base address.
width – DMA read/write unit in bytes.
- Returns:
The I3C Slave Receive Data Register address.
-
static inline void I3C_MasterSetWatermarks(I3C_Type *base, i3c_tx_trigger_level_t txLvl, i3c_rx_trigger_level_t rxLvl, bool flushTx, bool flushRx)#
Sets the watermarks for I3C master FIFOs.
- Parameters:
base – The I3C peripheral base address.
txLvl – Transmit FIFO watermark level. The kI3C_MasterTxReadyFlag flag is set whenever the number of words in the transmit FIFO reaches txLvl.
rxLvl – Receive FIFO watermark level. The kI3C_MasterRxReadyFlag flag is set whenever the number of words in the receive FIFO reaches rxLvl.
flushTx – true if TX FIFO is to be cleared, otherwise TX FIFO remains unchanged.
flushRx – true if RX FIFO is to be cleared, otherwise RX FIFO remains unchanged.
-
static inline void I3C_MasterGetFifoCounts(I3C_Type *base, size_t *rxCount, size_t *txCount)#
Gets the current number of bytes in the I3C master FIFOs.
- Parameters:
base – The I3C peripheral base address.
txCount – [out] Pointer through which the current number of bytes in the transmit FIFO is returned. Pass NULL if this value is not required.
rxCount – [out] Pointer through which the current number of bytes in the receive FIFO is returned. Pass NULL if this value is not required.
-
static inline void I3C_SlaveSetWatermarks(I3C_Type *base, i3c_tx_trigger_level_t txLvl, i3c_rx_trigger_level_t rxLvl, bool flushTx, bool flushRx)#
Sets the watermarks for I3C slave FIFOs.
- Parameters:
base – The I3C peripheral base address.
txLvl – Transmit FIFO watermark level. The kI3C_SlaveTxReadyFlag flag is set whenever the number of words in the transmit FIFO reaches txLvl.
rxLvl – Receive FIFO watermark level. The kI3C_SlaveRxReadyFlag flag is set whenever the number of words in the receive FIFO reaches rxLvl.
flushTx – true if TX FIFO is to be cleared, otherwise TX FIFO remains unchanged.
flushRx – true if RX FIFO is to be cleared, otherwise RX FIFO remains unchanged.
-
static inline void I3C_SlaveGetFifoCounts(I3C_Type *base, size_t *rxCount, size_t *txCount)#
Gets the current number of bytes in the I3C slave FIFOs.
- Parameters:
base – The I3C peripheral base address.
txCount – [out] Pointer through which the current number of bytes in the transmit FIFO is returned. Pass NULL if this value is not required.
rxCount – [out] Pointer through which the current number of bytes in the receive FIFO is returned. Pass NULL if this value is not required.
-
void I3C_MasterSetBaudRate(I3C_Type *base, const i3c_baudrate_hz_t *baudRate_Hz, uint32_t sourceClock_Hz)#
Sets the I3C bus frequency for master transactions.
The I3C master is automatically disabled and re-enabled as necessary to configure the baud rate. Do not call this function during a transfer, or the transfer is aborted.
Note
On devices affected by I3C errata ERR053429, an SDR read with PPBAUD < 2 can lose the last received byte when the RxFIFO fills before the CPU/DMA services it. For safe SDR reads, request a push-pull baud that yields PPBAUD > 1, or guarantee the CPU/DMA drains the RxFIFO fast enough to avoid a Full event.
- Parameters:
base – The I3C peripheral base address.
baudRate_Hz – Pointer to structure of requested bus frequency in Hertz.
sourceClock_Hz – I3C functional clock frequency in Hertz.
-
status_t I3C_MasterGetI2CPresetTiming(i3c_legacy_i2c_speed_mode_t speed, i3c_master_src_clk_t srcClk, i3c_timing_t *timing)#
Get prevalidated timing values for supported I2C speed.
- Parameters:
speed – [in] I2C Speed mode.
srcClk – [in] FCLK source clock.
timing – [out] Prevalidated timing values. Valid when kStatus_Success is returned.
- Returns:
kStatus_Success A supported preset timing is found. kStatus_Fail The requested timing is not supported.
-
status_t I3C_MasterCalcTiming(const i3c_master_baudrate_config_t *baudRate, uint32_t sourceClock_Hz, i3c_timing_t *timing)#
Calculate timing from desired baud rates.
- Parameters:
baudRate – [in] Desired baud rates and bus configuration.
sourceClock_Hz – [in] Master peripheral clock (FCLK) frequency in Hz.
timing – [out] I3C timing register field values. Valid only when kStatus_Success is returned.
- Returns:
kStatus_Success Target rate is achieved. kStatus_Fail Target rate isn’t achieved.
-
void I3C_MasterSetTiming(I3C_Type *base, const i3c_timing_t *timing)#
Set I3C timing parameters.
- Parameters:
base – I3C peripheral base address.
timing – Pre-calculated timing values.
-
static inline bool I3C_MasterGetBusIdleState(I3C_Type *base)#
Returns whether the bus is idle.
Requires the master mode to be enabled.
- Parameters:
base – The I3C peripheral base address.
- Return values:
true – Bus is busy.
false – Bus is idle.
-
status_t I3C_MasterStartWithRxSize(I3C_Type *base, i3c_bus_type_t type, uint8_t address, i3c_direction_t dir, uint32_t rxSize)#
Sends a START signal and slave address on the I2C/I3C bus, receive size is also specified in the call.
This function is used to initiate a new master mode transfer. First, the bus state is checked to ensure that another master is not occupying the bus. Then a START signal is transmitted, followed by the 7-bit address specified in the a address parameter. Note that this function does not actually wait until the START and address are successfully sent on the bus before returning.
- Parameters:
base – The I3C peripheral base address.
type – The bus type to use in this transaction.
address – 7-bit slave device address, in bits [6:0].
dir – Master transfer direction, either kI3C_Read or kI3C_Write. This parameter is used to set the R/w bit (bit 0) in the transmitted slave address.
rxSize – Read terminate size for the followed read transfer, limit to MCTRL.RDTERM field width.
- Return values:
kStatus_Success – START signal and address were successfully enqueued in the transmit FIFO.
kStatus_I3C_Busy – Another master is currently utilizing the bus.
-
status_t I3C_MasterStart(I3C_Type *base, i3c_bus_type_t type, uint8_t address, i3c_direction_t dir)#
Sends a START signal and slave address on the I2C/I3C bus.
This function is used to initiate a new master mode transfer. First, the bus state is checked to ensure that another master is not occupying the bus. Then a START signal is transmitted, followed by the 7-bit address specified in the address parameter. Note that this function does not actually wait until the START and address are successfully sent on the bus before returning.
- Parameters:
base – The I3C peripheral base address.
type – The bus type to use in this transaction.
address – 7-bit slave device address, in bits [6:0].
dir – Master transfer direction, either kI3C_Read or kI3C_Write. This parameter is used to set the R/w bit (bit 0) in the transmitted slave address.
- Return values:
kStatus_Success – START signal and address were successfully enqueued in the transmit FIFO.
kStatus_I3C_Busy – Another master is currently utilizing the bus.
-
status_t I3C_MasterRepeatedStartWithRxSize(I3C_Type *base, i3c_bus_type_t type, uint8_t address, i3c_direction_t dir, uint32_t rxSize)#
Sends a repeated START signal and slave address on the I2C/I3C bus, receive size is also specified in the call.
This function is used to send a Repeated START signal when a transfer is already in progress. Like I3C_MasterStart(), it also sends the specified 7-bit address. Call this API also configures the read terminate size for the following read transfer. For example, set the rxSize = 2, the following read transfer will be terminated after two bytes of data received. Write transfer will not be affected by the rxSize configuration.
Note
This function exists primarily to maintain compatible APIs between I3C and I2C drivers, as well as to better document the intent of code that uses these APIs.
- Parameters:
base – The I3C peripheral base address.
type – The bus type to use in this transaction.
address – 7-bit slave device address, in bits [6:0].
dir – Master transfer direction, either kI3C_Read or kI3C_Write. This parameter is used to set the R/w bit (bit 0) in the transmitted slave address.
rxSize – Read terminate size for the followed read transfer, limit to MCTRL.RDTERM field width.
- Return values:
kStatus_Success – Repeated START signal and address were successfully enqueued in the transmit FIFO.
-
static inline status_t I3C_MasterRepeatedStart(I3C_Type *base, i3c_bus_type_t type, uint8_t address, i3c_direction_t dir)#
Sends a repeated START signal and slave address on the I2C/I3C bus.
This function is used to send a Repeated START signal when a transfer is already in progress. Like I3C_MasterStart(), it also sends the specified 7-bit address.
Note
This function exists primarily to maintain compatible APIs between I3C and I2C drivers, as well as to better document the intent of code that uses these APIs.
- Parameters:
base – The I3C peripheral base address.
type – The bus type to use in this transaction.
address – 7-bit slave device address, in bits [6:0].
dir – Master transfer direction, either kI3C_Read or kI3C_Write. This parameter is used to set the R/w bit (bit 0) in the transmitted slave address.
- Return values:
kStatus_Success – Repeated START signal and address were successfully enqueued in the transmit FIFO.
-
status_t I3C_MasterSend(I3C_Type *base, const void *txBuff, size_t txSize, uint32_t flags)#
Performs a polling send transfer on the I2C/I3C bus.
Sends up to txSize number of bytes to the previously addressed slave device. The slave may reply with a NAK to any byte in order to terminate the transfer early. If this happens, this function returns kStatus_I3C_Nak.
- Parameters:
base – The I3C peripheral base address.
txBuff – The pointer to the data to be transferred.
txSize – The length in bytes of the data to be transferred.
flags – Bit mask of options for the transfer. See enumeration _i3c_master_transfer_flags for available options.
- Return values:
kStatus_Success – Data was sent successfully.
kStatus_I3C_Busy – Another master is currently utilizing the bus.
kStatus_I3C_Timeout – The module has stalled too long in a frame.
kStatus_I3C_Nak – The slave device sent a NAK in response to an address.
kStatus_I3C_WriteAbort – The slave device sent a NAK in response to a write.
kStatus_I3C_MsgError – Message SDR/DDR mismatch or read/write message in wrong state.
kStatus_I3C_WriteFifoError – Write to M/SWDATAB register when FIFO full.
kStatus_I3C_InvalidReq – Invalid use of request.
-
status_t I3C_MasterReceive(I3C_Type *base, void *rxBuff, size_t rxSize, uint32_t flags)#
Performs a polling receive transfer on the I2C/I3C bus.
- Parameters:
base – The I3C peripheral base address.
rxBuff – The pointer to the data to be transferred.
rxSize – The length in bytes of the data to be transferred.
flags – Bit mask of options for the transfer. See enumeration _i3c_master_transfer_flags for available options.
- Return values:
kStatus_Success – Data was received successfully.
kStatus_I3C_Busy – Another master is currently utilizing the bus.
kStatus_I3C_Timeout – The module has stalled too long in a frame.
kStatus_I3C_Term – The master terminates slave read.
kStatus_I3C_HdrParityError – Parity error from DDR read.
kStatus_I3C_CrcError – CRC error from DDR read.
kStatus_I3C_MsgError – Message SDR/DDR mismatch or read/write message in wrong state.
kStatus_I3C_ReadFifoError – Read from M/SRDATAB register when FIFO empty.
kStatus_I3C_InvalidReq – Invalid use of request.
-
status_t I3C_MasterStop(I3C_Type *base)#
Sends a STOP signal on the I2C/I3C bus.
This function does not return until the STOP signal is seen on the bus, or an error occurs.
- Parameters:
base – The I3C peripheral base address.
- Return values:
kStatus_Success – The STOP signal was successfully sent on the bus and the transaction terminated.
kStatus_I3C_Busy – Another master is currently utilizing the bus.
kStatus_I3C_Timeout – The module has stalled too long in a frame.
kStatus_I3C_InvalidReq – Invalid use of request.
-
void I3C_MasterEmitRequest(I3C_Type *base, i3c_bus_request_t masterReq)#
I3C master emit request.
- Parameters:
base – The I3C peripheral base address.
masterReq – I3C master request of type i3c_bus_request_t
-
static inline void I3C_MasterEmitIBIResponse(I3C_Type *base, i3c_ibi_response_t ibiResponse)#
I3C master emit request.
- Parameters:
base – The I3C peripheral base address.
ibiResponse – I3C master emit IBI response of type i3c_ibi_response_t
-
void I3C_MasterRegisterIBI(I3C_Type *base, i3c_register_ibi_addr_t *ibiRule)#
I3C master register IBI rule.
- Parameters:
base – The I3C peripheral base address.
ibiRule – Pointer to ibi rule description of type i3c_register_ibi_addr_t
-
void I3C_MasterGetIBIRules(I3C_Type *base, i3c_register_ibi_addr_t *ibiRule)#
I3C master get IBI rule.
- Parameters:
base – The I3C peripheral base address.
ibiRule – Pointer to store the read out ibi rule description.
-
i3c_ibi_type_t I3C_GetIBIType(I3C_Type *base)#
I3C master get IBI Type.
- Parameters:
base – The I3C peripheral base address.
- Return values:
i3c_ibi_type_t – Type of i3c_ibi_type_t.
-
static inline uint8_t I3C_GetIBIAddress(I3C_Type *base)#
I3C master get IBI Address.
- Parameters:
base – The I3C peripheral base address.
- Return values:
The – 8-bit IBI address.
-
status_t I3C_MasterProcessDAASpecifiedBaudrate(I3C_Type *base, uint8_t *addressList, uint32_t count, i3c_master_daa_baudrate_t *daaBaudRate)#
Performs a DAA in the i3c bus with specified temporary baud rate.
- Parameters:
base – The I3C peripheral base address.
addressList – The pointer for address list which is used to do DAA.
count – The address count in the address list.
daaBaudRate – The temporary baud rate in DAA process, NULL for using initial setting. The initial setting is set back between the completion of the DAA and the return of this function.
- Return values:
kStatus_Success – The transaction was started successfully.
kStatus_I3C_Busy – Either another master is currently utilizing the bus, or a non-blocking transaction is already in progress.
kStatus_I3C_SlaveCountExceed – The I3C slave count has exceed the definition in I3C_MAX_DEVCNT.
-
static inline status_t I3C_MasterProcessDAA(I3C_Type *base, uint8_t *addressList, uint32_t count)#
Performs a DAA in the i3c bus.
- Parameters:
base – The I3C peripheral base address.
addressList – The pointer for address list which is used to do DAA.
count – The address count in the address list. The initial setting is set back between the completion of the DAA and the return of this function.
- Return values:
kStatus_Success – The transaction was started successfully.
kStatus_I3C_Busy – Either another master is currently utilizing the bus, or a non-blocking transaction is already in progress.
kStatus_I3C_SlaveCountExceed – The I3C slave count has exceed the definition in I3C_MAX_DEVCNT.
-
i3c_device_info_t *I3C_MasterGetDeviceListAfterDAA(I3C_Type *base, uint8_t *count)#
Get device information list after DAA process is done.
- Parameters:
base – The I3C peripheral base address.
count – [out] The pointer to store the available device count.
- Returns:
Pointer to the i3c_device_info_t array.
-
void I3C_MasterClearDeviceCount(I3C_Type *base)#
Clear the global device count which represents current devices number on the bus. When user resets all dynamic addresses on the bus, should call this API.
- Parameters:
base – The I3C peripheral base address.
-
status_t I3C_MasterTransferBlocking(I3C_Type *base, i3c_master_transfer_t *transfer)#
Performs a master polling transfer on the I2C/I3C bus.
Note
The API does not return until the transfer succeeds or fails due to error happens during transfer.
- Parameters:
base – The I3C peripheral base address.
transfer – Pointer to the transfer structure.
- Return values:
kStatus_Success – Data was received successfully.
kStatus_I3C_Busy – Another master is currently utilizing the bus.
kStatus_I3C_IBIWon – The I3C slave event IBI or MR or HJ won the arbitration on a header address.
kStatus_I3C_Timeout – The module has stalled too long in a frame.
kStatus_I3C_Nak – The slave device sent a NAK in response to an address.
kStatus_I3C_WriteAbort – The slave device sent a NAK in response to a write.
kStatus_I3C_Term – The master terminates slave read.
kStatus_I3C_HdrParityError – Parity error from DDR read.
kStatus_I3C_CrcError – CRC error from DDR read.
kStatus_I3C_MsgError – Message SDR/DDR mismatch or read/write message in wrong state.
kStatus_I3C_ReadFifoError – Read from M/SRDATAB register when FIFO empty.
kStatus_I3C_WriteFifoError – Write to M/SWDATAB register when FIFO full.
kStatus_I3C_InvalidReq – Invalid use of request.
-
status_t I3C_SlaveSend(I3C_Type *base, const void *txBuff, size_t txSize)#
Performs a polling send transfer on the I3C bus.
- Parameters:
base – The I3C peripheral base address.
txBuff – The pointer to the data to be transferred.
txSize – The length in bytes of the data to be transferred.
- Returns:
Error or success status returned by API.
-
status_t I3C_SlaveReceive(I3C_Type *base, void *rxBuff, size_t rxSize)#
Performs a polling receive transfer on the I3C bus.
- Parameters:
base – The I3C peripheral base address.
rxBuff – The pointer to the data to be transferred.
rxSize – The length in bytes of the data to be transferred.
- Returns:
Error or success status returned by API.
-
void I3C_MasterTransferCreateHandle(I3C_Type *base, i3c_master_handle_t *handle, const i3c_master_transfer_callback_t *callback, void *userData)#
Creates a new handle for the I3C master non-blocking APIs.
The creation of a handle is for use with the non-blocking APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the I3C_MasterTransferAbort() API shall be called.
Note
The function also enables the NVIC IRQ for the input I3C. Need to notice that on some SoCs the I3C IRQ is connected to INTMUX, in this case user needs to enable the associated INTMUX IRQ in application.
- Parameters:
base – The I3C peripheral base address.
handle – [out] Pointer to the I3C master driver handle.
callback – User provided pointer to the asynchronous callback function.
userData – User provided pointer to the application callback data.
-
status_t I3C_MasterTransferNonBlocking(I3C_Type *base, i3c_master_handle_t *handle, i3c_master_transfer_t *transfer)#
Performs a non-blocking transaction on the I2C/I3C bus.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C master driver handle.
transfer – The pointer to the transfer descriptor.
- Return values:
kStatus_Success – The transaction was started successfully.
kStatus_I3C_Busy – Either another master is currently utilizing the bus, or a non-blocking transaction is already in progress.
-
status_t I3C_MasterTransferGetCount(I3C_Type *base, i3c_master_handle_t *handle, size_t *count)#
Returns number of bytes transferred so far.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C master driver handle.
count – [out] Number of bytes transferred so far by the non-blocking transaction.
- Return values:
kStatus_Success –
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
void I3C_MasterTransferAbort(I3C_Type *base, i3c_master_handle_t *handle)#
Terminates a non-blocking I3C master transmission early.
Note
It is not safe to call this function from an IRQ handler that has a higher priority than the I3C peripheral’s IRQ priority.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C master driver handle.
-
void I3C_MasterTransferHandleIRQ(I3C_Type *base, void *intHandle)#
Reusable routine to handle master interrupts.
Note
This function does not need to be called unless you are reimplementing the nonblocking API’s interrupt handler routines to add special functionality.
- Parameters:
base – The I3C peripheral base address.
intHandle – Pointer to the I3C master driver handle.
-
void I3C_DriverIRQHandler(uint32_t instance)#
Common IRQ handler entry for all I3C instances.
This function dispatches the IRQ to the correct instance handler using the instance index.
- Parameters:
instance – I3C instance number.
-
enum _i3c_master_flags#
I3C master peripheral flags.
The following status register flags can be cleared:
All flags except kI3C_MasterBetweenFlag and kI3C_MasterNackDetectFlag can be enabled as interrupts.
Note
These enums are meant to be OR’d together to form a bit mask.
Values:
-
enumerator kI3C_MasterBetweenFlag#
Between messages/DAAs flag
-
enumerator kI3C_MasterNackDetectFlag#
NACK detected flag
-
enumerator kI3C_MasterSlaveStartFlag#
Slave request start flag
-
enumerator kI3C_MasterControlDoneFlag#
Master request complete flag
-
enumerator kI3C_MasterCompleteFlag#
Transfer complete flag
-
enumerator kI3C_MasterRxReadyFlag#
Rx data ready in Rx buffer flag
-
enumerator kI3C_MasterTxReadyFlag#
Tx buffer ready for Tx data flag
-
enumerator kI3C_MasterArbitrationWonFlag#
Header address won arbitration flag
-
enumerator kI3C_MasterErrorFlag#
Error occurred flag
-
enumerator kI3C_MasterSlave2MasterFlag#
Switch from slave to master flag
-
enumerator kI3C_MasterClearFlags#
-
enum _i3c_master_error_flags#
I3C master error flags to indicate the causes.
Note
These enums are meant to be OR’d together to form a bit mask.
Values:
-
enumerator kI3C_MasterErrorNackFlag#
Slave NACKed the last address
-
enumerator kI3C_MasterErrorWriteAbortFlag#
Slave NACKed the write data
-
enumerator kI3C_MasterErrorParityFlag#
Parity error from DDR read
-
enumerator kI3C_MasterErrorCrcFlag#
CRC error from DDR read
-
enumerator kI3C_MasterErrorReadFlag#
Read from MRDATAB register when FIFO empty
-
enumerator kI3C_MasterErrorWriteFlag#
Write to MWDATAB register when FIFO full
-
enumerator kI3C_MasterErrorMsgFlag#
Message SDR/DDR mismatch or read/write message in wrong state
-
enumerator kI3C_MasterErrorInvalidReqFlag#
Invalid use of request
-
enumerator kI3C_MasterErrorTimeoutFlag#
The module has stalled too long in a frame
-
enumerator kI3C_MasterAllErrorFlags#
All error flags
-
enumerator kI3C_MasterErrorNackFlag#
-
enum _i3c_master_state#
I3C working master state.
Values:
-
enumerator kI3C_MasterStateIdle#
Bus stopped.
-
enumerator kI3C_MasterStateSlvReq#
Bus stopped but slave holding SDA low.
-
enumerator kI3C_MasterStateMsgSdr#
In SDR Message mode from using MWMSG_SDR.
-
enumerator kI3C_MasterStateNormAct#
In normal active SDR mode.
-
enumerator kI3C_MasterStateDdr#
In DDR Message mode.
-
enumerator kI3C_MasterStateDaa#
In ENTDAA mode.
-
enumerator kI3C_MasterStateIbiAck#
Waiting on IBI ACK/NACK decision.
-
enumerator kI3C_MasterStateIbiRcv#
Receiving IBI.
-
enumerator kI3C_MasterStateIdle#
-
enum _i3c_master_enable#
I3C master enable configuration.
Values:
-
enumerator kI3C_MasterOff#
Master off.
-
enumerator kI3C_MasterOn#
Master on.
-
enumerator kI3C_MasterCapable#
Master capable.
-
enumerator kI3C_MasterOff#
-
enum _i3c_master_hkeep#
I3C high keeper configuration.
Values:
-
enumerator kI3C_MasterHighKeeperNone#
Use PUR to hold SCL high.
-
enumerator kI3C_MasterHighKeeperWiredIn#
Use pin_HK controls.
-
enumerator kI3C_MasterPassiveSDA#
Hi-Z for Bus Free and hold SDA.
-
enumerator kI3C_MasterPassiveSDASCL#
Hi-Z both for Bus Free, and can Hi-Z SDA for hold.
-
enumerator kI3C_MasterHighKeeperNone#
-
enum _i3c_bus_request#
Emits the requested operation when doing in pieces vs. by message.
Values:
-
enumerator kI3C_RequestNone#
No request.
-
enumerator kI3C_RequestEmitStartAddr#
Request to emit start and address on bus.
-
enumerator kI3C_RequestEmitStop#
Request to emit stop on bus.
-
enumerator kI3C_RequestIbiAckNack#
Manual IBI ACK or NACK.
-
enumerator kI3C_RequestProcessDAA#
Process DAA.
-
enumerator kI3C_RequestForceExit#
Request to force exit.
-
enumerator kI3C_RequestAutoIbi#
Hold in stopped state, but Auto-emit START,7E.
-
enumerator kI3C_RequestNone#
-
enum _i3c_bus_type#
Bus type with EmitStartAddr.
Values:
-
enumerator kI3C_TypeI3CSdr#
SDR mode of I3C.
-
enumerator kI3C_TypeI2C#
Standard i2c protocol.
-
enumerator kI3C_TypeI3CDdr#
HDR-DDR mode of I3C.
-
enumerator kI3C_TypeI3CSdr#
-
enum _i3c_ibi_response#
IBI response.
Values:
-
enumerator kI3C_IbiRespAck#
ACK with no mandatory byte.
-
enumerator kI3C_IbiRespNack#
NACK.
-
enumerator kI3C_IbiRespAckMandatory#
ACK with mandatory byte.
-
enumerator kI3C_IbiRespManual#
Reserved.
-
enumerator kI3C_IbiRespAck#
-
enum _i3c_ibi_type#
IBI type.
Values:
-
enumerator kI3C_IbiNormal#
In-band interrupt.
-
enumerator kI3C_IbiHotJoin#
slave hot join.
-
enumerator kI3C_IbiMasterRequest#
slave master ship request.
-
enumerator kI3C_IbiNormal#
-
enum _i3c_ibi_state#
IBI state.
Values:
-
enumerator kI3C_IbiReady#
In-band interrupt ready state, ready for user to handle.
-
enumerator kI3C_IbiDataBuffNeed#
In-band interrupt need data buffer for data receive.
-
enumerator kI3C_IbiAckNackPending#
In-band interrupt Ack/Nack pending for decision.
-
enumerator kI3C_IbiReady#
-
enum _i3c_direction#
Direction of master and slave transfers.
Values:
-
enumerator kI3C_Write#
Master transmit.
-
enumerator kI3C_Read#
Master receive.
-
enumerator kI3C_Write#
-
enum _i3c_tx_trigger_level#
Watermark of TX int/dma trigger level.
Values:
-
enumerator kI3C_TxTriggerOnEmpty#
Trigger on empty.
-
enumerator kI3C_TxTriggerUntilOneQuarterOrLess#
Trigger on 1/4 full or less.
-
enumerator kI3C_TxTriggerUntilOneHalfOrLess#
Trigger on 1/2 full or less.
-
enumerator kI3C_TxTriggerUntilOneLessThanFull#
Trigger on 1 less than full or less.
-
enumerator kI3C_TxTriggerOnEmpty#
-
enum _i3c_rx_trigger_level#
Watermark of RX int/dma trigger level.
Values:
-
enumerator kI3C_RxTriggerOnNotEmpty#
Trigger on not empty.
-
enumerator kI3C_RxTriggerUntilOneQuarterOrMore#
Trigger on 1/4 full or more.
-
enumerator kI3C_RxTriggerUntilOneHalfOrMore#
Trigger on 1/2 full or more.
-
enumerator kI3C_RxTriggerUntilThreeQuarterOrMore#
Trigger on 3/4 full or more.
-
enumerator kI3C_RxTriggerOnNotEmpty#
-
enum _i3c_rx_term_ops#
I3C master read termination operations.
Values:
-
enumerator kI3C_RxTermDisable#
Master doesn’t terminate read, used for CCC transfer.
-
enumerator kI3C_RxAutoTerm#
Master auto terminate read after receiving specified bytes(up to MCTRL.RDTERM field width).
-
enumerator kI3C_RxTermLastByte#
Master terminates read at any time after START, no length limitation.
-
enumerator kI3C_RxTermDisable#
-
enum _i3c_start_scl_delay#
I3C start SCL delay options.
Values:
-
enumerator kI3C_NoDelay#
No delay.
-
enumerator kI3C_IncreaseSclHalfPeriod#
Increases SCL clock period by 1/2.
-
enumerator kI3C_IncreaseSclOnePeriod#
Increases SCL clock period by 1.
-
enumerator kI3C_IncreaseSclOneAndHalfPeriod#
Increases SCL clock period by 1 1/2
-
enumerator kI3C_NoDelay#
-
enum _i3c_master_bus_mode#
I3C bus topology. Selects how the baud rate is calculated for the bus.
Values:
-
enumerator kI3C_PureBus#
Only I3C devices on the bus.
-
enumerator kI3C_MixedFastBus#
I3C and legacy I2C Fm/Fm+ devices share the bus.
-
enumerator kI3C_LimitedBus#
I3C controller on a legacy I2C bus.
-
enumerator kI3C_PureBus#
-
enum _i3c_legacy_i2c_speed_mode#
Legacy I2C preset selector.
Values:
-
enumerator kI3C_LegacyI2CStandardMode#
Reserved for future Standard-mode support.
-
enumerator kI3C_LegacyI2CFastMode#
Legacy I2C Fast-mode preset.
-
enumerator kI3C_LegacyI2CFastModePlus#
Legacy I2C Fast-mode Plus preset.
-
enumerator kI3C_LegacyI2CStandardMode#
-
enum _i3c_master_src_clk#
Validated source clock selector for I2C timing presets.
Values:
-
enumerator kI3C_MasterSrcClk24M#
Use the validated 24 MHz timing table.
-
enumerator kI3C_MasterSrcClk25M#
Use the validated 25 MHz timing table.
-
enumerator kI3C_MasterSrcClk24M#
-
enum _i3c_master_transfer_flags#
Transfer option flags.
Note
These enumerations are intended to be OR’d together to form a bit mask of options for the _i3c_master_transfer::flags field.
Values:
-
enumerator kI3C_TransferDefaultFlag#
Transfer starts with a start signal, stops with a stop signal.
-
enumerator kI3C_TransferNoStartFlag#
Don’t send a start condition, address, and sub address
-
enumerator kI3C_TransferRepeatedStartFlag#
Send a repeated start condition
-
enumerator kI3C_TransferNoStopFlag#
Don’t send a stop condition.
-
enumerator kI3C_TransferWordsFlag#
Transfer in words, else transfer in bytes.
-
enumerator kI3C_TransferDisableRxTermFlag#
Disable Rx termination. Note: It’s for I3C CCC transfer.
-
enumerator kI3C_TransferRxAutoTermFlag#
Set Rx auto-termination. Note: It’s adaptive based on Rx size(up to MCTRL.RDTERM field width) except in I3C_MasterReceive.
-
enumerator kI3C_TransferStartWithBroadcastAddr#
Start transfer with 0x7E, then read/write data with device address.
-
enumerator kI3C_TransferDefaultFlag#
-
typedef enum _i3c_master_state i3c_master_state_t#
I3C working master state.
-
typedef enum _i3c_master_enable i3c_master_enable_t#
I3C master enable configuration.
-
typedef enum _i3c_master_hkeep i3c_master_hkeep_t#
I3C high keeper configuration.
-
typedef enum _i3c_bus_request i3c_bus_request_t#
Emits the requested operation when doing in pieces vs. by message.
-
typedef enum _i3c_bus_type i3c_bus_type_t#
Bus type with EmitStartAddr.
-
typedef enum _i3c_ibi_response i3c_ibi_response_t#
IBI response.
-
typedef enum _i3c_ibi_type i3c_ibi_type_t#
IBI type.
-
typedef enum _i3c_ibi_state i3c_ibi_state_t#
IBI state.
-
typedef enum _i3c_direction i3c_direction_t#
Direction of master and slave transfers.
-
typedef enum _i3c_tx_trigger_level i3c_tx_trigger_level_t#
Watermark of TX int/dma trigger level.
-
typedef enum _i3c_rx_trigger_level i3c_rx_trigger_level_t#
Watermark of RX int/dma trigger level.
-
typedef enum _i3c_rx_term_ops i3c_rx_term_ops_t#
I3C master read termination operations.
-
typedef enum _i3c_start_scl_delay i3c_start_scl_delay_t#
I3C start SCL delay options.
-
typedef struct _i3c_register_ibi_addr i3c_register_ibi_addr_t#
Structure with setting master IBI rules and slave registry.
-
typedef struct _i3c_baudrate i3c_baudrate_hz_t#
Structure with I3C baudrate settings.
-
typedef struct _i3c_master_daa_baudrate i3c_master_daa_baudrate_t#
I3C DAA baud rate configuration.
-
typedef enum _i3c_master_bus_mode i3c_master_bus_mode_t#
I3C bus topology. Selects how the baud rate is calculated for the bus.
-
typedef enum _i3c_legacy_i2c_speed_mode i3c_legacy_i2c_speed_mode_t#
Legacy I2C preset selector.
-
typedef enum _i3c_master_src_clk i3c_master_src_clk_t#
Validated source clock selector for I2C timing presets.
-
typedef struct _i3c_master_baudrate_config i3c_master_baudrate_config_t#
I3C master baud rate configuration.
-
typedef struct _i3c_timing i3c_timing_t#
Pre-calculated I3C MCONFIG timing fields.
Pre-compute the timing at init, then switch with I3C_MasterSetTiming(). The actualXxxBaud fields report the rates the hardware achieves.
-
typedef struct _i3c_master_config i3c_master_config_t#
Structure with settings to initialize the I3C master module.
This structure holds configuration settings for the I3C peripheral. To initialize this structure to reasonable defaults, call the I3C_MasterGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
-
typedef struct _i3c_master_transfer i3c_master_transfer_t#
-
typedef struct _i3c_master_handle i3c_master_handle_t#
-
typedef struct _i3c_master_transfer_callback i3c_master_transfer_callback_t#
i3c master callback functions.
-
typedef void (*i3c_master_isr_t)(I3C_Type *base, void *handle)#
Typedef for master interrupt handler.
-
struct _i3c_register_ibi_addr#
- #include <fsl_i3c.h>
Structure with setting master IBI rules and slave registry.
-
struct _i3c_baudrate#
- #include <fsl_i3c.h>
Structure with I3C baudrate settings.
-
struct _i3c_master_daa_baudrate#
- #include <fsl_i3c.h>
I3C DAA baud rate configuration.
-
struct _i3c_master_baudrate_config#
- #include <fsl_i3c.h>
I3C master baud rate configuration.
Public Members
-
i3c_master_bus_mode_t busMode#
Bus topology.
-
uint32_t i2cBaud#
Desired legacy I2C baud rate in Hz; 0 = do not program I2CBAUD.
-
uint32_t i3cPushPullBaud#
Desired I3C push-pull SCL frequency in Hz.
-
uint32_t i3cOpenDrainBaud#
Desired I3C open-drain SCL frequency in Hz.
-
bool enableODHPP#
Open-drain HIGH shape: true = narrow (normal I3C frames), false = symmetric (required for the first-7Eh broadcast).
-
i3c_master_bus_mode_t busMode#
-
struct _i3c_timing#
- #include <fsl_i3c.h>
Pre-calculated I3C MCONFIG timing fields.
Pre-compute the timing at init, then switch with I3C_MasterSetTiming(). The actualXxxBaud fields report the rates the hardware achieves.
Public Members
-
uint8_t ppBaud#
MCONFIG[PPBAUD] field.
-
uint8_t ppLow#
MCONFIG[PPLOW] field.
-
uint8_t odBaud#
MCONFIG[ODBAUD] field (0 is forbidden).
-
bool odHighPP#
MCONFIG[ODHPP] field.
-
uint8_t i2cBaud#
MCONFIG[I2CBAUD] field.
-
uint32_t actualPpBaud#
Achieved PP SCL frequency in Hz.
-
uint32_t actualOdBaud#
Achieved OD SCL frequency in Hz.
-
uint32_t actualI2cBaud#
Achieved I2C SCL frequency in Hz (0 if no I2C is configured).
-
uint8_t ppBaud#
-
struct _i3c_master_config#
- #include <fsl_i3c.h>
Structure with settings to initialize the I3C master module.
This structure holds configuration settings for the I3C peripheral. To initialize this structure to reasonable defaults, call the I3C_MasterGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
Public Members
-
i3c_master_enable_t enableMaster#
Enable master mode.
-
bool disableTimeout#
Whether to disable timeout to prevent the ERRWARN.
-
i3c_master_hkeep_t hKeep#
High keeper mode setting.
-
bool enableOpenDrainStop#
Whether to emit open-drain speed STOP.
-
bool enableOpenDrainHigh#
Enable Open-Drain High to be 1 PPBAUD count for i3c messages, or 1 ODBAUD.
-
i3c_baudrate_hz_t baudRate_Hz#
Desired baud rate settings.
-
i3c_start_scl_delay_t startSclDelay#
I3C SCL delay after START.
-
i3c_start_scl_delay_t restartSclDelay#
I3C SCL delay after Repeated START.
-
i3c_master_enable_t enableMaster#
-
struct _i3c_master_transfer_callback#
- #include <fsl_i3c.h>
i3c master callback functions.
Public Members
-
void (*slave2Master)(I3C_Type *base, void *userData)#
Transfer complete callback
-
void (*ibiCallback)(I3C_Type *base, i3c_master_handle_t *handle, i3c_ibi_type_t ibiType, i3c_ibi_state_t ibiState)#
IBI event callback
-
void (*transferComplete)(I3C_Type *base, i3c_master_handle_t *handle, status_t completionStatus, void *userData)#
Transfer complete callback
-
void (*slave2Master)(I3C_Type *base, void *userData)#
-
struct _i3c_master_transfer#
- #include <fsl_i3c.h>
Non-blocking transfer descriptor structure.
This structure is used to pass transaction parameters to the I3C_MasterTransferNonBlocking() API.
Public Members
-
uint32_t flags#
Bit mask of options for the transfer. See enumeration _i3c_master_transfer_flags for available options. Set to 0 or kI3C_TransferDefaultFlag for normal transfers.
-
uint8_t slaveAddress#
The 7-bit slave address.
-
i3c_direction_t direction#
Either kI3C_Read or kI3C_Write.
-
uint32_t subaddress#
Sub address. Transferred MSB first.
-
size_t subaddressSize#
Length of sub address to send in bytes. Maximum size is 4 bytes.
-
void *data#
Pointer to data to transfer.
-
size_t dataSize#
Number of bytes to transfer.
-
i3c_bus_type_t busType#
bus type.
-
i3c_ibi_response_t ibiResponse#
ibi response during transfer.
-
uint32_t flags#
-
struct _i3c_master_handle#
- #include <fsl_i3c.h>
Driver handle for master non-blocking APIs.
Note
The contents of this structure are private and subject to change.
Public Members
-
uint8_t state#
Transfer state machine current state.
-
uint32_t remainingBytes#
Remaining byte count in current state.
-
i3c_rx_term_ops_t rxTermOps#
Read termination operation.
-
i3c_master_transfer_t transfer#
Copy of the current transfer info.
-
uint8_t ibiAddress#
Slave address which request IBI.
-
uint8_t *ibiBuff#
Pointer to IBI buffer to keep ibi bytes.
-
size_t ibiPayloadSize#
IBI payload size.
-
i3c_ibi_type_t ibiType#
IBI type.
-
i3c_master_transfer_callback_t callback#
Callback functions pointer.
-
void *userData#
Application data passed to callback.
-
uint8_t state#
I3C Master DMA Driver#
-
void I3C_MasterTransferCreateHandleEDMA(I3C_Type *base, i3c_master_edma_handle_t *handle, const i3c_master_edma_callback_t *callback, void *userData, edma_handle_t *rxDmaHandle, edma_handle_t *txDmaHandle)#
Create a new handle for the I3C master DMA APIs.
The creation of a handle is for use with the DMA APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the I3C_MasterTransferAbortDMA() API shall be called.
For devices where the I3C send and receive DMA requests are OR’d together, the txDmaHandle parameter is ignored and may be set to NULL.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C master driver handle.
callback – User provided pointer to the asynchronous callback function.
userData – User provided pointer to the application callback data.
rxDmaHandle – Handle for the DMA receive channel. Created by the user prior to calling this function.
txDmaHandle – Handle for the DMA transmit channel. Created by the user prior to calling this function.
-
status_t I3C_MasterTransferEDMA(I3C_Type *base, i3c_master_edma_handle_t *handle, i3c_master_transfer_t *transfer)#
Performs a non-blocking DMA-based transaction on the I3C bus.
The callback specified when the handle was created is invoked when the transaction has completed.
Note
On parts affected by ERR053412, the I3C controller stalls SCL when the RxFIFO becomes full and does not recover after CPU read FIFO, bus will be stalling indefinitely. This DMA-based API services the RxFIFO with EDMA so it never fills, and is the recommended workaround on affected parts.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C master driver handle.
transfer – The pointer to the transfer descriptor.
- Return values:
kStatus_Success – The transaction was started successfully.
kStatus_I3C_Busy – Either another master is currently utilizing the bus, or another DMA transaction is already in progress.
-
status_t I3C_MasterTransferGetCountEDMA(I3C_Type *base, i3c_master_edma_handle_t *handle, size_t *count)#
Returns number of bytes transferred so far.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C master driver handle.
count – [out] Number of bytes transferred so far by the non-blocking transaction.
- Return values:
kStatus_Success –
kStatus_NoTransferInProgress – There is not a DMA transaction currently in progress.
-
void I3C_MasterTransferAbortEDMA(I3C_Type *base, i3c_master_edma_handle_t *handle)#
Terminates a non-blocking I3C master transmission early.
Note
It is not safe to call this function from an IRQ handler that has a higher priority than the DMA peripheral’s IRQ priority.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C master driver handle.
-
void I3C_MasterTransferEDMAHandleIRQ(I3C_Type *base, void *i3cHandle)#
Reusable routine to handle master interrupts.
Note
This function does not need to be called unless you are reimplementing the nonblocking API’s interrupt handler routines to add special functionality.
- Parameters:
base – The I3C peripheral base address.
i3cHandle – Pointer to the I3C master DMA driver handle.
-
typedef struct _i3c_master_edma_handle i3c_master_edma_handle_t#
-
typedef struct _i3c_master_edma_callback i3c_master_edma_callback_t#
i3c master callback functions.
-
struct _i3c_master_edma_callback#
- #include <fsl_i3c_edma.h>
i3c master callback functions.
Public Members
-
void (*slave2Master)(I3C_Type *base, void *userData)#
Target asks for controller request.
-
void (*ibiCallback)(I3C_Type *base, i3c_master_edma_handle_t *handle, i3c_ibi_type_t ibiType, i3c_ibi_state_t ibiState)#
IBI event callback.
-
void (*transferComplete)(I3C_Type *base, i3c_master_edma_handle_t *handle, status_t status, void *userData)#
Transfer complete callback.
-
void (*slave2Master)(I3C_Type *base, void *userData)#
-
struct _i3c_master_edma_handle#
- #include <fsl_i3c_edma.h>
Driver handle for master EDMA APIs.
Note
The contents of this structure are private and subject to change.
Public Members
-
I3C_Type *base#
I3C base pointer.
-
uint8_t state#
Transfer state machine current state.
-
uint32_t transferCount#
Indicates progress of the transfer
-
uint8_t subaddressBuffer[4]#
Saving subaddress command.
-
uint8_t subaddressCount#
Saving command count.
-
i3c_master_transfer_t transfer#
Copy of the current transfer info.
-
i3c_master_edma_callback_t callback#
Callback function pointer.
-
void *userData#
Application data passed to callback.
-
edma_handle_t *rxDmaHandle#
Handle for receive DMA channel.
-
edma_handle_t *txDmaHandle#
Handle for transmit DMA channel.
-
bool ibiFlag#
IBIWON flag.
-
uint8_t ibiAddress#
Slave address which request IBI.
-
uint8_t *ibiBuff#
Pointer to IBI buffer to keep ibi bytes.
-
size_t ibiPayloadSize#
IBI payload size.
-
i3c_ibi_type_t ibiType#
IBI type.
-
I3C_Type *base#
I3C Slave Driver#
-
void I3C_SlaveGetDefaultConfig(i3c_slave_config_t *slaveConfig)
Provides a default configuration for the I3C slave peripheral.
This function provides the following default configuration for the I3C slave peripheral:
slaveConfig->enableslave = true;
After calling this function, you can override any settings in order to customize the configuration, prior to initializing the slave driver with I3C_SlaveInit().
- Parameters:
slaveConfig – [out] User provided configuration structure for default values. Refer to i3c_slave_config_t.
-
void I3C_SlaveInit(I3C_Type *base, const i3c_slave_config_t *slaveConfig, uint32_t slowClock_Hz)
Initializes the I3C slave peripheral.
This function enables the peripheral clock and initializes the I3C slave peripheral as described by the user provided configuration.
- Parameters:
base – The I3C peripheral base address.
slaveConfig – User provided peripheral configuration. Use I3C_SlaveGetDefaultConfig() to get a set of defaults that you can override.
slowClock_Hz – Frequency in Hertz of the I3C slow clock. Used to calculate the bus match condition values. If FSL_FEATURE_I3C_HAS_NO_SCONFIG_BAMATCH defines as 1, this parameter is useless.
-
void I3C_SlaveDeinit(I3C_Type *base)
Deinitializes the I3C slave peripheral.
This function disables the I3C slave peripheral and gates the clock.
- Parameters:
base – The I3C peripheral base address.
-
static inline void I3C_SlaveEnable(I3C_Type *base, bool isEnable)
Enable/Disable Slave.
- Parameters:
base – The I3C peripheral base address.
isEnable – Enable or disable.
-
static inline uint32_t I3C_SlaveGetStatusFlags(I3C_Type *base)
Gets the I3C slave status flags.
A bit mask with the state of all I3C slave status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
See also
- Parameters:
base – The I3C peripheral base address.
- Returns:
State of the status flags:
1: related status flag is set.
0: related status flag is not set.
-
static inline void I3C_SlaveClearStatusFlags(I3C_Type *base, uint32_t statusMask)
Clears the I3C slave status flag state.
The following status register flags can be cleared:
Attempts to clear other flags has no effect.
See also
- Parameters:
base – The I3C peripheral base address.
statusMask – A bitmask of status flags that are to be cleared. The mask is composed of _i3c_slave_flags enumerators OR’d together. You may pass the result of a previous call to I3C_SlaveGetStatusFlags().
-
static inline uint32_t I3C_SlaveGetErrorStatusFlags(I3C_Type *base)
Gets the I3C slave error status flags.
A bit mask with the state of all I3C slave error status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
See also
- Parameters:
base – The I3C peripheral base address.
- Returns:
State of the error status flags:
1: related status flag is set.
0: related status flag is not set.
-
static inline void I3C_SlaveClearErrorStatusFlags(I3C_Type *base, uint32_t statusMask)
Clears the I3C slave error status flag state.
See also
- Parameters:
base – The I3C peripheral base address.
statusMask – A bitmask of error status flags that are to be cleared. The mask is composed of _i3c_slave_error_flags enumerators OR’d together. You may pass the result of a previous call to I3C_SlaveGetErrorStatusFlags().
-
i3c_slave_activity_state_t I3C_SlaveGetActivityState(I3C_Type *base)
Gets the I3C slave state.
- Parameters:
base – The I3C peripheral base address.
- Returns:
I3C slave activity state, refer i3c_slave_activity_state_t.
-
static inline void I3C_SlaveEnableInterrupts(I3C_Type *base, uint32_t interruptMask)
Enables the I3C slave interrupt requests.
Only below flags can be enabled as interrupts.
- Parameters:
base – The I3C peripheral base address.
interruptMask – Bit mask of interrupts to enable. See _i3c_slave_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline void I3C_SlaveDisableInterrupts(I3C_Type *base, uint32_t interruptMask)
Disables the I3C slave interrupt requests.
Only below flags can be disabled as interrupts.
- Parameters:
base – The I3C peripheral base address.
interruptMask – Bit mask of interrupts to disable. See _i3c_slave_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline uint32_t I3C_SlaveGetEnabledInterrupts(I3C_Type *base)
Returns the set of currently enabled I3C slave interrupt requests.
- Parameters:
base – The I3C peripheral base address.
- Returns:
A bitmask composed of _i3c_slave_flags enumerators OR’d together to indicate the set of enabled interrupts.
-
static inline uint32_t I3C_SlaveGetPendingInterrupts(I3C_Type *base)
Returns the set of pending I3C slave interrupt requests.
- Parameters:
base – The I3C peripheral base address.
- Returns:
A bitmask composed of _i3c_slave_flags enumerators OR’d together to indicate the set of pending interrupts.
-
static inline void I3C_SlaveEnableDMA(I3C_Type *base, bool enableTx, bool enableRx, uint32_t width)
Enables or disables I3C slave DMA requests.
- Parameters:
base – The I3C peripheral base address.
enableTx – Enable flag for transmit DMA request. Pass true for enable, false for disable.
enableRx – Enable flag for receive DMA request. Pass true for enable, false for disable.
width – DMA read/write unit in bytes.
-
static inline uint32_t I3C_SlaveGetTxFifoAddress(I3C_Type *base, uint32_t width)
Gets I3C slave transmit data register address for DMA transfer.
- Parameters:
base – The I3C peripheral base address.
width – DMA read/write unit in bytes.
- Returns:
The I3C Slave Transmit Data Register address.
-
static inline uint32_t I3C_SlaveGetRxFifoAddress(I3C_Type *base, uint32_t width)
Gets I3C slave receive data register address for DMA transfer.
- Parameters:
base – The I3C peripheral base address.
width – DMA read/write unit in bytes.
- Returns:
The I3C Slave Receive Data Register address.
-
static inline void I3C_SlaveSetWatermarks(I3C_Type *base, i3c_tx_trigger_level_t txLvl, i3c_rx_trigger_level_t rxLvl, bool flushTx, bool flushRx)
Sets the watermarks for I3C slave FIFOs.
- Parameters:
base – The I3C peripheral base address.
txLvl – Transmit FIFO watermark level. The kI3C_SlaveTxReadyFlag flag is set whenever the number of words in the transmit FIFO reaches txLvl.
rxLvl – Receive FIFO watermark level. The kI3C_SlaveRxReadyFlag flag is set whenever the number of words in the receive FIFO reaches rxLvl.
flushTx – true if TX FIFO is to be cleared, otherwise TX FIFO remains unchanged.
flushRx – true if RX FIFO is to be cleared, otherwise RX FIFO remains unchanged.
-
static inline void I3C_SlaveGetFifoCounts(I3C_Type *base, size_t *rxCount, size_t *txCount)
Gets the current number of bytes in the I3C slave FIFOs.
- Parameters:
base – The I3C peripheral base address.
txCount – [out] Pointer through which the current number of bytes in the transmit FIFO is returned. Pass NULL if this value is not required.
rxCount – [out] Pointer through which the current number of bytes in the receive FIFO is returned. Pass NULL if this value is not required.
-
status_t I3C_SlaveSend(I3C_Type *base, const void *txBuff, size_t txSize)
Performs a polling send transfer on the I3C bus.
- Parameters:
base – The I3C peripheral base address.
txBuff – The pointer to the data to be transferred.
txSize – The length in bytes of the data to be transferred.
- Returns:
Error or success status returned by API.
-
status_t I3C_SlaveReceive(I3C_Type *base, void *rxBuff, size_t rxSize)
Performs a polling receive transfer on the I3C bus.
- Parameters:
base – The I3C peripheral base address.
rxBuff – The pointer to the data to be transferred.
rxSize – The length in bytes of the data to be transferred.
- Returns:
Error or success status returned by API.
-
void I3C_SlaveTransferCreateHandle(I3C_Type *base, i3c_slave_handle_t *handle, i3c_slave_transfer_callback_t callback, void *userData)#
Creates a new handle for the I3C slave non-blocking APIs.
The creation of a handle is for use with the non-blocking APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the I3C_SlaveTransferAbort() API shall be called.
Note
The function also enables the NVIC IRQ for the input I3C. Need to notice that on some SoCs the I3C IRQ is connected to INTMUX, in this case user needs to enable the associated INTMUX IRQ in application.
- Parameters:
base – The I3C peripheral base address.
handle – [out] Pointer to the I3C slave driver handle.
callback – User provided pointer to the asynchronous callback function.
userData – User provided pointer to the application callback data.
-
status_t I3C_SlaveTransferNonBlocking(I3C_Type *base, i3c_slave_handle_t *handle, uint32_t eventMask)#
Starts accepting slave transfers.
Call this API after calling I2C_SlaveInit() and I3C_SlaveTransferCreateHandle() to start processing transactions driven by an I2C master. The slave monitors the I2C bus and pass events to the callback that was passed into the call to I3C_SlaveTransferCreateHandle(). The callback is always invoked from the interrupt context.
The set of events received by the callback is customizable. To do so, set the eventMask parameter to the OR’d combination of i3c_slave_transfer_event_t enumerators for the events you wish to receive. The kI3C_SlaveTransmitEvent and kI3C_SlaveReceiveEvent events are always enabled and do not need to be included in the mask. Alternatively, you can pass 0 to get a default set of only the transmit and receive events that are always enabled. In addition, the kI3C_SlaveAllEvents constant is provided as a convenient way to enable all events.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to struct: _i3c_slave_handle structure which stores the transfer state.
eventMask – Bit mask formed by OR’ing together i3c_slave_transfer_event_t enumerators to specify which events to send to the callback. Other accepted values are 0 to get a default set of only the transmit and receive events, and kI3C_SlaveAllEvents to enable all events.
- Return values:
kStatus_Success – Slave transfers were successfully started.
kStatus_I3C_Busy – Slave transfers have already been started on this handle.
-
status_t I3C_SlaveTransferGetCount(I3C_Type *base, i3c_slave_handle_t *handle, size_t *count)#
Gets the slave transfer status during a non-blocking transfer.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to i2c_slave_handle_t structure.
count – [out] Pointer to a value to hold the number of bytes transferred. May be NULL if the count is not required.
- Return values:
kStatus_Success –
kStatus_NoTransferInProgress –
-
void I3C_SlaveTransferAbort(I3C_Type *base, i3c_slave_handle_t *handle)#
Aborts the slave non-blocking transfers.
Note
This API could be called at any time to stop slave for handling the bus events.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to struct: _i3c_slave_handle structure which stores the transfer state.
-
void I3C_SlaveTransferHandleIRQ(I3C_Type *base, void *intHandle)#
Reusable routine to handle slave interrupts.
Note
This function does not need to be called unless you are reimplementing the non blocking API’s interrupt handler routines to add special functionality.
- Parameters:
base – The I3C peripheral base address.
intHandle – Pointer to struct: _i3c_slave_handle structure which stores the transfer state.
-
enum _i3c_slave_flags#
I3C slave peripheral flags.
The following status register flags can be cleared:
Only below flags can be enabled as interrupts.
Note
These enums are meant to be OR’d together to form a bit mask.
Values:
-
enumerator kI3C_SlaveNotStopFlag#
Slave status not stop flag
-
enumerator kI3C_SlaveMessageFlag#
Slave status message, indicating slave is listening to the bus traffic or responding
-
enumerator kI3C_SlaveRequiredReadFlag#
Slave status required, either is master doing SDR read from slave, or is IBI pushing out.
-
enumerator kI3C_SlaveRequiredWriteFlag#
Slave status request write, master is doing SDR write to slave, except slave in ENTDAA mode
-
enumerator kI3C_SlaveBusDAAFlag#
I3C bus is in ENTDAA mode
-
enumerator kI3C_SlaveBusHDRModeFlag#
I3C bus is in HDR mode
-
enumerator kI3C_SlaveBusStartFlag#
Start/Re-start event is seen since the bus was last cleared
-
enumerator kI3C_SlaveMatchedFlag#
Slave address(dynamic/static) matched since last cleared
-
enumerator kI3C_SlaveBusStopFlag#
Stop event is seen since the bus was last cleared
-
enumerator kI3C_SlaveRxReadyFlag#
Rx data ready in rx buffer flag
-
enumerator kI3C_SlaveTxReadyFlag#
Tx buffer ready for Tx data flag
-
enumerator kI3C_SlaveDynamicAddrChangedFlag#
Slave dynamic address has been assigned, re-assigned, or lost
-
enumerator kI3C_SlaveReceivedCCCFlag#
Slave received Common command code
-
enumerator kI3C_SlaveErrorFlag#
Error occurred flag
-
enumerator kI3C_SlaveHDRCommandMatchFlag#
High data rate command match
-
enumerator kI3C_SlaveCCCHandledFlag#
Slave received Common command code is handled by I3C module
-
enumerator kI3C_SlaveEventSentFlag#
Slave IBI/P2P/MR/HJ event has been sent
-
enumerator kI3C_SlaveIbiDisableFlag#
Slave in band interrupt is disabled.
-
enumerator kI3C_SlaveMasterRequestDisabledFlag#
Slave master request is disabled.
-
enumerator kI3C_SlaveHotJoinDisabledFlag#
Slave Hot-Join is disabled.
-
enumerator kI3C_SlaveClearFlags#
All flags which are cleared by the driver upon starting a transfer.
-
enumerator kI3C_SlaveAllIrqFlags#
-
enum _i3c_slave_error_flags#
I3C slave error flags to indicate the causes.
Note
These enums are meant to be OR’d together to form a bit mask.
Values:
-
enumerator kI3C_SlaveErrorOverrunFlag#
Slave internal from-bus buffer/FIFO overrun.
-
enumerator kI3C_SlaveErrorUnderrunFlag#
Slave internal to-bus buffer/FIFO underrun
-
enumerator kI3C_SlaveErrorUnderrunNakFlag#
Slave internal from-bus buffer/FIFO underrun and NACK error
-
enumerator kI3C_SlaveErrorTermFlag#
Terminate error from master
-
enumerator kI3C_SlaveErrorInvalidStartFlag#
Slave invalid start flag
-
enumerator kI3C_SlaveErrorSdrParityFlag#
SDR parity error
-
enumerator kI3C_SlaveErrorHdrParityFlag#
HDR parity error
-
enumerator kI3C_SlaveErrorHdrCRCFlag#
HDR-DDR CRC error
-
enumerator kI3C_SlaveErrorS0S1Flag#
S0 or S1 error
-
enumerator kI3C_SlaveErrorOverreadFlag#
Over-read error
-
enumerator kI3C_SlaveErrorOverwriteFlag#
Over-write error
-
enumerator kI3C_SlaveErrorOverrunFlag#
-
enum _i3c_slave_event#
I3C slave.event.
Values:
-
enumerator kI3C_SlaveEventNormal#
Normal mode.
-
enumerator kI3C_SlaveEventIBI#
In band interrupt event.
-
enumerator kI3C_SlaveEventMasterReq#
Master request event.
-
enumerator kI3C_SlaveEventHotJoinReq#
Hot-join event.
-
enumerator kI3C_SlaveEventNormal#
-
enum _i3c_slave_activity_state#
I3C slave.activity state.
Values:
-
enumerator kI3C_SlaveNoLatency#
Normal bus operation
-
enumerator kI3C_SlaveLatency1Ms#
1ms of latency.
-
enumerator kI3C_SlaveLatency100Ms#
100ms of latency.
-
enumerator kI3C_SlaveLatency10S#
10s latency.
-
enumerator kI3C_SlaveNoLatency#
-
enum _i3c_slave_transfer_event#
Set of events sent to the callback for non blocking slave transfers.
These event enumerations are used for two related purposes. First, a bit mask created by OR’ing together events is passed to I3C_SlaveTransferNonBlocking() in order to specify which events to enable. Then, when the slave callback is invoked, it is passed the current event through its transfer parameter.
Note
These enumerations are meant to be OR’d together to form a bit mask of events.
Values:
-
enumerator kI3C_SlaveAddressMatchEvent#
Received the slave address after a start or repeated start.
-
enumerator kI3C_SlaveTransmitEvent#
Callback is requested to provide data to transmit (slave-transmitter role).
-
enumerator kI3C_SlaveReceiveEvent#
Callback is requested to provide a buffer in which to place received data (slave-receiver role).
-
enumerator kI3C_SlaveRequiredTransmitEvent#
Callback is requested to provide a buffer in which to place received data (slave-receiver role).
-
enumerator kI3C_SlaveStartEvent#
A start/repeated start was detected.
-
enumerator kI3C_SlaveHDRCommandMatchEvent#
Slave Match HDR Command.
-
enumerator kI3C_SlaveCompletionEvent#
A stop was detected, completing the transfer.
-
enumerator kI3C_SlaveRequestSentEvent#
Slave request event sent.
-
enumerator kI3C_SlaveReceivedCCCEvent#
Slave received CCC event, need to handle by application.
-
enumerator kI3C_SlaveAllEvents#
Bit mask of all available events.
-
enumerator kI3C_SlaveAddressMatchEvent#
-
typedef enum _i3c_slave_event i3c_slave_event_t#
I3C slave.event.
-
typedef enum _i3c_slave_activity_state i3c_slave_activity_state_t#
I3C slave.activity state.
-
typedef struct _i3c_slave_config i3c_slave_config_t#
Structure with settings to initialize the I3C slave module.
This structure holds configuration settings for the I3C peripheral. To initialize this structure to reasonable defaults, call the I3C_SlaveGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
-
typedef enum _i3c_slave_transfer_event i3c_slave_transfer_event_t#
Set of events sent to the callback for non blocking slave transfers.
These event enumerations are used for two related purposes. First, a bit mask created by OR’ing together events is passed to I3C_SlaveTransferNonBlocking() in order to specify which events to enable. Then, when the slave callback is invoked, it is passed the current event through its transfer parameter.
Note
These enumerations are meant to be OR’d together to form a bit mask of events.
-
typedef struct _i3c_slave_transfer i3c_slave_transfer_t#
I3C slave transfer structure.
-
typedef struct _i3c_slave_handle i3c_slave_handle_t#
-
typedef void (*i3c_slave_transfer_callback_t)(I3C_Type *base, i3c_slave_transfer_t *transfer, void *userData)#
Slave event callback function pointer type.
This callback is used only for the slave non-blocking transfer API. To install a callback, use the I3C_SlaveSetCallback() function after you have created a handle.
- Param base:
Base address for the I3C instance on which the event occurred.
- Param transfer:
Pointer to transfer descriptor containing values passed to and/or from the callback.
- Param userData:
Arbitrary pointer-sized value passed from the application.
-
typedef void (*i3c_slave_isr_t)(I3C_Type *base, void *handle)#
Typedef for slave interrupt handler.
-
struct _i3c_slave_config#
- #include <fsl_i3c.h>
Structure with settings to initialize the I3C slave module.
This structure holds configuration settings for the I3C peripheral. To initialize this structure to reasonable defaults, call the I3C_SlaveGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
Public Members
-
bool enableSlave#
Whether to enable slave.
-
uint8_t staticAddr#
Static address.
-
uint16_t vendorID#
Device vendor ID(manufacture ID).
-
uint32_t partNumber#
Device part number info
-
uint8_t dcr#
Device characteristics register information.
-
uint8_t bcr#
Bus characteristics register information.
-
uint8_t hdrMode#
Support hdr mode, could be OR logic in enumeration:i3c_hdr_mode_t.
-
bool nakAllRequest#
Whether to reply NAK to all requests except broadcast CCC.
-
bool ignoreS0S1Error#
Whether to ignore S0/S1 error in SDR mode.
-
bool offline#
Whether to wait 60 us of bus quiet or HDR request to ensure slave track SDR mode safely.
-
bool matchSlaveStartStop#
Whether to assert start/stop status only the time slave is addressed.
-
uint32_t maxWriteLength#
Maximum write length.
-
uint32_t maxReadLength#
Maximum read length.
-
bool enableSlave#
-
struct _i3c_slave_transfer#
- #include <fsl_i3c.h>
I3C slave transfer structure.
Public Members
-
uint32_t event#
Reason the callback is being invoked.
-
uint8_t *txData#
Transfer buffer
-
size_t txDataSize#
Transfer size
-
uint8_t *rxData#
Transfer buffer
-
size_t rxDataSize#
Transfer size
-
status_t completionStatus#
Success or error code describing how the transfer completed. Only applies for kI3C_SlaveCompletionEvent.
-
size_t transferredCount#
Number of bytes actually transferred since start or last repeated start.
-
uint32_t event#
-
struct _i3c_slave_handle#
- #include <fsl_i3c.h>
I3C slave handle structure.
Note
The contents of this structure are private and subject to change.
Public Members
-
i3c_slave_transfer_t transfer#
I3C slave transfer copy.
-
bool isBusy#
Whether transfer is busy.
-
bool wasTransmit#
Whether the last transfer was a transmit.
-
uint32_t eventMask#
Mask of enabled events.
-
uint32_t transferredCount#
Count of bytes transferred.
-
i3c_slave_transfer_callback_t callback#
Callback function called at transfer event.
-
void *userData#
Callback parameter passed to callback.
-
size_t txFifoSize#
Tx Fifo size
-
i3c_slave_transfer_t transfer#
I3C Slave DMA Driver#
-
void I3C_SlaveTransferCreateHandleEDMA(I3C_Type *base, i3c_slave_edma_handle_t *handle, i3c_slave_edma_callback_t callback, void *userData, edma_handle_t *rxDmaHandle, edma_handle_t *txDmaHandle)#
Create a new handle for the I3C slave DMA APIs.
The creation of a handle is for use with the DMA APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the I3C_SlaveTransferAbortDMA() API shall be called.
For devices where the I3C send and receive DMA requests are OR’d together, the txDmaHandle parameter is ignored and may be set to NULL.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C slave driver handle.
callback – User provided pointer to the asynchronous callback function.
userData – User provided pointer to the application callback data.
rxDmaHandle – Handle for the DMA receive channel. Created by the user prior to calling this function.
txDmaHandle – Handle for the DMA transmit channel. Created by the user prior to calling this function.
-
status_t I3C_SlaveTransferEDMA(I3C_Type *base, i3c_slave_edma_handle_t *handle, i3c_slave_edma_transfer_t *transfer, uint32_t eventMask)#
Prepares for a non-blocking DMA-based transaction on the I3C bus.
The API will do DMA configuration according to the input transfer descriptor, and the data will be transferred when there’s bus master requesting transfer from/to this slave. So the timing of call to this API need be aligned with master application to ensure the transfer is executed as expected. Callback specified when the handle was created is invoked when the transaction has completed.
- Parameters:
base – The I3C peripheral base address.
handle – Pointer to the I3C slave driver handle.
transfer – The pointer to the transfer descriptor.
eventMask – Bit mask formed by OR’ing together i3c_slave_transfer_event_t enumerators to specify which events to send to the callback. The transmit and receive events is not allowed to be enabled.
- Return values:
kStatus_Success – The transaction was started successfully.
kStatus_I3C_Busy – Either another master is currently utilizing the bus, or another DMA transaction is already in progress.
kStatus_Fail – The transaction can’t be set.
-
void I3C_SlaveTransferAbortEDMA(I3C_Type *base, i3c_slave_edma_handle_t *handle)#
Abort a slave edma non-blocking transfer in a early time.
- Parameters:
base – I3C peripheral base address
handle – pointer to i3c_slave_edma_handle_t structure
-
void I3C_SlaveTransferEDMAHandleIRQ(I3C_Type *base, void *i3cHandle)#
Reusable routine to handle slave interrupts.
Note
This function does not need to be called unless you are reimplementing the nonblocking API’s interrupt handler routines to add special functionality.
- Parameters:
base – The I3C peripheral base address.
i3cHandle – Pointer to the I3C slave DMA driver handle.
-
typedef struct _i3c_slave_edma_handle i3c_slave_edma_handle_t#
-
typedef struct _i3c_slave_edma_transfer i3c_slave_edma_transfer_t#
I3C slave transfer structure.
-
typedef void (*i3c_slave_edma_callback_t)(I3C_Type *base, i3c_slave_edma_transfer_t *transfer, void *userData)#
Slave event callback function pointer type.
This callback is used only for the slave DMA transfer API.
- Param base:
Base address for the I3C instance on which the event occurred.
- Param handle:
Pointer to slave DMA transfer handle.
- Param transfer:
Pointer to transfer descriptor containing values passed to and/or from the callback.
- Param userData:
Arbitrary pointer-sized value passed from the application.
-
struct _i3c_slave_edma_transfer#
- #include <fsl_i3c_edma.h>
I3C slave transfer structure.
Public Members
-
uint32_t event#
Reason the callback is being invoked.
-
uint8_t *txData#
Transfer buffer
-
size_t txDataSize#
Transfer size
-
uint8_t *rxData#
Transfer buffer
-
size_t rxDataSize#
Transfer size
-
status_t completionStatus#
Success or error code describing how the transfer completed. Only applies for kI3C_SlaveCompletionEvent.
-
uint32_t event#
-
struct _i3c_slave_edma_handle#
- #include <fsl_i3c_edma.h>
I3C slave edma handle structure.
Note
The contents of this structure are private and subject to change.
Public Members
-
I3C_Type *base#
I3C base pointer.
-
i3c_slave_edma_transfer_t transfer#
I3C slave transfer copy.
-
bool isBusy#
Whether transfer is busy.
-
bool wasTransmit#
Whether the last transfer was a transmit.
-
bool isDdrMode#
Whether this is HDR-DDR transfer.
-
uint32_t eventMask#
Mask of enabled events.
-
i3c_slave_edma_callback_t callback#
Callback function called at transfer event.
-
edma_handle_t *rxDmaHandle#
Handle for receive DMA channel.
-
edma_handle_t *txDmaHandle#
Handle for transmit DMA channel.
-
void *userData#
Callback parameter passed to callback.
-
I3C_Type *base#
INPUTMUX Connections#
-
enum _inputmux_index_t#
Values:
-
enumerator kINPUTMUX_AUDIO_xbar_out0_ref#
For AUDIO SS Selection for frequency measurement reference clock.
-
enumerator kINPUTMUX_AUDIO_audio_clk_ref#
-
enumerator kINPUTMUX_AUDIO_dmic0_appclk_ref#
-
enumerator kINPUTMUX_AUDIO_sai0_mclk0_ref#
-
enumerator kINPUTMUX_AUDIO_sai0_mclk1_ref#
-
enumerator kINPUTMUX_AUDIO_sai1_mclk0_ref#
-
enumerator kINPUTMUX_AUDIO_sai1_mclk1_ref#
-
enumerator kINPUTMUX_AUDIO_sai2_mclk0_ref#
-
enumerator kINPUTMUX_AUDIO_sai2_mclk1_ref#
-
enumerator kINPUTMUX_AUDIO_spdif_txclk_ref#
-
enumerator kINPUTMUX_AUDIO_spdif_cdrclk_ref#
-
enumerator kINPUTMUX_AUDIO_asrc_clk_ref#
Selection for frequency measurement target clock.
-
enumerator kINPUTMUX_AUDIO_xbar_out0_tar#
-
enumerator kINPUTMUX_AUDIO_audio_clk_tar#
-
enumerator kINPUTMUX_AUDIO_dmic0_appclk_tar#
-
enumerator kINPUTMUX_AUDIO_sai0_mclk0_tar#
-
enumerator kINPUTMUX_AUDIO_sai0_mclk1_tar#
-
enumerator kINPUTMUX_AUDIO_sai1_mclk0_tar#
-
enumerator kINPUTMUX_AUDIO_sai1_mclk1_tar#
-
enumerator kINPUTMUX_AUDIO_sai2_mclk0_tar#
-
enumerator kINPUTMUX_AUDIO_sai2_mclk1_tar#
-
enumerator kINPUTMUX_AUDIO_spdif_txclk_tar#
-
enumerator kINPUTMUX_AUDIO_spdif_cdrclk_tar#
-
enumerator kINPUTMUX_AUDIO_asrc_clk_tar#
For CMPT SS Selection for frequency measurement reference clock.
-
enumerator kINPUTMUX_CMPT_hsp_ss_xbar0_out217_ref#
-
enumerator kINPUTMUX_CMPT_pm_104mix_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_CMPT_pm_104mix_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_CMPT_pm_104mix_5m3c2m_lvt_sbs_ref#
-
enumerator kINPUTMUX_CMPT_pm_104mix_5m3c2m_slvt_sbs_ref#
-
enumerator kINPUTMUX_CMPT_pm_104pmro1_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_CMPT_pm_104pmro1_5m3c2m_lvt_sbs_ref#
-
enumerator kINPUTMUX_CMPT_pm_104pmro1_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_CMPT_pm_104pmro1_5m3c2m_slvt_sbs_ref#
-
enumerator kINPUTMUX_CMPT_pm_104htol1_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_CMPT_pm_104htol1_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_CMPT_cmpt_clk_ref#
-
enumerator kINPUTMUX_CMPT_cpu_clk_ref#
-
enumerator kINPUTMUX_CMPT_npu_clk_ref#
-
enumerator kINPUTMUX_CMPT_systick_clk0_ref#
-
enumerator kINPUTMUX_CMPT_systick_clk1_ref#
Selection for frequency measurement target clock.
-
enumerator kINPUTMUX_CMPT_hsp_ss_xbar0_out217_tar#
-
enumerator kINPUTMUX_CMPT_pm_104mix_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_CMPT_pm_104mix_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_CMPT_pm_104mix_5m3c2m_lvt_sbs_tar#
-
enumerator kINPUTMUX_CMPT_pm_104mix_5m3c2m_slvt_sbs_tar#
-
enumerator kINPUTMUX_CMPT_pm_104pmro1_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_CMPT_pm_104pmro1_5m3c2m_lvt_sbs_tar#
-
enumerator kINPUTMUX_CMPT_pm_104pmro1_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_CMPT_pm_104pmro1_5m3c2m_slvt_sbs_tar#
-
enumerator kINPUTMUX_CMPT_pm_104htol1_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_CMPT_pm_104htol1_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_CMPT_cmpt_clk_tar#
-
enumerator kINPUTMUX_CMPT_cpu_clk_tar#
-
enumerator kINPUTMUX_CMPT_npu_clk_tar#
-
enumerator kINPUTMUX_CMPT_systick_clk0_tar#
-
enumerator kINPUTMUX_CMPT_systick_clk1_tar#
For COMM SS Selection for frequency measurement reference clock.
-
enumerator kINPUTMUX_COMM_hsp_ss_xbar0_out199_ref#
-
enumerator kINPUTMUX_COMM_gf22_pm_104mix_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_COMM_gf22_pm_104mix_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_COMM_gf22_pm_104pmro1_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_COMM_gf22_pm_104pmro1_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_COMM_usbphy0_tsto_pll_out_div_ref#
-
enumerator kINPUTMUX_COMM_usbphy0_utmi_clk_ref#
-
enumerator kINPUTMUX_COMM_usbphy0_utmi_linestate_ref#
-
enumerator kINPUTMUX_COMM_comm_clk_ref#
-
enumerator kINPUTMUX_COMM_comm_ulp32k_ref#
-
enumerator kINPUTMUX_COMM_usdhc0_fclk_ref#
-
enumerator kINPUTMUX_COMM_usdhc1_fclk_ref#
-
enumerator kINPUTMUX_COMM_xspir_rootclk_ref#
-
enumerator kINPUTMUX_COMM_usb0_phyclk_ref#
-
enumerator kINPUTMUX_COMM_usb0_fro48m_ref#
-
enumerator kINPUTMUX_COMM_usb1_fclk_ref#
-
enumerator kINPUTMUX_COMM_usb0_wakeclk_ref#
-
enumerator kINPUTMUX_COMM_eth0_trxclk_ref#
-
enumerator kINPUTMUX_COMM_eth0_timerclk_ref#
-
enumerator kINPUTMUX_COMM_eth1_trxclk_ref#
-
enumerator kINPUTMUX_COMM_eth1_trxclk_divided_ref#
-
enumerator kINPUTMUX_COMM_eth1_timerclk_ref#
-
enumerator kINPUTMUX_COMM_eth_refclk_ref#
-
enumerator kINPUTMUX_COMM_xeno0_liwclk_ref#
-
enumerator kINPUTMUX_COMM_xeno1_liwclk_ref#
-
enumerator kINPUTMUX_COMM_dll_refclk_ref#
Selection for frequency measurement target clock.
-
enumerator kINPUTMUX_COMM_hsp_ss_xbar0_out199_tar#
-
enumerator kINPUTMUX_COMM_gf22_pm_104mix_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_COMM_gf22_pm_104mix_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_COMM_gf22_pm_104pmro1_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_COMM_gf22_pm_104pmro1_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_COMM_usbphy0_tsto_pll_out_div_tar#
-
enumerator kINPUTMUX_COMM_usbphy0_utmi_clk_tar#
-
enumerator kINPUTMUX_COMM_usbphy0_utmi_linestate_tar#
-
enumerator kINPUTMUX_COMM_comm_clk_tar#
-
enumerator kINPUTMUX_COMM_comm_ulp32k_tar#
-
enumerator kINPUTMUX_COMM_usdhc0_fclk_tar#
-
enumerator kINPUTMUX_COMM_usdhc1_fclk_tar#
-
enumerator kINPUTMUX_COMM_xspir_rootclk_tar#
-
enumerator kINPUTMUX_COMM_usb0_phyclk_tar#
-
enumerator kINPUTMUX_COMM_usb0_fro48m_tar#
-
enumerator kINPUTMUX_COMM_usb1_fclk_tar#
-
enumerator kINPUTMUX_COMM_usb0_wakeclk_tar#
-
enumerator kINPUTMUX_COMM_eth0_trxclk_tar#
-
enumerator kINPUTMUX_COMM_eth0_timerclk_tar#
-
enumerator kINPUTMUX_COMM_eth1_trxclk_tar#
-
enumerator kINPUTMUX_COMM_eth1_trxclk_divided_tar#
-
enumerator kINPUTMUX_COMM_eth1_timerclk_tar#
-
enumerator kINPUTMUX_COMM_eth_tarclk_tar#
-
enumerator kINPUTMUX_COMM_xeno0_liwclk_tar#
-
enumerator kINPUTMUX_COMM_xeno1_liwclk_tar#
-
enumerator kINPUTMUX_COMM_dll_tarclk_tar#
For MAIN SS Selection for frequency measurement reference clock.
-
enumerator kINPUTMUX_MAIN_hsp_ss_xbar0_out8_ref#
-
enumerator kINPUTMUX_MAIN_pm_104mix_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_MAIN_pm_104mix_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_MAIN_pm_104mix_5m3c2m_hvt_ref#
-
enumerator kINPUTMUX_MAIN_pm_104mix_5m3c2m_rvt_ref#
-
enumerator kINPUTMUX_MAIN_pm_104pmro1_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_MAIN_pm_104pmro1_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_MAIN_main_clk_ref#
-
enumerator kINPUTMUX_MAIN_main_clk_divided_ref#
-
enumerator kINPUTMUX_MAIN_xspi0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_xspi0_fclk_divided_ref#
-
enumerator kINPUTMUX_MAIN_xspi1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_xspi1_fclk_divided_ref#
-
enumerator kINPUTMUX_MAIN_i3c0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpi2c0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpi2c1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpspi0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpspi1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpspi2_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpspi3_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpspi4_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpuart0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpuart1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpuart2_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpuart3_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpuart4_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpuart5_fclk_ref#
-
enumerator kINPUTMUX_MAIN_flexcan0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_flexcan1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_flexcan2_fclk_ref#
-
enumerator kINPUTMUX_MAIN_flexcan_gfclk_ref#
-
enumerator kINPUTMUX_MAIN_qtpm0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpit0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_lpit1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_adc0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_adc1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_sinc0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_sinc1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_flexio0_fclk_ref#
-
enumerator kINPUTMUX_MAIN_flexio1_fclk_ref#
-
enumerator kINPUTMUX_MAIN_flexio2_fclk_ref#
-
enumerator kINPUTMUX_MAIN_tpiu_clk_ref#
-
enumerator kINPUTMUX_MAIN_cssi_refclk_ref#
-
enumerator kINPUTMUX_MAIN_otp_clk_ref#
-
enumerator kINPUTMUX_MAIN_clkout_ref#
-
enumerator kINPUTMUX_MAIN_main_fro192m_ref#
-
enumerator kINPUTMUX_MAIN_main_ulp32k_ref#
Selection for frequency measurement target clock.
-
enumerator kINPUTMUX_MAIN_hsp_ss_xbar0_out8_tar#
-
enumerator kINPUTMUX_MAIN_pm_104mix_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_MAIN_pm_104mix_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_MAIN_pm_104mix_5m3c2m_hvt_tar#
-
enumerator kINPUTMUX_MAIN_pm_104mix_5m3c2m_rvt_tar#
-
enumerator kINPUTMUX_MAIN_pm_104pmro1_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_MAIN_pm_104pmro1_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_MAIN_main_clk_tar#
-
enumerator kINPUTMUX_MAIN_main_clk_divided_tar#
-
enumerator kINPUTMUX_MAIN_xspi0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_xspi0_fclk_divided_tar#
-
enumerator kINPUTMUX_MAIN_xspi1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_xspi1_fclk_divided_tar#
-
enumerator kINPUTMUX_MAIN_i3c0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpi2c0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpi2c1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpspi0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpspi1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpspi2_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpspi3_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpspi4_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpuart0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpuart1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpuart2_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpuart3_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpuart4_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpuart5_fclk_tar#
-
enumerator kINPUTMUX_MAIN_flexcan0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_flexcan1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_flexcan2_fclk_tar#
-
enumerator kINPUTMUX_MAIN_flexcan_gfclk_tar#
-
enumerator kINPUTMUX_MAIN_qtpm0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpit0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_lpit1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_adc0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_adc1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_sinc0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_sinc1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_flexio0_fclk_tar#
-
enumerator kINPUTMUX_MAIN_flexio1_fclk_tar#
-
enumerator kINPUTMUX_MAIN_flexio2_fclk_tar#
-
enumerator kINPUTMUX_MAIN_tpiu_clk_tar#
-
enumerator kINPUTMUX_MAIN_cssi_refclk_tar#
-
enumerator kINPUTMUX_MAIN_otp_clk_tar#
-
enumerator kINPUTMUX_MAIN_clkout_tar#
-
enumerator kINPUTMUX_MAIN_main_fro192m_tar#
-
enumerator kINPUTMUX_MAIN_main_ulp32k_tar#
For MEDIA SS Selection for frequency measurement reference clock.
-
enumerator kINPUTMUX_MEDIA_hsp_ss_xbar0_out218_ref#
-
enumerator kINPUTMUX_MEDIA_gf22_pm_104mix_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_MEDIA_gf22_pm_104mix_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_MEDIA_gf22_pm_104pmro1_5m3c2m_lvt_ref#
-
enumerator kINPUTMUX_MEDIA_gf22_pm_104pmro1_5m3c2m_slvt_ref#
-
enumerator kINPUTMUX_MEDIA_media_clk_ref#
-
enumerator kINPUTMUX_MEDIA_mediapll_rootclk_ref#
-
enumerator kINPUTMUX_MEDIA_mipicsi_escclk_ref#
-
enumerator kINPUTMUX_MEDIA_mipicsi_clk_ref#
-
enumerator kINPUTMUX_MEDIA_mipidsi_escclk_ref#
-
enumerator kINPUTMUX_MEDIA_mipidsi_escclk_divided_ref#
-
enumerator kINPUTMUX_MEDIA_mipidsi_refclk_ref#
-
enumerator kINPUTMUX_MEDIA_mipidsi_clk_ref#
-
enumerator kINPUTMUX_MEDIA_reformat_fclk_ref#
-
enumerator kINPUTMUX_MEDIA_dcpixel_fclk_ref#
-
enumerator kINPUTMUX_MEDIA_csi_mclkout_ref#
Selection for frequency measurement target clock.
-
enumerator kINPUTMUX_MEDIA_hsp_ss_xbar0_out218_tar#
-
enumerator kINPUTMUX_MEDIA_gf22_pm_104mix_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_MEDIA_gf22_pm_104mix_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_MEDIA_gf22_pm_104pmro1_5m3c2m_lvt_tar#
-
enumerator kINPUTMUX_MEDIA_gf22_pm_104pmro1_5m3c2m_slvt_tar#
-
enumerator kINPUTMUX_MEDIA_media_clk_tar#
-
enumerator kINPUTMUX_MEDIA_mediapll_rootclk_tar#
-
enumerator kINPUTMUX_MEDIA_mipicsi_escclk_tar#
-
enumerator kINPUTMUX_MEDIA_mipicsi_clk_tar#
-
enumerator kINPUTMUX_MEDIA_mipidsi_escclk_tar#
-
enumerator kINPUTMUX_MEDIA_mipidsi_escclk_divided_tar#
-
enumerator kINPUTMUX_MEDIA_mipidsi_tarclk_tar#
-
enumerator kINPUTMUX_MEDIA_mipidsi_clk_tar#
-
enumerator kINPUTMUX_MEDIA_tarormat_fclk_tar#
-
enumerator kINPUTMUX_MEDIA_dcpixel_fclk_tar#
-
enumerator kINPUTMUX_MEDIA_csi_mclkout_tar#
For SYSCON SS Selection for frequency measurement reference clock.
-
enumerator kINPUTMUX_SYSCON_hsp_ss_xbar0_out9_ref#
-
enumerator kINPUTMUX_SYSCON_sxosc_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_base_clk_ref#
-
enumerator kINPUTMUX_SYSCON_low_clk_ref#
-
enumerator kINPUTMUX_SYSCON_mainpll_divx_ref#
-
enumerator kINPUTMUX_SYSCON_syspll_divx_ref#
-
enumerator kINPUTMUX_SYSCON_pll_pfdx_ref#
-
enumerator kINPUTMUX_SYSCON_media_pfdx_ref#
-
enumerator kINPUTMUX_SYSCON_mainpfdx_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_commpfdx_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_maindivx_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_saimclk_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_saimclk0_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_saimclk1_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_saimclk2_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_lp12m_core_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_lp1m_core_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_ulp32k_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_fro192m_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_fro96m_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_fro48m_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_fro24m_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_sysplldiv4_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_sysplldiv5_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_sysplldivx_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_mainplldivx_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_mainplldiv8_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_mainplldiv10_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_mainplldiv20_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_audiopll_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_videopll_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_cpu_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_cpu_rootclk_divided_ref#
-
enumerator kINPUTMUX_SYSCON_npu_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_mediabus_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_audiobus_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_commbus_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_wakebus_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_syscon_pdmain_clk_ref#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk0_ref#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk1_ref#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk2_ref#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk3_ref#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk4_ref#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk5_ref#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk6_ref#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk7_ref#
-
enumerator kINPUTMUX_SYSCON_audio_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_video_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_usb1_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_eth_rootclk_ref#
-
enumerator kINPUTMUX_SYSCON_test_rootclk_ref#
Selection for frequency measurement target clock.
-
enumerator kINPUTMUX_SYSCON_hsp_ss_xbar0_out9_tar#
-
enumerator kINPUTMUX_SYSCON_sxosc_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_base_clk_tar#
-
enumerator kINPUTMUX_SYSCON_low_clk_tar#
-
enumerator kINPUTMUX_SYSCON_mainpll_divx_tar#
-
enumerator kINPUTMUX_SYSCON_syspll_divx_tar#
-
enumerator kINPUTMUX_SYSCON_pll_pfdx_tar#
-
enumerator kINPUTMUX_SYSCON_media_pfdx_tar#
-
enumerator kINPUTMUX_SYSCON_mainpfdx_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_commpfdx_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_maindivx_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_saimclk_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_saimclk0_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_saimclk1_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_saimclk2_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_lp12m_core_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_lp1m_core_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_ulp32k_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_fro192m_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_fro96m_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_fro48m_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_fro24m_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_sysplldiv4_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_sysplldiv5_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_sysplldivx_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_mainplldivx_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_mainplldiv8_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_mainplldiv10_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_mainplldiv20_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_audiopll_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_videopll_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_cpu_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_cpu_rootclk_divided_tar#
-
enumerator kINPUTMUX_SYSCON_npu_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_mediabus_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_audiobus_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_commbus_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_wakebus_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_syscon_pdmain_clk_tar#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk0_tar#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk1_tar#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk2_tar#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk3_tar#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk4_tar#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk5_tar#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk6_tar#
-
enumerator kINPUTMUX_SYSCON_peri_rootclk7_tar#
-
enumerator kINPUTMUX_SYSCON_audio_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_video_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_usb1_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_eth_rootclk_tar#
-
enumerator kINPUTMUX_SYSCON_test_rootclk_tar#
For WAKE SS Selection for frequency measurement reference clock.
-
enumerator kINPUTMUX_WAKE_wake_ss_xbar_out8_ref#
-
enumerator kINPUTMUX_WAKE_buck_vddcore_testbus_0_ref#
-
enumerator kINPUTMUX_WAKE_buck_vddcore_testbus_1_ref#
-
enumerator kINPUTMUX_WAKE_clk_lposc_1m_vdd0v8_ref#
-
enumerator kINPUTMUX_WAKE_clk_lposc_2m_vdd0v8_ref#
-
enumerator kINPUTMUX_WAKE_clk_ckfro12m_wake_ref#
-
enumerator kINPUTMUX_WAKE_pmu_lfro32k_clk_vddcoreaon_ref#
-
enumerator kINPUTMUX_WAKE_pmu_clk_xosc_32k_vddcoreaon_ref#
-
enumerator kINPUTMUX_WAKE_pmu_bb_tst_dig_out_ref#
-
enumerator kINPUTMUX_WAKE_wake_clk_ref#
-
enumerator kINPUTMUX_WAKE_wake_sxosc_ref#
-
enumerator kINPUTMUX_WAKE_wake_lp1m_ref#
-
enumerator kINPUTMUX_WAKE_wake_lp12m_ref#
-
enumerator kINPUTMUX_WAKE_wake_ulp32k_ref#
-
enumerator kINPUTMUX_WAKE_wake_lpclk_ref#
-
enumerator kINPUTMUX_WAKE_i3c0_fclk_ref#
-
enumerator kINPUTMUX_WAKE_lpi2c0_fclk_ref#
-
enumerator kINPUTMUX_WAKE_lpi2c1_fclk_ref#
-
enumerator kINPUTMUX_WAKE_lpspi0_fclk_ref#
-
enumerator kINPUTMUX_WAKE_lpuart0_fclk_ref#
-
enumerator kINPUTMUX_WAKE_lpuart1_fclk_ref#
-
enumerator kINPUTMUX_WAKE_dmic1_appclk_ref#
-
enumerator kINPUTMUX_WAKE_qtpm0_fclk_ref#
-
enumerator kINPUTMUX_WAKE_lptmr0_fclk_ref#
-
enumerator kINPUTMUX_WAKE_lptmr1_fclk_ref#
-
enumerator kINPUTMUX_WAKE_swt0_fclk_ref#
-
enumerator kINPUTMUX_WAKE_swt1_fclk_ref#
-
enumerator kINPUTMUX_WAKE_ewm_fclk_ref#
-
enumerator kINPUTMUX_WAKE_acmp0_fclk_ref#
-
enumerator kINPUTMUX_WAKE_acmp1_fclk_ref#
-
enumerator kINPUTMUX_WAKE_acmp2_fclk_ref#
-
enumerator kINPUTMUX_WAKE_acmp3_fclk_ref#
-
enumerator kINPUTMUX_WAKE_acmp0_rrclk_ref#
-
enumerator kINPUTMUX_WAKE_acmp1_rrclk_ref#
-
enumerator kINPUTMUX_WAKE_acmp2_rrclk_ref#
-
enumerator kINPUTMUX_WAKE_acmp3_rrclk_ref#
Selection for frequency measurement target clock.
-
enumerator kINPUTMUX_WAKE_wake_ss_xbar_out8_tar#
-
enumerator kINPUTMUX_WAKE_buck_vddcore_testbus_0_tar#
-
enumerator kINPUTMUX_WAKE_buck_vddcore_testbus_1_tar#
-
enumerator kINPUTMUX_WAKE_clk_lposc_1m_vdd0v8_tar#
-
enumerator kINPUTMUX_WAKE_clk_lposc_2m_vdd0v8_tar#
-
enumerator kINPUTMUX_WAKE_clk_ckfro12m_wake_tar#
-
enumerator kINPUTMUX_WAKE_pmu_lfro32k_clk_vddcoreaon_tar#
-
enumerator kINPUTMUX_WAKE_pmu_clk_xosc_32k_vddcoreaon_tar#
-
enumerator kINPUTMUX_WAKE_pmu_bb_tst_dig_out_tar#
-
enumerator kINPUTMUX_WAKE_wake_clk_tar#
-
enumerator kINPUTMUX_WAKE_wake_sxosc_tar#
-
enumerator kINPUTMUX_WAKE_wake_lp1m_tar#
-
enumerator kINPUTMUX_WAKE_wake_lp12m_tar#
-
enumerator kINPUTMUX_WAKE_wake_ulp32k_tar#
-
enumerator kINPUTMUX_WAKE_wake_lpclk_tar#
-
enumerator kINPUTMUX_WAKE_i3c0_fclk_tar#
-
enumerator kINPUTMUX_WAKE_lpi2c0_fclk_tar#
-
enumerator kINPUTMUX_WAKE_lpi2c1_fclk_tar#
-
enumerator kINPUTMUX_WAKE_lpspi0_fclk_tar#
-
enumerator kINPUTMUX_WAKE_lpuart0_fclk_tar#
-
enumerator kINPUTMUX_WAKE_lpuart1_fclk_tar#
-
enumerator kINPUTMUX_WAKE_dmic1_appclk_tar#
-
enumerator kINPUTMUX_WAKE_qtpm0_fclk_tar#
-
enumerator kINPUTMUX_WAKE_lptmr0_fclk_tar#
-
enumerator kINPUTMUX_WAKE_lptmr1_fclk_tar#
-
enumerator kINPUTMUX_WAKE_swt0_fclk_tar#
-
enumerator kINPUTMUX_WAKE_swt1_fclk_tar#
-
enumerator kINPUTMUX_WAKE_ewm_fclk_tar#
-
enumerator kINPUTMUX_WAKE_acmp0_fclk_tar#
-
enumerator kINPUTMUX_WAKE_acmp1_fclk_tar#
-
enumerator kINPUTMUX_WAKE_acmp2_fclk_tar#
-
enumerator kINPUTMUX_WAKE_acmp3_fclk_tar#
-
enumerator kINPUTMUX_WAKE_acmp0_rrclk_tar#
-
enumerator kINPUTMUX_WAKE_acmp1_rrclk_tar#
-
enumerator kINPUTMUX_WAKE_acmp2_rrclk_tar#
-
enumerator kINPUTMUX_WAKE_acmp3_rrclk_tar#
-
enumerator kINPUTMUX_AUDIO_xbar_out0_ref#
-
typedef enum _inputmux_index_t inputmux_connection_t#
-
FREQMEAS_REF_REG#
Periphinmux IDs.
-
FREQMEAS_TAR_REG#
-
PMUX_SHIFT#
-
FSL_INPUTMUX_DRIVER_VERSION#
Group interrupt driver version for SDK.
-
void INPUTMUX_Init(void *base)#
Initialize INPUTMUX peripheral.
This function enables the INPUTMUX clock.
- Parameters:
base – Base address of the INPUTMUX peripheral.
-
void INPUTMUX_AttachSignal(void *base, uint16_t index, inputmux_connection_t connection)#
Attaches a signal.
This function writes a source signal selection into an INPUTMUX multiplexer register. The target register address is computed as:
target address = base + pmux_id + index * 4
Each inputmux_connection_t enum value encodes two fields via
PMUX_SHIFT(20):31 20 19 0 +------------+------------------------+ | pmux_id | output_id | +------------+------------------------+ | | group base signal value addr offset to write
When N consecutive registers all accept the same set of source signals (same
pmux_id), only one set of enum values is defined for the whole group;index(0 ~ N-1) selects which register to write, avoiding duplicate enum entries.Example: SCT0 has 8 input mux registers sharing
SCT0_INMUX0= 0x000 as the group base:To connect CMP0 output to SCT0 input 5:base | +--[+0x000] SCT0_INMUX0 <-- index=0 +--[+0x004] SCT0_INMUX1 <-- index=1 +--[+0x008] SCT0_INMUX2 <-- index=2 : ... +--[+0x014] SCT0_INMUX5 <-- index=5 (write target for the call below) : ... +--[+0x01C] SCT0_INMUX7 <-- index=7
INPUTMUX_AttachSignal(INPUTMUX, 5, kINPUTMUX_Cmp0OutToSct0); // write address = base + 0x000 + 5*4 = base + 0x014 (SCT0_INMUX5)
For peripherals with only a single register per function (e.g.
FREQMEAS_REF_REG= 0x180,FREQMEAS_TAR_REG= 0x184), each register has its own uniquepmux_idandindexmust be 0. The two registers are distinguished by their differentpmux_idvalues, not byindex:base | +--[+0x180] FREQMEAS_REF_REG (pmux_id=0x180, index=0) +--[+0x184] FREQMEAS_TAR_REG (pmux_id=0x184, index=0)
- Parameters:
base – Base address of the INPUTMUX peripheral.
index – Zero-based index of the destination register within its group. Each increment advances the address by 4 bytes. Use 0 for single-register groups.
connection – Encodes the group base offset (bits [31:PMUX_SHIFT]) and the source signal value (bits [PMUX_SHIFT-1:0]).
-
void INPUTMUX_Deinit(void *base)#
Deinitialize INPUTMUX peripheral.
This function disables the INPUTMUX clock.
- Parameters:
base – Base address of the INPUTMUX peripheral.
IOMUXC: IOMUX Controller#
-
enum _iomuxc_mqs_pwm_oversample_rate#
Values:
-
enumerator kIOMUXC_MqsPwmOverSampleRate32#
-
enumerator kIOMUXC_MqsPwmOverSampleRate64#
-
enumerator kIOMUXC_MqsPwmOverSampleRate32#
-
typedef enum _iomuxc_mqs_pwm_oversample_rate iomuxc_mqs_pwm_oversample_rate_t#
-
IOMUXC_PIO2_0_HSP_GPIO0_GPIO0#
-
IOMUXC_PIO2_0_HSP_LPUART0_CTS_B#
-
IOMUXC_PIO2_0_HSP_FLEXIO0_FXIO_D00#
-
IOMUXC_PIO2_0_AUDIO_SAI0_TX_DATA0#
-
IOMUXC_PIO2_0_HSP_eFlexPWM0_PWM_A0#
-
IOMUXC_PIO2_0_MAIN_AHB_SRAMC_SRAMC_DA00#
-
IOMUXC_PIO2_0_HSP_QTPM0_CH0#
-
IOMUXC_PIO2_0_MEDIA_DCIF_DATA00#
-
IOMUXC_PIO2_0_HSP_LPI2C0_SDA#
-
IOMUXC_PIO2_0_HSP_XBAR0_INOUT00#
-
IOMUXC_PIO2_0_HSP_XBAR1_INOUT00#
-
IOMUXC_PIO2_1_HSP_GPIO0_GPIO1#
-
IOMUXC_PIO2_1_HSP_LPUART0_RTS_B#
-
IOMUXC_PIO2_1_HSP_FLEXIO0_FXIO_D01#
-
IOMUXC_PIO2_1_AUDIO_SAI0_RX_DATA0#
-
IOMUXC_PIO2_1_HSP_eFlexPWM0_PWM_B0#
-
IOMUXC_PIO2_1_MAIN_AHB_SRAMC_SRAMC_DA01#
-
IOMUXC_PIO2_1_HSP_QTPM0_CH1#
-
IOMUXC_PIO2_1_MEDIA_DCIF_DATA01#
-
IOMUXC_PIO2_1_HSP_LPI2C0_SCL#
-
IOMUXC_PIO2_1_HSP_XBAR0_INOUT01#
-
IOMUXC_PIO2_1_HSP_XBAR1_INOUT01#
-
IOMUXC_PIO2_2_HSP_GPIO0_GPIO2#
-
IOMUXC_PIO2_2_HSP_LPUART0_TXD#
-
IOMUXC_PIO2_2_HSP_FLEXIO0_FXIO_D02#
-
IOMUXC_PIO2_2_AUDIO_SAI0_TX_BCLK#
-
IOMUXC_PIO2_2_HSP_eFlexPWM0_PWM_A1#
-
IOMUXC_PIO2_2_MAIN_AHB_SRAMC_SRAMC_DA02#
-
IOMUXC_PIO2_2_HSP_QTPM0_CH2#
-
IOMUXC_PIO2_2_MEDIA_DCIF_DATA02#
-
IOMUXC_PIO2_2_HSP_LPI2C1_SDA#
-
IOMUXC_PIO2_2_HSP_XBAR0_INOUT02#
-
IOMUXC_PIO2_2_HSP_XBAR1_INOUT02#
-
IOMUXC_PIO2_2_COMM_uSDHC0_TST_TRG#
-
IOMUXC_PIO2_3_HSP_GPIO0_GPIO3#
-
IOMUXC_PIO2_3_HSP_LPUART0_RXD#
-
IOMUXC_PIO2_3_HSP_FLEXIO0_FXIO_D03#
-
IOMUXC_PIO2_3_AUDIO_SAI0_TX_SYNC#
-
IOMUXC_PIO2_3_HSP_eFlexPWM0_PWM_B1#
-
IOMUXC_PIO2_3_MAIN_AHB_SRAMC_SRAMC_DA03#
-
IOMUXC_PIO2_3_HSP_QTPM0_CH3#
-
IOMUXC_PIO2_3_MEDIA_DCIF_DATA03#
-
IOMUXC_PIO2_3_HSP_LPI2C1_SCL#
-
IOMUXC_PIO2_3_HSP_XBAR0_INOUT03#
-
IOMUXC_PIO2_3_HSP_XBAR1_INOUT03#
-
IOMUXC_PIO2_3_COMM_uSDHC1_TST_TRG#
-
IOMUXC_PIO2_4_HSP_GPIO0_GPIO4#
-
IOMUXC_PIO2_4_HSP_LPUART1_CTS_B#
-
IOMUXC_PIO2_4_HSP_FLEXIO0_FXIO_D04#
-
IOMUXC_PIO2_4_AUDIO_SAI0_MCLK#
-
IOMUXC_PIO2_4_HSP_eFlexPWM0_PWM_A2#
-
IOMUXC_PIO2_4_MAIN_AHB_SRAMC_SRAMC_DA04#
-
IOMUXC_PIO2_4_HSP_QTPM0_CH4#
-
IOMUXC_PIO2_4_MEDIA_DCIF_DATA04#
-
IOMUXC_PIO2_4_HSP_LPSPI0_PCS0#
-
IOMUXC_PIO2_4_MAIN_TRACE3#
-
IOMUXC_PIO2_4_HSP_XBAR0_INOUT04#
-
IOMUXC_PIO2_4_HSP_XBAR1_INOUT04#
-
IOMUXC_PIO2_5_HSP_GPIO0_GPIO5#
-
IOMUXC_PIO2_5_HSP_LPUART1_RTS_B#
-
IOMUXC_PIO2_5_HSP_FLEXIO0_FXIO_D05#
-
IOMUXC_PIO2_5_AUDIO_SAI0_RX_BCLK#
-
IOMUXC_PIO2_5_HSP_eFlexPWM0_PWM_B2#
-
IOMUXC_PIO2_5_MAIN_AHB_SRAMC_SRAMC_DA05#
-
IOMUXC_PIO2_5_HSP_QTPM0_CH5#
-
IOMUXC_PIO2_5_MEDIA_DCIF_DATA05#
-
IOMUXC_PIO2_5_HSP_LPSPI0_SOUT#
-
IOMUXC_PIO2_5_MAIN_TRACE2#
-
IOMUXC_PIO2_5_HSP_XBAR0_INOUT05#
-
IOMUXC_PIO2_5_HSP_XBAR1_INOUT05#
-
IOMUXC_PIO2_6_HSP_GPIO0_GPIO6#
-
IOMUXC_PIO2_6_HSP_LPUART1_TXD#
-
IOMUXC_PIO2_6_HSP_FLEXIO0_FXIO_D06#
-
IOMUXC_PIO2_6_AUDIO_SAI0_RX_SYNC#
-
IOMUXC_PIO2_6_HSP_eFlexPWM0_PWM_A3#
-
IOMUXC_PIO2_6_MAIN_AHB_SRAMC_SRAMC_DA06#
-
IOMUXC_PIO2_6_HSP_QTPM0_CH6#
-
IOMUXC_PIO2_6_MEDIA_DCIF_DATA06#
-
IOMUXC_PIO2_6_HSP_LPSPI0_SIN#
-
IOMUXC_PIO2_6_MAIN_TRACE1#
-
IOMUXC_PIO2_6_HSP_XBAR0_INOUT06#
-
IOMUXC_PIO2_6_HSP_XBAR1_INOUT06#
-
IOMUXC_PIO2_7_HSP_GPIO0_GPIO7#
-
IOMUXC_PIO2_7_HSP_LPUART1_RXD#
-
IOMUXC_PIO2_7_HSP_FLEXIO0_FXIO_D07#
-
IOMUXC_PIO2_7_AUDIO_SAI0_TX_DATA1#
-
IOMUXC_PIO2_7_HSP_eFlexPWM0_PWM_B3#
-
IOMUXC_PIO2_7_MAIN_AHB_SRAMC_SRAMC_DA07#
-
IOMUXC_PIO2_7_HSP_QTPM0_CH7#
-
IOMUXC_PIO2_7_MEDIA_DCIF_DATA07#
-
IOMUXC_PIO2_7_HSP_LPSPI0_SCK#
-
IOMUXC_PIO2_7_MAIN_TRACE0#
-
IOMUXC_PIO2_7_HSP_XBAR0_INOUT07#
-
IOMUXC_PIO2_7_HSP_XBAR1_INOUT07#
-
IOMUXC_PIO2_8_HSP_GPIO0_GPIO8#
-
IOMUXC_PIO2_8_HSP_LPUART2_TXD#
-
IOMUXC_PIO2_8_HSP_FLEXIO0_FXIO_D08#
-
IOMUXC_PIO2_8_AUDIO_SAI0_RX_DATA1#
-
IOMUXC_PIO2_8_HSP_SINC0_MCLK0#
-
IOMUXC_PIO2_8_MAIN_AHB_SRAMC_SRAMC_LBB#
-
IOMUXC_PIO2_8_HSP_SINC0_MCLK_OUT0#
-
IOMUXC_PIO2_8_MEDIA_DCIF_DATA08#
-
IOMUXC_PIO2_8_HSP_LPSPI0_PCS1#
-
IOMUXC_PIO2_8_MAIN_TRACE_CLK#
-
IOMUXC_PIO2_8_HSP_XBAR0_INOUT08#
-
IOMUXC_PIO2_8_HSP_XBAR1_INOUT08#
-
IOMUXC_PIO2_9_HSP_GPIO0_GPIO9#
-
IOMUXC_PIO2_9_HSP_LPUART2_RXD#
-
IOMUXC_PIO2_9_HSP_FLEXIO0_FXIO_D09#
-
IOMUXC_PIO2_9_AUDIO_SAI0_TX_DATA2#
-
IOMUXC_PIO2_9_HSP_SINC0_MCLK1#
-
IOMUXC_PIO2_9_MAIN_AHB_SRAMC_SRAMC_DA08#
-
IOMUXC_PIO2_9_HSP_SINC0_MCLK_OUT1#
-
IOMUXC_PIO2_9_MEDIA_DCIF_DATA09#
-
IOMUXC_PIO2_9_HSP_LPSPI0_PCS2#
-
IOMUXC_PIO2_9_HSP_XBAR0_INOUT09#
-
IOMUXC_PIO2_9_HSP_XBAR1_INOUT09#
-
IOMUXC_PIO2_10_HSP_GPIO0_GPIO10#
-
IOMUXC_PIO2_10_HSP_LPUART2_CTS_B#
-
IOMUXC_PIO2_10_HSP_FLEXIO0_FXIO_D10#
-
IOMUXC_PIO2_10_AUDIO_SAI0_RX_DATA2#
-
IOMUXC_PIO2_10_HSP_SINC0_MCLK2#
-
IOMUXC_PIO2_10_MAIN_AHB_SRAMC_SRAMC_DA09#
-
IOMUXC_PIO2_10_HSP_SINC0_MCLK_OUT2#
-
IOMUXC_PIO2_10_MEDIA_DCIF_DATA10#
-
IOMUXC_PIO2_10_HSP_LPSPI0_PCS3#
-
IOMUXC_PIO2_10_HSP_XBAR0_INOUT10#
-
IOMUXC_PIO2_10_HSP_XBAR1_INOUT10#
-
IOMUXC_PIO2_11_HSP_GPIO0_GPIO11#
-
IOMUXC_PIO2_11_HSP_LPUART2_RTS_B#
-
IOMUXC_PIO2_11_HSP_FLEXIO0_FXIO_D11#
-
IOMUXC_PIO2_11_AUDIO_SAI0_TX_DATA3#
-
IOMUXC_PIO2_11_HSP_SINC0_MCLK3#
-
IOMUXC_PIO2_11_MAIN_AHB_SRAMC_SRAMC_DA10#
-
IOMUXC_PIO2_11_MEDIA_DCIF_DATA11#
-
IOMUXC_PIO2_11_HSP_XBAR0_INOUT11#
-
IOMUXC_PIO2_11_HSP_XBAR1_INOUT11#
-
IOMUXC_PIO2_12_HSP_GPIO0_GPIO12#
-
IOMUXC_PIO2_12_HSP_LPUART3_TXD#
-
IOMUXC_PIO2_12_HSP_FLEXIO0_FXIO_D12#
-
IOMUXC_PIO2_12_AUDIO_SAI0_RX_DATA3#
-
IOMUXC_PIO2_12_HSP_SINC0_MBIT0#
-
IOMUXC_PIO2_12_MAIN_AHB_SRAMC_SRAMC_DA11#
-
IOMUXC_PIO2_12_MEDIA_DCIF_DATA12#
-
IOMUXC_PIO2_12_HSP_LPI2C0_SDA#
-
IOMUXC_PIO2_12_HSP_XBAR0_INOUT12#
-
IOMUXC_PIO2_12_HSP_XBAR1_INOUT12#
-
IOMUXC_PIO2_13_HSP_GPIO0_GPIO13#
-
IOMUXC_PIO2_13_HSP_LPUART3_RXD#
-
IOMUXC_PIO2_13_HSP_FLEXIO0_FXIO_D13#
-
IOMUXC_PIO2_13_WAKE_EWM_OUT_B#
-
IOMUXC_PIO2_13_HSP_SINC0_MBIT1#
-
IOMUXC_PIO2_13_MAIN_AHB_SRAMC_SRAMC_DA12#
-
IOMUXC_PIO2_13_HSP_eFlexPWM0_PWM_X0#
-
IOMUXC_PIO2_13_MEDIA_DCIF_DATA13#
-
IOMUXC_PIO2_13_HSP_LPI2C0_SCL#
-
IOMUXC_PIO2_13_HSP_XBAR0_INOUT13#
-
IOMUXC_PIO2_13_HSP_XBAR1_INOUT13#
-
IOMUXC_PIO2_14_HSP_GPIO0_GPIO14#
-
IOMUXC_PIO2_14_HSP_LPUART3_CTS_B#
-
IOMUXC_PIO2_14_HSP_FLEXIO0_FXIO_D14#
-
IOMUXC_PIO2_14_AUDIO_MICFIL_PDM_CLK#
-
IOMUXC_PIO2_14_HSP_SINC0_MBIT2#
-
IOMUXC_PIO2_14_MAIN_AHB_SRAMC_SRAMC_DA13#
-
IOMUXC_PIO2_14_HSP_eFlexPWM0_PWM_X1#
-
IOMUXC_PIO2_14_MEDIA_DCIF_DATA14#
-
IOMUXC_PIO2_14_HSP_FlexCAN0_CAN_TX#
-
IOMUXC_PIO2_14_HSP_XBAR0_INOUT14#
-
IOMUXC_PIO2_14_HSP_XBAR1_INOUT14#
-
IOMUXC_PIO2_15_HSP_GPIO0_GPIO15#
-
IOMUXC_PIO2_15_HSP_LPUART3_RTS_B#
-
IOMUXC_PIO2_15_HSP_FLEXIO0_FXIO_D15#
-
IOMUXC_PIO2_15_AUDIO_MICFIL_PDM_DATA45#
-
IOMUXC_PIO2_15_HSP_SINC0_MBIT3#
-
IOMUXC_PIO2_15_MAIN_AHB_SRAMC_SRAMC_DA14#
-
IOMUXC_PIO2_15_HSP_eFlexPWM0_PWM_X2#
-
IOMUXC_PIO2_15_MEDIA_DCIF_DATA15#
-
IOMUXC_PIO2_15_HSP_FlexCAN0_CAN_RX#
-
IOMUXC_PIO2_15_HSP_XBAR0_INOUT15#
-
IOMUXC_PIO2_15_HSP_XBAR1_INOUT15#
-
IOMUXC_PIO2_16_HSP_GPIO0_GPIO16#
-
IOMUXC_PIO2_16_HSP_LPUART4_TXD#
-
IOMUXC_PIO2_16_HSP_FLEXIO0_FXIO_D16#
-
IOMUXC_PIO2_16_AUDIO_MICFIL_PDM_DATA23#
-
IOMUXC_PIO2_16_HSP_SINC0_BREAK#
-
IOMUXC_PIO2_16_MAIN_AHB_SRAMC_SRAMC_DA15#
-
IOMUXC_PIO2_16_HSP_eFlexPWM0_PWM_X3#
-
IOMUXC_PIO2_16_MEDIA_DCIF_DATA16#
-
IOMUXC_PIO2_16_HSP_FlexCAN1_CAN_TX#
-
IOMUXC_PIO2_16_HSP_XBAR0_INOUT16#
-
IOMUXC_PIO2_16_HSP_XBAR1_INOUT16#
-
IOMUXC_PIO2_17_HSP_GPIO0_GPIO17#
-
IOMUXC_PIO2_17_HSP_LPUART4_RXD#
-
IOMUXC_PIO2_17_HSP_FLEXIO0_FXIO_D17#
-
IOMUXC_PIO2_17_AUDIO_MICFIL_PDM_DATA01#
-
IOMUXC_PIO2_17_AUDIO_MQS_MQS_LEFT#
-
IOMUXC_PIO2_17_MAIN_AHB_SRAMC_SRAMC_UBB#
-
IOMUXC_PIO2_17_AUDIO_SAI1_MCLK#
-
IOMUXC_PIO2_17_MEDIA_DCIF_DATA17#
-
IOMUXC_PIO2_17_HSP_FlexCAN1_CAN_RX#
-
IOMUXC_PIO2_17_HSP_XBAR0_INOUT17#
-
IOMUXC_PIO2_17_HSP_XBAR1_INOUT17#
-
IOMUXC_PIO2_18_HSP_GPIO0_GPIO18#
-
IOMUXC_PIO2_18_HSP_LPUART4_CTS_B#
-
IOMUXC_PIO2_18_HSP_FLEXIO0_FXIO_D18#
-
IOMUXC_PIO2_18_AUDIO_MQS_MQS_RIGHT#
-
IOMUXC_PIO2_18_MAIN_AHB_SRAMC_SRAMC_WEB#
-
IOMUXC_PIO2_18_AUDIO_SAI1_TX_BCLK#
-
IOMUXC_PIO2_18_MEDIA_DCIF_DATA18#
-
IOMUXC_PIO2_18_HSP_XBAR0_INOUT18#
-
IOMUXC_PIO2_18_HSP_XBAR1_INOUT18#
-
IOMUXC_PIO2_19_HSP_GPIO0_GPIO19#
-
IOMUXC_PIO2_19_HSP_LPUART4_RTS_B#
-
IOMUXC_PIO2_19_HSP_FLEXIO0_FXIO_D19#
-
IOMUXC_PIO2_19_HSP_eFlexPWM1_PWM_X0#
-
IOMUXC_PIO2_19_MAIN_AHB_SRAMC_SRAMC_OEB#
-
IOMUXC_PIO2_19_AUDIO_SAI1_TX_SYNC#
-
IOMUXC_PIO2_19_MEDIA_DCIF_DATA19#
-
IOMUXC_PIO2_19_HSP_XBAR0_INOUT19#
-
IOMUXC_PIO2_19_HSP_XBAR1_INOUT19#
-
IOMUXC_PIO2_20_HSP_GPIO0_GPIO20#
-
IOMUXC_PIO2_20_HSP_LPUART5_TXD#
-
IOMUXC_PIO2_20_HSP_FLEXIO0_FXIO_D20#
-
IOMUXC_PIO2_20_COMM_USB0_PWR#
-
IOMUXC_PIO2_20_HSP_eFlexPWM1_PWM_A3#
-
IOMUXC_PIO2_20_MAIN_AHB_SRAMC_SRAMC_WP0#
-
IOMUXC_PIO2_20_AUDIO_SAI1_TX_DATA0#
-
IOMUXC_PIO2_20_MEDIA_DCIF_DATA20#
-
IOMUXC_PIO2_20_HSP_XBAR0_INOUT20#
-
IOMUXC_PIO2_20_HSP_XBAR1_INOUT20#
-
IOMUXC_PIO2_21_HSP_GPIO0_GPIO21#
-
IOMUXC_PIO2_21_HSP_LPUART5_RXD#
-
IOMUXC_PIO2_21_HSP_FLEXIO0_FXIO_D21#
-
IOMUXC_PIO2_21_COMM_USB0_OC#
-
IOMUXC_PIO2_21_HSP_eFlexPWM1_PWM_B3#
-
IOMUXC_PIO2_21_MAIN_AHB_SRAMC_SRAMC_WP1#
-
IOMUXC_PIO2_21_AUDIO_SAI1_RX_DATA0#
-
IOMUXC_PIO2_21_MEDIA_DCIF_DATA21#
-
IOMUXC_PIO2_21_HSP_LPSPI1_PCS3#
-
IOMUXC_PIO2_21_HSP_XBAR0_INOUT21#
-
IOMUXC_PIO2_21_HSP_XBAR1_INOUT21#
-
IOMUXC_PIO2_22_HSP_GPIO0_GPIO22#
-
IOMUXC_PIO2_22_HSP_LPUART5_CTS_B#
-
IOMUXC_PIO2_22_HSP_FLEXIO0_FXIO_D22#
-
IOMUXC_PIO2_22_COMM_USB0_ID#
-
IOMUXC_PIO2_22_HSP_eFlexPWM1_PWM_A2#
-
IOMUXC_PIO2_22_MAIN_XSPI0_ECS#
-
IOMUXC_PIO2_22_AUDIO_SAI1_MCLK#
-
IOMUXC_PIO2_22_MEDIA_DCIF_DATA22#
-
IOMUXC_PIO2_22_HSP_LPSPI1_PCS2#
-
IOMUXC_PIO2_22_HSP_XBAR0_INOUT22#
-
IOMUXC_PIO2_22_HSP_XBAR1_INOUT22#
-
IOMUXC_PIO2_23_HSP_GPIO0_GPIO23#
-
IOMUXC_PIO2_23_HSP_LPUART5_RTS_B#
-
IOMUXC_PIO2_23_HSP_FLEXIO0_FXIO_D23#
-
IOMUXC_PIO2_23_MAIN_TRACE_SWO#
-
IOMUXC_PIO2_23_HSP_eFlexPWM1_PWM_B2#
-
IOMUXC_PIO2_23_HSP_eFlexPWM1_PWM_X0#
-
IOMUXC_PIO2_23_AUDIO_SAI1_RX_BCLK#
-
IOMUXC_PIO2_23_MEDIA_DCIF_DATA23#
-
IOMUXC_PIO2_23_HSP_LPSPI1_PCS1#
-
IOMUXC_PIO2_23_HSP_XBAR0_INOUT23#
-
IOMUXC_PIO2_23_HSP_XBAR1_INOUT23#
-
IOMUXC_PIO2_24_HSP_GPIO0_GPIO24#
-
IOMUXC_PIO2_24_HSP_LPI2C1_SDA#
-
IOMUXC_PIO2_24_HSP_FLEXIO0_FXIO_D24#
-
IOMUXC_PIO2_24_HSP_I3C_SDA#
-
IOMUXC_PIO2_24_HSP_eFlexPWM1_PWM_A1#
-
IOMUXC_PIO2_24_AUDIO_SPDIF_IN#
-
IOMUXC_PIO2_24_AUDIO_SAI1_RX_SYNC#
-
IOMUXC_PIO2_24_MEDIA_DCIF_HSYNC#
-
IOMUXC_PIO2_24_HSP_LPSPI1_PCS0#
-
IOMUXC_PIO2_24_HSP_XBAR0_INOUT24#
-
IOMUXC_PIO2_24_HSP_XBAR1_INOUT24#
-
IOMUXC_PIO2_25_HSP_GPIO0_GPIO25#
-
IOMUXC_PIO2_25_HSP_LPI2C1_SCL#
-
IOMUXC_PIO2_25_HSP_FLEXIO0_FXIO_D25#
-
IOMUXC_PIO2_25_HSP_I3C_SCL#
-
IOMUXC_PIO2_25_HSP_eFlexPWM1_PWM_B1#
-
IOMUXC_PIO2_25_AUDIO_SPDIF_OUT#
-
IOMUXC_PIO2_25_AUDIO_SAI1_TX_DATA1#
-
IOMUXC_PIO2_25_MEDIA_DCIF_VSYNC#
-
IOMUXC_PIO2_25_HSP_FlexCAN1_CAN_TX#
-
IOMUXC_PIO2_25_HSP_LPSPI1_SCK#
-
IOMUXC_PIO2_25_HSP_XBAR0_INOUT25#
-
IOMUXC_PIO2_25_HSP_XBAR1_INOUT25#
-
IOMUXC_PIO2_26_HSP_GPIO0_GPIO26#
-
IOMUXC_PIO2_26_HSP_FLEXIO0_FXIO_D26#
-
IOMUXC_PIO2_26_HSP_I3C_PUR#
-
IOMUXC_PIO2_26_HSP_eFlexPWM1_PWM_A0#
-
IOMUXC_PIO2_26_AUDIO_MQS_MQS_LEFT#
-
IOMUXC_PIO2_26_AUDIO_SAI1_RX_DATA1#
-
IOMUXC_PIO2_26_MEDIA_DCIF_DE#
-
IOMUXC_PIO2_26_HSP_FlexCAN1_CAN_RX#
-
IOMUXC_PIO2_26_HSP_LPSPI1_SIN#
-
IOMUXC_PIO2_26_HSP_XBAR0_INOUT26#
-
IOMUXC_PIO2_26_HSP_XBAR1_INOUT26#
-
IOMUXC_PIO2_27_HSP_GPIO0_GPIO27#
-
IOMUXC_PIO2_27_HSP_FLEXIO0_FXIO_D27#
-
IOMUXC_PIO2_27_COMM_CCM_CLKREF_25M#
-
IOMUXC_PIO2_27_HSP_eFlexPWM1_PWM_B0#
-
IOMUXC_PIO2_27_AUDIO_MQS_MQS_RIGHT#
-
IOMUXC_PIO2_27_COMM_USB1_VBUS_GPIO#
-
IOMUXC_PIO2_27_MEDIA_DCIF_PIXEL_CLK#
-
IOMUXC_PIO2_27_HSP_LPSPI1_SOUT#
-
IOMUXC_PIO2_27_HSP_XBAR0_INOUT27#
-
IOMUXC_PIO2_27_HSP_XBAR1_INOUT27#
-
IOMUXC_PIO3_0_HSP_GPIO1_GPIO0#
-
IOMUXC_PIO3_0_COMM_ENET_QOS_TX_CLK_IO#
-
IOMUXC_PIO3_0_HSP_FLEXIO1_FXIO_D00#
-
IOMUXC_PIO3_0_MEDIA_CSI_DATA00#
-
IOMUXC_PIO3_0_MAIN_AHB_SRAMC_SRAMC_ADDR00#
-
IOMUXC_PIO3_0_MEDIA_DCIF_DATA00#
-
IOMUXC_PIO3_0_MEDIA_DCIF_DBI_AB_DATA00#
-
IOMUXC_PIO3_0_HSP_eFlexPWM1_PWM_A0#
-
IOMUXC_PIO3_0_COMM_ENET_QOS_REF_CLK#
-
IOMUXC_PIO3_0_HSP_XBAR0_INOUT00#
-
IOMUXC_PIO3_0_HSP_XBAR1_INOUT00#
-
IOMUXC_PIO3_1_HSP_GPIO1_GPIO1#
-
IOMUXC_PIO3_1_COMM_ENET_QOS_TX_DATA0#
-
IOMUXC_PIO3_1_HSP_FLEXIO1_FXIO_D01#
-
IOMUXC_PIO3_1_MEDIA_CSI_DATA01#
-
IOMUXC_PIO3_1_MAIN_AHB_SRAMC_SRAMC_ADDR01#
-
IOMUXC_PIO3_1_MEDIA_DCIF_DATA01#
-
IOMUXC_PIO3_1_MEDIA_DCIF_DBI_AB_DATA01#
-
IOMUXC_PIO3_1_HSP_eFlexPWM1_PWM_B0#
-
IOMUXC_PIO3_1_HSP_XBAR0_INOUT01#
-
IOMUXC_PIO3_1_HSP_XBAR1_INOUT01#
-
IOMUXC_PIO3_2_HSP_GPIO1_GPIO2#
-
IOMUXC_PIO3_2_COMM_ENET_QOS_TX_DATA1#
-
IOMUXC_PIO3_2_HSP_FLEXIO1_FXIO_D02#
-
IOMUXC_PIO3_2_COMM_TENBASET_PHY0_TX#
-
IOMUXC_PIO3_2_MEDIA_CSI_DATA02#
-
IOMUXC_PIO3_2_MAIN_AHB_SRAMC_SRAMC_ADDR02#
-
IOMUXC_PIO3_2_MEDIA_DCIF_DATA02#
-
IOMUXC_PIO3_2_MEDIA_DCIF_DBI_AB_DATA02#
-
IOMUXC_PIO3_2_HSP_eFlexPWM1_PWM_A1#
-
IOMUXC_PIO3_2_HSP_LPUART0_TXD#
-
IOMUXC_PIO3_2_HSP_XBAR0_INOUT02#
-
IOMUXC_PIO3_2_HSP_XBAR1_INOUT02#
-
IOMUXC_PIO3_3_HSP_GPIO1_GPIO3#
-
IOMUXC_PIO3_3_COMM_ENET_QOS_TX_EN#
-
IOMUXC_PIO3_3_HSP_FLEXIO1_FXIO_D03#
-
IOMUXC_PIO3_3_MAIN_XSPI0_ECS#
-
IOMUXC_PIO3_3_MEDIA_CSI_DATA03#
-
IOMUXC_PIO3_3_MAIN_AHB_SRAMC_SRAMC_ADDR03#
-
IOMUXC_PIO3_3_MEDIA_DCIF_DATA03#
-
IOMUXC_PIO3_3_MEDIA_DCIF_DBI_AB_DATA03#
-
IOMUXC_PIO3_3_HSP_eFlexPWM1_PWM_B1#
-
IOMUXC_PIO3_3_HSP_LPUART0_RXD#
-
IOMUXC_PIO3_3_HSP_XBAR0_INOUT03#
-
IOMUXC_PIO3_3_HSP_XBAR1_INOUT03#
-
IOMUXC_PIO3_4_HSP_GPIO1_GPIO4#
-
IOMUXC_PIO3_4_COMM_ENET_QOS_RX_DATA0#
-
IOMUXC_PIO3_4_HSP_FLEXIO1_FXIO_D04#
-
IOMUXC_PIO3_4_AUDIO_MICFIL_PDM_CLK#
-
IOMUXC_PIO3_4_MEDIA_CSI_DATA04#
-
IOMUXC_PIO3_4_MAIN_AHB_SRAMC_SRAMC_ADDR04#
-
IOMUXC_PIO3_4_MEDIA_DCIF_DATA04#
-
IOMUXC_PIO3_4_MEDIA_DCIF_DBI_AB_DATA04#
-
IOMUXC_PIO3_4_HSP_eFlexPWM1_PWM_A2#
-
IOMUXC_PIO3_4_HSP_LPUART0_CTS_B#
-
IOMUXC_PIO3_4_HSP_XBAR0_INOUT04#
-
IOMUXC_PIO3_4_HSP_XBAR1_INOUT04#
-
IOMUXC_PIO3_5_HSP_GPIO1_GPIO5#
-
IOMUXC_PIO3_5_COMM_ENET_QOS_RX_DATA1#
-
IOMUXC_PIO3_5_HSP_FLEXIO1_FXIO_D05#
-
IOMUXC_PIO3_5_AUDIO_MICFIL_PDM_DATA45#
-
IOMUXC_PIO3_5_MEDIA_CSI_DATA05#
-
IOMUXC_PIO3_5_MAIN_AHB_SRAMC_SRAMC_ADDR05#
-
IOMUXC_PIO3_5_MEDIA_DCIF_DATA05#
-
IOMUXC_PIO3_5_MEDIA_DCIF_DBI_AB_DATA05#
-
IOMUXC_PIO3_5_HSP_eFlexPWM1_PWM_B2#
-
IOMUXC_PIO3_5_HSP_LPUART0_RTS_B#
-
IOMUXC_PIO3_5_HSP_XBAR0_INOUT05#
-
IOMUXC_PIO3_5_HSP_XBAR1_INOUT05#
-
IOMUXC_PIO3_6_HSP_GPIO1_GPIO6#
-
IOMUXC_PIO3_6_COMM_ENET_QOS_CRS#
-
IOMUXC_PIO3_6_HSP_FLEXIO1_FXIO_D06#
-
IOMUXC_PIO3_6_AUDIO_MICFIL_PDM_DATA23#
-
IOMUXC_PIO3_6_MEDIA_CSI_DATA06#
-
IOMUXC_PIO3_6_MAIN_AHB_SRAMC_SRAMC_ADDR06#
-
IOMUXC_PIO3_6_MEDIA_DCIF_DATA06#
-
IOMUXC_PIO3_6_MEDIA_DCIF_DBI_AB_DATA06#
-
IOMUXC_PIO3_6_HSP_eFlexPWM1_PWM_A3#
-
IOMUXC_PIO3_6_HSP_LPUART1_CTS_B#
-
IOMUXC_PIO3_6_HSP_XBAR0_INOUT06#
-
IOMUXC_PIO3_6_HSP_XBAR1_INOUT06#
-
IOMUXC_PIO3_7_HSP_GPIO1_GPIO7#
-
IOMUXC_PIO3_7_COMM_ENET_QOS_RXER#
-
IOMUXC_PIO3_7_HSP_FLEXIO1_FXIO_D07#
-
IOMUXC_PIO3_7_AUDIO_MICFIL_PDM_DATA01#
-
IOMUXC_PIO3_7_MEDIA_CSI_DATA07#
-
IOMUXC_PIO3_7_MAIN_AHB_SRAMC_SRAMC_ADDR07#
-
IOMUXC_PIO3_7_MEDIA_DCIF_DATA07#
-
IOMUXC_PIO3_7_MEDIA_DCIF_DBI_AB_DATA07#
-
IOMUXC_PIO3_7_HSP_eFlexPWM1_PWM_B3#
-
IOMUXC_PIO3_7_HSP_LPUART1_RTS_B#
-
IOMUXC_PIO3_7_HSP_XBAR0_INOUT07#
-
IOMUXC_PIO3_7_HSP_XBAR1_INOUT07#
-
IOMUXC_PIO3_8_HSP_GPIO1_GPIO8#
-
IOMUXC_PIO3_8_COMM_ENET_QOS_MDIO#
-
IOMUXC_PIO3_8_HSP_FLEXIO1_FXIO_D08#
-
IOMUXC_PIO3_8_COMM_TENBASET_PHY0_ED#
-
IOMUXC_PIO3_8_MEDIA_CSI_DATA08#
-
IOMUXC_PIO3_8_MAIN_AHB_SRAMC_SRAMC_ADDR08#
-
IOMUXC_PIO3_8_MEDIA_DCIF_DATA08#
-
IOMUXC_PIO3_8_MEDIA_DCIF_DBI_AB_DATA08#
-
IOMUXC_PIO3_8_HSP_LPI2C1_SDA#
-
IOMUXC_PIO3_8_HSP_LPUART1_TXD#
-
IOMUXC_PIO3_8_HSP_XBAR0_INOUT08#
-
IOMUXC_PIO3_8_HSP_XBAR1_INOUT08#
-
IOMUXC_PIO3_8_HSP_eFlexPWM2_PWM_A0#
-
IOMUXC_PIO3_9_HSP_GPIO1_GPIO9#
-
IOMUXC_PIO3_9_COMM_ENET_QOS_MDC#
-
IOMUXC_PIO3_9_HSP_FLEXIO1_FXIO_D09#
-
IOMUXC_PIO3_9_COMM_TENBASET_PHY0_RX#
-
IOMUXC_PIO3_9_MEDIA_CSI_DATA09#
-
IOMUXC_PIO3_9_MAIN_AHB_SRAMC_SRAMC_ADDR09#
-
IOMUXC_PIO3_9_MEDIA_DCIF_DATA09#
-
IOMUXC_PIO3_9_MEDIA_DCIF_DBI_AB_DATA09#
-
IOMUXC_PIO3_9_HSP_LPI2C1_SCL#
-
IOMUXC_PIO3_9_HSP_LPUART1_RXD#
-
IOMUXC_PIO3_9_HSP_XBAR0_INOUT09#
-
IOMUXC_PIO3_9_HSP_XBAR1_INOUT09#
-
IOMUXC_PIO3_9_HSP_eFlexPWM2_PWM_B0#
-
IOMUXC_PIO3_10_HSP_GPIO1_GPIO10#
-
IOMUXC_PIO3_10_COMM_ENET_QOS_TX_DATA2#
-
IOMUXC_PIO3_10_HSP_FLEXIO1_FXIO_D10#
-
IOMUXC_PIO3_10_AUDIO_SAI1_MCLK#
-
IOMUXC_PIO3_10_MEDIA_CSI_DATA10#
-
IOMUXC_PIO3_10_MAIN_AHB_SRAMC_SRAMC_ADDR10#
-
IOMUXC_PIO3_10_MEDIA_DCIF_DATA10#
-
IOMUXC_PIO3_10_MEDIA_DCIF_DBI_AB_DATA10#
-
IOMUXC_PIO3_10_HSP_LPSPI1_PCS3#
-
IOMUXC_PIO3_10_HSP_LPUART2_CTS_B#
-
IOMUXC_PIO3_10_HSP_XBAR0_INOUT10#
-
IOMUXC_PIO3_10_HSP_XBAR1_INOUT10#
-
IOMUXC_PIO3_10_HSP_eFlexPWM2_PWM_A1#
-
IOMUXC_PIO3_11_HSP_GPIO1_GPIO11#
-
IOMUXC_PIO3_11_COMM_ENET_QOS_TX_DATA3#
-
IOMUXC_PIO3_11_HSP_FLEXIO1_FXIO_D11#
-
IOMUXC_PIO3_11_AUDIO_SAI1_TX_BCLK#
-
IOMUXC_PIO3_11_MEDIA_CSI_DATA11#
-
IOMUXC_PIO3_11_MAIN_AHB_SRAMC_SRAMC_ADDR11#
-
IOMUXC_PIO3_11_MEDIA_DCIF_DATA11#
-
IOMUXC_PIO3_11_MEDIA_DCIF_DBI_AB_DATA11#
-
IOMUXC_PIO3_11_HSP_LPSPI1_PCS2#
-
IOMUXC_PIO3_11_HSP_LPUART2_RTS_B#
-
IOMUXC_PIO3_11_HSP_XBAR0_INOUT11#
-
IOMUXC_PIO3_11_HSP_XBAR1_INOUT11#
-
IOMUXC_PIO3_11_HSP_eFlexPWM2_PWM_B1#
-
IOMUXC_PIO3_12_HSP_GPIO1_GPIO12#
-
IOMUXC_PIO3_12_COMM_ENET_QOS_TX_ER#
-
IOMUXC_PIO3_12_HSP_FLEXIO1_FXIO_D12#
-
IOMUXC_PIO3_12_AUDIO_SAI1_TX_SYNC#
-
IOMUXC_PIO3_12_MEDIA_CSI_DATA12#
-
IOMUXC_PIO3_12_MAIN_AHB_SRAMC_SRAMC_ADDR12#
-
IOMUXC_PIO3_12_MEDIA_DCIF_DATA12#
-
IOMUXC_PIO3_12_MEDIA_DCIF_DBI_AB_DATA12#
-
IOMUXC_PIO3_12_HSP_LPSPI1_PCS1#
-
IOMUXC_PIO3_12_HSP_LPUART2_TXD#
-
IOMUXC_PIO3_12_HSP_XBAR0_INOUT12#
-
IOMUXC_PIO3_12_HSP_XBAR1_INOUT12#
-
IOMUXC_PIO3_12_HSP_eFlexPWM2_PWM_A3#
-
IOMUXC_PIO3_13_HSP_GPIO1_GPIO13#
-
IOMUXC_PIO3_13_COMM_ENET_QOS_RX_CLK#
-
IOMUXC_PIO3_13_HSP_FLEXIO1_FXIO_D13#
-
IOMUXC_PIO3_13_AUDIO_SAI1_TX_DATA0#
-
IOMUXC_PIO3_13_MEDIA_CSI_DATA13#
-
IOMUXC_PIO3_13_MAIN_AHB_SRAMC_SRAMC_ADDR13#
-
IOMUXC_PIO3_13_MEDIA_DCIF_DATA13#
-
IOMUXC_PIO3_13_MEDIA_DCIF_DBI_AB_DATA13#
-
IOMUXC_PIO3_13_HSP_LPSPI1_PCS0#
-
IOMUXC_PIO3_13_HSP_LPUART2_RXD#
-
IOMUXC_PIO3_13_HSP_XBAR0_INOUT13#
-
IOMUXC_PIO3_13_HSP_XBAR1_INOUT13#
-
IOMUXC_PIO3_13_HSP_eFlexPWM2_PWM_B3#
-
IOMUXC_PIO3_14_HSP_GPIO1_GPIO14#
-
IOMUXC_PIO3_14_COMM_ENET_QOS_RX_DATA2#
-
IOMUXC_PIO3_14_HSP_FLEXIO1_FXIO_D14#
-
IOMUXC_PIO3_14_AUDIO_SAI1_RX_DATA0#
-
IOMUXC_PIO3_14_MEDIA_CSI_DATA14#
-
IOMUXC_PIO3_14_MAIN_AHB_SRAMC_SRAMC_ADDR14#
-
IOMUXC_PIO3_14_MEDIA_DCIF_DATA14#
-
IOMUXC_PIO3_14_MEDIA_DCIF_DBI_AB_DATA14#
-
IOMUXC_PIO3_14_HSP_LPSPI1_SCK#
-
IOMUXC_PIO3_14_HSP_LPUART3_CTS_B#
-
IOMUXC_PIO3_14_HSP_XBAR0_INOUT14#
-
IOMUXC_PIO3_14_HSP_XBAR1_INOUT14#
-
IOMUXC_PIO3_15_HSP_GPIO1_GPIO15#
-
IOMUXC_PIO3_15_COMM_ENET_QOS_RX_DATA3#
-
IOMUXC_PIO3_15_HSP_FLEXIO1_FXIO_D15#
-
IOMUXC_PIO3_15_AUDIO_SAI1_RX_BCLK#
-
IOMUXC_PIO3_15_MEDIA_CSI_DATA15#
-
IOMUXC_PIO3_15_MAIN_AHB_SRAMC_SRAMC_ADDR15#
-
IOMUXC_PIO3_15_MEDIA_DCIF_DATA15#
-
IOMUXC_PIO3_15_MEDIA_DCIF_DBI_AB_DATA15#
-
IOMUXC_PIO3_15_HSP_LPSPI1_SOUT#
-
IOMUXC_PIO3_15_HSP_LPUART3_RTS_B#
-
IOMUXC_PIO3_15_HSP_XBAR0_INOUT15#
-
IOMUXC_PIO3_15_HSP_XBAR1_INOUT15#
-
IOMUXC_PIO3_16_HSP_GPIO1_GPIO16#
-
IOMUXC_PIO3_16_COMM_ENET_QOS_RXEN#
-
IOMUXC_PIO3_16_HSP_FLEXIO1_FXIO_D16#
-
IOMUXC_PIO3_16_AUDIO_SAI1_RX_SYNC#
-
IOMUXC_PIO3_16_MEDIA_CSI_MCLK#
-
IOMUXC_PIO3_16_MAIN_AHB_SRAMC_SRAMC_ADDR16#
-
IOMUXC_PIO3_16_MEDIA_DCIF_DATA16#
-
IOMUXC_PIO3_16_MEDIA_DCIF_DBI_CSX_AB#
-
IOMUXC_PIO3_16_HSP_LPSPI1_SIN#
-
IOMUXC_PIO3_16_HSP_LPUART3_TXD#
-
IOMUXC_PIO3_16_HSP_XBAR0_INOUT16#
-
IOMUXC_PIO3_16_HSP_XBAR1_INOUT16#
-
IOMUXC_PIO3_17_HSP_GPIO1_GPIO17#
-
IOMUXC_PIO3_17_COMM_ENET_QOS_COL#
-
IOMUXC_PIO3_17_HSP_FLEXIO1_FXIO_D17#
-
IOMUXC_PIO3_17_AUDIO_SAI1_TX_DATA1#
-
IOMUXC_PIO3_17_MEDIA_CSI_HSYNC#
-
IOMUXC_PIO3_17_MAIN_AHB_SRAMC_SRAMC_ADVB#
-
IOMUXC_PIO3_17_MEDIA_DCIF_DATA17#
-
IOMUXC_PIO3_17_MEDIA_DCIF_DBI_AB_DCS#
-
IOMUXC_PIO3_17_HSP_LPSPI0_PCS3#
-
IOMUXC_PIO3_17_HSP_LPUART3_RXD#
-
IOMUXC_PIO3_17_HSP_XBAR0_INOUT17#
-
IOMUXC_PIO3_17_HSP_XBAR1_INOUT17#
-
IOMUXC_PIO3_17_AUDIO_MQS_MQS_LEFT#
-
IOMUXC_PIO3_18_HSP_GPIO1_GPIO18#
-
IOMUXC_PIO3_18_WAKE_EWM_OUT_B#
-
IOMUXC_PIO3_18_HSP_FLEXIO1_FXIO_D18#
-
IOMUXC_PIO3_18_AUDIO_SAI1_RX_DATA1#
-
IOMUXC_PIO3_18_MEDIA_CSI_VSYNC#
-
IOMUXC_PIO3_18_MAIN_AHB_SRAMC_SRAMC_CS0#
-
IOMUXC_PIO3_18_MEDIA_DCIF_DATA18#
-
IOMUXC_PIO3_18_MEDIA_DCIF_DBI_B_RDX#
-
IOMUXC_PIO3_18_HSP_LPSPI0_PCS2#
-
IOMUXC_PIO3_18_MEDIA_DCIF_DBI_A_E#
-
IOMUXC_PIO3_18_HSP_XBAR0_INOUT18#
-
IOMUXC_PIO3_18_HSP_XBAR1_INOUT18#
-
IOMUXC_PIO3_18_AUDIO_MQS_MQS_RIGHT#
-
IOMUXC_PIO3_19_HSP_GPIO1_GPIO19#
-
IOMUXC_PIO3_19_HSP_FLEXIO1_FXIO_D19#
-
IOMUXC_PIO3_19_COMM_CCM_CLKREF_25M#
-
IOMUXC_PIO3_19_MEDIA_CSI_PIXCLK#
-
IOMUXC_PIO3_19_MAIN_AHB_SRAMC_SRAMC_CS1#
-
IOMUXC_PIO3_19_MEDIA_DCIF_DATA19#
-
IOMUXC_PIO3_19_MEDIA_DCIF_DBI_A_RWX_OR_B_WRX#
-
IOMUXC_PIO3_19_HSP_LPSPI0_PCS1#
-
IOMUXC_PIO3_19_AUDIO_MICFIL_PDM_DATA45#
-
IOMUXC_PIO3_19_HSP_XBAR0_INOUT19#
-
IOMUXC_PIO3_19_HSP_XBAR1_INOUT19#
-
IOMUXC_PIO3_20_HSP_GPIO1_GPIO20#
-
IOMUXC_PIO3_20_HSP_FLEXIO1_FXIO_D20#
-
IOMUXC_PIO3_20_SYSCON_FREQME_CLK_OUT#
-
IOMUXC_PIO3_20_MEDIA_CSI_FIELD#
-
IOMUXC_PIO3_20_MAIN_AHB_SRAMC_SRAMC_WP0#
-
IOMUXC_PIO3_20_MEDIA_DCIF_DATA20#
-
IOMUXC_PIO3_20_HSP_LPI2C0_SCL#
-
IOMUXC_PIO3_20_HSP_LPSPI0_SCK#
-
IOMUXC_PIO3_20_AUDIO_MICFIL_PDM_DATA23#
-
IOMUXC_PIO3_20_HSP_XBAR0_INOUT20#
-
IOMUXC_PIO3_20_HSP_XBAR1_INOUT20#
-
IOMUXC_PIO3_21_HSP_GPIO1_GPIO21#
-
IOMUXC_PIO3_21_HSP_FLEXIO1_FXIO_D21#
-
IOMUXC_PIO3_21_MEDIA_FREQME_CLK_OUT#
-
IOMUXC_PIO3_21_COMM_USB0_ID#
-
IOMUXC_PIO3_21_MAIN_AHB_SRAMC_SRAMC_WP1#
-
IOMUXC_PIO3_21_MEDIA_DCIF_DATA21#
-
IOMUXC_PIO3_21_HSP_LPI2C0_SDA#
-
IOMUXC_PIO3_21_HSP_LPSPI0_SOUT#
-
IOMUXC_PIO3_21_AUDIO_MICFIL_PDM_DATA01#
-
IOMUXC_PIO3_21_HSP_XBAR0_INOUT21#
-
IOMUXC_PIO3_21_HSP_XBAR1_INOUT21#
-
IOMUXC_PIO3_21_HSP_eFlexPWM2_PWM_X0#
-
IOMUXC_PIO3_22_HSP_GPIO1_GPIO22#
-
IOMUXC_PIO3_22_HSP_FLEXIO1_FXIO_D22#
-
IOMUXC_PIO3_22_COMM_FREQME_CLK_OUT#
-
IOMUXC_PIO3_22_COMM_uSDHC1_CD_B#
-
IOMUXC_PIO3_22_MEDIA_DCIF_DATA22#
-
IOMUXC_PIO3_22_HSP_FlexCAN2_CAN_TX#
-
IOMUXC_PIO3_22_HSP_LPSPI0_SIN#
-
IOMUXC_PIO3_22_AUDIO_MICFIL_PDM_CLK#
-
IOMUXC_PIO3_22_HSP_XBAR0_INOUT22#
-
IOMUXC_PIO3_22_HSP_XBAR1_INOUT22#
-
IOMUXC_PIO3_22_HSP_eFlexPWM2_PWM_X1#
-
IOMUXC_PIO3_23_HSP_GPIO1_GPIO23#
-
IOMUXC_PIO3_23_HSP_FLEXIO1_FXIO_D23#
-
IOMUXC_PIO3_23_MAIN_TRACE_SWO#
-
IOMUXC_PIO3_23_COMM_USB0_PWR#
-
IOMUXC_PIO3_23_COMM_uSDHC1_RESET_B#
-
IOMUXC_PIO3_23_MEDIA_DCIF_DATA23#
-
IOMUXC_PIO3_23_HSP_FlexCAN2_CAN_RX#
-
IOMUXC_PIO3_23_HSP_LPSPI0_PCS0#
-
IOMUXC_PIO3_23_HSP_XBAR0_INOUT23#
-
IOMUXC_PIO3_23_HSP_XBAR1_INOUT23#
-
IOMUXC_PIO3_23_HSP_eFlexPWM2_PWM_X2#
-
IOMUXC_PIO3_24_HSP_GPIO1_GPIO24#
-
IOMUXC_PIO3_24_HSP_FLEXIO1_FXIO_D24#
-
IOMUXC_PIO3_24_MAIN_CCM_CLKOUT#
-
IOMUXC_PIO3_24_COMM_USB0_OC#
-
IOMUXC_PIO3_24_COMM_uSDHC1_WP#
-
IOMUXC_PIO3_24_MEDIA_DCIF_DE#
-
IOMUXC_PIO3_24_HSP_LPI2C0_SDA#
-
IOMUXC_PIO3_24_HSP_XBAR0_INOUT24#
-
IOMUXC_PIO3_24_HSP_XBAR1_INOUT24#
-
IOMUXC_PIO3_24_HSP_eFlexPWM2_PWM_X3#
-
IOMUXC_PIO3_25_HSP_GPIO1_GPIO25#
-
IOMUXC_PIO3_25_HSP_FLEXIO1_FXIO_D25#
-
IOMUXC_PIO3_25_HSP_I3C_SDA#
-
IOMUXC_PIO3_25_COMM_uSDHC1_VSELECT#
-
IOMUXC_PIO3_25_MEDIA_DCIF_PIXEL_CLK#
-
IOMUXC_PIO3_25_HSP_LPI2C0_SCL#
-
IOMUXC_PIO3_25_HSP_XBAR0_INOUT25#
-
IOMUXC_PIO3_25_HSP_XBAR1_INOUT25#
-
IOMUXC_PIO3_26_HSP_GPIO1_GPIO26#
-
IOMUXC_PIO3_26_HSP_FLEXIO1_FXIO_D26#
-
IOMUXC_PIO3_26_HSP_I3C_SCL#
-
IOMUXC_PIO3_26_MEDIA_DCIF_HSYNC#
-
IOMUXC_PIO3_26_AUDIO_MQS_MQS_LEFT#
-
IOMUXC_PIO3_26_HSP_XBAR0_INOUT26#
-
IOMUXC_PIO3_26_HSP_XBAR1_INOUT26#
-
IOMUXC_PIO3_27_HSP_GPIO1_GPIO27#
-
IOMUXC_PIO3_27_HSP_FLEXIO1_FXIO_D27#
-
IOMUXC_PIO3_27_HSP_I3C_PUR#
-
IOMUXC_PIO3_27_MEDIA_DCIF_VSYNC#
-
IOMUXC_PIO3_27_AUDIO_MQS_MQS_RIGHT#
-
IOMUXC_PIO3_27_HSP_XBAR0_INOUT27#
-
IOMUXC_PIO3_27_HSP_XBAR1_INOUT27#
-
IOMUXC_PIO3_28_HSP_GPIO1_GPIO28#
-
IOMUXC_PIO3_28_HSP_LPUART0_CTS_B#
-
IOMUXC_PIO3_28_HSP_FLEXIO1_FXIO_D28#
-
IOMUXC_PIO3_28_MAIN_CCM_CLKOUT#
-
IOMUXC_PIO3_28_HSP_eFlexPWM1_PWM_X1#
-
IOMUXC_PIO3_28_COMM_ENET_TX_ER#
-
IOMUXC_PIO3_28_COMM_uSDHC0_RESET_B#
-
IOMUXC_PIO3_28_HSP_XBAR0_INOUT28#
-
IOMUXC_PIO3_28_HSP_XBAR1_INOUT28#
-
IOMUXC_PIO3_29_HSP_GPIO1_GPIO29#
-
IOMUXC_PIO3_29_HSP_LPUART0_RTS_B#
-
IOMUXC_PIO3_29_HSP_FLEXIO1_FXIO_D29#
-
IOMUXC_PIO3_29_CMPT_FREQME_CLK_OUT#
-
IOMUXC_PIO3_29_HSP_eFlexPWM1_PWM_X2#
-
IOMUXC_PIO3_29_COMM_ENET_RX_ER#
-
IOMUXC_PIO3_29_COMM_uSDHC0_CD_B#
-
IOMUXC_PIO3_29_HSP_XBAR0_INOUT29#
-
IOMUXC_PIO3_29_HSP_XBAR1_INOUT29#
-
IOMUXC_PIO3_30_HSP_GPIO1_GPIO30#
-
IOMUXC_PIO3_30_HSP_LPUART0_TXD#
-
IOMUXC_PIO3_30_HSP_FLEXIO1_FXIO_D30#
-
IOMUXC_PIO3_30_AUDIO_FREQME_CLK_OUT#
-
IOMUXC_PIO3_30_HSP_eFlexPWM1_PWM_X3#
-
IOMUXC_PIO3_30_COMM_ENET_CRS#
-
IOMUXC_PIO3_30_COMM_uSDHC0_WP#
-
IOMUXC_PIO3_30_HSP_XBAR0_INOUT30#
-
IOMUXC_PIO3_30_HSP_XBAR1_INOUT30#
-
IOMUXC_PIO3_30_MAIN_XSPI0_TST_TRG#
-
IOMUXC_PIO3_31_HSP_GPIO1_GPIO31#
-
IOMUXC_PIO3_31_HSP_LPUART0_RXD#
-
IOMUXC_PIO3_31_HSP_FLEXIO1_FXIO_D31#
-
IOMUXC_PIO3_31_MAIN_FREQME_CLK_OUT#
-
IOMUXC_PIO3_31_COMM_CCM_CLKREF_25M#
-
IOMUXC_PIO3_31_COMM_ENET_COL#
-
IOMUXC_PIO3_31_COMM_uSDHC0_VSELECT#
-
IOMUXC_PIO3_31_HSP_XBAR0_INOUT31#
-
IOMUXC_PIO3_31_HSP_XBAR1_INOUT31#
-
IOMUXC_PIO3_31_MAIN_XSPI1_TST_TRG#
-
IOMUXC_PIO4_0_HSP_GPIO2_GPIO0#
-
IOMUXC_PIO4_0_COMM_ENET_TX_CLK_IO#
-
IOMUXC_PIO4_0_HSP_FLEXIO2_FXIO_D00#
-
IOMUXC_PIO4_0_AUDIO_SAI2_MCLK#
-
IOMUXC_PIO4_0_MEDIA_CSI_DATA23#
-
IOMUXC_PIO4_0_HSP_SINC1_MBIT0#
-
IOMUXC_PIO4_0_MEDIA_DCIF_DATA00#
-
IOMUXC_PIO4_0_MEDIA_DCIF_DBI_AB_DATA00#
-
IOMUXC_PIO4_0_HSP_eFlexPWM2_PWM_A0#
-
IOMUXC_PIO4_0_COMM_ENET_REF_CLK#
-
IOMUXC_PIO4_0_HSP_XBAR0_INOUT00#
-
IOMUXC_PIO4_0_HSP_XBAR1_INOUT00#
-
IOMUXC_PIO4_0_COMM_TENBASET_PHY1_TX#
-
IOMUXC_PIO4_1_HSP_GPIO2_GPIO1#
-
IOMUXC_PIO4_1_COMM_ENET_TXD0#
-
IOMUXC_PIO4_1_HSP_FLEXIO2_FXIO_D01#
-
IOMUXC_PIO4_1_AUDIO_SAI2_TX_BCLK#
-
IOMUXC_PIO4_1_MEDIA_CSI_DATA22#
-
IOMUXC_PIO4_1_HSP_SINC1_MCLK0#
-
IOMUXC_PIO4_1_MEDIA_DCIF_DATA01#
-
IOMUXC_PIO4_1_MEDIA_DCIF_DBI_AB_DATA01#
-
IOMUXC_PIO4_1_HSP_eFlexPWM2_PWM_B0#
-
IOMUXC_PIO4_1_HSP_SINC1_MCLK_OUT0#
-
IOMUXC_PIO4_1_HSP_XBAR0_INOUT01#
-
IOMUXC_PIO4_1_HSP_XBAR1_INOUT01#
-
IOMUXC_PIO4_1_COMM_TENBASET_PHY1_ED#
-
IOMUXC_PIO4_2_HSP_GPIO2_GPIO2#
-
IOMUXC_PIO4_2_COMM_ENET_TXD1#
-
IOMUXC_PIO4_2_HSP_FLEXIO2_FXIO_D02#
-
IOMUXC_PIO4_2_AUDIO_SAI2_TX_SYNC#
-
IOMUXC_PIO4_2_MEDIA_CSI_DATA21#
-
IOMUXC_PIO4_2_HSP_SINC1_MCLK1#
-
IOMUXC_PIO4_2_MEDIA_DCIF_DATA02#
-
IOMUXC_PIO4_2_MEDIA_DCIF_DBI_AB_DATA02#
-
IOMUXC_PIO4_2_HSP_eFlexPWM2_PWM_A1#
-
IOMUXC_PIO4_2_HSP_SINC1_MCLK_OUT1#
-
IOMUXC_PIO4_2_HSP_XBAR0_INOUT02#
-
IOMUXC_PIO4_2_HSP_XBAR1_INOUT02#
-
IOMUXC_PIO4_2_COMM_TENBASET_PHY1_RX#
-
IOMUXC_PIO4_3_HSP_GPIO2_GPIO3#
-
IOMUXC_PIO4_3_COMM_ENET_TX_EN#
-
IOMUXC_PIO4_3_HSP_FLEXIO2_FXIO_D03#
-
IOMUXC_PIO4_3_AUDIO_SAI2_RX_DATA0#
-
IOMUXC_PIO4_3_MEDIA_CSI_DATA20#
-
IOMUXC_PIO4_3_HSP_SINC1_MBIT1#
-
IOMUXC_PIO4_3_MEDIA_DCIF_DATA03#
-
IOMUXC_PIO4_3_MEDIA_DCIF_DBI_AB_DATA03#
-
IOMUXC_PIO4_3_HSP_eFlexPWM2_PWM_B1#
-
IOMUXC_PIO4_3_HSP_XBAR0_INOUT03#
-
IOMUXC_PIO4_3_HSP_XBAR1_INOUT03#
-
IOMUXC_PIO4_3_COMM_TENBASET_PHY1_TX#
-
IOMUXC_PIO4_4_HSP_GPIO2_GPIO4#
-
IOMUXC_PIO4_4_COMM_ENET_RXD0#
-
IOMUXC_PIO4_4_HSP_FLEXIO2_FXIO_D04#
-
IOMUXC_PIO4_4_AUDIO_SAI2_TX_DATA0#
-
IOMUXC_PIO4_4_MEDIA_CSI_DATA19#
-
IOMUXC_PIO4_4_HSP_SINC1_MCLK2#
-
IOMUXC_PIO4_4_MEDIA_DCIF_DATA04#
-
IOMUXC_PIO4_4_MEDIA_DCIF_DBI_AB_DATA04#
-
IOMUXC_PIO4_4_HSP_eFlexPWM2_PWM_A2#
-
IOMUXC_PIO4_4_HSP_SINC1_MCLK_OUT2#
-
IOMUXC_PIO4_4_HSP_XBAR0_INOUT04#
-
IOMUXC_PIO4_4_HSP_XBAR1_INOUT04#
-
IOMUXC_PIO4_4_COMM_TENBASET_PHY1_ED#
-
IOMUXC_PIO4_5_HSP_GPIO2_GPIO5#
-
IOMUXC_PIO4_5_COMM_ENET_RXD1#
-
IOMUXC_PIO4_5_HSP_FLEXIO2_FXIO_D05#
-
IOMUXC_PIO4_5_AUDIO_SAI2_RX_BCLK#
-
IOMUXC_PIO4_5_MEDIA_CSI_DATA18#
-
IOMUXC_PIO4_5_HSP_SINC1_MBIT2#
-
IOMUXC_PIO4_5_MEDIA_DCIF_DATA05#
-
IOMUXC_PIO4_5_MEDIA_DCIF_DBI_AB_DATA05#
-
IOMUXC_PIO4_5_HSP_eFlexPWM2_PWM_B2#
-
IOMUXC_PIO4_5_HSP_XBAR0_INOUT05#
-
IOMUXC_PIO4_5_HSP_XBAR1_INOUT05#
-
IOMUXC_PIO4_5_COMM_TENBASET_PHY1_RX#
-
IOMUXC_PIO4_6_HSP_GPIO2_GPIO6#
-
IOMUXC_PIO4_6_COMM_ENET_MDIO#
-
IOMUXC_PIO4_6_HSP_FLEXIO2_FXIO_D06#
-
IOMUXC_PIO4_6_AUDIO_SAI2_RX_SYNC#
-
IOMUXC_PIO4_6_MEDIA_CSI_DATA17#
-
IOMUXC_PIO4_6_HSP_SINC1_MCLK3#
-
IOMUXC_PIO4_6_MEDIA_DCIF_DATA06#
-
IOMUXC_PIO4_6_MEDIA_DCIF_DBI_AB_DATA06#
-
IOMUXC_PIO4_6_HSP_eFlexPWM2_PWM_A3#
-
IOMUXC_PIO4_6_HSP_LPUART4_RTS_B#
-
IOMUXC_PIO4_6_HSP_XBAR0_INOUT06#
-
IOMUXC_PIO4_6_HSP_XBAR1_INOUT06#
-
IOMUXC_PIO4_7_HSP_GPIO2_GPIO7#
-
IOMUXC_PIO4_7_COMM_ENET_MDC#
-
IOMUXC_PIO4_7_HSP_FLEXIO2_FXIO_D07#
-
IOMUXC_PIO4_7_AUDIO_SAI2_TX_DATA1#
-
IOMUXC_PIO4_7_MEDIA_CSI_DATA16#
-
IOMUXC_PIO4_7_HSP_SINC1_MBIT3#
-
IOMUXC_PIO4_7_MEDIA_DCIF_DATA07#
-
IOMUXC_PIO4_7_MEDIA_DCIF_DBI_AB_DATA07#
-
IOMUXC_PIO4_7_HSP_eFlexPWM2_PWM_B3#
-
IOMUXC_PIO4_7_HSP_LPUART4_CTS_B#
-
IOMUXC_PIO4_7_HSP_XBAR0_INOUT07#
-
IOMUXC_PIO4_7_HSP_XBAR1_INOUT07#
-
IOMUXC_PIO4_8_HSP_GPIO2_GPIO8#
-
IOMUXC_PIO4_8_COMM_ENET_TXD2#
-
IOMUXC_PIO4_8_HSP_FLEXIO2_FXIO_D08#
-
IOMUXC_PIO4_8_AUDIO_SAI2_RX_DATA1#
-
IOMUXC_PIO4_8_MEDIA_CSI_DATA15#
-
IOMUXC_PIO4_8_HSP_SINC1_BREAK#
-
IOMUXC_PIO4_8_MEDIA_DCIF_DATA08#
-
IOMUXC_PIO4_8_MEDIA_DCIF_DBI_AB_DATA08#
-
IOMUXC_PIO4_8_COMM_TENBASET_PHY1_TX#
-
IOMUXC_PIO4_8_HSP_LPUART4_TXD#
-
IOMUXC_PIO4_8_HSP_XBAR0_INOUT08#
-
IOMUXC_PIO4_8_HSP_XBAR1_INOUT08#
-
IOMUXC_PIO4_8_COMM_ENET_QOS_COL#
-
IOMUXC_PIO4_9_HSP_GPIO2_GPIO9#
-
IOMUXC_PIO4_9_COMM_ENET_TXD3#
-
IOMUXC_PIO4_9_HSP_FLEXIO2_FXIO_D09#
-
IOMUXC_PIO4_9_AUDIO_FREQME_CLK_OUT#
-
IOMUXC_PIO4_9_MEDIA_CSI_DATA14#
-
IOMUXC_PIO4_9_MEDIA_DCIF_DATA09#
-
IOMUXC_PIO4_9_MEDIA_DCIF_DBI_AB_DATA09#
-
IOMUXC_PIO4_9_HSP_eFlexPWM3_PWM_A0#
-
IOMUXC_PIO4_9_HSP_LPUART4_RXD#
-
IOMUXC_PIO4_9_HSP_XBAR0_INOUT09#
-
IOMUXC_PIO4_9_HSP_XBAR1_INOUT09#
-
IOMUXC_PIO4_9_COMM_ENET_QOS_CRS#
-
IOMUXC_PIO4_10_HSP_GPIO2_GPIO10#
-
IOMUXC_PIO4_10_COMM_ENET_RX_CLK#
-
IOMUXC_PIO4_10_HSP_FLEXIO2_FXIO_D10#
-
IOMUXC_PIO4_10_AUDIO_MICFIL_PDM_CLK#
-
IOMUXC_PIO4_10_MEDIA_CSI_DATA13#
-
IOMUXC_PIO4_10_MEDIA_DCIF_DATA10#
-
IOMUXC_PIO4_10_MEDIA_DCIF_DBI_AB_DATA10#
-
IOMUXC_PIO4_10_HSP_eFlexPWM3_PWM_B0#
-
IOMUXC_PIO4_10_HSP_LPUART5_TXD#
-
IOMUXC_PIO4_10_HSP_XBAR1_INOUT10#
-
IOMUXC_PIO4_11_HSP_GPIO2_GPIO11#
-
IOMUXC_PIO4_11_COMM_ENET_RXD2#
-
IOMUXC_PIO4_11_HSP_FLEXIO2_FXIO_D11#
-
IOMUXC_PIO4_11_AUDIO_MICFIL_PDM_DATA45#
-
IOMUXC_PIO4_11_MEDIA_CSI_DATA12#
-
IOMUXC_PIO4_11_MEDIA_DCIF_DATA11#
-
IOMUXC_PIO4_11_MEDIA_DCIF_DBI_AB_DATA11#
-
IOMUXC_PIO4_11_HSP_eFlexPWM3_PWM_A1#
-
IOMUXC_PIO4_11_HSP_LPUART5_RXD#
-
IOMUXC_PIO4_11_HSP_XBAR1_INOUT11#
-
IOMUXC_PIO4_11_COMM_ENET_QOS_TX_ER#
-
IOMUXC_PIO4_12_HSP_GPIO2_GPIO12#
-
IOMUXC_PIO4_12_COMM_ENET_RXD3#
-
IOMUXC_PIO4_12_HSP_FLEXIO2_FXIO_D12#
-
IOMUXC_PIO4_12_AUDIO_MICFIL_PDM_DATA23#
-
IOMUXC_PIO4_12_MEDIA_CSI_DATA11#
-
IOMUXC_PIO4_12_HSP_LPSPI2_PCS2#
-
IOMUXC_PIO4_12_MEDIA_DCIF_DATA12#
-
IOMUXC_PIO4_12_MEDIA_DCIF_DBI_AB_DATA12#
-
IOMUXC_PIO4_12_HSP_eFlexPWM3_PWM_B1#
-
IOMUXC_PIO4_12_HSP_LPUART5_CTS_B#
-
IOMUXC_PIO4_12_HSP_XBAR1_INOUT12#
-
IOMUXC_PIO4_12_COMM_ENET_QOS_RXER#
-
IOMUXC_PIO4_13_HSP_GPIO2_GPIO13#
-
IOMUXC_PIO4_13_COMM_ENET_RX_EN#
-
IOMUXC_PIO4_13_HSP_FLEXIO2_FXIO_D13#
-
IOMUXC_PIO4_13_AUDIO_MICFIL_PDM_DATA01#
-
IOMUXC_PIO4_13_MEDIA_CSI_DATA10#
-
IOMUXC_PIO4_13_HSP_LPSPI2_PCS3#
-
IOMUXC_PIO4_13_MEDIA_DCIF_DATA13#
-
IOMUXC_PIO4_13_MEDIA_DCIF_DBI_AB_DATA13#
-
IOMUXC_PIO4_13_HSP_eFlexPWM3_PWM_A2#
-
IOMUXC_PIO4_13_HSP_LPUART5_RTS_B#
-
IOMUXC_PIO4_13_HSP_XBAR1_INOUT13#
-
IOMUXC_PIO4_14_HSP_GPIO2_GPIO14#
-
IOMUXC_PIO4_14_COMM_ENET_QOS_TX_CLK_IO#
-
IOMUXC_PIO4_14_HSP_FLEXIO2_FXIO_D14#
-
IOMUXC_PIO4_14_COMM_ENET_QOS_REF_CLK#
-
IOMUXC_PIO4_14_MEDIA_CSI_DATA09#
-
IOMUXC_PIO4_14_HSP_LPSPI2_PCS0#
-
IOMUXC_PIO4_14_MEDIA_DCIF_DATA14#
-
IOMUXC_PIO4_14_MEDIA_DCIF_DBI_AB_DATA14#
-
IOMUXC_PIO4_14_HSP_eFlexPWM3_PWM_B2#
-
IOMUXC_PIO4_14_HSP_XBAR1_INOUT14#
-
IOMUXC_PIO4_15_HSP_GPIO2_GPIO15#
-
IOMUXC_PIO4_15_COMM_ENET_QOS_TX_DATA0#
-
IOMUXC_PIO4_15_HSP_FLEXIO2_FXIO_D15#
-
IOMUXC_PIO4_15_MEDIA_CSI_DATA08#
-
IOMUXC_PIO4_15_HSP_LPSPI2_SCK#
-
IOMUXC_PIO4_15_MEDIA_DCIF_DATA15#
-
IOMUXC_PIO4_15_MEDIA_DCIF_DBI_AB_DATA15#
-
IOMUXC_PIO4_15_HSP_eFlexPWM3_PWM_A3#
-
IOMUXC_PIO4_15_HSP_XBAR1_INOUT15#
-
IOMUXC_PIO4_16_HSP_GPIO2_GPIO16#
-
IOMUXC_PIO4_16_COMM_ENET_QOS_TX_DATA1#
-
IOMUXC_PIO4_16_HSP_FLEXIO2_FXIO_D16#
-
IOMUXC_PIO4_16_MEDIA_CSI_DATA07#
-
IOMUXC_PIO4_16_HSP_LPSPI2_SOUT#
-
IOMUXC_PIO4_16_MEDIA_DCIF_DATA16#
-
IOMUXC_PIO4_16_MEDIA_DCIF_DBI_CSX_AB#
-
IOMUXC_PIO4_16_HSP_eFlexPWM3_PWM_B3#
-
IOMUXC_PIO4_16_HSP_XBAR1_INOUT16#
-
IOMUXC_PIO4_17_HSP_GPIO2_GPIO17#
-
IOMUXC_PIO4_17_COMM_ENET_QOS_TX_EN#
-
IOMUXC_PIO4_17_HSP_FLEXIO2_FXIO_D17#
-
IOMUXC_PIO4_17_AUDIO_SAI2_RX_DATA1#
-
IOMUXC_PIO4_17_MEDIA_CSI_DATA06#
-
IOMUXC_PIO4_17_HSP_LPSPI2_SIN#
-
IOMUXC_PIO4_17_MEDIA_DCIF_DATA17#
-
IOMUXC_PIO4_17_MEDIA_DCIF_DBI_AB_DCS#
-
IOMUXC_PIO4_17_HSP_eFlexPWM3_PWM_X0#
-
IOMUXC_PIO4_17_HSP_FlexCAN2_CAN_TX#
-
IOMUXC_PIO4_17_HSP_XBAR1_INOUT17#
-
IOMUXC_PIO4_18_HSP_GPIO2_GPIO18#
-
IOMUXC_PIO4_18_COMM_ENET_QOS_RX_DATA0#
-
IOMUXC_PIO4_18_HSP_FLEXIO2_FXIO_D18#
-
IOMUXC_PIO4_18_AUDIO_SAI2_TX_DATA1#
-
IOMUXC_PIO4_18_MEDIA_CSI_DATA05#
-
IOMUXC_PIO4_18_HSP_LPSPI2_PCS1#
-
IOMUXC_PIO4_18_MEDIA_DCIF_DATA18#
-
IOMUXC_PIO4_18_MEDIA_DCIF_DBI_A_RWX_OR_B_WRX#
-
IOMUXC_PIO4_18_HSP_eFlexPWM3_PWM_X1#
-
IOMUXC_PIO4_18_HSP_FlexCAN2_CAN_RX#
-
IOMUXC_PIO4_18_WAKE_EWM_OUT_B#
-
IOMUXC_PIO4_18_HSP_XBAR1_INOUT18#
-
IOMUXC_PIO4_19_HSP_GPIO2_GPIO19#
-
IOMUXC_PIO4_19_COMM_ENET_QOS_RX_DATA1#
-
IOMUXC_PIO4_19_HSP_FLEXIO2_FXIO_D19#
-
IOMUXC_PIO4_19_AUDIO_SAI2_MCLK#
-
IOMUXC_PIO4_19_MEDIA_CSI_DATA04#
-
IOMUXC_PIO4_19_MEDIA_DCIF_DATA19#
-
IOMUXC_PIO4_19_MEDIA_DCIF_DBI_B_RDX#
-
IOMUXC_PIO4_19_HSP_eFlexPWM3_PWM_X2#
-
IOMUXC_PIO4_19_MEDIA_DCIF_DBI_A_E#
-
IOMUXC_PIO4_19_HSP_SINC1_MBIT0#
-
IOMUXC_PIO4_19_HSP_XBAR1_INOUT19#
-
IOMUXC_PIO4_20_HSP_GPIO2_GPIO20#
-
IOMUXC_PIO4_20_COMM_ENET_QOS_MDIO#
-
IOMUXC_PIO4_20_HSP_FLEXIO2_FXIO_D20#
-
IOMUXC_PIO4_20_AUDIO_SAI2_RX_DATA0#
-
IOMUXC_PIO4_20_MEDIA_CSI_DATA03#
-
IOMUXC_PIO4_20_COMM_USB1_VBUS_GPIO#
-
IOMUXC_PIO4_20_MEDIA_DCIF_DATA20#
-
IOMUXC_PIO4_20_HSP_eFlexPWM3_PWM_X3#
-
IOMUXC_PIO4_20_HSP_LPUART4_RTS_B#
-
IOMUXC_PIO4_20_HSP_SINC1_MBIT1#
-
IOMUXC_PIO4_20_HSP_XBAR1_INOUT20#
-
IOMUXC_PIO4_21_HSP_GPIO2_GPIO21#
-
IOMUXC_PIO4_21_COMM_ENET_QOS_MDC#
-
IOMUXC_PIO4_21_HSP_FLEXIO2_FXIO_D21#
-
IOMUXC_PIO4_21_AUDIO_SAI2_TX_DATA0#
-
IOMUXC_PIO4_21_MEDIA_CSI_DATA02#
-
IOMUXC_PIO4_21_AUDIO_SPDIF_IN#
-
IOMUXC_PIO4_21_MEDIA_DCIF_DATA21#
-
IOMUXC_PIO4_21_COMM_TENBASET_PHY0_TX#
-
IOMUXC_PIO4_21_HSP_eFlexPWM2_PWM_X0#
-
IOMUXC_PIO4_21_HSP_LPUART4_CTS_B#
-
IOMUXC_PIO4_21_HSP_SINC1_MBIT2#
-
IOMUXC_PIO4_21_HSP_XBAR1_INOUT21#
-
IOMUXC_PIO4_22_HSP_GPIO2_GPIO22#
-
IOMUXC_PIO4_22_COMM_ENET_QOS_TX_DATA2#
-
IOMUXC_PIO4_22_HSP_FLEXIO2_FXIO_D22#
-
IOMUXC_PIO4_22_AUDIO_SAI2_TX_BCLK#
-
IOMUXC_PIO4_22_MEDIA_CSI_DATA01#
-
IOMUXC_PIO4_22_AUDIO_SPDIF_OUT#
-
IOMUXC_PIO4_22_MEDIA_DCIF_DATA22#
-
IOMUXC_PIO4_22_COMM_TENBASET_PHY0_ED#
-
IOMUXC_PIO4_22_HSP_eFlexPWM2_PWM_X1#
-
IOMUXC_PIO4_22_HSP_LPUART4_RXD#
-
IOMUXC_PIO4_22_HSP_SINC1_MBIT3#
-
IOMUXC_PIO4_22_HSP_XBAR1_INOUT22#
-
IOMUXC_PIO4_22_COMM_ENET_RX_ER#
-
IOMUXC_PIO4_23_HSP_GPIO2_GPIO23#
-
IOMUXC_PIO4_23_COMM_ENET_QOS_TX_DATA3#
-
IOMUXC_PIO4_23_HSP_FLEXIO2_FXIO_D23#
-
IOMUXC_PIO4_23_AUDIO_SAI2_TX_SYNC#
-
IOMUXC_PIO4_23_MEDIA_CSI_DATA00#
-
IOMUXC_PIO4_23_HSP_SINC1_MCLK_OUT0#
-
IOMUXC_PIO4_23_MEDIA_DCIF_DATA23#
-
IOMUXC_PIO4_23_COMM_TENBASET_PHY0_RX#
-
IOMUXC_PIO4_23_HSP_eFlexPWM2_PWM_X2#
-
IOMUXC_PIO4_23_HSP_LPUART4_TXD#
-
IOMUXC_PIO4_23_HSP_SINC1_MCLK0#
-
IOMUXC_PIO4_23_HSP_XBAR1_INOUT23#
-
IOMUXC_PIO4_23_COMM_ENET_TX_ER#
-
IOMUXC_PIO4_24_HSP_GPIO2_GPIO24#
-
IOMUXC_PIO4_24_COMM_ENET_QOS_RX_CLK#
-
IOMUXC_PIO4_24_HSP_FLEXIO2_FXIO_D24#
-
IOMUXC_PIO4_24_AUDIO_SAI2_RX_SYNC#
-
IOMUXC_PIO4_24_MEDIA_CSI_MCLK#
-
IOMUXC_PIO4_24_HSP_SINC1_MCLK_OUT1#
-
IOMUXC_PIO4_24_MEDIA_DCIF_PIXEL_CLK#
-
IOMUXC_PIO4_24_HSP_eFlexPWM2_PWM_X3#
-
IOMUXC_PIO4_24_HSP_LPUART5_CTS_B#
-
IOMUXC_PIO4_24_HSP_SINC1_MCLK1#
-
IOMUXC_PIO4_24_HSP_XBAR1_INOUT24#
-
IOMUXC_PIO4_25_HSP_GPIO2_GPIO25#
-
IOMUXC_PIO4_25_COMM_ENET_QOS_RX_DATA2#
-
IOMUXC_PIO4_25_HSP_FLEXIO2_FXIO_D25#
-
IOMUXC_PIO4_25_AUDIO_SAI2_RX_BCLK#
-
IOMUXC_PIO4_25_MEDIA_CSI_HSYNC#
-
IOMUXC_PIO4_25_HSP_SINC1_MCLK_OUT2#
-
IOMUXC_PIO4_25_MEDIA_DCIF_HSYNC#
-
IOMUXC_PIO4_25_COMM_TENBASET_PHY0_TX#
-
IOMUXC_PIO4_25_HSP_LPUART5_RTS_B#
-
IOMUXC_PIO4_25_HSP_SINC1_MCLK2#
-
IOMUXC_PIO4_25_HSP_XBAR1_INOUT25#
-
IOMUXC_PIO4_25_COMM_ENET_CRS#
-
IOMUXC_PIO4_26_HSP_GPIO2_GPIO26#
-
IOMUXC_PIO4_26_COMM_ENET_QOS_RX_DATA3#
-
IOMUXC_PIO4_26_HSP_FLEXIO2_FXIO_D26#
-
IOMUXC_PIO4_26_MAIN_XSPI0_ECS#
-
IOMUXC_PIO4_26_MEDIA_CSI_VSYNC#
-
IOMUXC_PIO4_26_AUDIO_MQS_MQS_LEFT#
-
IOMUXC_PIO4_26_MEDIA_DCIF_VSYNC#
-
IOMUXC_PIO4_26_COMM_TENBASET_PHY0_ED#
-
IOMUXC_PIO4_26_HSP_LPUART5_TXD#
-
IOMUXC_PIO4_26_HSP_SINC1_MCLK3#
-
IOMUXC_PIO4_26_HSP_XBAR1_INOUT26#
-
IOMUXC_PIO4_26_COMM_ENET_COL#
-
IOMUXC_PIO4_27_HSP_GPIO2_GPIO27#
-
IOMUXC_PIO4_27_COMM_ENET_QOS_RXEN#
-
IOMUXC_PIO4_27_HSP_FLEXIO2_FXIO_D27#
-
IOMUXC_PIO4_27_MAIN_TRACE_SWO#
-
IOMUXC_PIO4_27_MEDIA_CSI_PIXCLK#
-
IOMUXC_PIO4_27_AUDIO_MQS_MQS_RIGHT#
-
IOMUXC_PIO4_27_MEDIA_DCIF_DE#
-
IOMUXC_PIO4_27_COMM_TENBASET_PHY0_RX#
-
IOMUXC_PIO4_27_HSP_LPUART5_RXD#
-
IOMUXC_PIO4_27_HSP_SINC1_BREAK#
-
IOMUXC_PIO4_27_HSP_XBAR1_INOUT27#
-
IOMUXC_PIO5_0_HSP_GPIO3_GPIO0#
-
IOMUXC_PIO5_0_MAIN_XSPI1_SS0_N#
-
IOMUXC_PIO5_0_COMM_ENET_REF_CLK#
-
IOMUXC_PIO5_0_COMM_ENET_TX_CLK_IO#
-
IOMUXC_PIO5_0_MAIN_AHB_SRAMC_SRAMC_CS0#
-
IOMUXC_PIO5_0_HSP_eFlexPWM3_PWM_A0#
-
IOMUXC_PIO5_0_HSP_LPSPI2_PCS0#
-
IOMUXC_PIO5_1_HSP_GPIO3_GPIO1#
-
IOMUXC_PIO5_1_MAIN_XSPI1_DATA0#
-
IOMUXC_PIO5_1_COMM_ENET_TXD0#
-
IOMUXC_PIO5_1_MAIN_AHB_SRAMC_SRAMC_DA00#
-
IOMUXC_PIO5_1_HSP_eFlexPWM3_PWM_B0#
-
IOMUXC_PIO5_1_HSP_LPSPI2_SOUT#
-
IOMUXC_PIO5_2_HSP_GPIO3_GPIO2#
-
IOMUXC_PIO5_2_MAIN_XSPI1_DATA1#
-
IOMUXC_PIO5_2_COMM_ENET_TXD1#
-
IOMUXC_PIO5_2_MAIN_AHB_SRAMC_SRAMC_DA01#
-
IOMUXC_PIO5_2_HSP_eFlexPWM3_PWM_A1#
-
IOMUXC_PIO5_2_HSP_LPSPI2_SIN#
-
IOMUXC_PIO5_3_HSP_GPIO3_GPIO3#
-
IOMUXC_PIO5_3_MAIN_XSPI1_DATA2#
-
IOMUXC_PIO5_3_COMM_ENET_TX_EN#
-
IOMUXC_PIO5_3_MAIN_AHB_SRAMC_SRAMC_DA02#
-
IOMUXC_PIO5_3_HSP_eFlexPWM3_PWM_B1#
-
IOMUXC_PIO5_3_HSP_LPSPI2_PCS2#
-
IOMUXC_PIO5_4_HSP_GPIO3_GPIO4#
-
IOMUXC_PIO5_4_MAIN_XSPI1_DATA3#
-
IOMUXC_PIO5_4_COMM_ENET_RXD0#
-
IOMUXC_PIO5_4_MAIN_AHB_SRAMC_SRAMC_DA03#
-
IOMUXC_PIO5_4_HSP_eFlexPWM3_PWM_A2#
-
IOMUXC_PIO5_4_HSP_LPSPI2_PCS3#
-
IOMUXC_PIO5_5_HSP_GPIO3_GPIO5#
-
IOMUXC_PIO5_5_MAIN_XSPI1_SCLK0#
-
IOMUXC_PIO5_5_COMM_ENET_RXD1#
-
IOMUXC_PIO5_5_MAIN_AHB_SRAMC_SRAMC_DA04#
-
IOMUXC_PIO5_5_HSP_eFlexPWM3_PWM_B2#
-
IOMUXC_PIO5_5_HSP_LPSPI2_SCK#
-
IOMUXC_PIO5_6_HSP_GPIO3_GPIO6#
-
IOMUXC_PIO5_6_MAIN_XSPI1_DATA4#
-
IOMUXC_PIO5_6_COMM_ENET_CRS#
-
IOMUXC_PIO5_6_MAIN_AHB_SRAMC_SRAMC_DA05#
-
IOMUXC_PIO5_6_HSP_eFlexPWM3_PWM_A3#
-
IOMUXC_PIO5_6_HSP_LPSPI2_PCS1#
-
IOMUXC_PIO5_7_HSP_GPIO3_GPIO7#
-
IOMUXC_PIO5_7_MAIN_XSPI1_DATA5#
-
IOMUXC_PIO5_7_COMM_ENET_RX_ER#
-
IOMUXC_PIO5_7_MAIN_AHB_SRAMC_SRAMC_DA06#
-
IOMUXC_PIO5_7_HSP_eFlexPWM3_PWM_B3#
-
IOMUXC_PIO5_7_HSP_LPSPI3_SIN#
-
IOMUXC_PIO5_8_HSP_GPIO3_GPIO8#
-
IOMUXC_PIO5_8_MAIN_XSPI1_DATA6#
-
IOMUXC_PIO5_8_COMM_ENET_MDIO#
-
IOMUXC_PIO5_8_MAIN_AHB_SRAMC_SRAMC_DA07#
-
IOMUXC_PIO5_8_HSP_LPSPI3_SOUT#
-
IOMUXC_PIO5_9_HSP_GPIO3_GPIO9#
-
IOMUXC_PIO5_9_MAIN_XSPI1_DATA7#
-
IOMUXC_PIO5_9_COMM_ENET_MDC#
-
IOMUXC_PIO5_9_MAIN_AHB_SRAMC_SRAMC_DA08#
-
IOMUXC_PIO5_9_HSP_LPSPI3_SCK#
-
IOMUXC_PIO5_10_HSP_GPIO3_GPIO10#
-
IOMUXC_PIO5_10_MAIN_XSPI1_DQS0#
-
IOMUXC_PIO5_10_COMM_FlexSPI_FLR_XSPI_FLR_CS#
-
IOMUXC_PIO5_10_MAIN_AHB_SRAMC_SRAMC_DA09#
-
IOMUXC_PIO5_10_HSP_LPSPI3_PCS0#
-
IOMUXC_PIO5_11_HSP_GPIO3_GPIO11#
-
IOMUXC_PIO5_11_MAIN_XSPI1_SCLK0_N#
-
IOMUXC_PIO5_11_MAIN_XSPI1_SS1_N#
-
IOMUXC_PIO5_11_COMM_FlexSPI_FLR_XSPI_FLR_CLK#
-
IOMUXC_PIO5_11_COMM_ENET_TXD2#
-
IOMUXC_PIO5_11_MAIN_AHB_SRAMC_SRAMC_DA10#
-
IOMUXC_PIO5_11_HSP_LPSPI3_PCS1#
-
IOMUXC_PIO5_12_HSP_GPIO3_GPIO12#
-
IOMUXC_PIO5_12_MAIN_XSPI1_DATA8#
-
IOMUXC_PIO5_12_COMM_FlexSPI_FLR_XSPI_FLR_DATA0#
-
IOMUXC_PIO5_12_COMM_ENET_TXD3#
-
IOMUXC_PIO5_12_MAIN_AHB_SRAMC_SRAMC_DA11#
-
IOMUXC_PIO5_12_HSP_SINC0_MCLK_OUT0#
-
IOMUXC_PIO5_12_HSP_SINC0_MCLK0#
-
IOMUXC_PIO5_12_HSP_LPSPI3_PCS2#
-
IOMUXC_PIO5_12_HSP_FLEXIO0_FXIO_D28#
-
IOMUXC_PIO5_13_HSP_GPIO3_GPIO13#
-
IOMUXC_PIO5_13_MAIN_XSPI1_DATA9#
-
IOMUXC_PIO5_13_COMM_FlexSPI_FLR_XSPI_FLR_DATA1#
-
IOMUXC_PIO5_13_MAIN_AHB_SRAMC_SRAMC_DA12#
-
IOMUXC_PIO5_13_HSP_SINC0_MCLK_OUT1#
-
IOMUXC_PIO5_13_HSP_SINC0_MCLK1#
-
IOMUXC_PIO5_13_HSP_LPSPI3_PCS3#
-
IOMUXC_PIO5_13_HSP_FLEXIO0_FXIO_D29#
-
IOMUXC_PIO5_14_HSP_GPIO3_GPIO14#
-
IOMUXC_PIO5_14_MAIN_XSPI1_DATA10#
-
IOMUXC_PIO5_14_COMM_FlexSPI_FLR_XSPI_FLR_DATA2#
-
IOMUXC_PIO5_14_COMM_ENET_RX_CLK#
-
IOMUXC_PIO5_14_MAIN_AHB_SRAMC_SRAMC_DA13#
-
IOMUXC_PIO5_14_HSP_SINC0_MCLK_OUT2#
-
IOMUXC_PIO5_14_HSP_SINC0_MCLK2#
-
IOMUXC_PIO5_14_HSP_LPSPI4_SIN#
-
IOMUXC_PIO5_14_HSP_FLEXIO0_FXIO_D30#
-
IOMUXC_PIO5_15_HSP_GPIO3_GPIO15#
-
IOMUXC_PIO5_15_MAIN_XSPI1_DATA11#
-
IOMUXC_PIO5_15_COMM_uSDHC1_CLK#
-
IOMUXC_PIO5_15_COMM_FlexSPI_FLR_XSPI_FLR_DATA3#
-
IOMUXC_PIO5_15_COMM_ENET_RXD2#
-
IOMUXC_PIO5_15_MAIN_AHB_SRAMC_SRAMC_DA14#
-
IOMUXC_PIO5_15_HSP_SINC0_MCLK3#
-
IOMUXC_PIO5_15_HSP_LPSPI4_SOUT#
-
IOMUXC_PIO5_15_HSP_FLEXIO0_FXIO_D31#
-
IOMUXC_PIO5_16_HSP_GPIO3_GPIO16#
-
IOMUXC_PIO5_16_MAIN_XSPI1_DQS1#
-
IOMUXC_PIO5_16_COMM_uSDHC1_CMD#
-
IOMUXC_PIO5_16_COMM_FlexSPI_FLR_XSPI_FLR_DQS#
-
IOMUXC_PIO5_16_COMM_ENET_RXD3#
-
IOMUXC_PIO5_16_MAIN_AHB_SRAMC_SRAMC_DA15#
-
IOMUXC_PIO5_16_HSP_SINC0_MBIT0#
-
IOMUXC_PIO5_16_HSP_LPSPI4_SCK#
-
IOMUXC_PIO5_17_HSP_GPIO3_GPIO17#
-
IOMUXC_PIO5_17_MAIN_XSPI1_DATA12#
-
IOMUXC_PIO5_17_COMM_uSDHC1_DAT0#
-
IOMUXC_PIO5_17_COMM_FlexSPI_FLR_XSPI_FLR_DATA4#
-
IOMUXC_PIO5_17_COMM_ENET_RX_EN#
-
IOMUXC_PIO5_17_MAIN_AHB_SRAMC_SRAMC_WEB#
-
IOMUXC_PIO5_17_HSP_SINC0_MBIT1#
-
IOMUXC_PIO5_17_HSP_LPSPI4_PCS0#
-
IOMUXC_PIO5_17_HSP_FLEXIO2_FXIO_D28#
-
IOMUXC_PIO5_18_HSP_GPIO3_GPIO18#
-
IOMUXC_PIO5_18_MAIN_XSPI1_DATA13#
-
IOMUXC_PIO5_18_COMM_uSDHC1_DAT1#
-
IOMUXC_PIO5_18_COMM_FlexSPI_FLR_XSPI_FLR_DATA5#
-
IOMUXC_PIO5_18_COMM_ENET_TX_ER#
-
IOMUXC_PIO5_18_MAIN_AHB_SRAMC_SRAMC_OEB#
-
IOMUXC_PIO5_18_HSP_SINC0_MBIT2#
-
IOMUXC_PIO5_18_HSP_LPSPI4_PCS1#
-
IOMUXC_PIO5_18_HSP_FLEXIO2_FXIO_D29#
-
IOMUXC_PIO5_19_HSP_GPIO3_GPIO19#
-
IOMUXC_PIO5_19_MAIN_XSPI1_DATA14#
-
IOMUXC_PIO5_19_COMM_uSDHC1_DAT2#
-
IOMUXC_PIO5_19_COMM_FlexSPI_FLR_XSPI_FLR_DATA6#
-
IOMUXC_PIO5_19_COMM_ENET_COL#
-
IOMUXC_PIO5_19_MAIN_AHB_SRAMC_SRAMC_ADVB#
-
IOMUXC_PIO5_19_HSP_SINC0_MBIT3#
-
IOMUXC_PIO5_19_HSP_LPSPI4_PCS2#
-
IOMUXC_PIO5_19_HSP_FLEXIO2_FXIO_D30#
-
IOMUXC_PIO5_20_HSP_GPIO3_GPIO20#
-
IOMUXC_PIO5_20_MAIN_XSPI1_DATA15#
-
IOMUXC_PIO5_20_COMM_uSDHC1_DAT3#
-
IOMUXC_PIO5_20_COMM_FlexSPI_FLR_XSPI_FLR_DATA7#
-
IOMUXC_PIO5_20_MAIN_AHB_SRAMC_SRAMC_WP0#
-
IOMUXC_PIO5_20_HSP_SINC0_BREAK#
-
IOMUXC_PIO5_20_HSP_LPSPI4_PCS3#
-
IOMUXC_PIO5_20_HSP_FLEXIO2_FXIO_D31#
-
IOMUXC_PIO6_0_HSP_GPIO4_GPIO0#
-
IOMUXC_PIO6_0_MAIN_XSPI0_SCLK0#
-
IOMUXC_PIO6_0_HSP_LPSPI3_SCK#
-
IOMUXC_PIO6_1_HSP_GPIO4_GPIO1#
-
IOMUXC_PIO6_1_MAIN_XSPI0_SS0_N#
-
IOMUXC_PIO6_1_HSP_LPSPI3_PCS0#
-
IOMUXC_PIO6_2_HSP_GPIO4_GPIO2#
-
IOMUXC_PIO6_2_MAIN_XSPI0_DATA0#
-
IOMUXC_PIO6_2_HSP_LPSPI3_SOUT#
-
IOMUXC_PIO6_3_HSP_GPIO4_GPIO3#
-
IOMUXC_PIO6_3_MAIN_XSPI0_DATA1#
-
IOMUXC_PIO6_3_HSP_LPSPI3_SIN#
-
IOMUXC_PIO6_4_HSP_GPIO4_GPIO4#
-
IOMUXC_PIO6_4_MAIN_XSPI0_DATA2#
-
IOMUXC_PIO6_4_HSP_LPSPI3_PCS2#
-
IOMUXC_PIO6_5_HSP_GPIO4_GPIO5#
-
IOMUXC_PIO6_5_MAIN_XSPI0_DATA3#
-
IOMUXC_PIO6_5_HSP_LPSPI3_PCS3#
-
IOMUXC_PIO6_6_HSP_GPIO4_GPIO6#
-
IOMUXC_PIO6_6_MAIN_XSPI0_DQS0#
-
IOMUXC_PIO6_6_HSP_LPSPI4_PCS3#
-
IOMUXC_PIO6_7_HSP_GPIO4_GPIO7#
-
IOMUXC_PIO6_7_MAIN_XSPI0_DATA4#
-
IOMUXC_PIO6_7_COMM_uSDHC0_RESET_B#
-
IOMUXC_PIO6_7_HSP_eFlexPWM2_PWM_A0#
-
IOMUXC_PIO6_7_HSP_LPSPI4_SOUT#
-
IOMUXC_PIO6_7_HSP_LPUART3_TXD#
-
IOMUXC_PIO6_8_HSP_GPIO4_GPIO8#
-
IOMUXC_PIO6_8_MAIN_XSPI0_DATA5#
-
IOMUXC_PIO6_8_COMM_uSDHC0_CD_B#
-
IOMUXC_PIO6_8_HSP_eFlexPWM2_PWM_B0#
-
IOMUXC_PIO6_8_HSP_LPSPI4_SIN#
-
IOMUXC_PIO6_8_HSP_LPUART3_RXD#
-
IOMUXC_PIO6_9_HSP_GPIO4_GPIO9#
-
IOMUXC_PIO6_9_MAIN_XSPI0_DATA6#
-
IOMUXC_PIO6_9_COMM_uSDHC0_WP#
-
IOMUXC_PIO6_9_HSP_eFlexPWM2_PWM_A1#
-
IOMUXC_PIO6_9_HSP_LPSPI4_PCS2#
-
IOMUXC_PIO6_9_HSP_LPUART4_TXD#
-
IOMUXC_PIO6_10_HSP_GPIO4_GPIO10#
-
IOMUXC_PIO6_10_MAIN_XSPI0_DATA7#
-
IOMUXC_PIO6_10_HSP_eFlexPWM2_PWM_B1#
-
IOMUXC_PIO6_10_HSP_LPSPI4_PCS3#
-
IOMUXC_PIO6_10_HSP_LPUART4_RXD#
-
IOMUXC_PIO6_11_HSP_GPIO4_GPIO11#
-
IOMUXC_PIO6_11_MAIN_XSPI0_SS1_N#
-
IOMUXC_PIO6_11_COMM_uSDHC0_VSELECT#
-
IOMUXC_PIO6_11_HSP_eFlexPWM2_PWM_A2#
-
IOMUXC_PIO6_11_HSP_LPSPI4_PCS0#
-
IOMUXC_PIO6_11_HSP_LPUART5_TXD#
-
IOMUXC_PIO6_12_HSP_GPIO4_GPIO12#
-
IOMUXC_PIO6_12_MAIN_XSPI0_SCLK0_N#
-
IOMUXC_PIO6_12_HSP_eFlexPWM2_PWM_B2#
-
IOMUXC_PIO6_12_HSP_LPSPI4_SCK#
-
IOMUXC_PIO6_12_HSP_LPUART5_RXD#
-
IOMUXC_PIO7_0_HSP_GPIO4_GPIO13#
-
IOMUXC_PIO7_0_COMM_uSDHC0_DAT4#
-
IOMUXC_PIO7_0_COMM_FlexSPI_FLR_XSPI_FLR_DATA0#
-
IOMUXC_PIO7_0_COMM_uSDHC1_DAT0#
-
IOMUXC_PIO7_0_HSP_FLEXIO0_FXIO_D28#
-
IOMUXC_PIO7_0_HSP_eFlexPWM3_PWM_A0#
-
IOMUXC_PIO7_0_HSP_LPSPI1_SIN#
-
IOMUXC_PIO7_1_HSP_GPIO4_GPIO14#
-
IOMUXC_PIO7_1_COMM_uSDHC0_DAT5#
-
IOMUXC_PIO7_1_COMM_FlexSPI_FLR_XSPI_FLR_DATA1#
-
IOMUXC_PIO7_1_COMM_uSDHC1_DAT1#
-
IOMUXC_PIO7_1_HSP_FLEXIO0_FXIO_D29#
-
IOMUXC_PIO7_1_HSP_eFlexPWM3_PWM_B0#
-
IOMUXC_PIO7_1_HSP_LPSPI1_PCS2#
-
IOMUXC_PIO7_1_HSP_LPUART3_TXD#
-
IOMUXC_PIO7_2_HSP_GPIO4_GPIO15#
-
IOMUXC_PIO7_2_COMM_uSDHC0_DAT6#
-
IOMUXC_PIO7_2_COMM_FlexSPI_FLR_XSPI_FLR_DATA2#
-
IOMUXC_PIO7_2_COMM_uSDHC1_DAT2#
-
IOMUXC_PIO7_2_HSP_FLEXIO0_FXIO_D30#
-
IOMUXC_PIO7_2_HSP_eFlexPWM3_PWM_A1#
-
IOMUXC_PIO7_2_HSP_LPSPI1_PCS1#
-
IOMUXC_PIO7_2_HSP_LPUART3_RXD#
-
IOMUXC_PIO7_3_HSP_GPIO4_GPIO16#
-
IOMUXC_PIO7_3_COMM_uSDHC0_DAT7#
-
IOMUXC_PIO7_3_COMM_FlexSPI_FLR_XSPI_FLR_DATA3#
-
IOMUXC_PIO7_3_COMM_uSDHC1_DAT3#
-
IOMUXC_PIO7_3_HSP_FLEXIO0_FXIO_D31#
-
IOMUXC_PIO7_3_HSP_eFlexPWM3_PWM_B1#
-
IOMUXC_PIO7_3_HSP_LPSPI1_PCS0#
-
IOMUXC_PIO7_3_HSP_LPUART3_CTS_B#
-
IOMUXC_PIO7_4_HSP_GPIO4_GPIO17#
-
IOMUXC_PIO7_4_COMM_uSDHC0_DS#
-
IOMUXC_PIO7_4_COMM_FlexSPI_FLR_XSPI_FLR_DQS#
-
IOMUXC_PIO7_4_COMM_uSDHC1_CMD#
-
IOMUXC_PIO7_4_HSP_eFlexPWM3_PWM_A2#
-
IOMUXC_PIO7_4_HSP_LPSPI1_SOUT#
-
IOMUXC_PIO7_4_HSP_LPUART3_RTS_B#
-
IOMUXC_PIO7_5_HSP_GPIO4_GPIO18#
-
IOMUXC_PIO7_5_COMM_FlexSPI_FLR_XSPI_FLR_CLK#
-
IOMUXC_PIO7_5_COMM_uSDHC1_CLK#
-
IOMUXC_PIO7_5_HSP_eFlexPWM3_PWM_B2#
-
IOMUXC_PIO7_5_HSP_LPSPI1_SCK#
-
IOMUXC_PIO7_6_HSP_GPIO4_GPIO19#
-
IOMUXC_PIO7_6_COMM_uSDHC0_CMD#
-
IOMUXC_PIO7_6_COMM_FlexSPI_FLR_XSPI_FLR_CS#
-
IOMUXC_PIO7_6_HSP_eFlexPWM0_PWM_A0#
-
IOMUXC_PIO7_6_HSP_LPSPI2_SOUT#
-
IOMUXC_PIO7_7_HSP_GPIO4_GPIO20#
-
IOMUXC_PIO7_7_COMM_uSDHC0_CLK#
-
IOMUXC_PIO7_7_HSP_eFlexPWM0_PWM_B0#
-
IOMUXC_PIO7_7_HSP_LPSPI2_SCK#
-
IOMUXC_PIO7_8_HSP_GPIO4_GPIO21#
-
IOMUXC_PIO7_8_COMM_uSDHC0_DAT0#
-
IOMUXC_PIO7_8_COMM_FlexSPI_FLR_XSPI_FLR_DATA4#
-
IOMUXC_PIO7_8_HSP_FLEXIO2_FXIO_D28#
-
IOMUXC_PIO7_8_HSP_eFlexPWM0_PWM_A1#
-
IOMUXC_PIO7_8_HSP_LPSPI2_SIN#
-
IOMUXC_PIO7_8_HSP_LPUART4_RTS_B#
-
IOMUXC_PIO7_9_HSP_GPIO4_GPIO22#
-
IOMUXC_PIO7_9_COMM_uSDHC0_DAT1#
-
IOMUXC_PIO7_9_COMM_FlexSPI_FLR_XSPI_FLR_DATA5#
-
IOMUXC_PIO7_9_HSP_FLEXIO2_FXIO_D29#
-
IOMUXC_PIO7_9_HSP_eFlexPWM0_PWM_B1#
-
IOMUXC_PIO7_9_HSP_LPSPI2_PCS0#
-
IOMUXC_PIO7_9_HSP_LPUART4_CTS_B#
-
IOMUXC_PIO7_10_HSP_GPIO4_GPIO23#
-
IOMUXC_PIO7_10_COMM_uSDHC0_DAT2#
-
IOMUXC_PIO7_10_COMM_FlexSPI_FLR_XSPI_FLR_DATA6#
-
IOMUXC_PIO7_10_HSP_FLEXIO2_FXIO_D30#
-
IOMUXC_PIO7_10_HSP_eFlexPWM0_PWM_A2#
-
IOMUXC_PIO7_10_HSP_LPSPI2_PCS1#
-
IOMUXC_PIO7_10_HSP_LPUART4_TXD#
-
IOMUXC_PIO7_11_HSP_GPIO4_GPIO24#
-
IOMUXC_PIO7_11_COMM_uSDHC0_DAT3#
-
IOMUXC_PIO7_11_COMM_FlexSPI_FLR_XSPI_FLR_DATA7#
-
IOMUXC_PIO7_11_HSP_FLEXIO2_FXIO_D31#
-
IOMUXC_PIO7_11_HSP_eFlexPWM0_PWM_B2#
-
IOMUXC_PIO7_11_HSP_LPSPI2_PCS2#
-
IOMUXC_PIO7_11_HSP_LPUART4_RXD#
-
IOMUXC_PIO1_0_WAKE_GPIO0_GPIO0#
-
IOMUXC_PIO1_0_WAKE_CMP3_OUT#
-
IOMUXC_PIO1_0_WAKE_LPI2C0_SDA#
-
IOMUXC_PIO1_0_WAKE_LPSPI0_SIN#
-
IOMUXC_PIO1_0_WAKE_LPUART1_CTS_B#
-
IOMUXC_PIO1_0_WAKE_LPTMR0_ALT0#
-
IOMUXC_PIO1_0_WAKE_QTPM0_CH0#
-
IOMUXC_PIO1_1_WAKE_GPIO0_GPIO1#
-
IOMUXC_PIO1_1_WAKE_CMP2_OUT#
-
IOMUXC_PIO1_1_WAKE_LPI2C0_SCL#
-
IOMUXC_PIO1_1_WAKE_LPSPI0_PCS0#
-
IOMUXC_PIO1_1_WAKE_LPUART1_RTS_B#
-
IOMUXC_PIO1_1_WAKE_LPTMR0_ALT1#
-
IOMUXC_PIO1_1_WAKE_QTPM0_CH1#
-
IOMUXC_PIO1_2_WAKE_GPIO0_GPIO2#
-
IOMUXC_PIO1_2_WAKE_CMP1_OUT#
-
IOMUXC_PIO1_2_WAKE_LPSPI0_SCK#
-
IOMUXC_PIO1_2_WAKE_LPUART1_TXD#
-
IOMUXC_PIO1_2_WAKE_LPTMR0_ALT2#
-
IOMUXC_PIO1_2_WAKE_QTPM0_CH2#
-
IOMUXC_PIO1_3_WAKE_GPIO0_GPIO3#
-
IOMUXC_PIO1_3_WAKE_CMP0_OUT#
-
IOMUXC_PIO1_3_WAKE_EWM_OUT_B#
-
IOMUXC_PIO1_3_WAKE_LPSPI0_SOUT#
-
IOMUXC_PIO1_3_WAKE_XBAR_INOUT0#
-
IOMUXC_PIO1_3_WAKE_LPUART1_RXD#
-
IOMUXC_PIO1_3_WAKE_LPTMR0_ALT3#
-
IOMUXC_PIO1_3_WAKE_QTPM0_CH3#
-
IOMUXC_PIO1_4_WAKE_GPIO0_GPIO4#
-
IOMUXC_PIO1_4_BOOT_MODE0#
-
IOMUXC_PIO1_4_WAKE_LPSPI0_PCS1#
-
IOMUXC_PIO1_4_WAKE_XBAR_INOUT1#
-
IOMUXC_PIO1_4_WAKE_LPUART0_TXD#
-
IOMUXC_PIO1_4_WAKE_FREQME_CLK_OUT#
-
IOMUXC_PIO1_4_WAKE_LPTMR1_ALT0#
-
IOMUXC_PIO1_4_WAKE_QTPM0_CH4#
-
IOMUXC_PIO1_5_WAKE_GPIO0_GPIO5#
-
IOMUXC_PIO1_5_BOOT_MODE1#
-
IOMUXC_PIO1_5_WAKE_XBAR_INOUT2#
-
IOMUXC_PIO1_5_WAKE_LPUART0_RXD#
-
IOMUXC_PIO1_5_VBAT_RTC_CLKOUT#
-
IOMUXC_PIO1_5_WAKE_LPTMR1_ALT1#
-
IOMUXC_PIO1_5_WAKE_QTPM0_CH5#
-
IOMUXC_PIO1_6_WAKE_GPIO0_GPIO6#
-
IOMUXC_PIO1_6_WAKE_LPI2C0_SDA#
-
IOMUXC_PIO1_6_WAKE_XBAR_INOUT3#
-
IOMUXC_PIO1_6_WAKE_LPUART0_CTS_B#
-
IOMUXC_PIO1_6_WAKE_MICFIL_PDM_DATA01#
-
IOMUXC_PIO1_6_WAKE_LPTMR1_ALT2#
-
IOMUXC_PIO1_6_WAKE_QTPM0_CH6#
-
IOMUXC_PIO1_6_JTAGC_TCK#
-
IOMUXC_PIO1_7_WAKE_GPIO0_GPIO7#
-
IOMUXC_PIO1_7_WAKE_LPI2C0_SCL#
-
IOMUXC_PIO1_7_WAKE_XBAR_INOUT4#
-
IOMUXC_PIO1_7_WAKE_LPUART0_RTS_B#
-
IOMUXC_PIO1_7_WAKE_MICFIL_PDM_CLK#
-
IOMUXC_PIO1_7_WAKE_LPTMR1_ALT3#
-
IOMUXC_PIO1_7_WAKE_QTPM0_CH7#
-
IOMUXC_PIO1_7_JTAGC_TMS#
-
IOMUXC_PIO1_8_WAKE_GPIO0_GPIO8#
-
IOMUXC_PIO1_8_WAKE_I3C_SDA#
-
IOMUXC_PIO1_8_WAKE_LPI2C1_SDA#
-
IOMUXC_PIO1_8_WAKE_LPSPI0_PCS2#
-
IOMUXC_PIO1_8_WAKE_XBAR_INOUT5#
-
IOMUXC_PIO1_8_WAKE_MICFIL_PDM_DATA01#
-
IOMUXC_PIO1_8_JTAGC_TDI#
-
IOMUXC_PIO1_9_WAKE_GPIO0_GPIO9#
-
IOMUXC_PIO1_9_WAKE_I3C_SCL#
-
IOMUXC_PIO1_9_WAKE_LPI2C1_SCL#
-
IOMUXC_PIO1_9_WAKE_LPSPI0_PCS3#
-
IOMUXC_PIO1_9_WAKE_XBAR_INOUT6#
-
IOMUXC_PIO1_9_WAKE_MICFIL_PDM_CLK#
-
IOMUXC_PIO1_9_JTAGC_TDO#
-
IOMUXC_PIO1_10_WAKE_GPIO0_GPIO10#
-
IOMUXC_PIO1_10_WAKE_I3C_PUR#
-
IOMUXC_PIO1_10_WAKE_XBAR_INOUT7#
-
IOMUXC_PIO1_10_JTAGC_TRSTN#
-
IOMUXC_PIO0_0_VBAT_GPIO0_GPIO0#
-
IOMUXC_PIO0_0_PMIC_MODE0#
-
IOMUXC_PIO0_1_VBAT_GPIO0_GPIO1#
-
IOMUXC_PIO0_1_PMIC_MODE1#
-
IOMUXC_PIO0_2_VBAT_GPIO0_GPIO2#
-
IOMUXC_PIO0_2_RTC_TAMPER0#
-
IOMUXC_PIO0_3_VBAT_GPIO0_GPIO3#
-
IOMUXC_PIO0_3_RTC_TAMPER1#
-
IOMUXC_PIO0_4_VBAT_GPIO0_GPIO4#
-
IOMUXC_PIO0_4_ON_OFF#
-
IOMUXC_PIO0_5_VBAT_GPIO0_GPIO5#
-
IOMUXC_PIO0_5_PMIC_ON_REQ#
-
IOMUXC_GPR_SAIMCLK_LOWBITMASK#
-
IOMUXC_GPR_SAIMCLK_HIGHBITMASK#
-
static inline void IOMUXC_SetPin_Mux_Config(uint32_t muxRegister, uint32_t muxMode, uint32_t inputRegister, uint32_t inputDaisy, uint32_t configValue)#
Sets the IOMUXC pin mux mode.
This is an example to set the PTA6 as the lpuart0_tx:
IOMUXC_SetPinMux(IOMUXC_PTA6_LPUART0_TX, 0);
This is an example to set the PTA0 as GPIOA0:
IOMUXC_SetPinMux(IOMUXC_PTA0_GPIOA0, 0);
Note
The first five parameters can be filled with the pin function ID macros.
- Parameters:
muxRegister – The pin mux register.
muxMode – The pin mux mode.
inputRegister – The select input register.
inputDaisy – The input daisy.
configRegister – The config register.
inputOnfield – Software input on field.
-
FSL_IOMUXC_DRIVER_VERSION#
IOMUXC driver version 2.0.0.
-
FSL_COMPONENT_ID#
IRTC: IRTC Driver#
-
status_t IRTC_Init(RTC_Type *base, const irtc_config_t *config)#
Ungates the IRTC clock and configures the peripheral for basic operation.
This function initiates a soft-reset of the IRTC module, this has not effect on DST, calendaring, standby time and tamper detect registers.
Note
This API should be called at the beginning of the application using the IRTC driver.
- Parameters:
base – IRTC peripheral base address
config – Pointer to user’s IRTC config structure.
- Returns:
kStatus_Success If the driver is initialized successfully.
- Returns:
kStatus_Fail if we cannot disable register write protection
- Returns:
kStatus_InvalidArgument If the input parameters are wrong.
-
status_t IRTC_Deinit(RTC_Type *base)#
Gate the IRTC clock.
- Parameters:
base – IRTC peripheral base address
- Returns:
kStatus_Success If the driver is initialized successfully.
- Returns:
kStatus_InvalidArgument If the input parameters are wrong.
-
void IRTC_GetDefaultConfig(irtc_config_t *config)#
Fill in the IRTC config struct with the default settings.
The default values are:
config->wakeupSelect = true; config->timerStdMask = false; config->alrmMatch = kRTC_MatchSecMinHr;
- Parameters:
config – Pointer to user’s IRTC config structure.
-
status_t IRTC_SetDatetime(RTC_Type *base, const irtc_datetime_t *datetime)#
Sets the IRTC date and time according to the given time structure.
The IRTC counter is started after the time is set.
- Parameters:
base – IRTC peripheral base address
datetime – Pointer to structure where the date and time details to set are stored
- Returns:
kStatus_Success: success in setting the time and starting the IRTC kStatus_InvalidArgument: failure. An error occurs because the datetime format is incorrect.
-
void IRTC_GetDatetime(RTC_Type *base, irtc_datetime_t *datetime)#
Gets the IRTC time and stores it in the given time structure.
- Parameters:
base – IRTC peripheral base address
datetime – Pointer to structure where the date and time details are stored.
-
status_t IRTC_SetAlarm(RTC_Type *base, const irtc_datetime_t *alarmTime)#
Sets the IRTC alarm time.
Note
weekDay field of alarmTime is not used during alarm match and should be set to 0
- Parameters:
base – RTC peripheral base address
alarmTime – Pointer to structure where the alarm time is stored.
- Returns:
kStatus_Success: success in setting the alarm kStatus_InvalidArgument: error in setting the alarm. Error occurs because the alarm datetime format is incorrect.
-
void IRTC_GetAlarm(RTC_Type *base, irtc_datetime_t *datetime)#
Returns the IRTC alarm time.
- Parameters:
base – RTC peripheral base address
datetime – Pointer to structure where the alarm date and time details are stored.
-
static inline void IRTC_EnableInterrupts(RTC_Type *base, uint32_t mask)#
Enables the selected IRTC interrupts.
- Parameters:
base – IRTC peripheral base address
mask – The interrupts to enable. This is a logical OR of members of the enumeration irtc_interrupt_enable_t
-
static inline void IRTC_DisableInterrupts(RTC_Type *base, uint32_t mask)#
Disables the selected IRTC interrupts.
- Parameters:
base – IRTC peripheral base address
mask – The interrupts to enable. This is a logical OR of members of the enumeration irtc_interrupt_enable_t
-
static inline uint32_t IRTC_GetEnabledInterrupts(RTC_Type *base)#
Gets the enabled IRTC interrupts.
- Parameters:
base – IRTC peripheral base address
- Returns:
The enabled interrupts. This is the logical OR of members of the enumeration irtc_interrupt_enable_t
-
static inline uint32_t IRTC_GetStatusFlags(RTC_Type *base)#
Gets the IRTC status flags.
- Parameters:
base – IRTC peripheral base address
- Returns:
The status flags. This is the logical OR of members of the enumeration irtc_status_flags_t
-
static inline void IRTC_ClearStatusFlags(RTC_Type *base, uint32_t mask)#
Clears the IRTC status flags.
- Parameters:
base – IRTC peripheral base address
mask – The status flags to clear. This is a logical OR of members of the enumeration irtc_status_flags_t
-
void IRTC_SetDaylightTime(RTC_Type *base, const irtc_daylight_time_t *datetime)#
Sets the IRTC daylight savings start and stop date and time.
It also enables the daylight saving bit in the IRTC control register
- Parameters:
base – IRTC peripheral base address
datetime – Pointer to a structure where the date and time details are stored.
-
void IRTC_GetDaylightTime(RTC_Type *base, irtc_daylight_time_t *datetime)#
Gets the IRTC daylight savings time and stores it in the given time structure.
- Parameters:
base – IRTC peripheral base address
datetime – Pointer to a structure where the date and time details are stored.
-
void IRTC_SetCoarseCompensation(RTC_Type *base, uint8_t compensationValue, uint8_t compensationInterval)#
Enables the coarse compensation and sets the value in the IRTC compensation register.
- Parameters:
base – IRTC peripheral base address
compensationValue – Compensation value is a 2’s complement value.
compensationInterval – Compensation interval.
-
void IRTC_SetFineCompensation(RTC_Type *base, uint8_t integralValue, uint8_t fractionValue, bool accumulateFractional)#
Enables the fine compensation and sets the value in the IRTC compensation register.
- Parameters:
base – The IRTC peripheral base address
integralValue – Compensation integral value; twos complement value of the integer part
fractionValue – Compensation fraction value expressed as number of clock cycles of a fixed 4.194304Mhz clock that have to be added.
accumulateFractional – Flag indicating if we want to add to previous fractional part; true: Add to previously accumulated fractional part, false: Start afresh and overwrite current value
-
FSL_IRTC_DRIVER_VERSION#
-
enum _irtc_clock_select#
IRTC clock select.
Values:
-
enumerator kIRTC_Clk16K#
16.384 kHz clock is selected.
-
enumerator kIRTC_Clk32K#
32.768 kHz clock is selected.
-
enumerator kIRTC_Clk16K#
-
enum _irtc_interrupt_enable#
List of IRTC interrupts.
Values:
-
enumerator kIRTC_AlarmInterruptEnable#
Alarm Interrupt Enable
-
enumerator kIRTC_DayInterruptEnable#
Days Interrupt Enable
-
enumerator kIRTC_HourInterruptEnable#
Hours Interrupt Enable
-
enumerator kIRTC_MinInterruptEnable#
Minutes Interrupt Enable
-
enumerator kIRTC_1hzInterruptEnable#
1 Hz interval Interrupt Enable
-
enumerator kIRTC_2hzInterruptEnable#
2 Hz interval Interrupt Enable
-
enumerator kIRTC_4hzInterruptEnable#
4 Hz interval Interrupt Enable
-
enumerator kIRTC_8hzInterruptEnable#
8 Hz interval Interrupt Enable
-
enumerator kIRTC_16hzInterruptEnable#
16 Hz interval Interrupt Enable
-
enumerator kIRTC_32hzInterruptEnable#
32 Hz interval Interrupt Enable
-
enumerator kIRTC_64hzInterruptEnable#
64 Hz interval Interrupt Enable
-
enumerator kIRTC_128hzInterruptEnable#
128 Hz interval Interrupt Enable
-
enumerator kIRTC_256hzInterruptEnable#
256 Hz interval Interrupt Enable
-
enumerator kIRTC_512hzInterruptEnable#
512 Hz interval Interrupt Enable
-
enumerator kIRTC_TamperQueueFullInterruptEnable#
Tamper queue full Interrupt Enable
-
enumerator kIRTC_AlarmInterruptEnable#
-
enum _irtc_status_flags#
List of IRTC flags.
Values:
-
enumerator kIRTC_AlarmFlag#
Alarm Status flag
-
enumerator kIRTC_DayFlag#
Days Status flag
-
enumerator kIRTC_HourFlag#
Hour Status flag
-
enumerator kIRTC_MinFlag#
Minutes Status flag
-
enumerator kIRTC_1hzFlag#
1 Hz interval status flag
-
enumerator kIRTC_2hzFlag#
2 Hz interval status flag
-
enumerator kIRTC_4hzFlag#
4 Hz interval status flag
-
enumerator kIRTC_8hzFlag#
8 Hz interval status flag
-
enumerator kIRTC_16hzFlag#
16 Hz interval status flag
-
enumerator kIRTC_32hzFlag#
32 Hz interval status flag
-
enumerator kIRTC_64hzFlag#
64 Hz interval status flag
-
enumerator kIRTC_128hzFlag#
128 Hz interval status flag
-
enumerator kIRTC_256hzFlag#
256 Hz interval status flag
-
enumerator kIRTC_512hzFlag#
512 Hz interval status flag
-
enumerator kIRTC_InvalidFlag#
Indicates if time/date counters are invalid
-
enumerator kIRTC_WriteProtFlag#
Write protect enable status flag
-
enumerator kIRTC_CmpIntFlag#
Compensation interval status flag
-
enumerator kIRTC_CmpDoneFlag#
Compensation done flag
-
enumerator kIRTC_BusErrFlag#
Bus error flag
-
enumerator kIRTC_AlarmFlag#
-
enum _irtc_alarm_match#
IRTC alarm match options.
Values:
-
enumerator kRTC_MatchSecMinHr#
Only match second, minute and hour
-
enumerator kRTC_MatchSecMinHrDay#
Only match second, minute, hour and day
-
enumerator kRTC_MatchSecMinHrDayMnth#
Only match second, minute, hour, day and month
-
enumerator kRTC_MatchSecMinHrDayMnthYr#
Only match second, minute, hour, day, month and year
-
enumerator kRTC_MatchSecMinHr#
-
enum _irtc_clockout_sel#
IRTC clockout select.
Values:
-
enumerator kIRTC_ClkoutNo#
No clock out
-
enumerator kIRTC_ClkoutFine1Hz#
clock out fine 1Hz
-
enumerator kIRTC_Clkout32kHz#
clock out 32.768kHz
-
enumerator kIRTC_ClkoutCoarse1Hz#
clock out coarse 1Hz
-
enumerator kIRTC_ClkoutNo#
-
typedef enum _irtc_clock_select irtc_clock_select_t#
IRTC clock select.
-
typedef enum _irtc_interrupt_enable irtc_interrupt_enable_t#
List of IRTC interrupts.
-
typedef enum _irtc_status_flags irtc_status_flags_t#
List of IRTC flags.
-
typedef enum _irtc_alarm_match irtc_alarm_match_t#
IRTC alarm match options.
-
typedef enum _irtc_clockout_sel irtc_clockout_sel_t#
IRTC clockout select.
-
typedef struct _irtc_datetime irtc_datetime_t#
Structure is used to hold the date and time.
-
typedef struct _irtc_daylight_time irtc_daylight_time_t#
Structure is used to hold the daylight saving time.
-
typedef struct _irtc_config irtc_config_t#
RTC config structure.
This structure holds the configuration settings for the RTC peripheral. To initialize this structure to reasonable defaults, call the IRTC_GetDefaultConfig() function and pass a pointer to your config structure instance.
The config struct can be made const so it resides in flash
-
status_t IRTC_SetWriteProtection(RTC_Type *base, bool lock)#
Locks or unlocks IRTC registers for write access.
Note
When the registers are unlocked, they remain in unlocked state for 2 seconds, after which they are locked automatically. After power-on-reset, the registers come out unlocked and they are locked automatically 15 seconds after power on.
- Parameters:
base – IRTC peripheral base address
lock – true: Lock IRTC registers; false: Unlock IRTC registers.
- Returns:
kStatus_Success: if lock or unlock operation is successful kStatus_Fail: if lock or unlock operation fails even after multiple retry attempts
-
static inline void IRTC_Reset(RTC_Type *base)#
Performs a software reset on the IRTC module.
Clears contents of alarm, interrupt (status and enable except tamper interrupt enable bit) registers, STATUS[CMP_DONE] and STATUS[BUS_ERR]. This has no effect on DST, calendaring, standby time and tamper detect registers.
- Parameters:
base – IRTC peripheral base address
-
void IRTC_ConfigClockOut(RTC_Type *base, irtc_clockout_sel_t clkOut)#
Select which clock to output from RTC.
Select which clock to output from RTC for other modules to use inside SoC, for example, RTC subsystem needs RTC to output 1HZ clock for sub-second counter.
- Parameters:
base – IRTC peripheral base address
clkOut – select clock to use for output,
-
void IRTC_ConfigClockSelect(RTC_Type *base, irtc_clock_select_t clkSelect)#
Select which clock is used by RTC.
Select which clock is used by RTC to output to the peripheral and divided to generate a 512 Hz clock and a 1 Hz clock.
- Parameters:
base – IRTC peripheral base address
clkSelect – select clock used by RTC
-
static inline void IRTC_EnableClockOutputToPeripheral(RTC_Type *base, bool enable)#
Determines whether the selected clock is output to other peripherals.
Determines whether the selected clock is output to other peripherals.
- Parameters:
base – IRTC peripheral base address
enable – determine whether the selected clock is output to other peripherals
-
IRTC_STATUS_W1C_BITS#
-
struct _irtc_datetime#
- #include <fsl_irtc.h>
Structure is used to hold the date and time.
Public Members
-
uint16_t year#
Range from 1984 to 2239.
-
uint8_t month#
Range from 1 to 12.
-
uint8_t day#
Range from 1 to 31 (depending on month).
-
uint8_t weekDay#
Range from 0(Sunday) to 6(Saturday).
-
uint8_t hour#
Range from 0 to 23.
-
uint8_t minute#
Range from 0 to 59.
-
uint8_t second#
Range from 0 to 59.
-
uint16_t year#
-
struct _irtc_daylight_time#
- #include <fsl_irtc.h>
Structure is used to hold the daylight saving time.
-
struct _irtc_config#
- #include <fsl_irtc.h>
RTC config structure.
This structure holds the configuration settings for the RTC peripheral. To initialize this structure to reasonable defaults, call the IRTC_GetDefaultConfig() function and pass a pointer to your config structure instance.
The config struct can be made const so it resides in flash
Public Members
-
irtc_alarm_match_t alrmMatch#
Pick one option from enumeration :: irtc_alarm_match_t
-
irtc_clock_select_t clockSelect#
Pick one option from enumeration :: irtc_clock_select_t
-
bool disableClockOutput#
true: The selected clock is not output to other peripherals; false: The selected clock is output to other peripherals
-
irtc_alarm_match_t alrmMatch#
ISI: Image Sensing Interface#
-
void ISI_Init(ISI_Type *base)#
Initializes the ISI peripheral.
This function ungates the ISI clock, it should be called before any other ISI functions.
- Parameters:
base – ISI peripheral base address.
-
void ISI_Deinit(ISI_Type *base)#
Deinitializes the ISI peripheral.
This function gates the ISI clock.
- Parameters:
base – ISI peripheral base address.
-
void ISI_Reset(ISI_Type *base)#
Reset the ISI peripheral.
This function resets the ISI channel processing pipeline similar to a hardware reset. The channel will need to be reconfigured after reset before it can be used.
- Parameters:
base – ISI peripheral base address.
-
static inline uint32_t ISI_EnableInterrupts(ISI_Type *base, uint32_t mask)#
Enables ISI interrupts.
- Parameters:
base – ISI peripheral base address
mask – Interrupt source, OR’ed value of _isi_interrupt.
- Returns:
OR’ed value of the enabled interrupts before calling this function.
-
static inline uint32_t ISI_DisableInterrupts(ISI_Type *base, uint32_t mask)#
Disables ISI interrupts.
- Parameters:
base – ISI peripheral base address
mask – Interrupt source, OR’ed value of _isi_interrupt.
- Returns:
OR’ed value of the enabled interrupts before calling this function.
-
static inline uint32_t ISI_GetInterruptStatus(ISI_Type *base)#
Get the ISI interrupt pending flags.
All interrupt pending flags are returned, upper layer could compare with the OR’ed value of _isi_interrupt. For example, to check whether memory read completed, use like this:
uint32_t mask = ISI_GetInterruptStatus(ISI); if (mask & kISI_MemReadCompletedInterrupt) { memory read completed }
- Parameters:
base – ISI peripheral base address
- Returns:
The OR’ed value of the pending interrupt flags. of _isi_interrupt.
-
static inline void ISI_ClearInterruptStatus(ISI_Type *base, uint32_t mask)#
Clear ISI interrupt pending flags.
This function could clear one or more flags at one time, the flags to clear are passed in as an OR’ed value of _isi_interrupt. For example, to clear both line received interrupt flag and frame received flag, use like this:
ISI_ClearInterruptStatus(ISI, kISI_LineReceivedInterrupt | kISI_FrameReceivedInterrupt);
- Parameters:
base – ISI peripheral base address
mask – The flags to clear, it is OR’ed value of _isi_interrupt.
-
void ISI_SetScalerConfig(ISI_Type *base, uint16_t inputWidth, uint16_t inputHeight, uint16_t outputWidth, uint16_t outputHeight)#
Set the ISI channel scaler configurations.
This function sets the scaling configurations. If the ISI channel is bypassed, then the scaling feature could not be used.
ISI only supports down scaling but not up scaling.
Note
Total bytes in one line after down scaling must be more than 256 bytes.
- Parameters:
base – ISI peripheral base address
inputWidth – Input image width.
inputHeight – Input image height.
outputWidth – Output image width.
outputHeight – Output image height.
-
void ISI_SetColorSpaceConversionConfig(ISI_Type *base, const isi_csc_config_t *config)#
Set the ISI color space conversion configurations.
This function sets the color space conversion configurations. After setting the configuration, use the function ISI_EnableColorSpaceConversion to enable this feature. If the ISI channel is bypassed, then the color space conversion feature could not be used.
- Parameters:
base – ISI peripheral base address
config – Pointer to the configuration structure.
-
void ISI_ColorSpaceConversionGetDefaultConfig(isi_csc_config_t *config)#
Get the ISI color space conversion default configurations.
The default value is:
config->mode = kISI_CscYUV2RGB; config->A1 = 0.0; config->A2 = 0.0; config->A3 = 0.0; config->B1 = 0.0; config->B2 = 0.0; config->B3 = 0.0; config->C1 = 0.0; config->C2 = 0.0; config->C3 = 0.0; config->D1 = 0; config->D2 = 0; config->D3 = 0;
- Parameters:
config – Pointer to the configuration structure.
-
static inline void ISI_EnableColorSpaceConversion(ISI_Type *base, bool enable)#
Enable or disable the ISI color space conversion.
If the ISI channel is bypassed, then the color space conversion feature could not be used even enable using this function.
Note
The CSC is enabled by default. Disable it if it is not required.
- Parameters:
base – ISI peripheral base address
enable – True to enable, false to disable.
-
void ISI_SetCropConfig(ISI_Type *base, const isi_crop_config_t *config)#
Set the ISI cropping configurations.
This function sets the cropping configurations. After setting the configuration, use the function ISI_EnableCrop to enable the feature. Cropping still works when the ISI channel is bypassed.
Note
The upper left corner and lower right corner should be configured base on the image resolution output from the scaler.
- Parameters:
base – ISI peripheral base address
config – Pointer to the configuration structure.
-
void ISI_CropGetDefaultConfig(isi_crop_config_t *config)#
Get the ISI cropping default configurations.
The default value is:
config->upperLeftX = 0U; config->upperLeftY = 0U; config->lowerRightX = 0U; config->lowerRightY = 0U;
- Parameters:
config – Pointer to the configuration structure.
-
static inline void ISI_EnableCrop(ISI_Type *base, bool enable)#
Enable or disable the ISI cropping.
If the ISI channel is bypassed, the cropping still works.
- Parameters:
base – ISI peripheral base address
enable – True to enable, false to disable.
-
static inline void ISI_SetGlobalAlpha(ISI_Type *base, uint8_t alpha)#
Set the global alpha value.
- Parameters:
base – ISI peripheral base address
alpha – The global alpha value.
-
static inline void ISI_EnableGlobalAlpha(ISI_Type *base, bool enable)#
Enable the global alpha insertion.
Alpha still works when channel bypassed.
- Parameters:
base – ISI peripheral base address
enable – True to enable, false to disable.
-
void ISI_SetRegionAlphaConfig(ISI_Type *base, uint8_t index, const isi_region_alpha_config_t *config)#
Set the alpha value for region of interest.
Set the alpha insertion configuration for specific region of interest. The function ISI_EnableRegionAlpha could be used to enable the alpha insertion. Alpha insertion still works when channel bypassed.
Note
The upper left corner and lower right corner should be configured base on the image resolution output from the scaler.
- Parameters:
base – ISI peripheral base address
index – Index of the region of interest, Could be 0, 1, 2, and 3.
config – Pointer to the configuration structure.
-
void ISI_RegionAlphaGetDefaultConfig(isi_region_alpha_config_t *config)#
Get the regional alpha insertion default configurations.
The default configuration is:
config->upperLeftX = 0U; config->upperLeftY = 0U; config->lowerRightX = 0U; config->lowerRightY = 0U; config->alpha = 0U;
- Parameters:
config – Pointer to the configuration structure.
-
void ISI_EnableRegionAlpha(ISI_Type *base, uint8_t index, bool enable)#
Enable or disable the alpha value insertion for region of interest.
Alpha insertion still works when channel bypassed.
- Parameters:
base – ISI peripheral base address
index – Index of the region of interest, Could be 0, 1, 2, and 3.
enable – True to enable, false to disable.
-
void ISI_SetInputMemConfig(ISI_Type *base, const isi_input_mem_config_t *config)#
Set the input memory configuration.
- Parameters:
base – ISI peripheral base address
config – Pointer to the configuration structure.
-
void ISI_InputMemGetDefaultConfig(isi_input_mem_config_t *config)#
Get the input memory default configurations.
The default configuration is:
config->adddr = 0U; config->linePitchBytes = 0U; config->framePitchBytes = 0U; config->format = kISI_InputMemBGR8P;
- Parameters:
config – Pointer to the configuration structure.
-
static inline void ISI_SetInputMemAddr(ISI_Type *base, uint32_t addr)#
Set the input memory address.
This function only sets the input memory address, it is used for fast run-time setting.
- Parameters:
base – ISI peripheral base address
addr – Input memory address.
-
void ISI_TriggerInputMemRead(ISI_Type *base)#
Trigger the ISI pipeline to read the input memory.
- Parameters:
base – ISI peripheral base address
-
static inline void ISI_SetFlipMode(ISI_Type *base, isi_flip_mode_t mode)#
Set the ISI channel flipping mode.
- Parameters:
base – ISI peripheral base address
mode – Flipping mode.
-
void ISI_SetOutputBufferAddr(ISI_Type *base, uint8_t index, uint32_t addrY, uint32_t addrU, uint32_t addrV)#
Set the ISI output buffer address.
This function sets the output buffer address and trigger the ISI to shadow the address, it is used for fast run-time setting.
- Parameters:
base – ISI peripheral base address
index – Index of output buffer, could be 0 and 1.
addrY – RGB or Luma (Y) output buffer address.
addrU – Chroma (U/Cb/UV/CbCr) output buffer address.
addrV – Chroma (V/Cr) output buffer address.
-
static inline void ISI_Start(ISI_Type *base)#
Start the ISI channel.
Start the ISI channel to work, this function should be called after all channel configuration finished.
- Parameters:
base – ISI peripheral base address
-
static inline void ISI_Stop(ISI_Type *base)#
Stop the ISI channel.
- Parameters:
base – ISI peripheral base address
-
FSL_ISI_DRIVER_VERSION#
ISI driver version.
-
enum _isi_interrupt#
ISI interrupts.
Values:
-
enumerator kISI_MemReadCompletedInterrupt#
Input memory read completed.
-
enumerator kISI_LineReceivedInterrupt#
Line received.
-
enumerator kISI_FrameReceivedInterrupt#
Frame received.
-
enumerator kISI_AxiWriteErrorVInterrupt#
AXI Bus write error when storing V data to memory.
-
enumerator kISI_AxiWriteErrorUInterrupt#
AXI Bus write error when storing U data to memory.
-
enumerator kISI_AxiWriteErrorYInterrupt#
AXI Bus write error when storing Y data to memory.
-
enumerator kISI_AxiReadErrorInterrupt#
AXI Bus error when reading the input memory.
-
enumerator kISI_MemReadCompletedInterrupt#
-
enum _isi_output_format#
ISI output image format.
Values:
-
enumerator kISI_OutputRGBA8888#
RGBA8888.
-
enumerator kISI_OutputABGR8888#
ABGR8888.
-
enumerator kISI_OutputARGB8888#
ARGB8888.
-
enumerator kISI_OutputRGBX8888#
RGBX8888 unpacked and MSB aligned in 32-bit.
-
enumerator kISI_OutputXBGR8888#
XBGR8888 unpacked and LSB aligned in 32-bit.
-
enumerator kISI_OutputXRGB8888#
XRGB8888 unpacked and LSB aligned in 32-bit.
-
enumerator kISI_OutputRGB888#
RGB888 packed into 32-bit.
-
enumerator kISI_OutputBGR888#
BGR888 packed into 32-bit.
-
enumerator kISI_OutputA2BGR10#
BGR format with 2-bits alpha in MSB; 10-bits per color component.
-
enumerator kISI_OutputA2RGB10#
RGB format with 2-bits alpha in MSB; 10-bits per color component.
-
enumerator kISI_OutputRGB565#
RGB565 packed into 32-bit.
-
enumerator kISI_OutputRaw8#
8-bit raw data packed into 32-bit.
-
enumerator kISI_OutputRaw10#
10-bit raw data packed into 16-bit with 6 LSBs wasted.
-
enumerator kISI_OutputRaw10P#
10-bit raw data packed into 32-bit.
-
enumerator kISI_OutputRaw12P#
16-bit raw data packed into 16-bit with 4 LSBs wasted.
-
enumerator kISI_OutputRaw16P#
16-bit raw data packed into 32-bit.
-
enumerator kISI_OutputYUV444_1P8P#
8-bits per color component; 1-plane, YUV interleaved packed bytes.
-
enumerator kISI_OutputYUV444_2P8P#
8-bits per color component; 2-plane, UV interleaved packed bytes.
-
enumerator kISI_OutputYUV444_3P8P#
8-bits per color component; 3-plane, non-interleaved packed bytes.
-
enumerator kISI_OutputYUV444_1P8#
8-bits per color component; 1-plane YUV interleaved unpacked bytes (8 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV444_1P10#
10-bits per color component; 1-plane, YUV interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV444_2P10#
10-bits per color component; 2-plane, UV interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV444_3P10#
10-bits per color component; 3-plane, non-interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV444_1P10P#
10-bits per color component; 1-plane, YUV interleaved packed bytes (2 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV444_2P10P#
10-bits per color component; 2-plane, UV interleaved packed bytes (2 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV444_3P10P#
10-bits per color component; 3-plane, non-interleaved packed bytes (2 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV444_1P12#
12-bits per color component; 1-plane, YUV interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV444_2P12#
12-bits per color component; 2-plane, UV interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV444_3P12#
12-bits per color component; 3-plane, non-interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV422_1P8P#
8-bits per color component; 1-plane, YUV interleaved packed bytes.
-
enumerator kISI_OutputYUV422_2P8P#
8-bits per color component; 2-plane, UV interleaved packed bytes.
-
enumerator kISI_OutputYUV422_3P8P#
8-bits per color component; 3-plane, non-interleaved packed bytes.
-
enumerator kISI_OutputYUV422_1P10#
10-bits per color component; 1-plane, YUV interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV422_2P10#
10-bits per color component; 2-plane, UV interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV422_3P10#
10-bits per color component; 3-plane, non-interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV422_1P10P#
10-bits per color component; 1-plane, YUV interleaved packed bytes (2 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV422_2P10P#
10-bits per color component; 2-plane, UV interleaved packed bytes (2 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV422_3P10P#
10-bits per color component; 3-plane, non-interleaved packed bytes (2 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV422_1P12#
12-bits per color component; 1-plane, YUV interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV422_2P12#
12-bits per color component; 2-plane, UV interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV422_3P12#
12-bits per color component; 3-plane, non-interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV420_2P8P#
8-bits per color component; 2-plane, UV interleaved packed bytes.
-
enumerator kISI_OutputYUV420_3P8P#
8-bits per color component; 3-plane, non-interleaved packed bytes.
-
enumerator kISI_OutputYUV420_2P10#
10-bits per color component; 2-plane, UV interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV420_3P10#
10-bits per color component; 3-plane, non-interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV420_2P10P#
10-bits per color component; 2-plane, UV interleaved packed bytes (2 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV420_3P10P#
10-bits per color component; 3-plane, non-interleaved packed bytes (2 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_OutputYUV420_2P12#
12-bits per color component; 2-plane, UV interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputYUV420_3P12#
12-bits per color component; 3-plane, non-interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_OutputRGBA8888#
-
enum _isi_chain_mode#
ISI line buffer chain mode.
Values:
-
enumerator kISI_ChainDisable#
No line buffers chained, for 2048 or less horizontal resolution.
-
enumerator kISI_ChainTwo#
Line buffers of channel n and n+1 chained, for 4096 horizontal resolution.
-
enumerator kISI_ChainDisable#
-
enum _isi_deint_mode#
ISI de-interlacing mode.
Values:
-
enumerator kISI_DeintDisable#
No de-interlacing.
-
enumerator kISI_DeintWeaveOddOnTop#
Weave de-interlacing (Odd, Even) method used.
-
enumerator kISI_DeintWeaveEvenOnTop#
Weave de-interlacing (Even, Odd) method used.
-
enumerator kISI_DeintBlendingOddFirst#
Blending or linear interpolation (Odd + Even).
-
enumerator kISI_DeintBlendingEvenFirst#
Blending or linear interpolation (Even + Odd).
-
enumerator kISI_DeintDoublingOdd#
Doubling odd frame and discard even frame.
-
enumerator kISI_DeintDoublingEven#
Doubling even frame and discard odd frame.
-
enumerator kISI_DeintDisable#
-
enum _isi_threshold#
ISI overflow panic alert threshold.
Values:
-
enumerator kISI_ThresholdDisable#
No panic alert will be asserted.
-
enumerator kISI_Threshold25Percent#
Panic will assert when the buffers are 25% full.
-
enumerator kISI_Threshold50Percent#
Panic will assert when the buffers are 50% full.
-
enumerator kISI_Threshold75Percent#
Panic will assert when the buffers are 75% full.
-
enumerator kISI_ThresholdDisable#
-
enum _isi_output_dest#
ISI channel output image destination (CHNL_CTRL[DEST]).
Values:
-
enumerator kISI_OutputDestMemory#
Output image is stored in memory only.
-
enumerator kISI_OutputDestMemoryDisplay#
Output image is sent to both memory and display controller 0.
-
enumerator kISI_OutputDestDisplay#
Output image is sent to display controller 0 only.
-
enumerator kISI_OutputDestMemory#
-
enum _isi_csc_mode#
ISI color space conversion mode.
Values:
-
enumerator kISI_CscYUV2RGB#
Convert YUV to RGB.
-
enumerator kISI_CscYCbCr2RGB#
Convert YCbCr to RGB.
-
enumerator kISI_CscRGB2YUV#
Convert RGB to YUV.
-
enumerator kISI_CscRGB2YCbCr#
Convert RGB to YCbCr.
-
enumerator kISI_CscYUV2RGB#
-
enum _isi_flip_mode#
ISI flipping mode.
Values:
-
enumerator kISI_FlipDisable#
Flip disabled.
-
enumerator kISI_FlipHorizontal#
Horizontal flip.
-
enumerator kISI_FlipVertical#
Vertical flip.
-
enumerator kISI_FlipBoth#
Flip both direction.
-
enumerator kISI_FlipDisable#
-
enum _isi_input_mem_format#
ISI image format of the input memory.
Values:
-
enumerator kISI_InputMemBGR888#
BGR format with 8-bits per color component, packed into 32-bit, 24 bits per pixel.
-
enumerator kISI_InputMemRGB888#
RGB format with 8-bits per color component, packed into 32-bit, 24 bits per pixel.
-
enumerator kISI_InputMemXRGB8888#
RGB format with 8-bits per color component, unpacked and LSB aligned in 32-bit, 32 bits per pixel.
-
enumerator kISI_InputMemRGBX8888#
RGB format with 8-bits per color component, unpacked and MSB alinged in 32-bit, 32 bits per pixel.
-
enumerator kISI_InputMemXBGR8888#
BGR format with 8-bits per color component, unpacked and LSB aligned in 32-bit, 32 bits per pixel.
-
enumerator kISI_InputMemRGB565#
RGB format with 5-bits of R, B; 6-bits of G (packed into 32-bit)
-
enumerator kISI_InputMemA2BGR10#
BGR format with 2-bits alpha in MSB; 10-bits per color component.
-
enumerator kISI_InputMemA2RGB10#
RGB format with 2-bits alpha in MSB; 10-bits per color component.
-
enumerator kISI_InputMemYUV444_1P8P#
8-bits per color component; 1-plane, YUV interleaved packed bytes.
-
enumerator kISI_InputMemYUV444_1P10#
10-bits per color component; 1-plane, YUV interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_InputMemYUV444_1P10P#
10-bits per color component; 1-plane, YUV interleaved packed bytes (2 MSBs waste bits in 32-bit WORD).
-
enumerator kISI_InputMemYUV444_1P12#
12-bits per color component; 1-plane, YUV interleaved unpacked bytes (4 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_InputMemYUV444_1P8#
8-bits per color component; 1-plane YUV interleaved unpacked bytes (8 MSBs waste bits in 32-bit DWORD).
-
enumerator kISI_InputMemYUV422_1P8P#
8-bits per color component; 1-plane YUV interleaved packed bytes.
-
enumerator kISI_InputMemYUV422_1P10#
10-bits per color component; 1-plane, YUV interleaved unpacked bytes (6 LSBs waste bits in 16-bit WORD).
-
enumerator kISI_InputMemYUV422_1P12#
12-bits per color component; 1-plane, YUV interleaved packed bytes (4 MSBs waste bits in 16-bit WORD).
-
enumerator kISI_InputMemBGR888#
-
enum _isi_roi_index#
ISI roi index number.
Values:
-
enumerator ISI_ROI_INDEX_0#
ISI ROI index 0
-
enumerator ISI_ROI_INDEX_1#
ISI ROI index 1
-
enumerator ISI_ROI_INDEX_2#
ISI ROI index 2
-
enumerator ISI_ROI_INDEX_3#
ISI ROI index 3
-
enumerator ISI_ROI_INDEX_0#
-
typedef enum _isi_output_format isi_output_format_t#
ISI output image format.
-
typedef enum _isi_chain_mode isi_chain_mode_t#
ISI line buffer chain mode.
-
typedef enum _isi_deint_mode isi_deint_mode_t#
ISI de-interlacing mode.
-
typedef enum _isi_threshold isi_threshold_t#
ISI overflow panic alert threshold.
-
typedef enum _isi_output_dest isi_output_dest_t#
ISI channel output image destination (CHNL_CTRL[DEST]).
-
typedef struct _isi_config isi_config_t#
ISI basic configuration.
-
typedef enum _isi_csc_mode isi_csc_mode_t#
ISI color space conversion mode.
-
typedef struct _isi_csc_config isi_csc_config_t#
ISI color space conversion configurations.
(a) RGB to YUV (or YCbCr) conversion
Y = (A1 x R) + (A2 x G) + (A3 x B) + D1
U = (B1 x R) + (B2 x G) + (B3 x B) + D2
V = (C1 x R) + (C2 x G) + (C3 x B) + D3
(b) YUV (or YCbCr) to RGB conversion
R = (A1 x (Y + D1)) + (A2 x (U + D2)) + (A3 x (V + D3))
G = (B1 x (Y + D1)) + (B2 x (U + D2)) + (B3 x (V + D3))
B = (C1 x (Y + D1)) + (C2 x (U + D2)) + (C3 x (V + D3))
Overflow for the three channels are saturated at 0x255 and underflow is saturated at 0x00.
-
typedef enum _isi_flip_mode isi_flip_mode_t#
ISI flipping mode.
-
typedef struct _isi_crop_config isi_crop_config_t#
ISI cropping configurations.
-
typedef struct _isi_regoin_alpha_config isi_region_alpha_config_t#
ISI regional region alpha configurations.
-
typedef enum _isi_input_mem_format isi_input_mem_format_t#
ISI image format of the input memory.
-
typedef struct _isi_input_mem_config isi_input_mem_config_t#
ISI input memory configurations.
-
typedef enum _isi_roi_index isi_roi_index_t#
ISI roi index number.
-
void ISI_SetConfig(ISI_Type *base, const isi_config_t *config)#
Set the ISI channel basic configurations.
This function sets the basic configurations, generally the channel could be started to work after this function. To enable other features such as croping, flipping, please call the functions accordingly.
- Parameters:
base – ISI peripheral base address
config – Pointer to the configuration structure.
-
void ISI_GetDefaultConfig(isi_config_t *config)#
Get the ISI channel default basic configurations.
The default value is:
config->isChannelBypassed = false; config->isSourceMemory = false; config->isYCbCr = false; config->chainMode = kISI_ChainDisable; config->deintMode = kISI_DeintDisable; config->blankPixel = 0xFFU; config->sourcePort = 0U; config->mipiChannel = 0U; config->inputHeight = 1080U; config->inputWidth = 1920U; config->outputFormat = kISI_OutputRGBA8888; config->outputLinePitchBytes = 0U; config->thresholdY = kISI_ThresholdDisable; config->thresholdU = kISI_ThresholdDisable; config->thresholdV = kISI_ThresholdDisable;
- Parameters:
config – Pointer to the configuration structure.
-
struct _isi_config#
- #include <fsl_isi.h>
ISI basic configuration.
Public Members
-
bool isChannelBypassed#
Bypass the channel, if bypassed, the scaling and color space conversion could not work.
-
bool isSourceMemory#
Whether the input source is memory or not.
-
bool isYCbCr#
Whether the input source is YCbCr mode or not.
-
isi_chain_mode_t chainMode#
The line buffer chain mode.
-
isi_deint_mode_t deintMode#
The de-interlacing mode.
-
uint8_t blankPixel#
The pixel to insert into image when overflow occors.
-
uint8_t sourcePort#
Input source port selection.
-
uint8_t mipiChannel#
MIPI virtual channel, ignored if input source is not MIPI CSI.
-
uint16_t inputHeight#
Input image height(lines).
-
uint16_t inputWidth#
Input image width(pixels).
-
isi_output_format_t outputFormat#
Output image format.
-
isi_threshold_t thresholdY#
Panic alert threshold for RGB or Luma (Y) buffer.
-
isi_threshold_t thresholdU#
Panic alert threshold for Chroma (U/Cb/UV/CbCr) buffer.
-
isi_threshold_t thresholdV#
Panic alert threshold for Chroma (V/Cr) buffer.
-
isi_output_dest_t outputDest#
Output image destination: memory, display controller, or both. Use kISI_OutputDestMemoryDisplay (or …Display) to feed the pixel-link path to the DCIF (e.g. the PDI low-latency display).
-
bool isChannelBypassed#
-
struct _isi_csc_config#
- #include <fsl_isi.h>
ISI color space conversion configurations.
(a) RGB to YUV (or YCbCr) conversion
Y = (A1 x R) + (A2 x G) + (A3 x B) + D1
U = (B1 x R) + (B2 x G) + (B3 x B) + D2
V = (C1 x R) + (C2 x G) + (C3 x B) + D3
(b) YUV (or YCbCr) to RGB conversion
R = (A1 x (Y + D1)) + (A2 x (U + D2)) + (A3 x (V + D3))
G = (B1 x (Y + D1)) + (B2 x (U + D2)) + (B3 x (V + D3))
B = (C1 x (Y + D1)) + (C2 x (U + D2)) + (C3 x (V + D3))
Overflow for the three channels are saturated at 0x255 and underflow is saturated at 0x00.
Public Members
-
isi_csc_mode_t mode#
Convertion mode.
-
float A1#
Must be in the range of [-3.99609375, 3.99609375].
-
float A2#
Must be in the range of [-3.99609375, 3.99609375].
-
float A3#
Must be in the range of [-3.99609375, 3.99609375].
-
float B1#
Must be in the range of [-3.99609375, 3.99609375].
-
float B2#
Must be in the range of [-3.99609375, 3.99609375].
-
float B3#
Must be in the range of [-3.99609375, 3.99609375].
-
float C1#
Must be in the range of [-3.99609375, 3.99609375].
-
float C2#
Must be in the range of [-3.99609375, 3.99609375].
-
float C3#
Must be in the range of [-3.99609375, 3.99609375].
-
int32_t D1#
Must be in the range of [-256, 255].
-
int32_t D2#
Must be in the range of [-256, 255].
-
int32_t D3#
Must be in the range of [-256, 255].
-
struct _isi_crop_config#
- #include <fsl_isi.h>
ISI cropping configurations.
-
struct _isi_regoin_alpha_config#
- #include <fsl_isi.h>
ISI regional region alpha configurations.
-
struct _isi_input_mem_config#
- #include <fsl_isi.h>
ISI input memory configurations.
Public Members
-
uint32_t adddr#
Address of the input memory.
-
uint16_t linePitchBytes#
Line phtch in bytes.
-
uint16_t framePitchBytes#
Frame phtch in bytes.
-
isi_input_mem_format_t format#
Image format of the input memory.
-
uint32_t adddr#
JPEGDEC: JPEG decoder Driver#
Error codes for the JPEG decoder driver.
Values:
-
enumerator kStatus_JPEGDEC_NotSupported#
Unsupported pixel format or image resolution.
-
enumerator kStatus_JPEGDEC_NotSupported#
-
enum _jpegdec_pixel_format#
JPEG decoding pixel format.
Values:
-
enumerator kJPEGDEC_PixelFormatYUV420#
YUV420 format, Y at first plane, UV at second plane.
-
enumerator kJPEGDEC_PixelFormatYUV422#
YUV422, 1 planar in the YUYV sequence.
-
enumerator kJPEGDEC_PixelFormatRGB#
RGB packed format.
-
enumerator kJPEGDEC_PixelFormatYUV444#
YUV444, 1 planar in the YUVYUV sequence.
-
enumerator kJPEGDEC_PixelFormatGray#
8-bit or 12-bit gray scale.
-
enumerator kJPEGDEC_PixelFormatReserved#
Reserved.
-
enumerator kJPEGDEC_PixelFormatYCCK#
YCCK format.
-
enumerator kJPEGDEC_PixelFormatYUV420#
-
enum _jpegdec_pixel_depth#
JPEG decoding pixel depth.
Values:
-
enumerator kJPEGDEC_PixelDepth8Bit#
8-bit per pixel.
-
enumerator kJPEGDEC_PixelDepth12Bit#
12-bit per pixel.
-
enumerator kJPEGDEC_PixelDepth8Bit#
-
enum _jpegdec_flags#
Decoder slot Interrupt status and enable/disable flags.
Values:
-
enumerator kJPEGDEC_StreamBufferHalfDoneFlag#
Slot’s bit stream buffer pointer has passed half the size.
-
enumerator kJPEGDEC_StreamBufferDoneFlag#
Slot’s bit stream buffer pointer has finished.
-
enumerator kJPEGDEC_SwitchInFlag#
Current slot is switched in.
-
enumerator kJPEGDEC_DecodeCompleteFlag#
Current slot finished decoding.
-
enumerator kJPEGDEC_DecodeErrorFlag#
Current slot has error during decoding.
-
enumerator kJPEGDEC_DescptReadErrorFlag#
Descriptor read error when switching in current slot.
-
enumerator kJPEGDEC_BitReadErrorFlag#
Read JPEG stream error.
-
enumerator kJPEGDEC_PixelWriteErrorFlag#
Write decoded pixel error.
-
enumerator kJPEGDEC_ErrorFlags#
-
enumerator kJPEGDEC_AllFlags#
-
enumerator kJPEGDEC_StreamBufferHalfDoneFlag#
-
enum _jpegdec_slots#
JPEG decoding Slot.
Values:
-
enumerator kJPEGDEC_Slot0#
Decoding slot 0.
-
enumerator kJPEGDEC_Slot1#
Decoding slot 1.
-
enumerator kJPEGDEC_Slot2#
Decoding slot 2.
-
enumerator kJPEGDEC_Slot3#
Decoding slot 3.
-
enumerator kJPEGDEC_Slot0#
-
enum _jpegdec_endian_mode#
JPEG stream data format.
Values:
-
enumerator kJPEGDEC_BigEndian#
JPEG data format is big endian.
-
enumerator kJPEGDEC_LittleEndian#
JPEG data format is little endian.
-
enumerator kJPEGDEC_BigEndian#
-
typedef enum _jpegdec_pixel_format jpegdec_pixel_format_t#
JPEG decoding pixel format.
-
typedef enum _jpegdec_pixel_depth jpegdec_pixel_depth_t#
JPEG decoding pixel depth.
-
typedef struct _jpegdec_decoder_config jpegdec_decoder_config_t#
JPEG decoder configuration.
-
typedef struct _jpegdec_descpt jpegdec_descpt_t#
JPEG decoder descriptor.
This structure is used to configure the linked decoding descriptor for one or more slots in Single Bit Stream Repeat mode or Context Switch mode.
-
typedef enum _jpegdec_endian_mode jpegdec_endian_mode_t#
JPEG stream data format.
-
typedef struct _jpegdec_config jpegdec_config_t#
Configuration for JPEG decoder.
-
FSL_JPEGDEC_DRIVER_VERSION#
JPEG decoder driver version.
-
void JPEGDEC_GetDefaultConfig(jpegdec_config_t *config)#
Gets the default configuration for JPEG decoder.
This function initializes the user configuration structure to default value. The default value are:
Example:
config->endianMode = kJPEGDEC_LittleEndian; config->slots = 0xFU; config->enable = true; config->enableLp = false;
- Parameters:
config – Pointer to JPEG decoder configuration structure.
-
void JPEGDEC_Init(JPEG_DECODER_Type *base, const jpegdec_config_t *config)#
Initializes the JPEG decoder.
The default configuration can be got by calling JPEGDEC_GetDefaultConfig.
- Parameters:
base – JPEG decoder peripheral base address.
config – Pointer to JPEG decoder configuration structure.
-
void JPEGDEC_Deinit(JPEG_DECODER_Type *base)#
Deinitializes the JPEG decoder.
- Parameters:
base – JPEG decoder peripheral base address.
-
static inline void JPEGDEC_EnableInterrupts(JPEG_DECODER_Type *base, uint8_t slot, uint32_t mask)#
Enables interrupts for certain slot.
- Parameters:
base – JPEG decoder peripheral base address.
slot – Slot number.
mask – Interrupts mask formed by flags OR’ed together. _jpegdec_flags.
-
static inline void JPEGDEC_DisableInterrupts(JPEG_DECODER_Type *base, uint8_t slot, uint32_t mask)#
Disables interrupts for certain slot.
- Parameters:
base – JPEG decoder peripheral base address.
slot – Slot number.
mask – Interrupts mask formed by flags OR’ed together. _jpegdec_flags.
-
static inline uint32_t JPEGDEC_GetStatusFlags(JPEG_DECODER_Type *base, uint8_t slot)#
Gets status flags for certain slot.
- Parameters:
base – JPEG decoder peripheral base address.
slot – Slot number.
- Returns:
Status flags asserted mask formed by flags OR’ed together. See “_jpegdec_flags”.
-
static inline void JPEGDEC_ClearStatusFlags(JPEG_DECODER_Type *base, uint8_t slot, uint32_t mask)#
Clears status flags for certain slot.
- Parameters:
base – JPEG decoder peripheral base address.
slot – Slot number.
mask – Status flags mask formed by flags OR’ed together. See “_jpegdec_flags”.
-
static inline void JPEGDEC_Enable(JPEG_DECODER_Type *base, bool enable)#
Enables the JPEG decoder module.
- Parameters:
base – JPEG decoder peripheral base address.
enable – True to enable, false to disable.
-
static inline void JPEGDEC_EnableLp(JPEG_DECODER_Type *base, bool enable)#
Enables the JPEG decoder core to enter low power mode.
- Parameters:
base – JPEG decoder peripheral base address.
enable – True to enable, false to disable.
-
static inline void JPEGDEC_Reset(JPEG_DECODER_Type *base)#
Resets the JPEG decoder.
- Parameters:
base – JPEG decoder peripheral base address.
-
static inline void JPEGDEC_StartDecode(JPEG_DECODER_Type *base)#
Starts the JPEG decode.
After calling this API the JPEG decoder will start decoding on a frame basis. The decoding process stops after the frame decoding is complete and if there are no other valid descriptors available. Auto-clear.
- Parameters:
base – JPEG decoder peripheral base address.
-
static inline void JPEGDEC_EnableSlots(JPEG_DECODER_Type *base, uint8_t slots)#
Enables the JPEG decoding slot(s)
- Parameters:
base – JPEG decoder peripheral base address.
slot – Masks of the enabled slot, _jpegdec_slots.
-
status_t JPEGDEC_GetActiveSlot(JPEG_DECODER_Type *base, uint8_t *slot)#
Gets the current active slot.
- Parameters:
base – JPEG decoder peripheral base address.
slot – [out] Pointer to the variable that stores the enabled slot.
- Return values:
kStatus_Success – Successfully get the current active slot.
kStatus_Fail – Current JPEG decoder is idle, no slot is active.
-
static inline void JPEGDEC_SetEndian(JPEG_DECODER_Type *base, jpegdec_endian_mode_t mode)#
Sets the JPEG decoder endian mode for decoded data.
- Parameters:
base – JPEG decoder peripheral base address.
mode – Endian mode.
-
void JPEGDEC_SetJpegBuffer(jpegdec_decoder_config_t *config, uint8_t *buffer, size_t length)#
Sets the address and length of the JPEG image.
- Parameters:
config – [out] Decoder configuration.
data – Start address of the buffer of the raw JPEG image, shall be 8-byte aligned.
length – Size of the buffer.
-
void JPEGDEC_SetOutputBuffer(jpegdec_decoder_config_t *config, uint8_t *imageData0, uint8_t *imageData1)#
Sets the address of the decoded data.
- Parameters:
config – [out] Decoder configuration.
imageData0 – Address of the output buffer0, shall be 16-byte aligned.
imageData1 – Address of the output buffer1, only used when output format is YUV420, shall be 16-byte aligned.
-
status_t JPEGDEC_ParseHeader(jpegdec_decoder_config_t *config)#
Parses the JPEG header and stores the info in the decoder configuration structure.
- Parameters:
config – [out] Decoder configuration.
- Return values:
kStatus_Success – Header parsing success.
kStatus_Fail – JPEG header parsing failed due corrupted header.
kStatus_JPEGDEC_NotSupported – Header parsing failed due to the image pixel format is not supported or image width/height is larger than 8k or image width/height is not 8-byte aligned.
-
void JPEGDEC_SetDecodeOption(jpegdec_decoder_config_t *config, uint16_t pitch, bool clearStreamBuf, bool autoStart)#
Sets the decode option.
- Parameters:
config – [out] Decoder configuration.
pitch – Output buffer pitch.
clearStreamBuf – Set to true to clear the saved bit stream buffer, not used in single frame mode.
autoStart – Set to true to automatically start the decoding when this descriptor is switched on, not used in single frame mode.
-
void JPEGDEC_ConfigDecoder(JPEG_DECODER_Type *base, const jpegdec_decoder_config_t *config)#
Sets JPEG decoder decoder configuration.
Call this API to set the decoder configuration and then call JPEGDEC_StartDecode to start decode. Need to enable at least one slot in jpegdec_config_t first.
- Parameters:
base – JPEG decoder peripheral base address.
config – Decoder configuration.
-
void JPEGDEC_SetSlotNextDescpt(JPEG_DECODER_Type *base, uint8_t slot, jpegdec_descpt_t *descriptor)#
Sets the address of the next decoder descriptor for certain slot.
Call this API to set the decoder descriptor for certain slot, and then call JPEGDEC_EnableSlotNextDescpt to enable the descriptor. If the decode configuration of this descriptor has enabled autoStart then decode will start automatically. Otherwise user has to call JPEGDEC_StartDecode manually. Need to enable the slot in jpegdec_config_t first.
- Parameters:
base – JPEG decoder peripheral base address.
slot – Slot number.
descriptor – Pointer to the descriptor structure.
-
static inline void JPEGDEC_EnableSlotNextDescpt(JPEG_DECODER_Type *base, uint8_t slot)#
Enables the next decoder descriptor for certain slot.
Call this API after calling JPEGDEC_SetSlotNextDescpt to set valid descriptor for certain slot. User can also call JPEGDEC_EnableLinkedDescpt before calling JPEGDEC_SetSlotNextDescpt, then the descriptor will be loaded automatically.
- Parameters:
base – JPEG decoder peripheral base address.
slot – Slot number.
-
static inline void JPEGDEC_EnableLinkedDescpt(jpegdec_descpt_t *descriptor)#
Enables the next linked descriptor.
Call this API before calling JPEGDEC_SetSlotNextDescpt, then the descriptor will be loaded automatically. Otherwise call JPEGDEC_EnableSlotNextDescpt after calling JPEGDEC_SetSlotNextDescpt.
- Parameters:
descriptor – [out] Pointer to the descriptor structure.
-
void JPEGDEC_DescptReset(jpegdec_descpt_t *descriptor)#
Sets all fields to default values for the descriptor structure.
Note
This function enables the auto start feature.
- Parameters:
descriptor – Pointer to the descriptor structure.
-
JPEGDEC_Type *core#
Pointer to decoder core.
-
JPGDECWRP_Type *wrapper#
Pointer to decoder wrapper.
-
uint32_t outBufAddr0#
Base address for output frame buffer0. 16-byte aligned(4 LSBs are zero).
-
uint32_t outBufAddr1#
Base address for output frame buffer1, only used for YUV420 second plane. 16-byte aligned(4 LSBs are zero).
-
uint32_t outBufPitch#
Output buffer pitch.
-
uint32_t __pad0__#
Reserved.
-
uint32_t jpegBufAddr#
Base address of the JPEG stream buffer for decoding. 16-byte aligned(4 LSBs are
zero).
-
uint32_t jpegBufSize#
Size of the JPEG stream buffer. 1k-byte aligned(10 LSBs are zero).
-
uint32_t height#
Image height in pixel. Max supported is 8K(2000h), must be integer times of 8.
-
uint32_t __pad1__#
Reserved.
-
uint32_t width#
Image width in pixel. Max supported is 8K(2000h), must be integer times of 8.
-
uint32_t __pad2__#
Reserved.
-
uint32_t __pad3__#
Reserved.
-
uint32_t pixelDepth#
Pixel depth, jpegdec_pixel_depth_t.
-
uint32_t pixelFormat#
The image pixel format, jpegdec_pixel_format_t.
-
uint32_t clearStreamBuf#
Set to true to clear the saved bit stream buffer.
-
uint32_t autoStart#
Set to true to automatically start the decoding when this descriptor is switched on.
-
uint32_t __pad4__#
Reserved.
-
uint32_t nextDescptAddr#
Address of the next decoding descriptor.
-
jpegdec_decoder_config_t config#
The decoding configuration for this descriptor.
-
bool enable#
Enables the decode IP.
-
bool enableLp#
Enables the core to enter low power mode.
-
jpegdec_endian_mode_t endianMode#
Endian mode for the souce/decoded image.
-
uint8_t slots#
Mask of enabled slots _jpegdec_slots.
-
JPEG_ALIGN_SIZE(size, align)#
-
struct JPEG_DECODER_Type#
- #include <fsl_jpegdec.h>
JPEG decoder structure definition.
-
struct _jpegdec_decoder_config#
- #include <fsl_jpegdec.h>
JPEG decoder configuration.
-
struct _jpegdec_descpt#
- #include <fsl_jpegdec.h>
JPEG decoder descriptor.
This structure is used to configure the linked decoding descriptor for one or more slots in Single Bit Stream Repeat mode or Context Switch mode.
-
struct _jpegdec_config#
- #include <fsl_jpegdec.h>
Configuration for JPEG decoder.
Common Driver#
-
FSL_COMMON_DRIVER_VERSION#
common driver version.
-
DEBUG_CONSOLE_DEVICE_TYPE_NONE#
No debug console.
-
DEBUG_CONSOLE_DEVICE_TYPE_UART#
Debug console based on UART.
-
DEBUG_CONSOLE_DEVICE_TYPE_LPUART#
Debug console based on LPUART.
-
DEBUG_CONSOLE_DEVICE_TYPE_LPSCI#
Debug console based on LPSCI.
-
DEBUG_CONSOLE_DEVICE_TYPE_USBCDC#
Debug console based on USBCDC.
-
DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM#
Debug console based on FLEXCOMM.
-
DEBUG_CONSOLE_DEVICE_TYPE_IUART#
Debug console based on i.MX UART.
-
DEBUG_CONSOLE_DEVICE_TYPE_VUSART#
Debug console based on LPC_VUSART.
-
DEBUG_CONSOLE_DEVICE_TYPE_MINI_USART#
Debug console based on LPC_USART.
-
DEBUG_CONSOLE_DEVICE_TYPE_SWO#
Debug console based on SWO.
-
DEBUG_CONSOLE_DEVICE_TYPE_QSCI#
Debug console based on QSCI.
-
MIN(a, b)#
Computes the minimum of a and b.
-
MAX(a, b)#
Computes the maximum of a and b.
-
UINT16_MAX#
Max value of uint16_t type.
-
UINT32_MAX#
Max value of uint32_t type.
-
UINTPTR_SIZE#
-
UINT64_H(X)#
Macro to get upper 32 bits of a 64-bit value
-
UINT64_L(X)#
Macro to get lower 32 bits of a 64-bit value
-
MCUX_MASK_INVERT_8(mask)#
8-bit mask inversion.
-
MCUX_MASK_INVERT_16(mask)#
16-bit mask inversion.
-
MCUX_MASK_INVERT_32(mask)#
32-bit mask inversion for completeness.
-
MCUX_REG_WRITE8(reg, value)#
8-bit register write macro
-
MCUX_REG_WRITE16(reg, value)#
16-bit register write macro
-
MCUX_REG_WRITE32(reg, value)#
32-bit register write macro
-
MCUX_REG_READ8(reg)#
8-bit register read macro
-
MCUX_REG_READ16(reg)#
16-bit register read macro
-
MCUX_REG_READ32(reg)#
32-bit register read macro
-
MCUX_REG_BIT_SET8(reg, mask)#
8-bit register bit set macro
-
MCUX_REG_BIT_SET16(reg, mask)#
16-bit register bit set macro
-
MCUX_REG_BIT_SET32(reg, mask)#
32-bit register bit set macro
-
MCUX_REG_BIT_CLEAR8(reg, mask)#
8-bit register bit clear macro
-
MCUX_REG_BIT_CLEAR16(reg, mask)#
16-bit register bit clear macro
-
MCUX_REG_BIT_CLEAR32(reg, mask)#
32-bit register bit clear macro
-
MCUX_REG_BIT_GET8(reg, mask)#
8-bit register bit get macro
-
MCUX_REG_BIT_GET16(reg, mask)#
16-bit register bit get macro
-
MCUX_REG_BIT_GET32(reg, mask)#
32-bit register bit get macro
-
MCUX_REG_MODIFY8(reg, mask, value)#
32-bit register read-modify-write macro
-
MCUX_REG_MODIFY16(reg, mask, value)#
16-bit register read-modify-write macro
-
MCUX_REG_MODIFY32(reg, mask, value)#
32-bit register read-modify-write macro
-
SDK_ATOMIC_LOCAL_ADD(addr, val)#
Add value val from the variable at address address.
-
SDK_ATOMIC_LOCAL_SUB(addr, val)#
Subtract value val to the variable at address address.
-
SDK_ATOMIC_LOCAL_SET(addr, bits)#
Set the bits specifiled by bits to the variable at address address.
-
SDK_ATOMIC_LOCAL_CLEAR(addr, bits)#
Clear the bits specifiled by bits to the variable at address address.
-
SDK_ATOMIC_LOCAL_TOGGLE(addr, bits)#
Toggle the bits specifiled by bits to the variable at address address.
-
SDK_ATOMIC_LOCAL_CLEAR_AND_SET(addr, clearBits, setBits)#
For the variable at address address, clear the bits specifiled by clearBits and set the bits specifiled by setBits.
-
SDK_ATOMIC_LOCAL_COMPARE_AND_SET(addr, expected, newValue)#
For the variable at address address, check whether the value equal to expected. If value same as expected then update newValue to address and return true , else return false .
-
SDK_ATOMIC_LOCAL_TEST_AND_SET(addr, newValue)#
For the variable at address address, set as newValue value and return old value.
-
USEC_TO_COUNT(us, clockFreqInHz)#
Macro to convert a microsecond period to raw count value
-
COUNT_TO_USEC(count, clockFreqInHz)#
Macro to convert a raw count value to microsecond
-
MSEC_TO_COUNT(ms, clockFreqInHz)#
Macro to convert a millisecond period to raw count value
-
COUNT_TO_MSEC(count, clockFreqInHz)#
Macro to convert a raw count value to millisecond
-
SDK_ISR_EXIT_BARRIER#
-
SDK_ALIGN(var, alignbytes)#
Macro to define a variable with alignbytes alignment
-
SDK_L1DCACHE_ALIGN(var)#
Macro to define a variable with L1 d-cache line size alignment
-
SDK_SIZEALIGN(var, alignbytes)#
Macro to define a variable with L2 cache line size alignment
Macro to change a value to a given size aligned value (rounded up)
-
SDK_SIZEALIGN_UP(var, alignbytes)#
Macro to change a value to a given size aligned value (rounded up), the wrapper of SDK_SIZEALIGN
-
SDK_SIZEALIGN_DOWN(var, alignbytes)#
Macro to change a value to a given size aligned value (rounded down)
-
SDK_IS_ALIGNED(var, alignbytes)#
Macro to check if a value is aligned to a given size
-
AT_NONCACHEABLE_SECTION(var)#
Define a variable var, and place it in non-cacheable section.
-
AT_NONCACHEABLE_SECTION_ALIGN(var, alignbytes)#
Define a variable var, and place it in non-cacheable section, the start address of the variable is aligned to alignbytes.
-
AT_NONCACHEABLE_SECTION_INIT(var)#
Define a variable var with initial value, and place it in non-cacheable section.
-
AT_NONCACHEABLE_SECTION_ALIGN_INIT(var, alignbytes)#
Define a variable var with initial value, and place it in non-cacheable section, the start address of the variable is aligned to alignbytes.
-
MCUX_CS#
-
AT_CACHE_LINE_SECTION(var)#
Define a variable var, which is cache line size aligned and be placed in CacheLineData section.
-
AT_CACHE_LINE_SECTION_INIT(var)#
Define a variable var with initial value, which is cache line size aligned and be placed in CacheLineData.init section.
-
CACHE_LINE_DATA#
-
AT_QUICKACCESS_SECTION_CODE(func)#
Place function in a section which can be accessed quickly by core.
-
AT_QUICKACCESS_SECTION_DATA(var)#
Place data in a section which can be accessed quickly by core.
-
AT_QUICKACCESS_SECTION_DATA_ALIGN(var, alignbytes)#
Place data in a section which can be accessed quickly by core, and the variable address is set to align with alignbytes.
-
MCUX_RAMFUNC#
Function attribute to place function in RAM. For example, to place function my_func in ram, use like:
MCUX_RAMFUNC my_func
-
RAMFUNCTION_SECTION_CODE(func)#
Place function in ram.
-
MCUX_DEPRECATED#
Deprecated APIs.
-
MCUX_DEPRECATED_MACRO#
Deprecated macros.
-
MCUX_EXPERIMENTAL#
Experimental APIs.
-
MCUX_EXPERIMENTAL_MACRO#
Experimental macros.
-
enum _status_groups#
Status group numbers.
Values:
-
enumerator kStatusGroup_Generic#
Group number for generic status codes.
-
enumerator kStatusGroup_FLASH#
Group number for FLASH status codes.
-
enumerator kStatusGroup_LPSPI#
Group number for LPSPI status codes.
-
enumerator kStatusGroup_FLEXIO_SPI#
Group number for FLEXIO SPI status codes.
-
enumerator kStatusGroup_DSPI#
Group number for DSPI status codes.
-
enumerator kStatusGroup_FLEXIO_UART#
Group number for FLEXIO UART status codes.
-
enumerator kStatusGroup_FLEXIO_I2C#
Group number for FLEXIO I2C status codes.
-
enumerator kStatusGroup_LPI2C#
Group number for LPI2C status codes.
-
enumerator kStatusGroup_UART#
Group number for UART status codes.
-
enumerator kStatusGroup_I2C#
Group number for UART status codes.
-
enumerator kStatusGroup_LPSCI#
Group number for LPSCI status codes.
-
enumerator kStatusGroup_LPUART#
Group number for LPUART status codes.
-
enumerator kStatusGroup_SPI#
Group number for SPI status code.
-
enumerator kStatusGroup_XRDC#
Group number for XRDC status code.
-
enumerator kStatusGroup_SEMA42#
Group number for SEMA42 status code.
-
enumerator kStatusGroup_SDHC#
Group number for SDHC status code
-
enumerator kStatusGroup_SDMMC#
Group number for SDMMC status code
-
enumerator kStatusGroup_SAI#
Group number for SAI status code
-
enumerator kStatusGroup_MCG#
Group number for MCG status codes.
-
enumerator kStatusGroup_SCG#
Group number for SCG status codes.
-
enumerator kStatusGroup_SDSPI#
Group number for SDSPI status codes.
-
enumerator kStatusGroup_FLEXIO_I2S#
Group number for FLEXIO I2S status codes
-
enumerator kStatusGroup_FLEXIO_MCULCD#
Group number for FLEXIO LCD status codes
-
enumerator kStatusGroup_FLASHIAP#
Group number for FLASHIAP status codes
-
enumerator kStatusGroup_FLEXCOMM_I2C#
Group number for FLEXCOMM I2C status codes
-
enumerator kStatusGroup_I2S#
Group number for I2S status codes
-
enumerator kStatusGroup_IUART#
Group number for IUART status codes
-
enumerator kStatusGroup_CSI#
Group number for CSI status codes
-
enumerator kStatusGroup_MIPI_DSI#
Group number for MIPI DSI status codes
-
enumerator kStatusGroup_SDRAMC#
Group number for SDRAMC status codes.
-
enumerator kStatusGroup_POWER#
Group number for POWER status codes.
-
enumerator kStatusGroup_ENET#
Group number for ENET status codes.
-
enumerator kStatusGroup_PHY#
Group number for PHY status codes.
-
enumerator kStatusGroup_TRGMUX#
Group number for TRGMUX status codes.
-
enumerator kStatusGroup_SMARTCARD#
Group number for SMARTCARD status codes.
-
enumerator kStatusGroup_LMEM#
Group number for LMEM status codes.
-
enumerator kStatusGroup_QSPI#
Group number for QSPI status codes.
-
enumerator kStatusGroup_DMA#
Group number for DMA status codes.
-
enumerator kStatusGroup_EDMA#
Group number for EDMA status codes.
-
enumerator kStatusGroup_DMAMGR#
Group number for DMAMGR status codes.
-
enumerator kStatusGroup_FLEXCAN#
Group number for FlexCAN status codes.
-
enumerator kStatusGroup_LTC#
Group number for LTC status codes.
-
enumerator kStatusGroup_FLEXIO_CAMERA#
Group number for FLEXIO CAMERA status codes.
-
enumerator kStatusGroup_LPC_SPI#
Group number for LPC_SPI status codes.
-
enumerator kStatusGroup_LPC_USART#
Group number for LPC_USART status codes.
-
enumerator kStatusGroup_DMIC#
Group number for DMIC status codes.
-
enumerator kStatusGroup_SDIF#
Group number for SDIF status codes.
-
enumerator kStatusGroup_SPIFI#
Group number for SPIFI status codes.
-
enumerator kStatusGroup_OTP#
Group number for OTP status codes.
-
enumerator kStatusGroup_MCAN#
Group number for MCAN status codes.
-
enumerator kStatusGroup_CAAM#
Group number for CAAM status codes.
-
enumerator kStatusGroup_ECSPI#
Group number for ECSPI status codes.
-
enumerator kStatusGroup_USDHC#
Group number for USDHC status codes.
-
enumerator kStatusGroup_LPC_I2C#
Group number for LPC_I2C status codes.
-
enumerator kStatusGroup_DCP#
Group number for DCP status codes.
-
enumerator kStatusGroup_MSCAN#
Group number for MSCAN status codes.
-
enumerator kStatusGroup_ESAI#
Group number for ESAI status codes.
-
enumerator kStatusGroup_FLEXSPI#
Group number for FLEXSPI status codes.
-
enumerator kStatusGroup_MMDC#
Group number for MMDC status codes.
-
enumerator kStatusGroup_PDM#
Group number for MIC status codes.
-
enumerator kStatusGroup_SDMA#
Group number for SDMA status codes.
-
enumerator kStatusGroup_ICS#
Group number for ICS status codes.
-
enumerator kStatusGroup_SPDIF#
Group number for SPDIF status codes.
-
enumerator kStatusGroup_LPC_MINISPI#
Group number for LPC_MINISPI status codes.
-
enumerator kStatusGroup_HASHCRYPT#
Group number for Hashcrypt status codes
-
enumerator kStatusGroup_LPC_SPI_SSP#
Group number for LPC_SPI_SSP status codes.
-
enumerator kStatusGroup_I3C#
Group number for I3C status codes
-
enumerator kStatusGroup_LPC_I2C_1#
Group number for LPC_I2C_1 status codes.
-
enumerator kStatusGroup_NOTIFIER#
Group number for NOTIFIER status codes.
-
enumerator kStatusGroup_DebugConsole#
Group number for debug console status codes.
-
enumerator kStatusGroup_SEMC#
Group number for SEMC status codes.
-
enumerator kStatusGroup_ApplicationRangeStart#
Starting number for application groups.
-
enumerator kStatusGroup_IAP#
Group number for IAP status codes
-
enumerator kStatusGroup_SFA#
Group number for SFA status codes
-
enumerator kStatusGroup_SPC#
Group number for SPC status codes.
-
enumerator kStatusGroup_PUF#
Group number for PUF status codes.
-
enumerator kStatusGroup_TOUCH_PANEL#
Group number for touch panel status codes
-
enumerator kStatusGroup_VBAT#
Group number for VBAT status codes
-
enumerator kStatusGroup_XSPI#
Group number for XSPI status codes
-
enumerator kStatusGroup_PNGDEC#
Group number for PNGDEC status codes
-
enumerator kStatusGroup_JPEGDEC#
Group number for JPEGDEC status codes
-
enumerator kStatusGroup_AUDMIX#
Group number for AUDMIX status codes
-
enumerator kStatusGroup_HAL_GPIO#
Group number for HAL GPIO status codes.
-
enumerator kStatusGroup_HAL_UART#
Group number for HAL UART status codes.
-
enumerator kStatusGroup_HAL_TIMER#
Group number for HAL TIMER status codes.
-
enumerator kStatusGroup_HAL_SPI#
Group number for HAL SPI status codes.
-
enumerator kStatusGroup_HAL_I2C#
Group number for HAL I2C status codes.
-
enumerator kStatusGroup_HAL_FLASH#
Group number for HAL FLASH status codes.
-
enumerator kStatusGroup_HAL_PWM#
Group number for HAL PWM status codes.
-
enumerator kStatusGroup_HAL_RNG#
Group number for HAL RNG status codes.
-
enumerator kStatusGroup_HAL_I2S#
Group number for HAL I2S status codes.
-
enumerator kStatusGroup_HAL_ADC_SENSOR#
Group number for HAL ADC SENSOR status codes.
-
enumerator kStatusGroup_TIMERMANAGER#
Group number for TiMER MANAGER status codes.
-
enumerator kStatusGroup_SERIALMANAGER#
Group number for SERIAL MANAGER status codes.
-
enumerator kStatusGroup_LED#
Group number for LED status codes.
-
enumerator kStatusGroup_BUTTON#
Group number for BUTTON status codes.
-
enumerator kStatusGroup_EXTERN_EEPROM#
Group number for EXTERN EEPROM status codes.
-
enumerator kStatusGroup_SHELL#
Group number for SHELL status codes.
-
enumerator kStatusGroup_MEM_MANAGER#
Group number for MEM MANAGER status codes.
-
enumerator kStatusGroup_LIST#
Group number for List status codes.
-
enumerator kStatusGroup_OSA#
Group number for OSA status codes.
-
enumerator kStatusGroup_COMMON_TASK#
Group number for Common task status codes.
-
enumerator kStatusGroup_MSG#
Group number for messaging status codes.
-
enumerator kStatusGroup_SDK_OCOTP#
Group number for OCOTP status codes.
-
enumerator kStatusGroup_SDK_FLEXSPINOR#
Group number for FLEXSPINOR status codes.
-
enumerator kStatusGroup_CODEC#
Group number for codec status codes.
-
enumerator kStatusGroup_ASRC#
Group number for codec status ASRC.
-
enumerator kStatusGroup_OTFAD#
Group number for codec status codes.
-
enumerator kStatusGroup_SDIOSLV#
Group number for SDIOSLV status codes.
-
enumerator kStatusGroup_MECC#
Group number for MECC status codes.
-
enumerator kStatusGroup_ENET_QOS#
Group number for ENET_QOS status codes.
-
enumerator kStatusGroup_LOG#
Group number for LOG status codes.
-
enumerator kStatusGroup_I3CBUS#
Group number for I3CBUS status codes.
-
enumerator kStatusGroup_QSCI#
Group number for QSCI status codes.
-
enumerator kStatusGroup_ELEMU#
Group number for ELEMU status codes.
-
enumerator kStatusGroup_QUEUEDSPI#
Group number for QSPI status codes.
-
enumerator kStatusGroup_POWER_MANAGER#
Group number for POWER_MANAGER status codes.
-
enumerator kStatusGroup_IPED#
Group number for IPED status codes.
-
enumerator kStatusGroup_ELS_PKC#
Group number for ELS PKC status codes.
-
enumerator kStatusGroup_CSS_PKC#
Group number for CSS PKC status codes.
-
enumerator kStatusGroup_HOSTIF#
Group number for HOSTIF status codes.
-
enumerator kStatusGroup_CLIF#
Group number for CLIF status codes.
-
enumerator kStatusGroup_BMA#
Group number for BMA status codes.
-
enumerator kStatusGroup_NETC#
Group number for NETC status codes.
-
enumerator kStatusGroup_ELE#
Group number for ELE status codes.
-
enumerator kStatusGroup_GLIKEY#
Group number for GLIKEY status codes.
-
enumerator kStatusGroup_AON_POWER#
Group number for AON_POWER status codes.
-
enumerator kStatusGroup_AON_COMMON#
Group number for AON_COMMON status codes.
-
enumerator kStatusGroup_ENDAT3#
Group number for ENDAT3 status codes.
-
enumerator kStatusGroup_HIPERFACE#
Group number for HIPERFACE status codes.
-
enumerator kStatusGroup_NPX#
Group number for NPX status codes.
-
enumerator kStatusGroup_ELA_CSEC#
Group number for ELA_CSEC status codes.
-
enumerator kStatusGroup_FLEXIO_T_FORMAT#
Group number for T-format status codes.
-
enumerator kStatusGroup_FLEXIO_A_FORMAT#
Group number for A-format status codes.
-
enumerator kStatusGroup_LPC_QSPI#
Group number for LPC QSPI status codes.
-
enumerator kStatusGroup_EVENT_CTRL#
Group number for Event controller status codes.
-
enumerator kStatusGroup_Generic#
Generic status return codes.
Values:
-
enumerator kStatus_Success#
Generic status for Success.
-
enumerator kStatus_Fail#
Generic status for Fail.
-
enumerator kStatus_ReadOnly#
Generic status for read only failure.
-
enumerator kStatus_OutOfRange#
Generic status for out of range access.
-
enumerator kStatus_InvalidArgument#
Generic status for invalid argument check.
-
enumerator kStatus_Timeout#
Generic status for timeout.
-
enumerator kStatus_NoTransferInProgress#
Generic status for no transfer in progress.
-
enumerator kStatus_Busy#
Generic status for module is busy.
-
enumerator kStatus_NoData#
Generic status for no data is found for the operation.
-
enumerator kStatus_Success#
-
typedef int32_t status_t#
Type used for all status and error return values.
-
void *SDK_Malloc(size_t size, size_t alignbytes)#
Allocate memory with given alignment and aligned size.
This is provided to support the dynamically allocated memory used in cache-able region.
- Parameters:
size – The length required to malloc.
alignbytes – The alignment size.
- Return values:
The – allocated memory.
-
void SDK_Free(void *ptr)#
Free memory.
- Parameters:
ptr – The memory to be release.
-
void SDK_DelayAtLeastUs(uint32_t delayTime_us, uint32_t coreClock_Hz)#
Delay at least for some time. Please note that, this API uses while loop for delay, different run-time environments make the time not precise, if precise delay count was needed, please implement a new delay function with hardware timer.
- Parameters:
delayTime_us – Delay time in unit of microsecond.
coreClock_Hz – Core clock frequency with Hz.
-
static inline status_t EnableIRQ(IRQn_Type interrupt)#
Enable specific interrupt.
Enable LEVEL1 interrupt. For some devices, there might be multiple interrupt levels. For example, there are NVIC and intmux. Here the interrupts connected to NVIC are the LEVEL1 interrupts, because they are routed to the core directly. The interrupts connected to intmux are the LEVEL2 interrupts, they are routed to NVIC first then routed to core.
This function only enables the LEVEL1 interrupts. The number of LEVEL1 interrupts is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.
- Parameters:
interrupt – The IRQ number.
- Return values:
kStatus_Success – Interrupt enabled successfully
kStatus_Fail – Failed to enable the interrupt
-
static inline status_t DisableIRQ(IRQn_Type interrupt)#
Disable specific interrupt.
Disable LEVEL1 interrupt. For some devices, there might be multiple interrupt levels. For example, there are NVIC and intmux. Here the interrupts connected to NVIC are the LEVEL1 interrupts, because they are routed to the core directly. The interrupts connected to intmux are the LEVEL2 interrupts, they are routed to NVIC first then routed to core.
This function only disables the LEVEL1 interrupts. The number of LEVEL1 interrupts is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.
- Parameters:
interrupt – The IRQ number.
- Return values:
kStatus_Success – Interrupt disabled successfully
kStatus_Fail – Failed to disable the interrupt
-
static inline status_t EnableIRQWithPriority(IRQn_Type interrupt, uint8_t priNum)#
Enable the IRQ, and also set the interrupt priority.
Only handle LEVEL1 interrupt. For some devices, there might be multiple interrupt levels. For example, there are NVIC and intmux. Here the interrupts connected to NVIC are the LEVEL1 interrupts, because they are routed to the core directly. The interrupts connected to intmux are the LEVEL2 interrupts, they are routed to NVIC first then routed to core.
This function only handles the LEVEL1 interrupts. The number of LEVEL1 interrupts is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.
- Parameters:
interrupt – The IRQ to Enable.
priNum – Priority number set to interrupt controller register.
- Return values:
kStatus_Success – Interrupt priority set successfully
kStatus_Fail – Failed to set the interrupt priority.
-
static inline status_t IRQ_SetPriority(IRQn_Type interrupt, uint8_t priNum)#
Set the IRQ priority.
Only handle LEVEL1 interrupt. For some devices, there might be multiple interrupt levels. For example, there are NVIC and intmux. Here the interrupts connected to NVIC are the LEVEL1 interrupts, because they are routed to the core directly. The interrupts connected to intmux are the LEVEL2 interrupts, they are routed to NVIC first then routed to core.
This function only handles the LEVEL1 interrupts. The number of LEVEL1 interrupts is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.
- Parameters:
interrupt – The IRQ to set.
priNum – Priority number set to interrupt controller register.
- Return values:
kStatus_Success – Interrupt priority set successfully
kStatus_Fail – Failed to set the interrupt priority.
-
static inline status_t IRQ_ClearPendingIRQ(IRQn_Type interrupt)#
Clear the pending IRQ flag.
Only handle LEVEL1 interrupt. For some devices, there might be multiple interrupt levels. For example, there are NVIC and intmux. Here the interrupts connected to NVIC are the LEVEL1 interrupts, because they are routed to the core directly. The interrupts connected to intmux are the LEVEL2 interrupts, they are routed to NVIC first then routed to core.
This function only handles the LEVEL1 interrupts. The number of LEVEL1 interrupts is indicated by the feature macro FSL_FEATURE_NUMBER_OF_LEVEL1_INT_VECTORS.
- Parameters:
interrupt – The flag which IRQ to clear.
- Return values:
kStatus_Success – Interrupt priority set successfully
kStatus_Fail – Failed to set the interrupt priority.
-
static inline uint32_t DisableGlobalIRQ(void)#
Disable the global IRQ.
Disable the global interrupt and return the current primask register. User is required to provided the primask register for the EnableGlobalIRQ().
- Returns:
Current primask value.
-
static inline void EnableGlobalIRQ(uint32_t primask)#
Enable the global IRQ.
Set the primask register with the provided primask value but not just enable the primask. The idea is for the convenience of integration of RTOS. some RTOS get its own management mechanism of primask. User is required to use the EnableGlobalIRQ() and DisableGlobalIRQ() in pair.
- Parameters:
primask – value of primask register to be restored. The primask value is supposed to be provided by the DisableGlobalIRQ().
-
static inline bool _SDK_AtomicLocalCompareAndSet(uint32_t *addr, uint32_t expected, uint32_t newValue)#
-
static inline uint32_t _SDK_AtomicTestAndSet(uint32_t *addr, uint32_t newValue)#
-
FSL_DRIVER_TRANSFER_DOUBLE_WEAK_IRQ#
Macro to use the default weak IRQ handler in drivers.
-
MAKE_STATUS(statusGroup, statusCode)#
Construct a status code value from a group and code number.
-
MAKE_VERSION(major, minor, bugfix)#
Construct the version number for drivers.
The driver version is a 32-bit number, for both 32-bit platforms(such as Cortex M) and 16-bit platforms(such as DSC).
| Unused || Major Version || Minor Version || Bug Fix | 31 25 24 17 16 9 8 0
-
ARRAY_SIZE(x)#
Computes the number of elements in an array.
-
SUPPRESS_FALL_THROUGH_WARNING()#
For switch case code block, if case section ends without “break;” statement, there wil be fallthrough warning with compiler flag -Wextra or -Wimplicit-fallthrough=n when using armgcc. To suppress this warning, “SUPPRESS_FALL_THROUGH_WARNING();” need to be added at the end of each case section which misses “break;”statement.
-
MCUX_BUILD_ASSERT(cond, msg)#
Compile-time assertion macro.
Triggers a compile error when the constant expression
condevaluates to false, printingmsgas the diagnostic message.Example:
MCUX_BUILD_ASSERT(sizeof(uint32_t) == 4U, "uint32_t must be 4 bytes");
- Parameters:
cond – A constant integer expression that must evaluate to non-zero.
msg – A string literal that the compiler emits when
condis false.
-
MSDK_REG_SECURE_ADDR(x)#
Convert the register address to the one used in secure mode.
-
MSDK_REG_NONSECURE_ADDR(x)#
Convert the register address to the one used in non-secure mode.
-
MSDK_HAS_DWT_CYCCNT#
The chip supports DWT CYCCNT or not.
-
MSDK_INVALID_IRQ_HANDLER#
Invalid IRQ handler address.
Llc#
-
void LLC_GetDefaultConfig(llc_config_t *config)#
Gets the default configuration structure.
This function initializes the LLC configuration structure to default values. The default values are:
config->enableErrorDetection = true; config->enableWriteAllocPartial = true; config->scratchpadConfig = NULL;
- Parameters:
config – Pointer to configuration structure.
-
status_t LLC_Init(LLC_Type *base, const llc_config_t *config)#
Initializes the LLC module.
This function configures the LLC module with user-defined settings. It initializes the tag and data arrays and configures basic settings.
- Parameters:
base – LLC peripheral base address.
config – Pointer to configuration structure.
- Returns:
kStatus_Success LLC initialization succeeded.
- Returns:
kStatus_InvalidArgument Invalid argument provided.
- Returns:
kStatus_Timeout The tag/data array initialization did not complete within the driver’s maintenance poll budget. See the LLC Cache Operations group for what that budget covers.
-
void LLC_EnableCache(LLC_Type *base)#
Enables the LLC.
This function enables cache lookup and fill operations.
- Parameters:
base – LLC peripheral base address.
-
void LLC_DisableCache(LLC_Type *base)#
Disables the LLC.
This function disables cache lookup and fill operations.
- Parameters:
base – LLC peripheral base address.
-
void LLC_GetVersion(LLC_Type *base, llc_version_info_t *versionInfo)#
Gets the LLC version.
- Parameters:
base – LLC peripheral base address.
versionInfo – Pointer to version information structure.
-
void LLC_GetCapabilities(LLC_Type *base, llc_feature_capability_t *feature)#
Gets LLC feature capabilities.
- Parameters:
base – LLC peripheral base address.
feature – Pointer to feature capability to query.
-
status_t LLC_CleanInvalidateCache(LLC_Type *base)#
Cleans and invalidates the entire cache.
This operation evicts all dirty line and invalidates all lines from ways designed as valid by the CCUCMWVR register in the cache and leaves all entries of these valid ways in an invalid state.
- Parameters:
base – LLC peripheral base address.
- Returns:
kStatus_Success Cache invalidation succeeded.
- Returns:
kStatus_Timeout Maintenance operation timeout.
-
status_t LLC_CleanInvalidateCacheAtSetAndWay(LLC_Type *base, uint16_t set, uint8_t way)#
Cleans and invalidates cache at specific set and way.
This API evicts a dirty line. It invalidates all lines at the specified physical set and way in the cache. It leaves the entry in the invalid state.
- Parameters:
base – LLC peripheral base address.
set – Cache set index, starting from 0.
way – Cache way index, starting from 0.
- Returns:
kStatus_Success Cache invalidation succeeded.
- Returns:
kStatus_InvalidArgument Invalid set or way.
- Returns:
kStatus_Timeout Maintenance operation timeout.
-
status_t LLC_CleanInvalidateCacheAtAddress(LLC_Type *base, uint32_t address)#
Cleans and invalidates cache at address.
This operation evicts a dirty line and invalidates all lines matching the specified address, if any, in the cache and leaves the entry in the invalid state.
- Parameters:
base – LLC peripheral base address.
address – Low 32 bits cache line address to invalidate.
- Returns:
kStatus_Success Cache invalidation succeeded.
- Returns:
kStatus_Timeout Maintenance operation timeout.
-
status_t LLC_CleanInvalidateCacheAtAddressRange(LLC_Type *base, uint32_t address, uint16_t sizeInCacheLines)#
Cleans and invalidates cache at address range.
This operation evicts a dirty line and invalidates all lines matching the specified address, if any, in the cache and leaves the entry in the invalid state.
- Parameters:
base – LLC peripheral base address.
address – Low 32 bits starting cache line address to invalidate.
sizeInCacheLines – Number of cache lines to invalidate.
- Returns:
kStatus_Success Cache invalidation succeeded.
- Returns:
kStatus_Timeout Maintenance operation timeout.
-
status_t LLC_CleanInvalidateCacheAtSetWayRange(LLC_Type *base, uint16_t set, uint8_t way, uint16_t sizeInCacheLines)#
Cleans and invalidates cache at set and way range.
This operation evicts all dirty lines and invalidates all lines within the specified physical set and way range in the cache.
- Parameters:
base – LLC peripheral base address.
set – Starting cache set index.
way – Starting cache way index.
sizeInCacheLines – Number of cache lines to invalidate.
- Returns:
kStatus_Success Cache invalidation succeeded.
- Returns:
kStatus_InvalidArgument Invalid parameters.
- Returns:
kStatus_Timeout Maintenance operation timeout.
-
status_t LLC_CleanInvalidateCacheByRange(uint32_t address, uint32_t sizeByte)#
Cleans and invalidates cache by range using physical address.
This API uses the physical address to locate the corresponding LLC instance, aligns the range to cache line boundaries, and issues one or more address-range maintenance operations to invalidate the requested memory region.
The operation evicts any dirty lines in the affected range (write-back) and invalidates them.
The complete range must be contained within one LLC physical-memory alias.
- Parameters:
address – The physical start address.
sizeByte – Size of the memory to be invalidated in bytes. Must be > 0. Better to align to cache line size.
- Returns:
kStatus_Success Cache invalidation succeeded.
- Returns:
kStatus_InvalidArgument Invalid parameters.
- Returns:
kStatus_Timeout Maintenance operation timeout.
-
status_t LLC_ConfigScratchpad(LLC_Type *base, const llc_scratchpad_config_t *config)#
Configures the scratchpad.
- Parameters:
base – LLC peripheral base address.
config – Pointer to scratchpad configuration.
- Returns:
kStatus_Success Scratchpad configuration succeeded.
- Returns:
kStatus_InvalidArgument Invalid configuration.
-
status_t LLC_SetCacheOverride(LLC_Type *base, llc_cache_override_t overrideType, uint8_t overrideValue)#
Sets cache override configuration.
- Parameters:
base – LLC peripheral base address.
overrideType – Type of cache override to configure.
overrideValue – Cache override value (AxCACHE bits).
- Returns:
kStatus_Success Cache override configuration succeeded.
- Returns:
kStatus_InvalidArgument Invalid parameters.
-
status_t LLC_ConfigWayPartition(LLC_Type *base, uint8_t partitionIndex, const llc_way_partition_config_t *config)#
Configures way partitioning.
- Parameters:
base – LLC peripheral base address.
partitionIndex – Way partition control register set index (0-7).
config – Pointer to way partitioning configuration.
- Returns:
kStatus_Success Way partitioning configuration succeeded.
- Returns:
kStatus_InvalidArgument Invalid parameters.
-
status_t LLC_EnableErrorDetection(LLC_Type *base, llc_error_type_t errorType, bool enable)#
Enables or disables error detection.
- Parameters:
base – LLC peripheral base address.
errorType – Type of error detection to configure.
enable – True to enable, false to disable.
- Returns:
kStatus_Success Error detection configuration succeeded.
- Returns:
kStatus_InvalidArgument Invalid error type.
-
status_t LLC_GetErrorStatus(LLC_Type *base, llc_error_status_t *errorStatus)#
Gets error status.
Note: errorStatus->correctableErrorValid and errorStatus->uncorrectableErrorValid reflect the same hardware bits exposed as status flags by LLC_GetStatusFlags(). Prefer LLC_GetStatusFlags() for quick checks; use this API for full details.
- Parameters:
base – LLC peripheral base address.
errorStatus – Pointer to error status structure.
- Returns:
kStatus_Success Error status retrieved successfully.
- Returns:
kStatus_InvalidArgument Invalid argument.
-
static inline void LLC_SetCorrectableErrorInterruptThreshold(LLC_Type *base, uint8_t threshold)#
Set Error Threshold.
Set the number of correctable errors that must be corrected before the correctable error interrupt output signal (IRQ_C_LEVEL) is asserted.
-
void LLC_RegisterCallBack(LLC_Type *base, llc_callback_t callback)#
Registers a user callback for an LLC instance.
The callback is invoked from the LLC interrupt handler for the given instance. Callbacks are stored per instance, so multiple LLC instances can each register their own handler. Pass NULL to unregister.
Note
Registering a callback and enabling an LLC interrupt source through LLC_EnableInterrupts() is not sufficient by itself to deliver the callback. The application must also enable the corresponding NVIC channel, e.g.
The driver deliberately does not touch the NVIC so the application retains full control over interrupt priority and masking.EnableIRQ(CMPT_LLC_IRQn);
- Parameters:
base – LLC peripheral base address.
callback – User callback function, or NULL to unregister.
-
void LLC_EnableInterrupts(LLC_Type *base, uint32_t mask)#
Enable LLC interrupts.
- Parameters:
base – LLC peripheral base address.
mask – Mask of interrupts to enable. This is a logical OR of members of the enumeration llc_interrupt_enable_t
-
void LLC_DisableInterrupts(LLC_Type *base, uint32_t mask)#
Disable LLC interrupts.
- Parameters:
base – LLC peripheral base address.
mask – Mask of interrupts to disable. This is a logical OR of members of the enumeration llc_interrupt_enable_t
-
uint32_t LLC_GetEnabledInterrupts(LLC_Type *base)#
Gets enabled LLC interrupts.
- Parameters:
base – LLC peripheral base address.
- Returns:
Mask of enabled interrupts. This is a logical OR of members of the enumeration llc_interrupt_enable_t
-
uint32_t LLC_GetStatusFlags(LLC_Type *base)#
Gets LLC status flags.
Note: The error-valid flags reported here (kLLC_CorrectableErrorValidFlag and kLLC_UncorrectableErrorValidFlag) mirror the corresponding fields returned by LLC_GetErrorStatus(). Use this function for a quick poll; call LLC_GetErrorStatus() when you need detailed error information.
- Parameters:
base – LLC peripheral base address.
- Returns:
LLC status flags. This is a logical OR of members of the enumeration llc_status_flags_t
-
void LLC_ClearStatusFlags(LLC_Type *base, uint32_t mask)#
Clears LLC status flags.
- Parameters:
base – LLC peripheral base address.
mask – Mask of status flags to clear. This is a logical OR of members of the enumeration llc_status_flags_t
-
status_t LLC_InitPerformanceMonitor(LLC_Type *base, const llc_performance_config_t *config)#
Initializes performance monitor.
- Parameters:
base – LLC peripheral base address.
config – Pointer to performance monitor configuration.
- Returns:
kStatus_Success Performance monitor initialization succeeded.
- Returns:
kStatus_InvalidArgument Invalid configuration.
-
void LLC_StartPerformanceMonitor(LLC_Type *base)#
Starts performance monitoring.
- Parameters:
base – LLC peripheral base address.
-
void LLC_StopPerformanceMonitor(LLC_Type *base)#
Stops performance monitoring.
- Parameters:
base – LLC peripheral base address.
-
void LLC_ResetPerformanceCounters(LLC_Type *base)#
Resets performance monitor counters.
- Parameters:
base – LLC peripheral base address.
-
status_t LLC_GetPerformanceCounters(LLC_Type *base, llc_performance_counters_t *counters)#
Gets performance monitor counters.
- Parameters:
base – LLC peripheral base address.
counters – Pointer to performance counters structure.
- Returns:
kStatus_Success Performance counters retrieved successfully.
- Returns:
kStatus_InvalidArgument Invalid argument.
-
FSL_LLC_DRIVER_VERSION#
cache driver version.
-
enum _llc_maintenance_operation#
LLC maintenance operation types.
Values:
-
enumerator kLLC_MaintenanceInitValidEntries#
Initialize valid entries
-
enumerator kLLC_MaintenanceFlushValidEntries#
Flush valid entries
-
enumerator kLLC_MaintenanceFlushEntrySetWay#
Flush entry at set and way
-
enumerator kLLC_MaintenanceFlushEntryAddress#
Flush entry at address
-
enumerator kLLC_MaintenanceFlushAddressRange#
Flush address range
-
enumerator kLLC_MaintenanceFlushSetWayRange#
Flush set way range
-
enumerator kLLC_MaintenanceInitValidEntries#
-
enum _llc_cache_override#
LLC cache override types.
Values:
-
enumerator kLLC_CacheOverrideWrite#
Write channel cache override
-
enumerator kLLC_CacheOverrideRead#
Read channel cache override
-
enumerator kLLC_CacheOverrideDisable#
Disable cache override
-
enumerator kLLC_CacheOverrideWrite#
-
enum _llc_error_type#
LLC error types.
Values:
-
enumerator kLLC_ErrorCorrectable#
Correctable error
-
enumerator kLLC_ErrorUncorrectableMemory#
Uncorrectable memory error
-
enumerator kLLC_ErrorUncorrectableProtocol#
Uncorrectable protocol error
-
enumerator kLLC_ErrorCorrectable#
-
enum _llc_event_type#
LLC event types.
Values:
-
enumerator kLLC_EventMaintenanceComplete#
Maintenance operation complete
-
enumerator kLLC_EventPerformanceMonitor#
Performance monitor event
-
enumerator kLLC_EventAll#
All events
-
enumerator kLLC_EventMaintenanceComplete#
-
enum _llc_interrupt_enable#
List of LLC interrupts.
Values:
-
enumerator kLLC_CorrectableErrorInterruptEnable#
Correctable Error Interrupt
-
enumerator kLLC_UncorrectableErrorMemoryProtectionErrorInterruptEnable#
Uncorrectable Error Interrupt
-
enumerator kLLC_UncorrectableErrorProtocolErrorInterruptEnable#
Uncorrectable Error Interrupt
-
enumerator kLLC_MaintenanceCompletionInterruptEnable#
Maintenance complete interrupt
-
enumerator kLLC_PerformanceMonitorInterruptEnable#
Performance monitor interrupt
-
enumerator kLLC_AllInterruptsEnable#
All interrupts
-
enumerator kLLC_CorrectableErrorInterruptEnable#
-
enum _llc_status_flags#
LLC status flags.
Values:
-
enumerator kLLC_CorrectableErrorValidFlag#
Correctable error detected
-
enumerator kLLC_UncorrectableErrorValidFlag#
Uncorrectable error detected
-
enumerator kLLC_MaintenanceCompletionFlag#
Maintenance operation active
-
enumerator kLLC_PerformanceMonitorEventFlag#
Performance monitor active
-
enumerator kLLC_AllFlags#
All error valid flags
-
enumerator kLLC_CorrectableErrorValidFlag#
-
enum _llc_cache_line_size#
LLC cache line size capability.
Values:
-
enumerator kLLC_CacheLineSize128B#
128 bytes
-
enumerator kLLC_CacheLineSize128B#
-
enum _llc_axi_data_width#
LLC AXI data width capability.
Values:
-
enumerator kLLC_AxiDataWidth128b#
128 bits
-
enumerator kLLC_AxiDataWidth256b#
256 bits
-
enumerator kLLC_AxiDataWidth512b#
512 bits
-
enumerator kLLC_AxiDataWidth1024b#
1024 bits
-
enumerator kLLC_AxiDataWidth128b#
-
typedef enum _llc_maintenance_operation llc_maintenance_operation_t#
LLC maintenance operation types.
-
typedef enum _llc_cache_override llc_cache_override_t#
LLC cache override types.
-
typedef enum _llc_error_type llc_error_type_t#
LLC error types.
-
typedef enum _llc_event_type llc_event_type_t#
LLC event types.
-
typedef enum _llc_interrupt_enable llc_interrupt_enable_t#
List of LLC interrupts.
-
typedef enum _llc_status_flags llc_status_flags_t#
LLC status flags.
-
typedef enum _llc_cache_line_size llc_cache_line_size_t#
LLC cache line size capability.
-
typedef enum _llc_axi_data_width llc_axi_data_width_t#
LLC AXI data width capability.
-
typedef struct _llc_feature_capability llc_feature_capability_t#
LLC feature capabilities.
-
typedef struct _llc_version_info llc_version_info_t#
Version information structure.
-
typedef struct _llc_scratchpad_config llc_scratchpad_config_t#
LLC scratchpad configuration structure.
-
typedef struct _llc_way_partition_config llc_way_partition_config_t#
LLC way partitioning configuration structure.
-
typedef struct _llc_performance_config llc_performance_config_t#
LLC performance monitor configuration structure.
-
typedef struct _llc_config llc_config_t#
LLC configuration structure.
-
typedef struct _llc_error_status llc_error_status_t#
LLC error status structure.
-
typedef struct _llc_performance_counters llc_performance_counters_t#
LLC performance monitor counters structure.
-
typedef void (*llc_callback_t)(uint32_t statusFlags)#
LLC callback function.
The callback is invoked once per interrupt with a logical OR of members of llc_status_flags_t that were asserted when the interrupt was handled.
- Param statusFlags:
Asserted LLC status flags.
-
void LLC_DriverIRQHandler(uint32_t instance)#
LLC common interrupt handler.
-
LLC_WAY_COUNT#
Number of ways in each LLC instance.
-
LLC_SET_COUNT#
Number of sets in each LLC instance.
-
LLC_WAY_PARTITION_COUNT#
Number of way partition register sets in each LLC instance.
-
LLC_BARRIER()#
-
struct _llc_feature_capability#
- #include <fsl_llc.h>
LLC feature capabilities.
Public Members
-
llc_cache_line_size_t cacheLineSize#
Cache line size capability
-
llc_axi_data_width_t axiDataWidth#
AXI data width capability
-
uint8_t counterWidth#
Performance counter width capability
-
llc_cache_line_size_t cacheLineSize#
-
struct _llc_version_info#
- #include <fsl_llc.h>
Version information structure.
-
struct _llc_scratchpad_config#
- #include <fsl_llc.h>
LLC scratchpad configuration structure.
-
struct _llc_way_partition_config#
- #include <fsl_llc.h>
LLC way partitioning configuration structure.
-
struct _llc_performance_config#
- #include <fsl_llc.h>
LLC performance monitor configuration structure.
-
struct _llc_config#
- #include <fsl_llc.h>
LLC configuration structure.
Public Members
-
bool enableErrorDetection#
Enable error detection
-
bool enableWriteAllocPartial#
Enable partial write allocation
-
llc_scratchpad_config_t *scratchpadConfig#
Scratchpad configuration (NULL if not used)
-
bool enableErrorDetection#
-
struct _llc_error_status#
- #include <fsl_llc.h>
LLC error status structure.
Public Members
-
bool correctableErrorValid#
Correctable error detected
-
uint8_t correctableErrorType#
Correctable error type
-
uint16_t correctableErrorInfo#
Correctable error info
-
uint32_t correctableErrorLoc0#
Correctable error location 0
-
uint32_t correctableErrorLoc1#
Correctable error location 1
-
bool uncorrectableErrorValid#
Uncorrectable error detected
-
uint8_t uncorrectableErrorType#
Uncorrectable error type
-
uint32_t uncorrectableErrorInfo#
Uncorrectable error info
-
uint32_t uncorrectableErrorLoc0#
Uncorrectable error location 0
-
uint32_t uncorrectableErrorLoc1#
Uncorrectable error location 1
-
bool correctableErrorValid#
-
struct _llc_performance_counters#
- #include <fsl_llc.h>
LLC performance monitor counters structure.
Public Members
-
uint32_t cycleCounter#
Cycle counter
-
uint32_t readRequestCounter#
Read request counter
-
uint32_t writeRequestCounter#
Write request counter
-
uint32_t cacheableReadCounter#
Cacheable read request counter
-
uint32_t cacheableWriteCounter#
Cacheable write request counter
-
uint32_t readHitCounter#
Read hit counter
-
uint32_t writeHitCounter#
Write hit counter
-
uint32_t evictionCounter#
Eviction counter
-
uint32_t readBeatCounter#
Read beat counter
-
uint32_t writeBeatCounter#
Write beat counter
-
uint32_t rttAboveThresholdCounter#
RTT above threshold counter
-
uint32_t wttAboveThresholdCounter#
WTT above threshold counter
-
uint32_t cycleCounter#
LPADC: 12-bit SAR Analog-to-Digital Converter Driver#
-
enum _lpadc_status_flags#
Define hardware flags of the module.
Values:
-
enumerator kLPADC_ResultFIFO0OverflowFlag#
Indicates that more data has been written to the Result FIFO 0 than it can hold.
-
enumerator kLPADC_ResultFIFO0ReadyFlag#
Indicates when the number of valid datawords in the result FIFO 0 is greater than the setting watermark level.
-
enumerator kLPADC_TriggerExceptionFlag#
Indicates that a trigger exception event has occurred.
-
enumerator kLPADC_TriggerCompletionFlag#
Indicates that a trigger completion event has occurred.
-
enumerator kLPADC_CalibrationReadyFlag#
Indicates that the calibration process is done.
-
enumerator kLPADC_ActiveFlag#
Indicates that the ADC is in active state.
-
enumerator kLPADC_ResultFIFOOverflowFlag#
To compilitable with old version, do not recommend using this, please use kLPADC_ResultFIFO0OverflowFlag as instead.
-
enumerator kLPADC_ResultFIFOReadyFlag#
To compilitable with old version, do not recommend using this, please use kLPADC_ResultFIFO0ReadyFlag as instead.
-
enumerator kLPADC_ResultFIFO0OverflowFlag#
-
enum _lpadc_interrupt_enable#
Define interrupt switchers of the module.
Note: LPADC of different chips supports different number of trigger sources, please check the Reference Manual for details.
Values:
-
enumerator kLPADC_ResultFIFO0OverflowInterruptEnable#
Configures ADC to generate overflow interrupt requests when FOF0 flag is asserted.
-
enumerator kLPADC_FIFO0WatermarkInterruptEnable#
Configures ADC to generate watermark interrupt requests when RDY0 flag is asserted.
-
enumerator kLPADC_ResultFIFOOverflowInterruptEnable#
To compilitable with old version, do not recommend using this, please use kLPADC_ResultFIFO0OverflowInterruptEnable as instead.
-
enumerator kLPADC_FIFOWatermarkInterruptEnable#
To compilitable with old version, do not recommend using this, please use kLPADC_FIFO0WatermarkInterruptEnable as instead.
-
enumerator kLPADC_TriggerExceptionInterruptEnable#
Configures ADC to generate trigger exception interrupt.
-
enumerator kLPADC_Trigger0CompletionInterruptEnable#
Configures ADC to generate interrupt when trigger 0 completion.
-
enumerator kLPADC_Trigger1CompletionInterruptEnable#
Configures ADC to generate interrupt when trigger 1 completion.
-
enumerator kLPADC_ResultFIFO0OverflowInterruptEnable#
-
enum _lpadc_trigger_status_flags#
The enumerator of lpadc trigger status flags, including interrupted flags and completed flags.
Note: LPADC of different chips supports different number of trigger sources, please check the Reference Manual for details.
Values:
-
enumerator kLPADC_Trigger0InterruptedFlag#
Trigger 0 is interrupted by a high priority exception.
-
enumerator kLPADC_Trigger1InterruptedFlag#
Trigger 1 is interrupted by a high priority exception.
-
enumerator kLPADC_Trigger0CompletedFlag#
Trigger 0 is completed and trigger 0 has enabled completion interrupts.
-
enumerator kLPADC_Trigger1CompletedFlag#
Trigger 1 is completed and trigger 1 has enabled completion interrupts.
-
enumerator kLPADC_Trigger0InterruptedFlag#
-
enum _lpadc_sample_scale_mode#
Define enumeration of sample scale mode.
The sample scale mode is used to reduce the selected ADC analog channel input voltage level by a factor. The maximum possible voltage on the ADC channel input should be considered when selecting a scale mode to ensure that the reducing factor always results voltage level at or below the VREFH reference. This reducing capability allows conversion of analog inputs higher than VREFH. A-side and B-side channel inputs are both scaled using the scale mode.
Values:
-
enumerator kLPADC_SamplePartScale#
Use divided input voltage signal. (For scale select,please refer to the reference manual).
-
enumerator kLPADC_SampleFullScale#
Full scale (Factor of 1).
-
enumerator kLPADC_SamplePartScale#
-
enum _lpadc_sample_channel_mode#
Define enumeration of channel sample mode.
The channel sample mode configures the channel with single-end/differential/dual-single-end, side A/B.
Values:
-
enumerator kLPADC_SampleChannelSingleEndSideA#
Single-end mode, only A-side channel is converted.
-
enumerator kLPADC_SampleChannelSingleEndSideB#
Single-end mode, only B-side channel is converted.
-
enumerator kLPADC_SampleChannelDiffBothSideAB#
Differential mode, the ADC result is (CHnA-CHnB).
-
enumerator kLPADC_SampleChannelDiffBothSideBA#
Differential mode, the ADC result is (CHnB-CHnA).
-
enumerator kLPADC_SampleChannelDiffBothSide#
Differential mode, the ADC result is (CHnA-CHnB).
-
enumerator kLPADC_SampleChannelDualSingleEndBothSide#
Dual-Single-Ended Mode. Both A side and B side channels are converted independently.
-
enumerator kLPADC_SampleChannelSingleEndSideA#
-
enum _lpadc_hardware_average_mode#
Define enumeration of hardware average selection.
It Selects how many ADC conversions are averaged to create the ADC result. An internal storage buffer is used to capture temporary results while the averaging iterations are executed.
Note
Some enumerator values are not available on some devices, mainly depends on the size of AVGS field in CMDH register.
Values:
-
enumerator kLPADC_HardwareAverageCount1#
Single conversion.
-
enumerator kLPADC_HardwareAverageCount2#
2 conversions averaged.
-
enumerator kLPADC_HardwareAverageCount4#
4 conversions averaged.
-
enumerator kLPADC_HardwareAverageCount8#
8 conversions averaged.
-
enumerator kLPADC_HardwareAverageCount16#
16 conversions averaged.
-
enumerator kLPADC_HardwareAverageCount32#
32 conversions averaged.
-
enumerator kLPADC_HardwareAverageCount64#
64 conversions averaged.
-
enumerator kLPADC_HardwareAverageCount128#
128 conversions averaged.
-
enumerator kLPADC_HardwareAverageCount1#
-
enum _lpadc_sample_time_mode#
Define enumeration of sample time selection.
The shortest sample time maximizes conversion speed for lower impedance inputs. Extending sample time allows higher impedance inputs to be accurately sampled. Longer sample times can also be used to lower overall power consumption when command looping and sequencing is configured and high conversion rates are not required.
Values:
-
enumerator kLPADC_SampleTimeADCK3#
3 ADCK cycles total sample time.
-
enumerator kLPADC_SampleTimeADCK5#
5 ADCK cycles total sample time.
-
enumerator kLPADC_SampleTimeADCK7#
7 ADCK cycles total sample time.
-
enumerator kLPADC_SampleTimeADCK11#
11 ADCK cycles total sample time.
-
enumerator kLPADC_SampleTimeADCK19#
19 ADCK cycles total sample time.
-
enumerator kLPADC_SampleTimeADCK35#
35 ADCK cycles total sample time.
-
enumerator kLPADC_SampleTimeADCK67#
69 ADCK cycles total sample time.
-
enumerator kLPADC_SampleTimeADCK131#
131 ADCK cycles total sample time.
-
enumerator kLPADC_SampleTimeADCK3#
-
enum _lpadc_hardware_compare_mode#
Define enumeration of hardware compare mode.
After an ADC channel input is sampled and converted and any averaging iterations are performed, this mode setting guides operation of the automatic compare function to optionally only store when the compare operation is true. When compare is enabled, the conversion result is compared to the compare values.
Values:
-
enumerator kLPADC_HardwareCompareDisabled#
Compare disabled.
-
enumerator kLPADC_HardwareCompareStoreOnTrue#
Compare enabled. Store on true.
-
enumerator kLPADC_HardwareCompareRepeatUntilTrue#
Compare enabled. Repeat channel acquisition until true.
-
enumerator kLPADC_HardwareCompareDisabled#
-
enum _lpadc_conversion_resolution_mode#
Define enumeration of conversion resolution mode.
Configure the resolution bit in specific conversion type. For detailed resolution accuracy, see to lpadc_sample_channel_mode_t
Values:
-
enumerator kLPADC_ConversionResolutionStandard#
Standard resolution. Single-ended 12-bit conversion, Differential 13-bit conversion with 2’s complement output.
-
enumerator kLPADC_ConversionResolutionHigh#
High resolution. Single-ended 16-bit conversion; Differential 16-bit conversion with 2’s complement output.
-
enumerator kLPADC_ConversionResolutionStandard#
-
enum _lpadc_conversion_average_mode#
Define enumeration of conversion averages mode.
Configure the converion average number for auto-calibration.
Note
Some enumerator values are not available on some devices, mainly depends on the size of CAL_AVGS field in CTRL register.
Values:
-
enumerator kLPADC_ConversionAverage1#
Single conversion.
-
enumerator kLPADC_ConversionAverage2#
2 conversions averaged.
-
enumerator kLPADC_ConversionAverage4#
4 conversions averaged.
-
enumerator kLPADC_ConversionAverage8#
8 conversions averaged.
-
enumerator kLPADC_ConversionAverage16#
16 conversions averaged.
-
enumerator kLPADC_ConversionAverage32#
32 conversions averaged.
-
enumerator kLPADC_ConversionAverage64#
64 conversions averaged.
-
enumerator kLPADC_ConversionAverage128#
128 conversions averaged.
-
enumerator kLPADC_ConversionAverageMax#
-
enumerator kLPADC_ConversionAverage1#
-
enum _lpadc_reference_voltage_mode#
Define enumeration of reference voltage source.
For detail information, need to check the SoC’s specification.
Values:
-
enumerator kLPADC_ReferenceVoltageAlt1#
Option 1 setting.
-
enumerator kLPADC_ReferenceVoltageAlt2#
Option 2 setting.
-
enumerator kLPADC_ReferenceVoltageAlt3#
Option 3 setting.
-
enumerator kLPADC_ReferenceVoltageAlt1#
-
enum _lpadc_power_level_mode#
Define enumeration of power configuration.
Configures the ADC for power and performance. In the highest power setting the highest conversion rates will be possible. Refer to the device data sheet for power and performance capabilities for each setting.
Values:
-
enumerator kLPADC_PowerLevelAlt1#
Lowest power setting.
-
enumerator kLPADC_PowerLevelAlt2#
Next lowest power setting.
-
enumerator kLPADC_PowerLevelAlt3#
…
-
enumerator kLPADC_PowerLevelAlt4#
Highest power setting.
-
enumerator kLPADC_PowerLevelAlt1#
-
enum _lpadc_offset_calibration_mode#
Define enumeration of offset calibration mode.
Values:
-
enumerator kLPADC_OffsetCalibration12bitMode#
12 bit offset calibration mode.
-
enumerator kLPADC_OffsetCalibration16bitMode#
16 bit offset calibration mode.
-
enumerator kLPADC_OffsetCalibration12bitMode#
-
enum _lpadc_trigger_priority_policy#
Define enumeration of trigger priority policy.
This selection controls how higher priority triggers are handled.
Note
kLPADC_TriggerPriorityPreemptSubsequently is not available on some devices, mainly depends on the size of TPRICTRL field in CFG register.
Values:
-
enumerator kLPADC_ConvPreemptImmediatelyNotAutoResumed#
If a higher priority trigger is detected during command processing, the current conversion is aborted and the new command specified by the trigger is started, when higher priority conversion finishes, the preempted conversion is not automatically resumed or restarted.
-
enumerator kLPADC_ConvPreemptSoftlyNotAutoResumed#
If a higher priority trigger is received during command processing, the current conversion is completed (including averaging iterations and compare function if enabled) and stored to the result FIFO before the higher priority trigger/command is initiated, when higher priority conversion finishes, the preempted conversion is not resumed or restarted.
-
enumerator kLPADC_ConvPreemptImmediatelyAutoRestarted#
If a higher priority trigger is detected during command processing, the current conversion is aborted and the new command specified by the trigger is started, when higher priority conversion finishes, the preempted conversion will automatically be restarted.
-
enumerator kLPADC_ConvPreemptSoftlyAutoRestarted#
If a higher priority trigger is received during command processing, the current conversion is completed (including averaging iterations and compare function if enabled) and stored to the result FIFO before the higher priority trigger/command is initiated, when higher priority conversion finishes, the preempted conversion will automatically be restarted.
-
enumerator kLPADC_ConvPreemptImmediatelyAutoResumed#
If a higher priority trigger is detected during command processing, the current conversion is aborted and the new command specified by the trigger is started, when higher priority conversion finishes, the preempted conversion will automatically be resumed.
-
enumerator kLPADC_ConvPreemptSoftlyAutoResumed#
If a higher priority trigger is received during command processing, the current conversion is completed (including averaging iterations and compare function if enabled) and stored to the result FIFO before the higher priority trigger/command is initiated, when higher priority conversion finishes, the preempted conversion will be automatically be resumed.
-
enumerator kLPADC_TriggerPriorityPreemptImmediately#
Legacy support is not recommended as it only ensures compatibility with older versions.
-
enumerator kLPADC_TriggerPriorityPreemptSoftly#
Legacy support is not recommended as it only ensures compatibility with older versions.
-
enumerator kLPADC_TriggerPriorityExceptionDisabled#
High priority trigger exception disabled.
-
enumerator kLPADC_ConvPreemptImmediatelyNotAutoResumed#
-
enum _lpadc_tune_value#
Define enumeration of tune value.
Values:
-
enumerator kLPADC_TuneValue0#
Tune value 0.
-
enumerator kLPADC_TuneValue1#
Tune value 1.
-
enumerator kLPADC_TuneValue2#
Tune value 2.
-
enumerator kLPADC_TuneValue3#
Tune value 3.
-
enumerator kLPADC_TuneValue0#
-
typedef enum _lpadc_sample_scale_mode lpadc_sample_scale_mode_t#
Define enumeration of sample scale mode.
The sample scale mode is used to reduce the selected ADC analog channel input voltage level by a factor. The maximum possible voltage on the ADC channel input should be considered when selecting a scale mode to ensure that the reducing factor always results voltage level at or below the VREFH reference. This reducing capability allows conversion of analog inputs higher than VREFH. A-side and B-side channel inputs are both scaled using the scale mode.
-
typedef enum _lpadc_sample_channel_mode lpadc_sample_channel_mode_t#
Define enumeration of channel sample mode.
The channel sample mode configures the channel with single-end/differential/dual-single-end, side A/B.
-
typedef enum _lpadc_hardware_average_mode lpadc_hardware_average_mode_t#
Define enumeration of hardware average selection.
It Selects how many ADC conversions are averaged to create the ADC result. An internal storage buffer is used to capture temporary results while the averaging iterations are executed.
Note
Some enumerator values are not available on some devices, mainly depends on the size of AVGS field in CMDH register.
-
typedef enum _lpadc_sample_time_mode lpadc_sample_time_mode_t#
Define enumeration of sample time selection.
The shortest sample time maximizes conversion speed for lower impedance inputs. Extending sample time allows higher impedance inputs to be accurately sampled. Longer sample times can also be used to lower overall power consumption when command looping and sequencing is configured and high conversion rates are not required.
-
typedef enum _lpadc_hardware_compare_mode lpadc_hardware_compare_mode_t#
Define enumeration of hardware compare mode.
After an ADC channel input is sampled and converted and any averaging iterations are performed, this mode setting guides operation of the automatic compare function to optionally only store when the compare operation is true. When compare is enabled, the conversion result is compared to the compare values.
-
typedef enum _lpadc_conversion_resolution_mode lpadc_conversion_resolution_mode_t#
Define enumeration of conversion resolution mode.
Configure the resolution bit in specific conversion type. For detailed resolution accuracy, see to lpadc_sample_channel_mode_t
-
typedef enum _lpadc_conversion_average_mode lpadc_conversion_average_mode_t#
Define enumeration of conversion averages mode.
Configure the converion average number for auto-calibration.
Note
Some enumerator values are not available on some devices, mainly depends on the size of CAL_AVGS field in CTRL register.
-
typedef enum _lpadc_reference_voltage_mode lpadc_reference_voltage_source_t#
Define enumeration of reference voltage source.
For detail information, need to check the SoC’s specification.
-
typedef enum _lpadc_power_level_mode lpadc_power_level_mode_t#
Define enumeration of power configuration.
Configures the ADC for power and performance. In the highest power setting the highest conversion rates will be possible. Refer to the device data sheet for power and performance capabilities for each setting.
-
typedef enum _lpadc_offset_calibration_mode lpadc_offset_calibration_mode_t#
Define enumeration of offset calibration mode.
-
typedef enum _lpadc_trigger_priority_policy lpadc_trigger_priority_policy_t#
Define enumeration of trigger priority policy.
This selection controls how higher priority triggers are handled.
Note
kLPADC_TriggerPriorityPreemptSubsequently is not available on some devices, mainly depends on the size of TPRICTRL field in CFG register.
-
typedef enum _lpadc_tune_value lpadc_tune_value_t#
Define enumeration of tune value.
-
typedef struct _lpadc_calibration_value lpadc_calibration_value_t#
A structure of calibration value.
-
LPADC_CONVERSION_COMPLETE_TIMEOUT#
Max loops to wait for LPADC conversion complete.
When doing calibration, driver will wait for the completion of conversion. This parameter defines how many loops to check completion before return timeout. If defined as 0, driver will wait forever until completion.
-
LPADC_CALIBRATION_READY_TIMEOUT#
Max loops to wait for LPADC calibration ready.
Before doing calibration, driver will wait for the calibration ready. This parameter defines how many loops to check the calibration ready. If defined as 0, driver will wait forever until ready.
-
LPADC_GAIN_CAL_READY_TIMEOUT#
Max loops to wait for LPADC gain calibration GAIN_CAL ready.
Before doing calibration, driver will wait for the gain calibration GAIN_CAL ready. This parameter defines how many loops to check the gain calibration GAIN_CAL ready. If defined as 0, driver will wait forever until ready.
-
LPADC_USE_FIXED_POINT_GAIN_CALCULATION#
Use fixed point arithmetic for the auto-calibration gain calculation.
When set to 1, LPADC_FinishAutoCalibration() calculates the gain conversion result with integer-only arithmetic instead of the float/double software library, which saves several kB of flash on code size sensitive devices. The fixed point result keeps the gain fraction in Q17.14, so the two least significant bits of the gain conversion result are always zero.
-
ADC_OFSTRIM_OFSTRIM_MAX#
-
ADC_OFSTRIM_OFSTRIM_SIGN#
-
LPADC_GET_ACTIVE_COMMAND_STATUS(statusVal)#
Define the MACRO function to get command status from status value.
The statusVal is the return value from LPADC_GetStatusFlags().
-
LPADC_GET_ACTIVE_TRIGGER_STATUE(statusVal)#
Define the MACRO function to get trigger status from status value.
The statusVal is the return value from LPADC_GetStatusFlags().
-
void LPADC_Init(ADC_Type *base, const lpadc_config_t *config)#
Initializes the LPADC module.
- Parameters:
base – LPADC peripheral base address.
config – Pointer to configuration structure. See “lpadc_config_t”.
-
void LPADC_GetDefaultConfig(lpadc_config_t *config)#
Gets an available pre-defined settings for initial configuration.
This function initializes the converter configuration structure with an available settings. The default values are:
config->enableInDozeMode = true; config->enableAnalogPreliminary = false; config->powerUpDelay = 0x80; config->referenceVoltageSource = kLPADC_ReferenceVoltageAlt1; config->powerLevelMode = kLPADC_PowerLevelAlt1; config->triggerPriorityPolicy = kLPADC_TriggerPriorityPreemptImmediately; config->enableConvPause = false; config->convPauseDelay = 0U; config->FIFOWatermark = 0U;
- Parameters:
config – Pointer to configuration structure.
-
void LPADC_Deinit(ADC_Type *base)#
De-initializes the LPADC module.
- Parameters:
base – LPADC peripheral base address.
-
static inline void LPADC_Enable(ADC_Type *base, bool enable)#
Switch on/off the LPADC module.
- Parameters:
base – LPADC peripheral base address.
enable – switcher to the module.
-
static inline void LPADC_DoResetFIFO(ADC_Type *base)#
Do reset the conversion FIFO.
- Parameters:
base – LPADC peripheral base address.
-
static inline void LPADC_DoResetConfig(ADC_Type *base)#
Do reset the module’s configuration.
Reset all ADC internal logic and registers, except the Control Register (ADCx_CTRL).
- Parameters:
base – LPADC peripheral base address.
-
static inline uint32_t LPADC_GetStatusFlags(ADC_Type *base)#
Get status flags.
- Parameters:
base – LPADC peripheral base address.
- Returns:
status flags’ mask. See to _lpadc_status_flags.
-
static inline void LPADC_ClearStatusFlags(ADC_Type *base, uint32_t mask)#
Clear status flags.
Only the flags can be cleared by writing ADCx_STATUS register would be cleared by this API.
- Parameters:
base – LPADC peripheral base address.
mask – Mask value for flags to be cleared. See to _lpadc_status_flags.
-
static inline uint32_t LPADC_GetTriggerStatusFlags(ADC_Type *base)#
Get trigger status flags to indicate which trigger sequences have been completed or interrupted by a high priority trigger exception.
Note
On some devices, the trigger completion status may be asserted before the final command in a chained trigger sequence starts to execute. When using chained commands, do not rely on trigger completion status alone to guarantee that all conversion results are already available in the FIFO. Use FIFO ready indication together with result tags, or stall the last command with WAIT_TRIG when that sequencing model is acceptable for the application.
- Parameters:
base – LPADC peripheral base address.
- Returns:
The OR’ed value of _lpadc_trigger_status_flags.
-
static inline void LPADC_ClearTriggerStatusFlags(ADC_Type *base, uint32_t mask)#
Clear trigger status flags.
- Parameters:
base – LPADC peripheral base address.
mask – The mask of trigger status flags to be cleared, should be the OR’ed value of _lpadc_trigger_status_flags.
-
static inline void LPADC_EnableInterrupts(ADC_Type *base, uint32_t mask)#
Enable interrupts.
Note
When enabling trigger completion interrupts (
kLPADC_TriggerXCompletionInterruptEnable) on some devices, the interrupt may occur before the final command in a chained trigger sequence starts to execute. For multi-command trigger sequences, do not use the trigger completion interrupt alone as the indication that all expected results are already stored in the FIFO.- Parameters:
base – LPADC peripheral base address.
mask – Mask value for interrupt events. See to _lpadc_interrupt_enable.
-
static inline void LPADC_DisableInterrupts(ADC_Type *base, uint32_t mask)#
Disable interrupts.
- Parameters:
base – LPADC peripheral base address.
mask – Mask value for interrupt events. See to _lpadc_interrupt_enable.
-
static inline void LPADC_EnableFIFOWatermarkDMA(ADC_Type *base, bool enable)#
Switch on/off the DMA trigger for FIFO watermark event.
- Parameters:
base – LPADC peripheral base address.
enable – Switcher to the event.
-
static inline uint32_t LPADC_GetConvResultCount(ADC_Type *base)#
Get the count of result kept in conversion FIFO.
- Parameters:
base – LPADC peripheral base address.
- Returns:
The count of result kept in conversion FIFO.
-
bool LPADC_GetConvResult(ADC_Type *base, lpadc_conv_result_t *result)#
Get the result in conversion FIFO.
- Parameters:
base – LPADC peripheral base address.
result – Pointer to structure variable that keeps the conversion result in conversion FIFO.
- Returns:
Status whether FIFO entry is valid.
-
void LPADC_GetConvResultBlocking(ADC_Type *base, lpadc_conv_result_t *result)#
Get the result in conversion FIFO using blocking method.
- Parameters:
base – LPADC peripheral base address.
result – Pointer to structure variable that keeps the conversion result in conversion FIFO.
-
void LPADC_SetConvTriggerConfig(ADC_Type *base, uint32_t triggerId, const lpadc_conv_trigger_config_t *config)#
Configure the conversion trigger source.
Each programmable trigger can launch the conversion command in command buffer.
- Parameters:
base – LPADC peripheral base address.
triggerId – ID for each trigger. Typically, the available value range is from 0.
config – Pointer to configuration structure. See to lpadc_conv_trigger_config_t.
-
void LPADC_GetDefaultConvTriggerConfig(lpadc_conv_trigger_config_t *config)#
Gets an available pre-defined settings for trigger’s configuration.
This function initializes the trigger’s configuration structure with an available settings. The default values are:
config->targetCommandId = 0U; config->delayPower = 0U; config->priority = 0U; config->channelAFIFOSelect = 0U; config->channelBFIFOSelect = 0U; config->enableHardwareTrigger = false;
- Parameters:
config – Pointer to configuration structure.
-
static inline void LPADC_DoSoftwareTrigger(ADC_Type *base, uint32_t triggerIdMask)#
Do software trigger to conversion command.
- Parameters:
base – LPADC peripheral base address.
triggerIdMask – Mask value for software trigger indexes, which count from zero.
-
static inline void LPADC_EnableHardwareTriggerCommandSelection(ADC_Type *base, uint32_t triggerId, bool enable)#
Enable hardware trigger command selection.
This function will use the hardware trigger command from ADC_ETC.The trigger command is then defined by ADC hardware trigger command selection field in ADC_ETC- >TRIGx_CHAINy_z_n[CSEL].
- Parameters:
base – LPADC peripheral base address.
triggerId – ID for each trigger. Typically, the available value range is from 0.
enable – True to enable or flase to disable.
-
void LPADC_SetConvCommandConfig(ADC_Type *base, uint32_t commandId, const lpadc_conv_command_config_t *config)#
Configure conversion command.
Note
The number of compare value register on different chips is different, that is mean in some chips, some command buffers do not have the compare functionality.
- Parameters:
base – LPADC peripheral base address.
commandId – ID for command in command buffer. Typically, the available value range is 1 - 15.
config – Pointer to configuration structure. See to lpadc_conv_command_config_t.
-
void LPADC_GetDefaultConvCommandConfig(lpadc_conv_command_config_t *config)#
Gets an available pre-defined settings for conversion command’s configuration.
This function initializes the conversion command’s configuration structure with an available settings. The default values are:
config->sampleScaleMode = kLPADC_SampleFullScale; config->channelBScaleMode = kLPADC_SampleFullScale; config->sampleChannelMode = kLPADC_SampleChannelSingleEndSideA; config->channelNumber = 0U; config->channelBNumber = 0U; config->chainedNextCommandNumber = 0U; config->enableAutoChannelIncrement = false; config->loopCount = 0U; config->hardwareAverageMode = kLPADC_HardwareAverageCount1; config->sampleTimeMode = kLPADC_SampleTimeADCK3; config->hardwareCompareMode = kLPADC_HardwareCompareDisabled; config->hardwareCompareValueHigh = 0U; config->hardwareCompareValueLow = 0U; config->conversionResolutionMode = kLPADC_ConversionResolutionStandard; config->enableWaitTrigger = false; config->enableChannelB = false;
- Parameters:
config – Pointer to configuration structure.
-
void LPADC_EnableCalibration(ADC_Type *base, bool enable)#
Enable the calibration function.
When CALOFS is set, the ADC is configured to perform a calibration function anytime the ADC executes a conversion. Any channel selected is ignored and the value returned in the RESFIFO is a signed value between -31 and 31. -32 is not a valid and is never a returned value. Software should copy the lower 6- bits of the conversion result stored in the RESFIFO after a completed calibration conversion to the OFSTRIM field. The OFSTRIM field is used in normal operation for offset correction.
- Parameters:
base – LPADC peripheral base address.
enable – switcher to the calibration function.
-
static inline void LPADC_SetOffsetValue(ADC_Type *base, uint32_t value)#
Set proper offset value to trim ADC.
To minimize the offset during normal operation, software should read the conversion result from the RESFIFO calibration operation and write the lower 6 bits to the OFSTRIM register.
- Parameters:
base – LPADC peripheral base address.
value – Setting offset value.
-
status_t LPADC_DoAutoCalibration(ADC_Type *base)#
Do auto calibration.
Calibration function should be executed before using converter in application. It used the software trigger and a dummy conversion, get the offset and write them into the OFSTRIM register. It called some of functional API including:
LPADC_EnableCalibration(…)
LPADC_SetOffsetValue(…)
LPADC_SetConvCommandConfig(…)
LPADC_SetConvTriggerConfig(…)
- Parameters:
base – LPADC peripheral base address.
base – LPADC peripheral base address.
- Return values:
kStatus_Success – Successfully configured.
kStatus_Timeout – Timeout occurs while waiting completion.
-
static inline void LPADC_SetOffsetValue(ADC_Type *base, int16_t value)
Set trim value for offset.
Note
For 16-bit conversions, each increment is 1/2 LSB resulting in a programmable offset range of -256 LSB to 255.5 LSB; For 12-bit conversions, each increment is 1/32 LSB resulting in a programmable offset range of -16 LSB to 15.96875 LSB.
- Parameters:
base – LPADC peripheral base address.
value – Offset trim value, is a 10-bit signed value between -512 and 511.
-
static inline void LPADC_GetOffsetValue(ADC_Type *base, int16_t *pValue)#
Get trim value of offset.
- Parameters:
base – LPADC peripheral base address.
pValue – Pointer to the variable in type of int16_t to store offset value.
-
static inline void LPADC_EnableOffsetCalibration(ADC_Type *base, bool enable)#
Enable the offset calibration function.
- Parameters:
base – LPADC peripheral base address.
enable – switcher to the calibration function.
-
static inline void LPADC_SetOffsetCalibrationMode(ADC_Type *base, lpadc_offset_calibration_mode_t mode)#
Set offset calibration mode.
- Parameters:
base – LPADC peripheral base address.
mode – set offset calibration mode.see to lpadc_offset_calibration_mode_t .
-
status_t LPADC_DoOffsetCalibration(ADC_Type *base)#
Do offset calibration.
- Parameters:
base – LPADC peripheral base address.
- Return values:
kStatus_Success – Successfully configured.
kStatus_Timeout – Timeout occurs while waiting completion.
-
void LPADC_PrepareAutoCalibration(ADC_Type *base)#
Prepare auto calibration, LPADC_FinishAutoCalibration has to be called before using the LPADC. LPADC_DoAutoCalibration has been split in two API to avoid to be stuck too long in the function.
- Parameters:
base – LPADC peripheral base address.
-
status_t LPADC_FinishAutoCalibration(ADC_Type *base)#
Finish auto calibration start with LPADC_PrepareAutoCalibration.
Note
This feature is used for LPADC with CTRL[CALOFSMODE].
- Parameters:
base – LPADC peripheral base address.
- Return values:
kStatus_Success – Successfully configured.
kStatus_Timeout – Timeout occurs while waiting completion.
-
void LPADC_GetCalibrationValue(ADC_Type *base, lpadc_calibration_value_t *ptrCalibrationValue)#
Get calibration value into the memory which is defined by invoker.
Note
Please note the ADC will be disabled temporary.
Note
This function should be used after finish calibration.
- Parameters:
base – LPADC peripheral base address.
ptrCalibrationValue – Pointer to lpadc_calibration_value_t structure, this memory block should be always powered on even in low power modes.
-
status_t LPADC_SetCalibrationValue(ADC_Type *base, const lpadc_calibration_value_t *ptrCalibrationValue)#
Set calibration value into ADC calibration registers.
Note
Please note the ADC will be disabled temporary.
- Parameters:
base – LPADC peripheral base address.
ptrCalibrationValue – Pointer to lpadc_calibration_value_t structure which contains ADC’s calibration value.
- Return values:
kStatus_Success – Successfully configured.
kStatus_Timeout – Timeout occurs while waiting completion.
-
static inline void LPADC_RequestHighSpeedModeTrim(ADC_Type *base)#
Request high speed mode trim calculation.
- Parameters:
base – LPADC peripheral base address.
-
static inline int8_t LPADC_GetHighSpeedTrimValue(ADC_Type *base)#
Get high speed mode trim value, the result is a 5-bit signed value between -16 and 15.
Note
The high speed mode trim value is used to minimize offset for high speed conversion.
- Parameters:
base – LPADC peripheral base address.
- Returns:
The calculated high speed mode trim value.
-
static inline void LPADC_SetHighSpeedTrimValue(ADC_Type *base, int8_t trimValue)#
Set high speed mode trim value.
Note
If is possible to set the trim value manually, but it is recommended to use the LPADC_RequestHighSpeedModeTrim.
- Parameters:
base – LPADC peripheral base address.
trimValue – The trim value to be set.
-
static inline void LPADC_EnableHighSpeedConversionMode(ADC_Type *base, bool enable)#
Enable/disable high speed conversion mode, if enabled conversions complete 2 or 3 ADCK cycles sooner compared to conversion cycle counts when high speed mode is disabled.
- Parameters:
base – LPADC peripheral base address.
enable – Used to enable/disable high speed conversion mode:
true Enable high speed conversion mode;
false Disable high speed conversion mode.
-
static inline void LPADC_EnableExtraCycle(ADC_Type *base, bool enable)#
Enable/disable an additional ADCK cycle to conversion.
- Parameters:
base – LPADC peripheral base address.
enable – Used to enable/disable an additional ADCK cycle to conversion:
true Enable an additional ADCK cycle to conversion;
false Disable an additional ADCK cycle to conversion.
-
static inline void LPADC_SetTuneValue(ADC_Type *base, lpadc_tune_value_t tuneValue)#
Set tune value which provides some variability in how many cycles are needed to complete a conversion.
- Parameters:
base – LPADC peripheral base address.
tuneValue – The tune value to be set, please refer to lpadc_tune_value_t.
-
static inline lpadc_tune_value_t LPADC_GetTuneValue(ADC_Type *base)#
Get tune value which provides some variability in how many cycles are needed to complete a conversion.
- Parameters:
base – LPADC peripheral base address.
- Returns:
The tune value, please refer to lpadc_tune_value_t.
-
static inline void LPADC_EnableJustifiedLeft(ADC_Type *base, bool enable)#
Enable/disable left-justify format in 12-bit single-end mode.
- Parameters:
base – LPADC peripheral base address.
enable – Used to enable/disable left-justify format in 12-bit single-end mode:
true Enable left-justify format in 12-bit single-end mode;
false Disable left-justify format in 12-bit single-end mode.
-
FSL_LPADC_DRIVER_VERSION#
LPADC driver version 2.12.0.
-
struct lpadc_config_t#
- #include <fsl_lpadc.h>
LPADC global configuration.
This structure would used to keep the settings for initialization.
Public Members
-
bool enableInternalClock#
Enables the internally generated clock source. The clock source is used in clock selection logic at the chip level and is optionally used for the ADC clock source.
-
bool enableVref1LowVoltage#
If voltage reference option1 input is below 1.8V, it should be “true”. If voltage reference option1 input is above 1.8V, it should be “false”.
-
bool enableInDozeMode#
Control system transition to Stop and Wait power modes while ADC is converting. When enabled in Doze mode, immediate entries to Wait or Stop are allowed. When disabled, the ADC will wait for the current averaging iteration/FIFO storage to complete before acknowledging stop or wait mode entry.
-
lpadc_conversion_average_mode_t conversionAverageMode#
Auto-Calibration Averages.
-
bool enableAnalogPreliminary#
ADC analog circuits are pre-enabled and ready to execute conversions without startup delays(at the cost of higher DC current consumption).
-
uint32_t powerUpDelay#
When the analog circuits are not pre-enabled, the ADC analog circuits are only powered while the ADC is active and there is a counted delay defined by this field after an initial trigger transitions the ADC from its Idle state to allow time for the analog circuits to stabilize. The startup delay count of (powerUpDelay * 4) ADCK cycles must result in a longer delay than the analog startup time.
-
lpadc_reference_voltage_source_t referenceVoltageSource#
Selects the voltage reference high used for conversions.
-
lpadc_power_level_mode_t powerLevelMode#
Power Configuration Selection.
-
lpadc_trigger_priority_policy_t triggerPriorityPolicy#
Control how higher priority triggers are handled, see to lpadc_trigger_priority_policy_t.
-
bool enableConvPause#
Enables the ADC pausing function. When enabled, a programmable delay is inserted during command execution sequencing between LOOP iterations, between commands in a sequence, and between conversions when command is executing in “Compare Until True” configuration.
-
uint32_t convPauseDelay#
Controls the duration of pausing during command execution sequencing. The pause delay is a count of (convPauseDelay*4) ADCK cycles. Only available when ADC pausing function is enabled. The available value range is in 9-bit.
-
uint32_t FIFOWatermark#
FIFOWatermark is a programmable threshold setting. When the number of datawords stored in the ADC Result FIFO is greater than the value in this field, the ready flag would be asserted to indicate stored data has reached the programmable threshold.
-
bool enableInternalClock#
-
struct lpadc_conv_command_config_t#
- #include <fsl_lpadc.h>
Define structure to keep the configuration for conversion command.
Public Members
-
lpadc_sample_scale_mode_t sampleScaleMode#
Sample scale mode.
-
lpadc_sample_scale_mode_t channelBScaleMode#
Alternate channe B Scale mode.
-
lpadc_sample_channel_mode_t sampleChannelMode#
Channel sample mode.
-
uint32_t channelNumber#
Channel number, select the channel or channel pair.
-
uint32_t channelBNumber#
Alternate Channel B number, select the channel.
-
uint32_t chainedNextCommandNumber#
Selects the next command to be executed after this command completes. 1-15 is available, 0 is to terminate the chain after this command.
-
bool enableAutoChannelIncrement#
Loop with increment: when disabled, the “loopCount” field selects the number of times the selected channel is converted consecutively; when enabled, the “loopCount” field defines how many consecutive channels are converted as part of the command execution.
-
uint32_t loopCount#
Selects how many times this command executes before finish and transition to the next command or Idle state. Command executes LOOP+1 times. 0-15 is available.
-
lpadc_hardware_average_mode_t hardwareAverageMode#
Hardware average selection.
-
lpadc_sample_time_mode_t sampleTimeMode#
Sample time selection.
-
lpadc_hardware_compare_mode_t hardwareCompareMode#
Hardware compare selection.
-
uint32_t hardwareCompareValueHigh#
Compare Value High. The available value range is in 16-bit.
-
uint32_t hardwareCompareValueLow#
Compare Value Low. The available value range is in 16-bit.
-
lpadc_conversion_resolution_mode_t conversionResolutionMode#
Conversion resolution mode.
-
bool enableWaitTrigger#
Wait for trigger assertion before execution: when disabled, this command will be automatically executed; when enabled, the active trigger must be asserted again before executing this command.
-
lpadc_sample_scale_mode_t sampleScaleMode#
-
struct lpadc_conv_trigger_config_t#
- #include <fsl_lpadc.h>
Define structure to keep the configuration for conversion trigger.
Public Members
-
uint32_t targetCommandId#
Select the command from command buffer to execute upon detect of the associated trigger event.
-
uint32_t delayPower#
Select the trigger delay duration to wait at the start of servicing a trigger event. When this field is clear, then no delay is incurred. When this field is set to a non-zero value, the duration for the delay is 2^delayPower ADCK cycles. The available value range is 4-bit.
-
uint32_t priority#
Sets the priority of the associated trigger source. If two or more triggers have the same priority level setting, the lower order trigger event has the higher priority. The lower value for this field is for the higher priority, the available value range is 1-bit.
-
bool enableHardwareTrigger#
Enable hardware trigger source to initiate conversion on the rising edge of the input trigger source or not. THe software trigger is always available.
-
uint32_t targetCommandId#
-
struct lpadc_conv_result_t#
- #include <fsl_lpadc.h>
Define the structure to keep the conversion result.
Public Members
-
uint32_t commandIdSource#
Indicate the command buffer being executed that generated this result.
-
uint32_t loopCountIndex#
Indicate the loop count value during command execution that generated this result.
-
uint32_t triggerIdSource#
Indicate the trigger source that initiated a conversion and generated this result.
-
uint16_t convValue#
Data result.
-
uint32_t commandIdSource#
-
struct _lpadc_calibration_value#
- #include <fsl_lpadc.h>
A structure of calibration value.
Lpc_freqme#
-
void FREQME_Init(FREQME_Type *base, const freq_measure_config_t *config)#
Initialize freqme module, set operate mode, operate mode attribute and initialize measurement cycle.
- Parameters:
base – FREQME peripheral base address.
config – The pointer to module basic configuration, please refer to freq_measure_config_t.
-
void FREQME_GetDefaultConfig(freq_measure_config_t *config)#
Get default configuration.
config->operateMode = kFREQME_FreqMeasurementMode; config->operateModeAttribute.refClkScaleFactor = 0U; config->enableContinuousMode = false; config->startMeasurement = false;
- Parameters:
config – The pointer to module basic configuration, please refer to freq_measure_config_t.
-
static inline void FREQME_StartMeasurementCycle(FREQME_Type *base)#
Start frequency or pulse width measurement process.
- Parameters:
base – FREQME peripheral base address.
-
static inline void FREQME_TerminateMeasurementCycle(FREQME_Type *base)#
Force the termination of any measurement cycle currently in progress and resets RESULT or just reset RESULT if the module in idle state.
- Parameters:
base – FREQME peripheral base address.
-
static inline void FREQME_EnableContinuousMode(FREQME_Type *base, bool enable)#
Enable/disable Continuous mode.
- Parameters:
base – FREQME peripheral base address.
enable – Used to enable/disable continuous mode,
true Enable Continuous mode.
false Disable Continuous mode.
-
static inline bool FREQME_CheckContinuousMode(FREQME_Type *base)#
Check whether continuous mode is enabled.
- Parameters:
base – FREQME peripheral base address.
- Return values:
True – Continuous mode is enabled, the measurement is performed continuously.
False – Continuous mode is disabled.
-
static inline void FREQME_SetOperateMode(FREQME_Type *base, freqme_operate_mode_t operateMode)#
Set operate mode of freqme module.
- Parameters:
base – FREQME peripheral base address.
operateMode – The operate mode to be set, please refer to freqme_operate_mode_t.
-
static inline bool FREQME_CheckOperateMode(FREQME_Type *base)#
Check module’s operate mode.
- Parameters:
base – FREQME peripheral base address.
- Return values:
True – Pulse width measurement mode.
False – Frequency measurement mode.
-
static inline void FREQME_SetMinExpectedValue(FREQME_Type *base, uint32_t minValue)#
Set the minimum expected value for the measurement result.
- Parameters:
base – FREQME peripheral base address.
minValue – The minimum value to set, please note that this value is 31 bits width.
-
static inline void FREQME_SetMaxExpectedValue(FREQME_Type *base, uint32_t maxValue)#
Set the maximum expected value for the measurement result.
- Parameters:
base – FREQME peripheral base address.
maxValue – The maximum value to set, please note that this value is 31 bits width.
-
static inline void FREQME_SetReferenceClk(FREQME_Type *base, uint32_t referenceClk)#
Set the reference clock source.
- Parameters:
base – FREQME peripheral base address.
referenceClk – The reference clock source, see freqme_reference_clock_t in <device>_COMMON.h.
-
static inline void FREQME_SetTargetClk(FREQME_Type *base, uint32_t targetClk)#
Set the target clock source.
- Parameters:
base – FREQME peripheral base address.
targetClk – The target clock source, see freqme_target_clock_t in <device>_COMMON.h.
-
uint32_t FREQME_CalculateTargetClkFreq(FREQME_Type *base, uint32_t refClkFrequency)#
Calculate the frequency of selected target clock.
Note
The formula: Ftarget = (RESULT - 2) * Freference / 2 ^ REF_SCALE or Ftarget = (RESULT + 1) * Freference / 2 ^ REF_SCALE
Note
This function only useful when the operate mode is selected as frequency measurement mode.
- Parameters:
base – FREQME peripheral base address.
refClkFrequency – The frequency of reference clock.
- Returns:
The frequency of target clock, if the output result is 0, please check the module’s operate mode.
-
static inline uint8_t FREQME_GetReferenceClkScaleValue(FREQME_Type *base)#
Get reference clock scaling factor.
- Parameters:
base – FREQME peripheral base address.
- Returns:
Reference clock scaling factor, the reference count cycle is 2 ^ ref_scale.
-
static inline void FREQME_SetPulsePolarity(FREQME_Type *base, freqme_pulse_polarity_t pulsePolarity)#
Set pulse polarity when operate mode is selected as Pulse Width Measurement mode.
- Parameters:
base – FREQME peripheral base address.
pulsePolarity – The pulse polarity to be set, please refer to freqme_pulse_polarity_t.
-
static inline bool FREQME_CheckPulsePolarity(FREQME_Type *base)#
Check pulse polarity when the operate mode is selected as pulse width measurement mode.
- Parameters:
base – FREQME peripheral base address.
- Return values:
True – Low period.
False – High period.
-
static inline uint32_t FREQME_GetMeasurementResult(FREQME_Type *base)#
Get measurement result.
- Parameters:
base – FREQME peripheral base address.
- Returns:
Measurement result.
-
static inline uint32_t FREQME_GetInterruptStatusFlags(FREQME_Type *base)#
Get interrupt status flags, such as overflow interrupt status flag, underflow interrupt status flag, and so on.
- Parameters:
base – FREQME peripheral base address.
- Returns:
Current interrupt status flags, should be the OR’ed value of _freqme_interrupt_status_flags.
-
static inline void FREQME_ClearInterruptStatusFlags(FREQME_Type *base, uint32_t statusFlags)#
Clear interrupt status flags.
- Parameters:
base – FREQME peripheral base address.
statusFlags – The combination of interrupt status flags to clear, should be the OR’ed value of _freqme_interrupt_status_flags.
-
static inline void FREQME_EnableInterrupts(FREQME_Type *base, uint32_t masks)#
Enable interrupts, such as result ready interrupt, overflow interrupt and so on.
- Parameters:
base – FREQME peripheral base address.
masks – The mask of interrupts to enable, should be the OR’ed value of _freqme_interrupt_enable.
-
static inline void FREQME_DisableInterrupts(FREQME_Type *base, uint32_t masks)#
Disable interrupts, such as result ready interrupt, overflow interrupt and so on.
- Parameters:
base – FREQME peripheral base address.
masks – The mask of interrupts to disable, should be the OR’ed value of _freqme_interrupt_enable.
-
FSL_FREQME_DRIVER_VERSION#
FREQME driver version 2.2.0.
-
enum _freqme_interrupt_status_flags#
The enumeration of interrupt status flags. .
Values:
-
enumerator kFREQME_UnderflowInterruptStatusFlag#
Indicate the measurement is just done and the result is less than minimum value.
-
enumerator kFREQME_OverflowInterruptStatusFlag#
Indicate the measurement is just done and the result is greater than maximum value.
-
enumerator kFREQME_ReadyInterruptStatusFlag#
Indicate the measurement is just done and the result is ready to read.
-
enumerator kFREQME_AllInterruptStatusFlags#
All interrupt status flags.
-
enumerator kFREQME_UnderflowInterruptStatusFlag#
-
enum _freqme_interrupt_enable#
The enumeration of interrupts, including underflow interrupt, overflow interrupt, and result ready interrupt. .
Values:
-
enumerator kFREQME_UnderflowInterruptEnable#
Enable interrupt when the result is less than minimum value.
-
enumerator kFREQME_OverflowInterruptEnable#
Enable interrupt when the result is greater than maximum value.
-
enumerator kFREQME_ReadyInterruptEnable#
Enable interrupt when a measurement completes and the result is ready.
-
enumerator kFREQME_UnderflowInterruptEnable#
-
enum _freqme_operate_mode#
FREQME module operate mode enumeration, including frequency measurement mode and pulse width measurement mode.
Values:
-
enumerator kFREQME_FreqMeasurementMode#
The module works in the frequency measurement mode.
-
enumerator kFREOME_PulseWidthMeasurementMode#
The module works in the pulse width measurement mode.
-
enumerator kFREQME_FreqMeasurementMode#
-
enum _freqme_pulse_polarity#
The enumeration of pulse polarity.
Values:
-
enumerator kFREQME_PulseHighPeriod#
Select high period of the reference clock.
-
enumerator kFREQME_PulseLowPeriod#
Select low period of the reference clock.
-
enumerator kFREQME_PulseHighPeriod#
-
typedef enum _freqme_operate_mode freqme_operate_mode_t#
FREQME module operate mode enumeration, including frequency measurement mode and pulse width measurement mode.
-
typedef enum _freqme_pulse_polarity freqme_pulse_polarity_t#
The enumeration of pulse polarity.
-
typedef union _freqme_mode_attribute freqme_mode_attribute_t#
The union of operate mode attribute.
Note
If the operate mode is selected as frequency measurement mode the member refClkScaleFactor should be used, if the operate mode is selected as pulse width measurement mode the member pulsePolarity should be used.
-
typedef struct _freq_measure_config freq_measure_config_t#
The structure of freqme module basic configuration, including operate mode, operate mode attribute and so on.
-
union _freqme_mode_attribute#
- #include <fsl_freqme.h>
The union of operate mode attribute.
Note
If the operate mode is selected as frequency measurement mode the member refClkScaleFactor should be used, if the operate mode is selected as pulse width measurement mode the member pulsePolarity should be used.
Public Members
-
uint8_t refClkScaleFactor#
Only useful in frequency measurement operate mode, used to set the reference clock counter scaling factor.
-
freqme_pulse_polarity_t pulsePolarity#
Only Useful in pulse width measurement operate mode, used to set period polarity.
-
uint8_t refClkScaleFactor#
-
struct _freq_measure_config#
- #include <fsl_freqme.h>
The structure of freqme module basic configuration, including operate mode, operate mode attribute and so on.
Public Members
-
freqme_operate_mode_t operateMode#
Select operate mode, please refer to freqme_operate_mode_t.
-
freqme_mode_attribute_t operateModeAttribute#
Used to set the attribute of the selected operate mode, if the operate mode is selected as kFREQME_FreqMeasurementMode set freqme_mode_attribute_t::refClkScaleFactor, if operate mode is selected as kFREOME_PulseWidthMeasurementMode, please set freqme_mode_attribute_t::pulsePolarity.
-
bool enableContinuousMode#
Enable/disable continuous mode, if continuous mode is enable, the measurement is performed continuously and the result for the last completed measurement is available in the result register.
-
freqme_operate_mode_t operateMode#
LPI2C: Low Power Inter-Integrated Circuit Driver#
-
void LPI2C_DriverIRQHandler(uint32_t instance)#
LPI2C driver IRQ handler common entry.
This function provides the common IRQ request entry for LPI2C.
- Parameters:
instance – LPI2C instance.
-
FSL_LPI2C_DRIVER_VERSION#
LPI2C driver version.
LPI2C status return codes.
Values:
-
enumerator kStatus_LPI2C_Busy#
The master is already performing a transfer.
-
enumerator kStatus_LPI2C_Idle#
The slave driver is idle.
-
enumerator kStatus_LPI2C_Nak#
The slave device sent a NAK in response to a byte.
-
enumerator kStatus_LPI2C_FifoError#
FIFO under run or overrun.
-
enumerator kStatus_LPI2C_BitError#
Transferred bit was not seen on the bus.
-
enumerator kStatus_LPI2C_ArbitrationLost#
Arbitration lost error.
-
enumerator kStatus_LPI2C_PinLowTimeout#
SCL or SDA were held low longer than the timeout.
-
enumerator kStatus_LPI2C_NoTransferInProgress#
Attempt to abort a transfer when one is not in progress.
-
enumerator kStatus_LPI2C_DmaRequestFail#
DMA request failed.
-
enumerator kStatus_LPI2C_Timeout#
Timeout polling status flags.
-
enumerator kStatus_LPI2C_Busy#
-
IRQn_Type const kLpi2cMasterIrqs[]#
Array to map LPI2C instance number to IRQ number, used internally for LPI2C master interrupt and EDMA transactional APIs.
-
IRQn_Type const kLpi2cSlaveIrqs[]#
-
lpi2c_master_isr_t s_lpi2cMasterIsr#
Pointer to master IRQ handler for each instance, used internally for LPI2C master interrupt and EDMA transactional APIs.
-
void *s_lpi2cMasterHandle[]#
Pointers to master handles for each instance, used internally for LPI2C master interrupt and EDMA transactional APIs.
-
uint32_t LPI2C_GetInstance(LPI2C_Type *base)#
Returns an instance number given a base address.
If an invalid base address is passed, debug builds will assert. Release builds will just return instance number 0.
- Parameters:
base – The LPI2C peripheral base address.
- Returns:
LPI2C instance number starting from 0.
-
I2C_RETRY_TIMES
Retry times for waiting flag.
LPI2C Master Driver#
-
void LPI2C_MasterGetDefaultConfig(lpi2c_master_config_t *masterConfig)#
Provides a default configuration for the LPI2C master peripheral.
This function provides the following default configuration for the LPI2C master peripheral:
masterConfig->enableMaster = true; masterConfig->debugEnable = false; masterConfig->ignoreAck = false; masterConfig->pinConfig = kLPI2C_2PinOpenDrain; masterConfig->baudRate_Hz = 100000U; masterConfig->busIdleTimeout_ns = 0; masterConfig->pinLowTimeout_ns = 0; masterConfig->sdaGlitchFilterWidth_ns = 0; masterConfig->sclGlitchFilterWidth_ns = 0; masterConfig->hostRequest.enable = false; masterConfig->hostRequest.source = kLPI2C_HostRequestExternalPin; masterConfig->hostRequest.polarity = kLPI2C_HostRequestPinActiveHigh;
After calling this function, you can override any settings in order to customize the configuration, prior to initializing the master driver with LPI2C_MasterInit().
- Parameters:
masterConfig – [out] User provided configuration structure for default values. Refer to lpi2c_master_config_t.
-
void LPI2C_MasterInit(LPI2C_Type *base, const lpi2c_master_config_t *masterConfig, uint32_t sourceClock_Hz)#
Initializes the LPI2C master peripheral.
This function enables the peripheral clock and initializes the LPI2C master peripheral as described by the user provided configuration. A software reset is performed prior to configuration.
- Parameters:
base – The LPI2C peripheral base address.
masterConfig – User provided peripheral configuration. Use LPI2C_MasterGetDefaultConfig() to get a set of defaults that you can override.
sourceClock_Hz – Frequency in Hertz of the LPI2C functional clock. Used to calculate the baud rate divisors, filter widths, and timeout periods.
-
void LPI2C_MasterDeinit(LPI2C_Type *base)#
Deinitializes the LPI2C master peripheral.
This function disables the LPI2C master peripheral and gates the clock. It also performs a software reset to restore the peripheral to reset conditions.
- Parameters:
base – The LPI2C peripheral base address.
-
void LPI2C_MasterConfigureDataMatch(LPI2C_Type *base, const lpi2c_data_match_config_t *matchConfig)#
Configures LPI2C master data match feature.
- Parameters:
base – The LPI2C peripheral base address.
matchConfig – Settings for the data match feature.
-
status_t LPI2C_MasterCheckAndClearError(LPI2C_Type *base, uint32_t status)#
Convert provided flags to status code, and clear any errors if present.
- Parameters:
base – The LPI2C peripheral base address.
status – Current status flags value that will be checked.
- Return values:
kStatus_Success –
kStatus_LPI2C_PinLowTimeout –
kStatus_LPI2C_ArbitrationLost –
kStatus_LPI2C_Nak –
kStatus_LPI2C_FifoError –
-
status_t LPI2C_CheckForBusyBus(LPI2C_Type *base)#
Make sure the bus isn’t already busy.
A busy bus is allowed if we are the one driving it.
- Parameters:
base – The LPI2C peripheral base address.
- Return values:
kStatus_Success –
kStatus_LPI2C_Busy –
-
static inline void LPI2C_MasterReset(LPI2C_Type *base)#
Performs a software reset.
Restores the LPI2C master peripheral to reset conditions.
- Parameters:
base – The LPI2C peripheral base address.
-
static inline void LPI2C_MasterEnable(LPI2C_Type *base, bool enable)#
Enables or disables the LPI2C module as master.
- Parameters:
base – The LPI2C peripheral base address.
enable – Pass true to enable or false to disable the specified LPI2C as master.
-
static inline uint32_t LPI2C_MasterGetStatusFlags(LPI2C_Type *base)#
Gets the LPI2C master status flags.
A bit mask with the state of all LPI2C master status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
See also
- Parameters:
base – The LPI2C peripheral base address.
- Returns:
State of the status flags:
1: related status flag is set.
0: related status flag is not set.
-
static inline void LPI2C_MasterClearStatusFlags(LPI2C_Type *base, uint32_t statusMask)#
Clears the LPI2C master status flag state.
The following status register flags can be cleared:
Attempts to clear other flags has no effect.
See also
- Parameters:
base – The LPI2C peripheral base address.
statusMask – A bitmask of status flags that are to be cleared. The mask is composed of _lpi2c_master_flags enumerators OR’d together. You may pass the result of a previous call to LPI2C_MasterGetStatusFlags().
-
static inline void LPI2C_MasterEnableInterrupts(LPI2C_Type *base, uint32_t interruptMask)#
Enables the LPI2C master interrupt requests.
All flags except kLPI2C_MasterBusyFlag and kLPI2C_MasterBusBusyFlag can be enabled as interrupts.
- Parameters:
base – The LPI2C peripheral base address.
interruptMask – Bit mask of interrupts to enable. See _lpi2c_master_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline void LPI2C_MasterDisableInterrupts(LPI2C_Type *base, uint32_t interruptMask)#
Disables the LPI2C master interrupt requests.
All flags except kLPI2C_MasterBusyFlag and kLPI2C_MasterBusBusyFlag can be enabled as interrupts.
- Parameters:
base – The LPI2C peripheral base address.
interruptMask – Bit mask of interrupts to disable. See _lpi2c_master_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline uint32_t LPI2C_MasterGetEnabledInterrupts(LPI2C_Type *base)#
Returns the set of currently enabled LPI2C master interrupt requests.
- Parameters:
base – The LPI2C peripheral base address.
- Returns:
A bitmask composed of _lpi2c_master_flags enumerators OR’d together to indicate the set of enabled interrupts.
-
static inline void LPI2C_MasterEnableDMA(LPI2C_Type *base, bool enableTx, bool enableRx)#
Enables or disables LPI2C master DMA requests.
- Parameters:
base – The LPI2C peripheral base address.
enableTx – Enable flag for transmit DMA request. Pass true for enable, false for disable.
enableRx – Enable flag for receive DMA request. Pass true for enable, false for disable.
-
static inline uint32_t LPI2C_MasterGetTxFifoAddress(LPI2C_Type *base)#
Gets LPI2C master transmit data register address for DMA transfer.
- Parameters:
base – The LPI2C peripheral base address.
- Returns:
The LPI2C Master Transmit Data Register address.
-
static inline uint32_t LPI2C_MasterGetRxFifoAddress(LPI2C_Type *base)#
Gets LPI2C master receive data register address for DMA transfer.
- Parameters:
base – The LPI2C peripheral base address.
- Returns:
The LPI2C Master Receive Data Register address.
-
static inline void LPI2C_MasterSetWatermarks(LPI2C_Type *base, size_t txWords, size_t rxWords)#
Sets the watermarks for LPI2C master FIFOs.
- Parameters:
base – The LPI2C peripheral base address.
txWords – Transmit FIFO watermark value in words. The kLPI2C_MasterTxReadyFlag flag is set whenever the number of words in the transmit FIFO is equal or less than txWords. Writing a value equal or greater than the FIFO size is truncated.
rxWords – Receive FIFO watermark value in words. The kLPI2C_MasterRxReadyFlag flag is set whenever the number of words in the receive FIFO is greater than rxWords. Writing a value equal or greater than the FIFO size is truncated.
-
static inline void LPI2C_MasterGetFifoCounts(LPI2C_Type *base, size_t *rxCount, size_t *txCount)#
Gets the current number of words in the LPI2C master FIFOs.
- Parameters:
base – The LPI2C peripheral base address.
txCount – [out] Pointer through which the current number of words in the transmit FIFO is returned. Pass NULL if this value is not required.
rxCount – [out] Pointer through which the current number of words in the receive FIFO is returned. Pass NULL if this value is not required.
-
void LPI2C_MasterSetBaudRate(LPI2C_Type *base, uint32_t sourceClock_Hz, uint32_t baudRate_Hz)#
Sets the I2C bus frequency for master transactions.
The LPI2C master is automatically disabled and re-enabled as necessary to configure the baud rate. Do not call this function during a transfer, or the transfer is aborted.
Note
Please note that the second parameter is the clock frequency of LPI2C module, the third parameter means user configured bus baudrate, this implementation is different from other I2C drivers which use baudrate configuration as second parameter and source clock frequency as third parameter.
- Parameters:
base – The LPI2C peripheral base address.
sourceClock_Hz – LPI2C functional clock frequency in Hertz.
baudRate_Hz – Requested bus frequency in Hertz.
-
static inline bool LPI2C_MasterGetBusIdleState(LPI2C_Type *base)#
Returns whether the bus is idle.
Requires the master mode to be enabled.
- Parameters:
base – The LPI2C peripheral base address.
- Return values:
true – Bus is busy.
false – Bus is idle.
-
status_t LPI2C_MasterStart(LPI2C_Type *base, uint8_t address, lpi2c_direction_t dir)#
Sends a START signal and slave address on the I2C bus.
This function is used to initiate a new master mode transfer. First, the bus state is checked to ensure that another master is not occupying the bus. Then a START signal is transmitted, followed by the 7-bit address specified in the address parameter. Note that this function does not actually wait until the START and address are successfully sent on the bus before returning.
- Parameters:
base – The LPI2C peripheral base address.
address – 7-bit slave device address, in bits [6:0].
dir – Master transfer direction, either kLPI2C_Read or kLPI2C_Write. This parameter is used to set the R/w bit (bit 0) in the transmitted slave address.
- Return values:
kStatus_Success – START signal and address were successfully enqueued in the transmit FIFO.
kStatus_LPI2C_Busy – Another master is currently utilizing the bus.
-
static inline status_t LPI2C_MasterRepeatedStart(LPI2C_Type *base, uint8_t address, lpi2c_direction_t dir)#
Sends a repeated START signal and slave address on the I2C bus.
This function is used to send a Repeated START signal when a transfer is already in progress. Like LPI2C_MasterStart(), it also sends the specified 7-bit address.
Note
This function exists primarily to maintain compatible APIs between LPI2C and I2C drivers, as well as to better document the intent of code that uses these APIs.
- Parameters:
base – The LPI2C peripheral base address.
address – 7-bit slave device address, in bits [6:0].
dir – Master transfer direction, either kLPI2C_Read or kLPI2C_Write. This parameter is used to set the R/w bit (bit 0) in the transmitted slave address.
- Return values:
kStatus_Success – Repeated START signal and address were successfully enqueued in the transmit FIFO.
kStatus_LPI2C_Busy – Another master is currently utilizing the bus.
-
status_t LPI2C_MasterSend(LPI2C_Type *base, void *txBuff, size_t txSize)#
Performs a polling send transfer on the I2C bus.
Sends up to txSize number of bytes to the previously addressed slave device. The slave may reply with a NAK to any byte in order to terminate the transfer early. If this happens, this function returns kStatus_LPI2C_Nak.
- Parameters:
base – The LPI2C peripheral base address.
txBuff – The pointer to the data to be transferred.
txSize – The length in bytes of the data to be transferred.
- Return values:
kStatus_Success – Data was sent successfully.
kStatus_LPI2C_Busy – Another master is currently utilizing the bus.
kStatus_LPI2C_Nak – The slave device sent a NAK in response to a byte.
kStatus_LPI2C_FifoError – FIFO under run or over run.
kStatus_LPI2C_ArbitrationLost – Arbitration lost error.
kStatus_LPI2C_PinLowTimeout – SCL or SDA were held low longer than the timeout.
-
status_t LPI2C_MasterReceive(LPI2C_Type *base, void *rxBuff, size_t rxSize)#
Performs a polling receive transfer on the I2C bus.
- Parameters:
base – The LPI2C peripheral base address.
rxBuff – The pointer to the data to be transferred.
rxSize – The length in bytes of the data to be transferred.
- Return values:
kStatus_Success – Data was received successfully.
kStatus_LPI2C_Busy – Another master is currently utilizing the bus.
kStatus_LPI2C_Nak – The slave device sent a NAK in response to a byte.
kStatus_LPI2C_FifoError – FIFO under run or overrun.
kStatus_LPI2C_ArbitrationLost – Arbitration lost error.
kStatus_LPI2C_PinLowTimeout – SCL or SDA were held low longer than the timeout.
-
status_t LPI2C_MasterStop(LPI2C_Type *base)#
Sends a STOP signal on the I2C bus.
This function does not return until the STOP signal is seen on the bus, or an error occurs.
- Parameters:
base – The LPI2C peripheral base address.
- Return values:
kStatus_Success – The STOP signal was successfully sent on the bus and the transaction terminated.
kStatus_LPI2C_Busy – Another master is currently utilizing the bus.
kStatus_LPI2C_Nak – The slave device sent a NAK in response to a byte.
kStatus_LPI2C_FifoError – FIFO under run or overrun.
kStatus_LPI2C_ArbitrationLost – Arbitration lost error.
kStatus_LPI2C_PinLowTimeout – SCL or SDA were held low longer than the timeout.
-
status_t LPI2C_MasterTransferBlocking(LPI2C_Type *base, lpi2c_master_transfer_t *transfer)#
Performs a master polling transfer on the I2C bus.
Note
The API does not return until the transfer succeeds or fails due to error happens during transfer.
- Parameters:
base – The LPI2C peripheral base address.
transfer – Pointer to the transfer structure.
- Return values:
kStatus_Success – Data was received successfully.
kStatus_LPI2C_Busy – Another master is currently utilizing the bus.
kStatus_LPI2C_Nak – The slave device sent a NAK in response to a byte.
kStatus_LPI2C_FifoError – FIFO under run or overrun.
kStatus_LPI2C_ArbitrationLost – Arbitration lost error.
kStatus_LPI2C_PinLowTimeout – SCL or SDA were held low longer than the timeout.
-
void LPI2C_MasterTransferCreateHandle(LPI2C_Type *base, lpi2c_master_handle_t *handle, lpi2c_master_transfer_callback_t callback, void *userData)#
Creates a new handle for the LPI2C master non-blocking APIs.
The creation of a handle is for use with the non-blocking APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the LPI2C_MasterTransferAbort() API shall be called.
Note
The function also enables the NVIC IRQ for the input LPI2C. Need to notice that on some SoCs the LPI2C IRQ is connected to INTMUX, in this case user needs to enable the associated INTMUX IRQ in application.
- Parameters:
base – The LPI2C peripheral base address.
handle – [out] Pointer to the LPI2C master driver handle.
callback – User provided pointer to the asynchronous callback function.
userData – User provided pointer to the application callback data.
-
status_t LPI2C_MasterTransferNonBlocking(LPI2C_Type *base, lpi2c_master_handle_t *handle, lpi2c_master_transfer_t *transfer)#
Performs a non-blocking transaction on the I2C bus.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to the LPI2C master driver handle.
transfer – The pointer to the transfer descriptor.
- Return values:
kStatus_Success – The transaction was started successfully.
kStatus_LPI2C_Busy – Either another master is currently utilizing the bus, or a non-blocking transaction is already in progress.
-
status_t LPI2C_MasterTransferGetCount(LPI2C_Type *base, lpi2c_master_handle_t *handle, size_t *count)#
Returns number of bytes transferred so far.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to the LPI2C master driver handle.
count – [out] Number of bytes transferred so far by the non-blocking transaction.
- Return values:
kStatus_Success –
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
void LPI2C_MasterTransferAbort(LPI2C_Type *base, lpi2c_master_handle_t *handle)#
Terminates a non-blocking LPI2C master transmission early.
Note
It is not safe to call this function from an IRQ handler that has a higher priority than the LPI2C peripheral’s IRQ priority.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to the LPI2C master driver handle.
-
void LPI2C_MasterTransferHandleIRQ(LPI2C_Type *base, void *lpi2cMasterHandle)#
Reusable routine to handle master interrupts.
Note
This function does not need to be called unless you are reimplementing the nonblocking API’s interrupt handler routines to add special functionality.
- Parameters:
base – The LPI2C peripheral base address.
lpi2cMasterHandle – Pointer to the LPI2C master driver handle.
-
enum _lpi2c_master_flags#
LPI2C master peripheral flags.
The following status register flags can be cleared:
All flags except kLPI2C_MasterBusyFlag and kLPI2C_MasterBusBusyFlag can be enabled as interrupts.
Note
These enums are meant to be OR’d together to form a bit mask.
Values:
-
enumerator kLPI2C_MasterTxReadyFlag#
Transmit data flag
-
enumerator kLPI2C_MasterRxReadyFlag#
Receive data flag
-
enumerator kLPI2C_MasterEndOfPacketFlag#
End Packet flag
-
enumerator kLPI2C_MasterStopDetectFlag#
Stop detect flag
-
enumerator kLPI2C_MasterNackDetectFlag#
NACK detect flag
-
enumerator kLPI2C_MasterArbitrationLostFlag#
Arbitration lost flag
-
enumerator kLPI2C_MasterFifoErrFlag#
FIFO error flag
-
enumerator kLPI2C_MasterPinLowTimeoutFlag#
Pin low timeout flag
-
enumerator kLPI2C_MasterDataMatchFlag#
Data match flag
-
enumerator kLPI2C_MasterBusyFlag#
Master busy flag
-
enumerator kLPI2C_MasterBusBusyFlag#
Bus busy flag
-
enumerator kLPI2C_MasterClearFlags#
All flags which are cleared by the driver upon starting a transfer.
-
enumerator kLPI2C_MasterIrqFlags#
IRQ sources enabled by the non-blocking transactional API.
-
enumerator kLPI2C_MasterErrorFlags#
Errors to check for.
-
enum _lpi2c_direction#
Direction of master and slave transfers.
Values:
-
enumerator kLPI2C_Write#
Master transmit.
-
enumerator kLPI2C_Read#
Master receive.
-
enumerator kLPI2C_Write#
-
enum _lpi2c_master_pin_config#
LPI2C pin configuration.
Values:
-
enumerator kLPI2C_2PinOpenDrain#
LPI2C Configured for 2-pin open drain mode
-
enumerator kLPI2C_2PinOutputOnly#
LPI2C Configured for 2-pin output only mode (ultra-fast mode)
-
enumerator kLPI2C_2PinPushPull#
LPI2C Configured for 2-pin push-pull mode
-
enumerator kLPI2C_4PinPushPull#
LPI2C Configured for 4-pin push-pull mode
-
enumerator kLPI2C_2PinOpenDrainWithSeparateSlave#
LPI2C Configured for 2-pin open drain mode with separate LPI2C slave
-
enumerator kLPI2C_2PinOutputOnlyWithSeparateSlave#
LPI2C Configured for 2-pin output only mode(ultra-fast mode) with separate LPI2C slave
-
enumerator kLPI2C_2PinPushPullWithSeparateSlave#
LPI2C Configured for 2-pin push-pull mode with separate LPI2C slave
-
enumerator kLPI2C_4PinPushPullWithInvertedOutput#
LPI2C Configured for 4-pin push-pull mode(inverted outputs)
-
enumerator kLPI2C_2PinOpenDrain#
-
enum _lpi2c_host_request_source#
LPI2C master host request selection.
Values:
-
enumerator kLPI2C_HostRequestExternalPin#
Select the LPI2C_HREQ pin as the host request input
-
enumerator kLPI2C_HostRequestInputTrigger#
Select the input trigger as the host request input
-
enumerator kLPI2C_HostRequestExternalPin#
-
enum _lpi2c_host_request_polarity#
LPI2C master host request pin polarity configuration.
Values:
-
enumerator kLPI2C_HostRequestPinActiveLow#
Configure the LPI2C_HREQ pin active low
-
enumerator kLPI2C_HostRequestPinActiveHigh#
Configure the LPI2C_HREQ pin active high
-
enumerator kLPI2C_HostRequestPinActiveLow#
-
enum _lpi2c_data_match_config_mode#
LPI2C master data match configuration modes.
Values:
-
enumerator kLPI2C_MatchDisabled#
LPI2C Match Disabled
-
enumerator kLPI2C_1stWordEqualsM0OrM1#
LPI2C Match Enabled and 1st data word equals MATCH0 OR MATCH1
-
enumerator kLPI2C_AnyWordEqualsM0OrM1#
LPI2C Match Enabled and any data word equals MATCH0 OR MATCH1
-
enumerator kLPI2C_1stWordEqualsM0And2ndWordEqualsM1#
LPI2C Match Enabled and 1st data word equals MATCH0, 2nd data equals MATCH1
-
enumerator kLPI2C_AnyWordEqualsM0AndNextWordEqualsM1#
LPI2C Match Enabled and any data word equals MATCH0, next data equals MATCH1
-
enumerator kLPI2C_1stWordAndM1EqualsM0AndM1#
LPI2C Match Enabled and 1st data word and MATCH0 equals MATCH0 and MATCH1
-
enumerator kLPI2C_AnyWordAndM1EqualsM0AndM1#
LPI2C Match Enabled and any data word and MATCH0 equals MATCH0 and MATCH1
-
enumerator kLPI2C_MatchDisabled#
-
enum _lpi2c_master_transfer_flags#
Transfer option flags.
Note
These enumerations are intended to be OR’d together to form a bit mask of options for the _lpi2c_master_transfer::flags field.
Values:
-
enumerator kLPI2C_TransferDefaultFlag#
Transfer starts with a start signal, stops with a stop signal.
-
enumerator kLPI2C_TransferNoStartFlag#
Don’t send a start condition, address, and sub address
-
enumerator kLPI2C_TransferNoStopFlag#
Don’t send a stop condition.
-
enumerator kLPI2C_TransferDefaultFlag#
-
typedef enum _lpi2c_direction lpi2c_direction_t#
Direction of master and slave transfers.
-
typedef enum _lpi2c_master_pin_config lpi2c_master_pin_config_t#
LPI2C pin configuration.
-
typedef enum _lpi2c_host_request_source lpi2c_host_request_source_t#
LPI2C master host request selection.
-
typedef enum _lpi2c_host_request_polarity lpi2c_host_request_polarity_t#
LPI2C master host request pin polarity configuration.
-
typedef struct _lpi2c_master_config lpi2c_master_config_t#
Structure with settings to initialize the LPI2C master module.
This structure holds configuration settings for the LPI2C peripheral. To initialize this structure to reasonable defaults, call the LPI2C_MasterGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
-
typedef enum _lpi2c_data_match_config_mode lpi2c_data_match_config_mode_t#
LPI2C master data match configuration modes.
-
typedef struct _lpi2c_match_config lpi2c_data_match_config_t#
LPI2C master data match configuration structure.
-
typedef struct _lpi2c_master_transfer lpi2c_master_transfer_t#
LPI2C master descriptor of the transfer.
-
typedef struct _lpi2c_master_handle lpi2c_master_handle_t#
LPI2C master handle of the transfer.
-
typedef void (*lpi2c_master_transfer_callback_t)(LPI2C_Type *base, lpi2c_master_handle_t *handle, status_t completionStatus, void *userData)#
Master completion callback function pointer type.
This callback is used only for the non-blocking master transfer API. Specify the callback you wish to use in the call to LPI2C_MasterTransferCreateHandle().
- Param base:
The LPI2C peripheral base address.
- Param handle:
Pointer to the LPI2C master driver handle.
- Param completionStatus:
Either kStatus_Success or an error code describing how the transfer completed.
- Param userData:
Arbitrary pointer-sized value passed from the application.
-
typedef void (*lpi2c_master_isr_t)(LPI2C_Type *base, void *handle)#
Typedef for master interrupt handler, used internally for LPI2C master interrupt and EDMA transactional APIs.
-
struct _lpi2c_master_config#
- #include <fsl_lpi2c.h>
Structure with settings to initialize the LPI2C master module.
This structure holds configuration settings for the LPI2C peripheral. To initialize this structure to reasonable defaults, call the LPI2C_MasterGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
Public Members
-
bool enableMaster#
Whether to enable master mode.
-
bool enableDoze#
Whether master is enabled in doze mode.
-
bool debugEnable#
Enable transfers to continue when halted in debug mode.
-
bool ignoreAck#
Whether to ignore ACK/NACK.
-
lpi2c_master_pin_config_t pinConfig#
The pin configuration option.
-
uint32_t baudRate_Hz#
Desired baud rate in Hertz.
-
uint32_t busIdleTimeout_ns#
Bus idle timeout in nanoseconds. Set to 0 to disable.
-
uint32_t pinLowTimeout_ns#
Pin low timeout in nanoseconds. Set to 0 to disable.
-
uint8_t sdaGlitchFilterWidth_ns#
Width in nanoseconds of glitch filter on SDA pin. Set to 0 to disable.
-
uint8_t sclGlitchFilterWidth_ns#
Width in nanoseconds of glitch filter on SCL pin. Set to 0 to disable.
-
struct _lpi2c_master_config hostRequest#
Host request options.
-
bool enableMaster#
-
struct _lpi2c_match_config#
- #include <fsl_lpi2c.h>
LPI2C master data match configuration structure.
Public Members
-
lpi2c_data_match_config_mode_t matchMode#
Data match configuration setting.
-
bool rxDataMatchOnly#
When set to true, received data is ignored until a successful match.
-
uint32_t match0#
Match value 0.
-
uint32_t match1#
Match value 1.
-
lpi2c_data_match_config_mode_t matchMode#
-
struct _lpi2c_master_transfer#
- #include <fsl_lpi2c.h>
Non-blocking transfer descriptor structure.
This structure is used to pass transaction parameters to the LPI2C_MasterTransferNonBlocking() API.
Public Members
-
uint32_t flags#
Bit mask of options for the transfer. See enumeration _lpi2c_master_transfer_flags for available options. Set to 0 or kLPI2C_TransferDefaultFlag for normal transfers.
-
uint16_t slaveAddress#
The 7-bit slave address.
-
lpi2c_direction_t direction#
Either kLPI2C_Read or kLPI2C_Write.
-
uint32_t subaddress#
Sub address. Transferred MSB first.
-
size_t subaddressSize#
Length of sub address to send in bytes. Maximum size is 4 bytes.
-
void *data#
Pointer to data to transfer.
-
size_t dataSize#
Number of bytes to transfer.
-
uint32_t flags#
-
struct _lpi2c_master_handle#
- #include <fsl_lpi2c.h>
Driver handle for master non-blocking APIs.
Note
The contents of this structure are private and subject to change.
Public Members
-
uint8_t state#
Transfer state machine current state.
-
uint16_t remainingBytes#
Remaining byte count in current state.
-
uint8_t *buf#
Buffer pointer for current state.
-
uint16_t commandBuffer[6]#
LPI2C command sequence. When all 6 command words are used: Start&addr&write[1 word] + subaddr[4 words] + restart&addr&read[1 word]
-
lpi2c_master_transfer_t transfer#
Copy of the current transfer info.
-
lpi2c_master_transfer_callback_t completionCallback#
Callback function pointer.
-
void *userData#
Application data passed to callback.
-
uint16_t chunkSize#
Remaining byte count in current chunk.
-
uint8_t state#
-
struct hostRequest
Public Members
-
bool enable#
Enable host request.
-
lpi2c_host_request_source_t source#
Host request source.
-
lpi2c_host_request_polarity_t polarity#
Host request pin polarity.
-
bool enable#
LPI2C Master DMA Driver#
-
void LPI2C_MasterCreateEDMAHandle(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle, edma_handle_t *rxDmaHandle, edma_handle_t *txDmaHandle, lpi2c_master_edma_transfer_callback_t callback, void *userData)#
Create a new handle for the LPI2C master DMA APIs.
The creation of a handle is for use with the DMA APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the LPI2C_MasterTransferAbortEDMA() API shall be called.
For devices where the LPI2C send and receive DMA requests are OR’d together, the txDmaHandle parameter is ignored and may be set to NULL.
- Parameters:
base – The LPI2C peripheral base address.
handle – [out] Pointer to the LPI2C master driver handle.
rxDmaHandle – Handle for the eDMA receive channel. Created by the user prior to calling this function.
txDmaHandle – Handle for the eDMA transmit channel. Created by the user prior to calling this function.
callback – User provided pointer to the asynchronous callback function.
userData – User provided pointer to the application callback data.
-
status_t LPI2C_MasterTransferEDMA(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle, lpi2c_master_transfer_t *transfer)#
Performs a non-blocking DMA-based transaction on the I2C bus.
The callback specified when the handle was created is invoked when the transaction has completed.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to the LPI2C master driver handle.
transfer – The pointer to the transfer descriptor.
- Return values:
kStatus_Success – The transaction was started successfully.
kStatus_LPI2C_Busy – Either another master is currently utilizing the bus, or another DMA transaction is already in progress.
-
status_t LPI2C_MasterTransferGetCountEDMA(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle, size_t *count)#
Returns number of bytes transferred so far.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to the LPI2C master driver handle.
count – [out] Number of bytes transferred so far by the non-blocking transaction.
- Return values:
kStatus_Success –
kStatus_NoTransferInProgress – There is not a DMA transaction currently in progress.
-
status_t LPI2C_MasterTransferAbortEDMA(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle)#
Terminates a non-blocking LPI2C master transmission early.
Note
It is not safe to call this function from an IRQ handler that has a higher priority than the eDMA peripheral’s IRQ priority.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to the LPI2C master driver handle.
- Return values:
kStatus_Success – A transaction was successfully aborted.
kStatus_LPI2C_Idle – There is not a DMA transaction currently in progress.
-
typedef struct _lpi2c_master_edma_handle lpi2c_master_edma_handle_t#
LPI2C master EDMA handle of the transfer.
-
typedef void (*lpi2c_master_edma_transfer_callback_t)(LPI2C_Type *base, lpi2c_master_edma_handle_t *handle, status_t completionStatus, void *userData)#
Master DMA completion callback function pointer type.
This callback is used only for the non-blocking master transfer API. Specify the callback you wish to use in the call to LPI2C_MasterCreateEDMAHandle().
- Param base:
The LPI2C peripheral base address.
- Param handle:
Handle associated with the completed transfer.
- Param completionStatus:
Either kStatus_Success or an error code describing how the transfer completed.
- Param userData:
Arbitrary pointer-sized value passed from the application.
-
struct _lpi2c_master_edma_handle#
- #include <fsl_lpi2c_edma.h>
Driver handle for master DMA APIs.
Note
The contents of this structure are private and subject to change.
Public Members
-
LPI2C_Type *base#
LPI2C base pointer.
-
bool isBusy#
Transfer state machine current state.
-
uint8_t nbytes#
eDMA minor byte transfer count initially configured.
-
uint16_t commandBuffer[20U]#
LPI2C command sequence. When all 10 command words are used: Start&addr&write[1 word] + subaddr[4 words] + restart&addr&read[1 word] + receive&Size[4 words]
-
lpi2c_master_transfer_t transfer#
Copy of the current transfer info.
-
lpi2c_master_edma_transfer_callback_t completionCallback#
Callback function pointer.
-
void *userData#
Application data passed to callback.
-
edma_handle_t *rx#
Handle for receive DMA channel.
-
edma_handle_t *tx#
Handle for transmit DMA channel.
-
edma_tcd_t tcds[3]#
Software TCD. Three are allocated to provide enough room to align to 32-bytes.
-
LPI2C_Type *base#
LPI2C Slave Driver#
-
void LPI2C_SlaveGetDefaultConfig(lpi2c_slave_config_t *slaveConfig)#
Provides a default configuration for the LPI2C slave peripheral.
This function provides the following default configuration for the LPI2C slave peripheral:
slaveConfig->enableSlave = true; slaveConfig->address0 = 0U; slaveConfig->address1 = 0U; slaveConfig->addressMatchMode = kLPI2C_MatchAddress0; slaveConfig->filterDozeEnable = true; slaveConfig->filterEnable = true; slaveConfig->enableGeneralCall = false; slaveConfig->sclStall.enableAck = false; slaveConfig->sclStall.enableTx = true; slaveConfig->sclStall.enableRx = true; slaveConfig->sclStall.enableAddress = true; slaveConfig->ignoreAck = false; slaveConfig->enableReceivedAddressRead = false; slaveConfig->sdaGlitchFilterWidth_ns = 0; slaveConfig->sclGlitchFilterWidth_ns = 0; slaveConfig->dataValidDelay_ns = 0; slaveConfig->clockHoldTime_ns = 0;
After calling this function, override any settings to customize the configuration, prior to initializing the master driver with LPI2C_SlaveInit(). Be sure to override at least the address0 member of the configuration structure with the desired slave address.
- Parameters:
slaveConfig – [out] User provided configuration structure that is set to default values. Refer to lpi2c_slave_config_t.
-
void LPI2C_SlaveInit(LPI2C_Type *base, const lpi2c_slave_config_t *slaveConfig, uint32_t sourceClock_Hz)#
Initializes the LPI2C slave peripheral.
This function enables the peripheral clock and initializes the LPI2C slave peripheral as described by the user provided configuration.
- Parameters:
base – The LPI2C peripheral base address.
slaveConfig – User provided peripheral configuration. Use LPI2C_SlaveGetDefaultConfig() to get a set of defaults that you can override.
sourceClock_Hz – Frequency in Hertz of the LPI2C functional clock. Used to calculate the filter widths, data valid delay, and clock hold time.
-
void LPI2C_SlaveDeinit(LPI2C_Type *base)#
Deinitializes the LPI2C slave peripheral.
This function disables the LPI2C slave peripheral and gates the clock. It also performs a software reset to restore the peripheral to reset conditions.
- Parameters:
base – The LPI2C peripheral base address.
-
static inline void LPI2C_SlaveReset(LPI2C_Type *base)#
Performs a software reset of the LPI2C slave peripheral.
- Parameters:
base – The LPI2C peripheral base address.
-
static inline void LPI2C_SlaveEnable(LPI2C_Type *base, bool enable)#
Enables or disables the LPI2C module as slave.
- Parameters:
base – The LPI2C peripheral base address.
enable – Pass true to enable or false to disable the specified LPI2C as slave.
-
static inline uint32_t LPI2C_SlaveGetStatusFlags(LPI2C_Type *base)#
Gets the LPI2C slave status flags.
A bit mask with the state of all LPI2C slave status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
See also
- Parameters:
base – The LPI2C peripheral base address.
- Returns:
State of the status flags:
1: related status flag is set.
0: related status flag is not set.
-
static inline void LPI2C_SlaveClearStatusFlags(LPI2C_Type *base, uint32_t statusMask)#
Clears the LPI2C status flag state.
The following status register flags can be cleared:
Attempts to clear other flags has no effect.
See also
- Parameters:
base – The LPI2C peripheral base address.
statusMask – A bitmask of status flags that are to be cleared. The mask is composed of _lpi2c_slave_flags enumerators OR’d together. You may pass the result of a previous call to LPI2C_SlaveGetStatusFlags().
-
static inline void LPI2C_SlaveEnableInterrupts(LPI2C_Type *base, uint32_t interruptMask)#
Enables the LPI2C slave interrupt requests.
All flags except kLPI2C_SlaveBusyFlag and kLPI2C_SlaveBusBusyFlag can be enabled as interrupts.
- Parameters:
base – The LPI2C peripheral base address.
interruptMask – Bit mask of interrupts to enable. See _lpi2c_slave_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline void LPI2C_SlaveDisableInterrupts(LPI2C_Type *base, uint32_t interruptMask)#
Disables the LPI2C slave interrupt requests.
All flags except kLPI2C_SlaveBusyFlag and kLPI2C_SlaveBusBusyFlag can be enabled as interrupts.
- Parameters:
base – The LPI2C peripheral base address.
interruptMask – Bit mask of interrupts to disable. See _lpi2c_slave_flags for the set of constants that should be OR’d together to form the bit mask.
-
static inline uint32_t LPI2C_SlaveGetEnabledInterrupts(LPI2C_Type *base)#
Returns the set of currently enabled LPI2C slave interrupt requests.
- Parameters:
base – The LPI2C peripheral base address.
- Returns:
A bitmask composed of _lpi2c_slave_flags enumerators OR’d together to indicate the set of enabled interrupts.
-
static inline void LPI2C_SlaveEnableDMA(LPI2C_Type *base, bool enableAddressValid, bool enableRx, bool enableTx)#
Enables or disables the LPI2C slave peripheral DMA requests.
- Parameters:
base – The LPI2C peripheral base address.
enableAddressValid – Enable flag for the address valid DMA request. Pass true for enable, false for disable. The address valid DMA request is shared with the receive data DMA request.
enableRx – Enable flag for the receive data DMA request. Pass true for enable, false for disable.
enableTx – Enable flag for the transmit data DMA request. Pass true for enable, false for disable.
-
static inline bool LPI2C_SlaveGetBusIdleState(LPI2C_Type *base)#
Returns whether the bus is idle.
Requires the slave mode to be enabled.
- Parameters:
base – The LPI2C peripheral base address.
- Return values:
true – Bus is busy.
false – Bus is idle.
-
static inline void LPI2C_SlaveTransmitAck(LPI2C_Type *base, bool ackOrNack)#
Transmits either an ACK or NAK on the I2C bus in response to a byte from the master.
Use this function to send an ACK or NAK when the kLPI2C_SlaveTransmitAckFlag is asserted. This only happens if you enable the sclStall.enableAck field of the lpi2c_slave_config_t configuration structure used to initialize the slave peripheral.
- Parameters:
base – The LPI2C peripheral base address.
ackOrNack – Pass true for an ACK or false for a NAK.
-
static inline void LPI2C_SlaveEnableAckStall(LPI2C_Type *base, bool enable)#
Enables or disables ACKSTALL.
When enables ACKSTALL, software can transmit either an ACK or NAK on the I2C bus in response to a byte from the master.
- Parameters:
base – The LPI2C peripheral base address.
enable – True will enable ACKSTALL,false will disable ACKSTALL.
-
static inline uint32_t LPI2C_SlaveGetReceivedAddress(LPI2C_Type *base)#
Returns the slave address sent by the I2C master.
This function should only be called if the kLPI2C_SlaveAddressValidFlag is asserted.
- Parameters:
base – The LPI2C peripheral base address.
- Returns:
The 8-bit address matched by the LPI2C slave. Bit 0 contains the R/w direction bit, and the 7-bit slave address is in the upper 7 bits.
-
status_t LPI2C_SlaveSend(LPI2C_Type *base, void *txBuff, size_t txSize, size_t *actualTxSize)#
Performs a polling send transfer on the I2C bus.
- Parameters:
base – The LPI2C peripheral base address.
txBuff – The pointer to the data to be transferred.
txSize – The length in bytes of the data to be transferred.
actualTxSize – [out]
- Returns:
Error or success status returned by API.
-
status_t LPI2C_SlaveReceive(LPI2C_Type *base, void *rxBuff, size_t rxSize, size_t *actualRxSize)#
Performs a polling receive transfer on the I2C bus.
- Parameters:
base – The LPI2C peripheral base address.
rxBuff – The pointer to the data to be transferred.
rxSize – The length in bytes of the data to be transferred.
actualRxSize – [out]
- Returns:
Error or success status returned by API.
-
void LPI2C_SlaveTransferCreateHandle(LPI2C_Type *base, lpi2c_slave_handle_t *handle, lpi2c_slave_transfer_callback_t callback, void *userData)#
Creates a new handle for the LPI2C slave non-blocking APIs.
The creation of a handle is for use with the non-blocking APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the LPI2C_SlaveTransferAbort() API shall be called.
Note
The function also enables the NVIC IRQ for the input LPI2C. Need to notice that on some SoCs the LPI2C IRQ is connected to INTMUX, in this case user needs to enable the associated INTMUX IRQ in application.
- Parameters:
base – The LPI2C peripheral base address.
handle – [out] Pointer to the LPI2C slave driver handle.
callback – User provided pointer to the asynchronous callback function.
userData – User provided pointer to the application callback data.
-
status_t LPI2C_SlaveTransferNonBlocking(LPI2C_Type *base, lpi2c_slave_handle_t *handle, uint32_t eventMask)#
Starts accepting slave transfers.
Call this API after calling I2C_SlaveInit() and LPI2C_SlaveTransferCreateHandle() to start processing transactions driven by an I2C master. The slave monitors the I2C bus and pass events to the callback that was passed into the call to LPI2C_SlaveTransferCreateHandle(). The callback is always invoked from the interrupt context.
The set of events received by the callback is customizable. To do so, set the eventMask parameter to the OR’d combination of lpi2c_slave_transfer_event_t enumerators for the events you wish to receive. The kLPI2C_SlaveTransmitEvent and kLPI2C_SlaveReceiveEvent events are always enabled and do not need to be included in the mask. Alternatively, you can pass 0 to get a default set of only the transmit and receive events that are always enabled. In addition, the kLPI2C_SlaveAllEvents constant is provided as a convenient way to enable all events.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to lpi2c_slave_handle_t structure which stores the transfer state.
eventMask – Bit mask formed by OR’ing together lpi2c_slave_transfer_event_t enumerators to specify which events to send to the callback. Other accepted values are 0 to get a default set of only the transmit and receive events, and kLPI2C_SlaveAllEvents to enable all events.
- Return values:
kStatus_Success – Slave transfers were successfully started.
kStatus_LPI2C_Busy – Slave transfers have already been started on this handle.
-
status_t LPI2C_SlaveTransferGetCount(LPI2C_Type *base, lpi2c_slave_handle_t *handle, size_t *count)#
Gets the slave transfer status during a non-blocking transfer.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to i2c_slave_handle_t structure.
count – [out] Pointer to a value to hold the number of bytes transferred. May be NULL if the count is not required.
- Return values:
kStatus_Success –
kStatus_NoTransferInProgress –
-
void LPI2C_SlaveTransferAbort(LPI2C_Type *base, lpi2c_slave_handle_t *handle)#
Aborts the slave non-blocking transfers.
Note
This API could be called at any time to stop slave for handling the bus events.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to lpi2c_slave_handle_t structure which stores the transfer state.
-
void LPI2C_SlaveTransferHandleIRQ(LPI2C_Type *base, lpi2c_slave_handle_t *handle)#
Reusable routine to handle slave interrupts.
Note
This function does not need to be called unless you are reimplementing the non blocking API’s interrupt handler routines to add special functionality.
- Parameters:
base – The LPI2C peripheral base address.
handle – Pointer to lpi2c_slave_handle_t structure which stores the transfer state.
-
enum _lpi2c_slave_flags#
LPI2C slave peripheral flags.
The following status register flags can be cleared:
All flags except kLPI2C_SlaveBusyFlag and kLPI2C_SlaveBusBusyFlag can be enabled as interrupts.
Note
These enumerations are meant to be OR’d together to form a bit mask.
Values:
-
enumerator kLPI2C_SlaveTxReadyFlag#
Transmit data flag
-
enumerator kLPI2C_SlaveRxReadyFlag#
Receive data flag
-
enumerator kLPI2C_SlaveAddressValidFlag#
Address valid flag
-
enumerator kLPI2C_SlaveTransmitAckFlag#
Transmit ACK flag
-
enumerator kLPI2C_SlaveRepeatedStartDetectFlag#
Repeated start detect flag
-
enumerator kLPI2C_SlaveStopDetectFlag#
Stop detect flag
-
enumerator kLPI2C_SlaveBitErrFlag#
Bit error flag
-
enumerator kLPI2C_SlaveFifoErrFlag#
FIFO error flag
-
enumerator kLPI2C_SlaveAddressMatch0Flag#
Address match 0 flag
-
enumerator kLPI2C_SlaveAddressMatch1Flag#
Address match 1 flag
-
enumerator kLPI2C_SlaveGeneralCallFlag#
General call flag
-
enumerator kLPI2C_SlaveBusyFlag#
Master busy flag
-
enumerator kLPI2C_SlaveBusBusyFlag#
Bus busy flag
-
enumerator kLPI2C_SlaveClearFlags#
All flags which are cleared by the driver upon starting a transfer.
-
enumerator kLPI2C_SlaveIrqFlags#
IRQ sources enabled by the non-blocking transactional API.
-
enumerator kLPI2C_SlaveErrorFlags#
Errors to check for.
-
enum _lpi2c_slave_address_match#
LPI2C slave address match options.
Values:
-
enumerator kLPI2C_MatchAddress0#
Match only address 0.
-
enumerator kLPI2C_MatchAddress0OrAddress1#
Match either address 0 or address 1.
-
enumerator kLPI2C_MatchAddress0ThroughAddress1#
Match a range of slave addresses from address 0 through address 1.
-
enumerator kLPI2C_MatchAddress0#
-
enum _lpi2c_slave_transfer_event#
Set of events sent to the callback for non blocking slave transfers.
These event enumerations are used for two related purposes. First, a bit mask created by OR’ing together events is passed to LPI2C_SlaveTransferNonBlocking() in order to specify which events to enable. Then, when the slave callback is invoked, it is passed the current event through its transfer parameter.
Note
These enumerations are meant to be OR’d together to form a bit mask of events.
Values:
-
enumerator kLPI2C_SlaveAddressMatchEvent#
Received the slave address after a start or repeated start.
-
enumerator kLPI2C_SlaveTransmitEvent#
Callback is requested to provide data to transmit (slave-transmitter role).
-
enumerator kLPI2C_SlaveReceiveEvent#
Callback is requested to provide a buffer in which to place received data (slave-receiver role).
-
enumerator kLPI2C_SlaveTransmitAckEvent#
Callback needs to either transmit an ACK or NACK.
-
enumerator kLPI2C_SlaveRepeatedStartEvent#
A repeated start was detected.
-
enumerator kLPI2C_SlaveCompletionEvent#
A stop was detected, completing the transfer.
-
enumerator kLPI2C_SlaveAllEvents#
Bit mask of all available events.
-
enumerator kLPI2C_SlaveAddressMatchEvent#
-
typedef enum _lpi2c_slave_address_match lpi2c_slave_address_match_t#
LPI2C slave address match options.
-
typedef struct _lpi2c_slave_config lpi2c_slave_config_t#
Structure with settings to initialize the LPI2C slave module.
This structure holds configuration settings for the LPI2C slave peripheral. To initialize this structure to reasonable defaults, call the LPI2C_SlaveGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
-
typedef enum _lpi2c_slave_transfer_event lpi2c_slave_transfer_event_t#
Set of events sent to the callback for non blocking slave transfers.
These event enumerations are used for two related purposes. First, a bit mask created by OR’ing together events is passed to LPI2C_SlaveTransferNonBlocking() in order to specify which events to enable. Then, when the slave callback is invoked, it is passed the current event through its transfer parameter.
Note
These enumerations are meant to be OR’d together to form a bit mask of events.
-
typedef struct _lpi2c_slave_transfer lpi2c_slave_transfer_t#
LPI2C slave transfer structure.
-
typedef struct _lpi2c_slave_handle lpi2c_slave_handle_t#
LPI2C slave handle structure.
-
typedef void (*lpi2c_slave_transfer_callback_t)(LPI2C_Type *base, lpi2c_slave_transfer_t *transfer, void *userData)#
Slave event callback function pointer type.
This callback is used only for the slave non-blocking transfer API. To install a callback, use the LPI2C_SlaveSetCallback() function after you have created a handle.
- Param base:
Base address for the LPI2C instance on which the event occurred.
- Param transfer:
Pointer to transfer descriptor containing values passed to and/or from the callback.
- Param userData:
Arbitrary pointer-sized value passed from the application.
-
struct _lpi2c_slave_config#
- #include <fsl_lpi2c.h>
Structure with settings to initialize the LPI2C slave module.
This structure holds configuration settings for the LPI2C slave peripheral. To initialize this structure to reasonable defaults, call the LPI2C_SlaveGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
Public Members
-
bool enableSlave#
Enable slave mode.
-
uint8_t address0#
Slave’s 7-bit address.
-
uint8_t address1#
Alternate slave 7-bit address.
-
lpi2c_slave_address_match_t addressMatchMode#
Address matching options.
-
bool filterDozeEnable#
Enable digital glitch filter in doze mode.
-
bool filterEnable#
Enable digital glitch filter.
-
bool enableGeneralCall#
Enable general call address matching.
-
struct _lpi2c_slave_config sclStall#
SCL stall enable options.
-
bool ignoreAck#
Continue transfers after a NACK is detected.
-
bool enableReceivedAddressRead#
Enable reading the address received address as the first byte of data.
-
uint32_t sdaGlitchFilterWidth_ns#
Width in nanoseconds of the digital filter on the SDA signal. Set to 0 to disable.
-
uint32_t sclGlitchFilterWidth_ns#
Width in nanoseconds of the digital filter on the SCL signal. Set to 0 to disable.
-
uint32_t dataValidDelay_ns#
Width in nanoseconds of the data valid delay.
-
uint32_t clockHoldTime_ns#
Width in nanoseconds of the clock hold time.
-
bool enableSlave#
-
struct _lpi2c_slave_transfer#
- #include <fsl_lpi2c.h>
LPI2C slave transfer structure.
Public Members
-
lpi2c_slave_transfer_event_t event#
Reason the callback is being invoked.
-
uint8_t receivedAddress#
Matching address send by master.
-
uint8_t *data#
Transfer buffer
-
size_t dataSize#
Transfer size
-
status_t completionStatus#
Success or error code describing how the transfer completed. Only applies for kLPI2C_SlaveCompletionEvent.
-
size_t transferredCount#
Number of bytes actually transferred since start or last repeated start.
-
lpi2c_slave_transfer_event_t event#
-
struct _lpi2c_slave_handle#
- #include <fsl_lpi2c.h>
LPI2C slave handle structure.
Note
The contents of this structure are private and subject to change.
Public Members
-
lpi2c_slave_transfer_t transfer#
LPI2C slave transfer copy.
-
bool isBusy#
Whether transfer is busy.
-
bool wasTransmit#
Whether the last transfer was a transmit.
-
uint32_t eventMask#
Mask of enabled events.
-
uint32_t transferredCount#
Count of bytes transferred.
-
lpi2c_slave_transfer_callback_t callback#
Callback function called at transfer event.
-
void *userData#
Callback parameter passed to callback.
-
lpi2c_slave_transfer_t transfer#
-
struct sclStall
Public Members
-
bool enableAck#
Enables SCL clock stretching during slave-transmit address byte(s) and slave-receiver address and data byte(s) to allow software to write the Transmit ACK Register before the ACK or NACK is transmitted. Clock stretching occurs when transmitting the 9th bit. When enableAckSCLStall is enabled, there is no need to set either enableRxDataSCLStall or enableAddressSCLStall.
-
bool enableTx#
Enables SCL clock stretching when the transmit data flag is set during a slave-transmit transfer.
-
bool enableRx#
Enables SCL clock stretching when receive data flag is set during a slave-receive transfer.
-
bool enableAddress#
Enables SCL clock stretching when the address valid flag is asserted.
-
bool enableAck#
LPIT: Low-Power Interrupt Timer#
-
void LPIT_Init(LPIT_Type *base, const lpit_config_t *config)#
Ungates the LPIT clock and configures the peripheral for a basic operation.
This function issues a software reset to reset all channels and registers except the Module Control register.
Note
This API should be called at the beginning of the application using the LPIT driver.
- Parameters:
base – LPIT peripheral base address.
config – Pointer to the user configuration structure.
-
void LPIT_Deinit(LPIT_Type *base)#
Disables the module and gates the LPIT clock.
- Parameters:
base – LPIT peripheral base address.
-
void LPIT_GetDefaultConfig(lpit_config_t *config)#
Fills in the LPIT configuration structure with default settings.
The default values are:
config->enableRunInDebug = false; config->enableRunInDoze = false;
- Parameters:
config – Pointer to the user configuration structure.
-
status_t LPIT_SetupChannel(LPIT_Type *base, lpit_chnl_t channel, const lpit_chnl_params_t *chnlSetup)#
Sets up an LPIT channel based on the user’s preference.
This function sets up the operation mode to one of the options available in the enumeration lpit_timer_modes_t. It sets the trigger source as either internal or external, trigger selection and the timers behaviour when a timeout occurs. It also chains the timer if a prior timer if requested by the user.
- Parameters:
base – LPIT peripheral base address.
channel – Channel that is being configured.
chnlSetup – Configuration parameters.
-
static inline void LPIT_EnableInterrupts(LPIT_Type *base, uint32_t mask)#
Enables the selected PIT interrupts.
- Parameters:
base – LPIT peripheral base address.
mask – The interrupts to enable. This is a logical OR of members of the enumeration lpit_interrupt_enable_t
-
static inline void LPIT_DisableInterrupts(LPIT_Type *base, uint32_t mask)#
Disables the selected PIT interrupts.
- Parameters:
base – LPIT peripheral base address.
mask – The interrupts to enable. This is a logical OR of members of the enumeration lpit_interrupt_enable_t
-
static inline uint32_t LPIT_GetEnabledInterrupts(LPIT_Type *base)#
Gets the enabled LPIT interrupts.
- Parameters:
base – LPIT peripheral base address.
- Returns:
The enabled interrupts. This is the logical OR of members of the enumeration lpit_interrupt_enable_t
-
static inline uint32_t LPIT_GetStatusFlags(LPIT_Type *base)#
Gets the LPIT status flags.
- Parameters:
base – LPIT peripheral base address.
- Returns:
The status flags. This is the logical OR of members of the enumeration lpit_status_flags_t
-
static inline void LPIT_ClearStatusFlags(LPIT_Type *base, uint32_t mask)#
Clears the LPIT status flags.
- Parameters:
base – LPIT peripheral base address.
mask – The status flags to clear. This is a logical OR of members of the enumeration lpit_status_flags_t
-
static inline void LPIT_SetTimerPeriod(LPIT_Type *base, lpit_chnl_t channel, uint32_t ticks)#
Sets the timer period in units of count.
Timers begin counting down from the value set by this function until it reaches 0, at which point it generates an interrupt and loads this register value again. Writing a new value to this register does not restart the timer. Instead, the value is loaded after the timer expires.
Note
User can call the utility macros provided in fsl_common.h to convert to ticks.
- Parameters:
base – LPIT peripheral base address.
channel – Timer channel number.
ticks – Timer period in units of ticks.
-
static inline void LPIT_SetTimerValue(LPIT_Type *base, lpit_chnl_t channel, uint32_t ticks)#
Sets the timer period in units of count.
In the Dual 16-bit Periodic Counter mode, the counter will load and then the lower 16-bits will decrement down to zero, which will assert the output pre-trigger. The upper 16-bits will then decrement down to zero, which will negate the output pre-trigger and set the timer interrupt flag.
Note
Set TVAL register to 0 or 1 is invalid in compare mode.
- Parameters:
base – LPIT peripheral base address.
channel – Timer channel number.
ticks – Timer period in units of ticks.
-
static inline uint32_t LPIT_GetCurrentTimerCount(LPIT_Type *base, lpit_chnl_t channel)#
Reads the current timer counting value.
This function returns the real-time timer counting value, in a range from 0 to a timer period.
Note
User can call the utility macros provided in fsl_common.h to convert ticks to microseconds or milliseconds.
- Parameters:
base – LPIT peripheral base address.
channel – Timer channel number.
- Returns:
Current timer counting value in ticks.
-
static inline void LPIT_StartTimer(LPIT_Type *base, lpit_chnl_t channel)#
Starts the timer counting.
After calling this function, timers load the period value and count down to 0. When the timer reaches 0, it generates a trigger pulse and sets the timeout interrupt flag.
- Parameters:
base – LPIT peripheral base address.
channel – Timer channel number.
-
static inline void LPIT_StopTimer(LPIT_Type *base, lpit_chnl_t channel)#
Stops the timer counting.
- Parameters:
base – LPIT peripheral base address.
channel – Timer channel number.
-
FSL_LPIT_DRIVER_VERSION#
Version 2.1.3
-
enum _lpit_chnl#
List of LPIT channels.
Note
Actual number of available channels is SoC-dependent
Values:
-
enumerator kLPIT_Chnl_0#
LPIT channel number 0
-
enumerator kLPIT_Chnl_1#
LPIT channel number 1
-
enumerator kLPIT_Chnl_2#
LPIT channel number 2
-
enumerator kLPIT_Chnl_3#
LPIT channel number 3
-
enumerator kLPIT_Chnl_0#
-
enum _lpit_timer_modes#
Mode options available for the LPIT timer.
Values:
-
enumerator kLPIT_PeriodicCounter#
Use the all 32-bits, counter loads and decrements to zero
-
enumerator kLPIT_DualPeriodicCounter#
Counter loads, lower 16-bits decrement to zero, then upper 16-bits decrement
-
enumerator kLPIT_TriggerAccumulator#
Counter loads on first trigger and decrements on each trigger
-
enumerator kLPIT_InputCapture#
Counter loads with 0xFFFFFFFF, decrements to zero. It stores the inverse of the current value when a input trigger is detected
-
enumerator kLPIT_PeriodicCounter#
-
enum _lpit_trigger_select#
Trigger options available.
This is used for both internal and external trigger sources. The actual trigger options available is SoC-specific, user should refer to the reference manual.
Values:
-
enumerator kLPIT_Trigger_TimerChn0#
Channel 0 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn1#
Channel 1 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn2#
Channel 2 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn3#
Channel 3 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn4#
Channel 4 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn5#
Channel 5 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn6#
Channel 6 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn7#
Channel 7 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn8#
Channel 8 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn9#
Channel 9 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn10#
Channel 10 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn11#
Channel 11 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn12#
Channel 12 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn13#
Channel 13 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn14#
Channel 14 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn15#
Channel 15 is selected as a trigger source
-
enumerator kLPIT_Trigger_TimerChn0#
-
enum _lpit_trigger_source#
Trigger source options available.
Values:
-
enumerator kLPIT_TriggerSource_External#
Use external trigger input
-
enumerator kLPIT_TriggerSource_Internal#
Use internal trigger
-
enumerator kLPIT_TriggerSource_External#
-
enum _lpit_interrupt_enable#
List of LPIT interrupts.
Note
Number of timer channels are SoC-specific. See the SoC Reference Manual.
Values:
-
enumerator kLPIT_Channel0TimerInterruptEnable#
Channel 0 Timer interrupt
-
enumerator kLPIT_Channel1TimerInterruptEnable#
Channel 1 Timer interrupt
-
enumerator kLPIT_Channel2TimerInterruptEnable#
Channel 2 Timer interrupt
-
enumerator kLPIT_Channel3TimerInterruptEnable#
Channel 3 Timer interrupt
-
enumerator kLPIT_Channel0TimerInterruptEnable#
-
enum _lpit_status_flags#
List of LPIT status flags.
Note
Number of timer channels are SoC-specific. See the SoC Reference Manual.
Values:
-
enumerator kLPIT_Channel0TimerFlag#
Channel 0 Timer interrupt flag
-
enumerator kLPIT_Channel1TimerFlag#
Channel 1 Timer interrupt flag
-
enumerator kLPIT_Channel2TimerFlag#
Channel 2 Timer interrupt flag
-
enumerator kLPIT_Channel3TimerFlag#
Channel 3 Timer interrupt flag
-
enumerator kLPIT_Channel0TimerFlag#
-
typedef enum _lpit_chnl lpit_chnl_t#
List of LPIT channels.
Note
Actual number of available channels is SoC-dependent
-
typedef enum _lpit_timer_modes lpit_timer_modes_t#
Mode options available for the LPIT timer.
-
typedef enum _lpit_trigger_select lpit_trigger_select_t#
Trigger options available.
This is used for both internal and external trigger sources. The actual trigger options available is SoC-specific, user should refer to the reference manual.
-
typedef enum _lpit_trigger_source lpit_trigger_source_t#
Trigger source options available.
-
typedef enum _lpit_interrupt_enable lpit_interrupt_enable_t#
List of LPIT interrupts.
Note
Number of timer channels are SoC-specific. See the SoC Reference Manual.
-
typedef enum _lpit_status_flags lpit_status_flags_t#
List of LPIT status flags.
Note
Number of timer channels are SoC-specific. See the SoC Reference Manual.
-
typedef struct _lpit_chnl_params lpit_chnl_params_t#
Structure to configure the channel timer.
-
typedef struct _lpit_config lpit_config_t#
LPIT configuration structure.
This structure holds the configuration settings for the LPIT peripheral. To initialize this structure to reasonable defaults, call the LPIT_GetDefaultConfig() function and pass a pointer to the configuration structure instance.
The configuration structure can be made constant so as to reside in flash.
-
static void LPIT_ResetStateDelay(void)#
Short wait for LPIT state reset.
After clear or set LPIT_EN, there should be delay longer than 4 LPIT functional clock.
-
static inline void LPIT_Reset(LPIT_Type *base)#
Performs a software reset on the LPIT module.
This resets all channels and registers except the Module Control Register.
- Parameters:
base – LPIT peripheral base address.
-
LPIT_RESET_STATE_DELAY#
Delay used in LPIT_Reset.
The macro value should be larger than 4 * core clock / LPIT peripheral clock.
-
struct _lpit_chnl_params#
- #include <fsl_lpit.h>
Structure to configure the channel timer.
Public Members
-
bool chainChannel#
true: Timer chained to previous timer; false: Timer not chained
-
lpit_timer_modes_t timerMode#
Timers mode of operation.
-
lpit_trigger_select_t triggerSelect#
Trigger selection for the timer
-
lpit_trigger_source_t triggerSource#
Decides if we use external or internal trigger.
-
bool enableReloadOnTrigger#
true: Timer reloads when a trigger is detected; false: No effect
-
bool enableStopOnTimeout#
true: Timer will stop after timeout; false: does not stop after timeout
-
bool enableStartOnTrigger#
true: Timer starts when a trigger is detected; false: decrement immediately
-
bool chainChannel#
-
struct _lpit_config#
- #include <fsl_lpit.h>
LPIT configuration structure.
This structure holds the configuration settings for the LPIT peripheral. To initialize this structure to reasonable defaults, call the LPIT_GetDefaultConfig() function and pass a pointer to the configuration structure instance.
The configuration structure can be made constant so as to reside in flash.
LPSPI: Low Power Serial Peripheral Interface#
LPSPI Peripheral driver#
-
void LPSPI_MasterInit(LPSPI_Type *base, const lpspi_master_config_t *masterConfig, uint32_t srcClock_Hz)#
Initializes the LPSPI master.
- Parameters:
base – LPSPI peripheral address.
masterConfig – Pointer to structure lpspi_master_config_t.
srcClock_Hz – Module source input clock in Hertz
-
void LPSPI_MasterGetDefaultConfig(lpspi_master_config_t *masterConfig)#
Sets the lpspi_master_config_t structure to default values.
This API initializes the configuration structure for LPSPI_MasterInit(). The initialized structure can remain unchanged in LPSPI_MasterInit(), or can be modified before calling the LPSPI_MasterInit(). Example:
lpspi_master_config_t masterConfig; LPSPI_MasterGetDefaultConfig(&masterConfig);
- Parameters:
masterConfig – pointer to lpspi_master_config_t structure
-
void LPSPI_SlaveInit(LPSPI_Type *base, const lpspi_slave_config_t *slaveConfig)#
LPSPI slave configuration.
- Parameters:
base – LPSPI peripheral address.
slaveConfig – Pointer to a structure lpspi_slave_config_t.
-
void LPSPI_SlaveGetDefaultConfig(lpspi_slave_config_t *slaveConfig)#
Sets the lpspi_slave_config_t structure to default values.
This API initializes the configuration structure for LPSPI_SlaveInit(). The initialized structure can remain unchanged in LPSPI_SlaveInit() or can be modified before calling the LPSPI_SlaveInit(). Example:
lpspi_slave_config_t slaveConfig; LPSPI_SlaveGetDefaultConfig(&slaveConfig);
- Parameters:
slaveConfig – pointer to lpspi_slave_config_t structure.
-
void LPSPI_Deinit(LPSPI_Type *base)#
De-initializes the LPSPI peripheral. Call this API to disable the LPSPI clock.
- Parameters:
base – LPSPI peripheral address.
-
void LPSPI_Reset(LPSPI_Type *base)#
Restores the LPSPI peripheral to reset state. Note that this function sets all registers to reset state. As a result, the LPSPI module can’t work after calling this API.
- Parameters:
base – LPSPI peripheral address.
-
uint32_t LPSPI_GetInstance(LPSPI_Type *base)#
Get the LPSPI instance from peripheral base address.
- Parameters:
base – LPSPI peripheral base address.
- Returns:
LPSPI instance.
-
static inline void LPSPI_Enable(LPSPI_Type *base, bool enable)#
Enables the LPSPI peripheral and sets the MCR MDIS to 0.
- Parameters:
base – LPSPI peripheral address.
enable – Pass true to enable module, false to disable module.
-
static inline uint32_t LPSPI_GetStatusFlags(LPSPI_Type *base)#
Gets the LPSPI status flag state.
- Parameters:
base – LPSPI peripheral address.
- Returns:
The LPSPI status(in SR register).
-
static inline uint8_t LPSPI_GetTxFifoSize(LPSPI_Type *base)#
Gets the LPSPI Tx FIFO size.
- Parameters:
base – LPSPI peripheral address.
- Returns:
The LPSPI Tx FIFO size.
-
static inline uint8_t LPSPI_GetRxFifoSize(LPSPI_Type *base)#
Gets the LPSPI Rx FIFO size.
- Parameters:
base – LPSPI peripheral address.
- Returns:
The LPSPI Rx FIFO size.
-
static inline uint32_t LPSPI_GetTxFifoCount(LPSPI_Type *base)#
Gets the LPSPI Tx FIFO count.
- Parameters:
base – LPSPI peripheral address.
- Returns:
The number of words in the transmit FIFO.
-
static inline uint32_t LPSPI_GetRxFifoCount(LPSPI_Type *base)#
Gets the LPSPI Rx FIFO count.
- Parameters:
base – LPSPI peripheral address.
- Returns:
The number of words in the receive FIFO.
-
static inline void LPSPI_ClearStatusFlags(LPSPI_Type *base, uint32_t statusFlags)#
Clears the LPSPI status flag.
This function clears the desired status bit by using a write-1-to-clear. The user passes in the base and the desired status flag bit to clear. The list of status flags is defined in the _lpspi_flags. Example usage:
LPSPI_ClearStatusFlags(base, kLPSPI_TxDataRequestFlag|kLPSPI_RxDataReadyFlag);
- Parameters:
base – LPSPI peripheral address.
statusFlags – The status flag used from type _lpspi_flags.
-
static inline uint32_t LPSPI_GetTcr(LPSPI_Type *base)#
-
static inline void LPSPI_EnableInterrupts(LPSPI_Type *base, uint32_t mask)#
Enables the LPSPI interrupts.
This function configures the various interrupt masks of the LPSPI. The parameters are base and an interrupt mask. Note that, for Tx fill and Rx FIFO drain requests, enabling the interrupt request disables the DMA request.
LPSPI_EnableInterrupts(base, kLPSPI_TxInterruptEnable | kLPSPI_RxInterruptEnable );
- Parameters:
base – LPSPI peripheral address.
mask – The interrupt mask; Use the enum _lpspi_interrupt_enable.
-
static inline void LPSPI_DisableInterrupts(LPSPI_Type *base, uint32_t mask)#
Disables the LPSPI interrupts.
LPSPI_DisableInterrupts(base, kLPSPI_TxInterruptEnable | kLPSPI_RxInterruptEnable );
- Parameters:
base – LPSPI peripheral address.
mask – The interrupt mask; Use the enum _lpspi_interrupt_enable.
-
static inline void LPSPI_EnableDMA(LPSPI_Type *base, uint32_t mask)#
Enables the LPSPI DMA request.
This function configures the Rx and Tx DMA mask of the LPSPI. The parameters are base and a DMA mask.
LPSPI_EnableDMA(base, kLPSPI_TxDmaEnable | kLPSPI_RxDmaEnable);
- Parameters:
base – LPSPI peripheral address.
mask – The interrupt mask; Use the enum _lpspi_dma_enable.
-
static inline void LPSPI_DisableDMA(LPSPI_Type *base, uint32_t mask)#
Disables the LPSPI DMA request.
This function configures the Rx and Tx DMA mask of the LPSPI. The parameters are base and a DMA mask.
SPI_DisableDMA(base, kLPSPI_TxDmaEnable | kLPSPI_RxDmaEnable);
- Parameters:
base – LPSPI peripheral address.
mask – The interrupt mask; Use the enum _lpspi_dma_enable.
-
static inline uint32_t LPSPI_GetTxRegisterAddress(LPSPI_Type *base)#
Gets the LPSPI Transmit Data Register address for a DMA operation.
This function gets the LPSPI Transmit Data Register address because this value is needed for the DMA operation. This function can be used for either master or slave mode.
- Parameters:
base – LPSPI peripheral address.
- Returns:
The LPSPI Transmit Data Register address.
-
static inline uint32_t LPSPI_GetRxRegisterAddress(LPSPI_Type *base)#
Gets the LPSPI Receive Data Register address for a DMA operation.
This function gets the LPSPI Receive Data Register address because this value is needed for the DMA operation. This function can be used for either master or slave mode.
- Parameters:
base – LPSPI peripheral address.
- Returns:
The LPSPI Receive Data Register address.
-
bool LPSPI_CheckTransferArgument(LPSPI_Type *base, lpspi_transfer_t *transfer, bool isEdma)#
Check the argument for transfer .
- Parameters:
base – LPSPI peripheral address.
transfer – the transfer struct to be used.
isEdma – True to check for EDMA transfer, false to check interrupt non-blocking transfer
- Returns:
Return true for right and false for wrong.
-
static inline void LPSPI_SetMasterSlaveMode(LPSPI_Type *base, lpspi_master_slave_mode_t mode)#
Configures the LPSPI for either master or slave.
Note that the CFGR1 should only be written when the LPSPI is disabled (LPSPIx_CR_MEN = 0).
- Parameters:
base – LPSPI peripheral address.
mode – Mode setting (master or slave) of type lpspi_master_slave_mode_t.
-
static inline void LPSPI_SelectTransferPCS(LPSPI_Type *base, lpspi_which_pcs_t select)#
Configures the peripheral chip select used for the transfer.
- Parameters:
base – LPSPI peripheral address.
select – LPSPI Peripheral Chip Select (PCS) configuration.
-
static inline void LPSPI_SetPCSContinous(LPSPI_Type *base, bool IsContinous)#
Set the PCS signal to continuous or uncontinuous mode.
Note
In master mode, continuous transfer will keep the PCS asserted at the end of the frame size, until a command word is received that starts a new frame. So PCS must be set back to uncontinuous when transfer finishes. In slave mode, when continuous transfer is enabled, the LPSPI will only transmit the first frame size bits, after that the LPSPI will transmit received data back (assuming a 32-bit shift register).
- Parameters:
base – LPSPI peripheral address.
IsContinous – True to set the transfer PCS to continuous mode, false to set to uncontinuous mode.
-
static inline bool LPSPI_IsMaster(LPSPI_Type *base)#
Returns whether the LPSPI module is in master mode.
- Parameters:
base – LPSPI peripheral address.
- Returns:
Returns true if the module is in master mode or false if the module is in slave mode.
-
static inline void LPSPI_FlushFifo(LPSPI_Type *base, bool flushTxFifo, bool flushRxFifo)#
Flushes the LPSPI FIFOs.
- Parameters:
base – LPSPI peripheral address.
flushTxFifo – Flushes (true) the Tx FIFO, else do not flush (false) the Tx FIFO.
flushRxFifo – Flushes (true) the Rx FIFO, else do not flush (false) the Rx FIFO.
-
static inline void LPSPI_SetFifoWatermarks(LPSPI_Type *base, uint32_t txWater, uint32_t rxWater)#
Sets the transmit and receive FIFO watermark values.
This function allows the user to set the receive and transmit FIFO watermarks. The function does not compare the watermark settings to the FIFO size. The FIFO watermark should not be equal to or greater than the FIFO size. It is up to the higher level driver to make this check.
- Parameters:
base – LPSPI peripheral address.
txWater – The TX FIFO watermark value. Writing a value equal or greater than the FIFO size is truncated.
rxWater – The RX FIFO watermark value. Writing a value equal or greater than the FIFO size is truncated.
-
static inline void LPSPI_SetAllPcsPolarity(LPSPI_Type *base, uint32_t mask)#
Configures all LPSPI peripheral chip select polarities simultaneously.
Note that the CFGR1 should only be written when the LPSPI is disabled (LPSPIx_CR_MEN = 0).
This is an example: PCS0 and PCS1 set to active low and other PCSs set to active high. Note that the number of PCS is device-specific.
LPSPI_SetAllPcsPolarity(base, kLPSPI_Pcs0ActiveLow | kLPSPI_Pcs1ActiveLow);
- Parameters:
base – LPSPI peripheral address.
mask – The PCS polarity mask; Use the enum _lpspi_pcs_polarity.
-
static inline void LPSPI_SetFrameSize(LPSPI_Type *base, uint32_t frameSize)#
Configures the frame size.
The minimum frame size is 8-bits and the maximum frame size is 4096-bits. If the frame size is less than or equal to 32-bits, the word size and frame size are identical. If the frame size is greater than 32-bits, the word size is 32-bits for each word except the last (the last word contains the remainder bits if the frame size is not divisible by 32). The minimum word size is 2-bits. A frame size of 33-bits (or similar) is not supported.
Note 1: The transmit command register should be initialized before enabling the LPSPI in slave mode, although the command register does not update until after the LPSPI is enabled. After it is enabled, the transmit command register should only be changed if the LPSPI is idle.
Note 2: The transmit and command FIFO is a combined FIFO that includes both transmit data and command words. That means the TCR register should be written to when the Tx FIFO is not full.
- Parameters:
base – LPSPI peripheral address.
frameSize – The frame size in number of bits.
-
uint32_t LPSPI_MasterSetBaudRate(LPSPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz, uint32_t *tcrPrescaleValue)#
Sets the LPSPI baud rate in bits per second.
This function takes in the desired bitsPerSec (baud rate) and calculates the nearest possible baud rate without exceeding the desired baud rate and returns the calculated baud rate in bits-per-second. It requires the caller to provide the frequency of the module source clock (in Hertz). Note that the baud rate does not go into effect until the Transmit Control Register (TCR) is programmed with the prescale value. Hence, this function returns the prescale tcrPrescaleValue parameter for later programming in the TCR. The higher level peripheral driver should alert the user of an out of range baud rate input.
Note that the LPSPI module must first be disabled before configuring this. Note that the LPSPI module must be configured for master mode before configuring this.
- Parameters:
base – LPSPI peripheral address.
baudRate_Bps – The desired baud rate in bits per second.
srcClock_Hz – Module source input clock in Hertz.
tcrPrescaleValue – The TCR prescale value needed to program the TCR.
- Returns:
The actual calculated baud rate. This function may also return a “0” if the LPSPI is not configured for master mode or if the LPSPI module is not disabled.
-
void LPSPI_MasterSetDelayScaler(LPSPI_Type *base, uint32_t scaler, lpspi_delay_type_t whichDelay)#
Manually configures a specific LPSPI delay parameter (module must be disabled to change the delay values).
This function configures the following: SCK to PCS delay, or PCS to SCK delay, or The configurations must occur between the transfer delay.
The delay names are available in type lpspi_delay_type_t.
The user passes the desired delay along with the delay value. This allows the user to directly set the delay values if they have pre-calculated them or if they simply wish to manually increment the value.
Note that the LPSPI module must first be disabled before configuring this. Note that the LPSPI module must be configured for master mode before configuring this.
- Parameters:
base – LPSPI peripheral address.
scaler – The 8-bit delay value 0x00 to 0xFF (255).
whichDelay – The desired delay to configure, must be of type lpspi_delay_type_t.
-
uint32_t LPSPI_MasterSetDelayTimes(LPSPI_Type *base, uint32_t delayTimeInNanoSec, lpspi_delay_type_t whichDelay, uint32_t srcClock_Hz)#
Calculates the delay based on the desired delay input in nanoseconds (module must be disabled to change the delay values).
This function configures the SCK to PCS delay, PCS to SCK delay, or the delay between transfers. The delay names are available in type lpspi_delay_type_t.
The function calculates the value needed for the desired delay parameter and returns the actual calculated delay. An exact delay match may not be possible, in which case the closest match is calculated without going below the desired delay value. If the input exceeds the maximum capability, the maximum supported delay is returned.
Note that the LPSPI module must first be disabled before configuring this. Note that the LPSPI module must be configured for master mode before configuring this.
- Parameters:
base – LPSPI peripheral address.
delayTimeInNanoSec – The desired delay value in nanoseconds.
whichDelay – The desired delay to configure, must be of type lpspi_delay_type_t.
srcClock_Hz – Module source input clock in Hertz.
- Returns:
Actual calculated delay value in nanoseconds.
-
static inline void LPSPI_WriteData(LPSPI_Type *base, uint32_t data)#
Writes data into the transmit data buffer.
This function writes data passed in by the user to the Transmit Data Register (TDR). The user can pass up to 32-bits of data to load into the TDR. If the frame size exceeds 32-bits, the user has to manage sending the data one 32-bit word at a time. Any writes to the TDR result in an immediate push to the transmit FIFO. This function can be used for either master or slave modes.
- Parameters:
base – LPSPI peripheral address.
data – The data word to be sent.
-
static inline uint32_t LPSPI_ReadData(LPSPI_Type *base)#
Reads data from the data buffer.
This function reads the data from the Receive Data Register (RDR). This function can be used for either master or slave mode.
- Parameters:
base – LPSPI peripheral address.
- Returns:
The data read from the data buffer.
-
void LPSPI_SetDummyData(LPSPI_Type *base, uint8_t dummyData)#
Set up the dummy data.
- Parameters:
base – LPSPI peripheral address.
dummyData – Data to be transferred when tx buffer is NULL. Note: This API has no effect when LPSPI in slave interrupt mode, because driver will set the TXMSK bit to 1 if txData is NULL, no data is loaded from transmit FIFO and output pin is tristated.
-
void LPSPI_MasterTransferCreateHandle(LPSPI_Type *base, lpspi_master_handle_t *handle, lpspi_master_transfer_callback_t callback, void *userData)#
Initializes the LPSPI master handle.
This function initializes the LPSPI handle, which can be used for other LPSPI transactional APIs. Usually, for a specified LPSPI instance, call this API once to get the initialized handle.
- Parameters:
base – LPSPI peripheral address.
handle – LPSPI handle pointer to lpspi_master_handle_t.
callback – DSPI callback.
userData – callback function parameter.
-
status_t LPSPI_MasterTransferBlocking(LPSPI_Type *base, lpspi_transfer_t *transfer)#
LPSPI master transfer data using a polling method.
This function transfers data using a polling method. This is a blocking function, which does not return until all transfers have been completed.
Note: The transfer data size should be integer multiples of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not integer multiples of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
- Parameters:
base – LPSPI peripheral address.
transfer – pointer to lpspi_transfer_t structure.
- Returns:
status of status_t.
-
status_t LPSPI_MasterTransferNonBlocking(LPSPI_Type *base, lpspi_master_handle_t *handle, lpspi_transfer_t *transfer)#
LPSPI master transfer data using an interrupt method.
This function transfers data using an interrupt method. This is a non-blocking function, which returns right away. When all data is transferred, the callback function is called.
Note: The transfer data size should be integer multiples of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not integer multiples of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
- Parameters:
base – LPSPI peripheral address.
handle – pointer to lpspi_master_handle_t structure which stores the transfer state.
transfer – pointer to lpspi_transfer_t structure.
- Returns:
status of status_t.
-
status_t LPSPI_MasterTransferGetCount(LPSPI_Type *base, lpspi_master_handle_t *handle, size_t *count)#
Gets the master transfer remaining bytes.
This function gets the master transfer remaining bytes.
- Parameters:
base – LPSPI peripheral address.
handle – pointer to lpspi_master_handle_t structure which stores the transfer state.
count – Number of bytes transferred so far by the non-blocking transaction.
- Returns:
status of status_t.
-
void LPSPI_MasterTransferAbort(LPSPI_Type *base, lpspi_master_handle_t *handle)#
LPSPI master abort transfer which uses an interrupt method.
This function aborts a transfer which uses an interrupt method.
- Parameters:
base – LPSPI peripheral address.
handle – pointer to lpspi_master_handle_t structure which stores the transfer state.
-
void LPSPI_MasterTransferHandleIRQ(LPSPI_Type *base, lpspi_master_handle_t *handle)#
LPSPI Master IRQ handler function.
This function processes the LPSPI transmit and receive IRQ.
- Parameters:
base – LPSPI peripheral address.
handle – pointer to lpspi_master_handle_t structure which stores the transfer state.
-
void LPSPI_SlaveTransferCreateHandle(LPSPI_Type *base, lpspi_slave_handle_t *handle, lpspi_slave_transfer_callback_t callback, void *userData)#
Initializes the LPSPI slave handle.
This function initializes the LPSPI handle, which can be used for other LPSPI transactional APIs. Usually, for a specified LPSPI instance, call this API once to get the initialized handle.
- Parameters:
base – LPSPI peripheral address.
handle – LPSPI handle pointer to lpspi_slave_handle_t.
callback – DSPI callback.
userData – callback function parameter.
-
status_t LPSPI_SlaveTransferNonBlocking(LPSPI_Type *base, lpspi_slave_handle_t *handle, lpspi_transfer_t *transfer)#
LPSPI slave transfer data using an interrupt method.
This function transfer data using an interrupt method. This is a non-blocking function, which returns right away. When all data is transferred, the callback function is called.
Note: The transfer data size should be integer multiples of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not an integer multiple of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
- Parameters:
base – LPSPI peripheral address.
handle – pointer to lpspi_slave_handle_t structure which stores the transfer state.
transfer – pointer to lpspi_transfer_t structure.
- Returns:
status of status_t.
-
status_t LPSPI_SlaveTransferGetCount(LPSPI_Type *base, lpspi_slave_handle_t *handle, size_t *count)#
Gets the slave transfer remaining bytes.
This function gets the slave transfer remaining bytes.
- Parameters:
base – LPSPI peripheral address.
handle – pointer to lpspi_slave_handle_t structure which stores the transfer state.
count – Number of bytes transferred so far by the non-blocking transaction.
- Returns:
status of status_t.
-
void LPSPI_SlaveTransferAbort(LPSPI_Type *base, lpspi_slave_handle_t *handle)#
LPSPI slave aborts a transfer which uses an interrupt method.
This function aborts a transfer which uses an interrupt method.
- Parameters:
base – LPSPI peripheral address.
handle – pointer to lpspi_slave_handle_t structure which stores the transfer state.
-
void LPSPI_SlaveTransferHandleIRQ(LPSPI_Type *base, lpspi_slave_handle_t *handle)#
LPSPI Slave IRQ handler function.
This function processes the LPSPI transmit and receives an IRQ.
- Parameters:
base – LPSPI peripheral address.
handle – pointer to lpspi_slave_handle_t structure which stores the transfer state.
-
bool LPSPI_WaitTxFifoEmpty(LPSPI_Type *base)#
Wait for tx FIFO to be empty.
This function wait the tx fifo empty
- Parameters:
base – LPSPI peripheral address.
- Returns:
true for the tx FIFO is ready, false is not.
-
void LPSPI_DriverIRQHandler(uint32_t instance)#
LPSPI driver IRQ handler common entry.
This function provides the common IRQ request entry for LPSPI.
- Parameters:
instance – LPSPI instance.
-
FSL_LPSPI_DRIVER_VERSION#
LPSPI driver version.
Status for the LPSPI driver.
Values:
-
enumerator kStatus_LPSPI_Busy#
LPSPI transfer is busy.
-
enumerator kStatus_LPSPI_Error#
LPSPI driver error.
-
enumerator kStatus_LPSPI_Idle#
LPSPI is idle.
-
enumerator kStatus_LPSPI_OutOfRange#
LPSPI transfer out Of range.
-
enumerator kStatus_LPSPI_Timeout#
LPSPI timeout polling status flags.
-
enumerator kStatus_LPSPI_Busy#
-
enum _lpspi_flags#
LPSPI status flags in SPIx_SR register.
Values:
-
enumerator kLPSPI_TxDataRequestFlag#
Transmit data flag
-
enumerator kLPSPI_RxDataReadyFlag#
Receive data flag
-
enumerator kLPSPI_WordCompleteFlag#
Word Complete flag
-
enumerator kLPSPI_FrameCompleteFlag#
Frame Complete flag
-
enumerator kLPSPI_TransferCompleteFlag#
Transfer Complete flag
-
enumerator kLPSPI_TransmitErrorFlag#
Transmit Error flag (FIFO underrun)
-
enumerator kLPSPI_ReceiveErrorFlag#
Receive Error flag (FIFO overrun)
-
enumerator kLPSPI_DataMatchFlag#
Data Match flag
-
enumerator kLPSPI_ModuleBusyFlag#
Module Busy flag
-
enumerator kLPSPI_AllStatusFlag#
Used for clearing all w1c status flags
-
enumerator kLPSPI_TxDataRequestFlag#
-
enum _lpspi_interrupt_enable#
LPSPI interrupt source.
Values:
-
enumerator kLPSPI_TxInterruptEnable#
Transmit data interrupt enable
-
enumerator kLPSPI_RxInterruptEnable#
Receive data interrupt enable
-
enumerator kLPSPI_WordCompleteInterruptEnable#
Word complete interrupt enable
-
enumerator kLPSPI_FrameCompleteInterruptEnable#
Frame complete interrupt enable
-
enumerator kLPSPI_TransferCompleteInterruptEnable#
Transfer complete interrupt enable
-
enumerator kLPSPI_TransmitErrorInterruptEnable#
Transmit error interrupt enable(FIFO underrun)
-
enumerator kLPSPI_ReceiveErrorInterruptEnable#
Receive Error interrupt enable (FIFO overrun)
-
enumerator kLPSPI_DataMatchInterruptEnable#
Data Match interrupt enable
-
enumerator kLPSPI_AllInterruptEnable#
All above interrupts enable.
-
enumerator kLPSPI_TxInterruptEnable#
-
enum _lpspi_dma_enable#
LPSPI DMA source.
Values:
-
enumerator kLPSPI_TxDmaEnable#
Transmit data DMA enable
-
enumerator kLPSPI_RxDmaEnable#
Receive data DMA enable
-
enumerator kLPSPI_TxDmaEnable#
-
enum _lpspi_master_slave_mode#
LPSPI master or slave mode configuration.
Values:
-
enumerator kLPSPI_Master#
LPSPI peripheral operates in master mode.
-
enumerator kLPSPI_Slave#
LPSPI peripheral operates in slave mode.
-
enumerator kLPSPI_Master#
-
enum _lpspi_which_pcs_config#
LPSPI Peripheral Chip Select (PCS) configuration (which PCS to configure).
Values:
-
enumerator kLPSPI_Pcs0#
PCS[0]
-
enumerator kLPSPI_Pcs1#
PCS[1]
-
enumerator kLPSPI_Pcs2#
PCS[2]
-
enumerator kLPSPI_Pcs3#
PCS[3]
-
enumerator kLPSPI_Pcs0#
-
enum _lpspi_pcs_polarity_config#
LPSPI Peripheral Chip Select (PCS) Polarity configuration.
Values:
-
enumerator kLPSPI_PcsActiveHigh#
PCS Active High (idles low)
-
enumerator kLPSPI_PcsActiveLow#
PCS Active Low (idles high)
-
enumerator kLPSPI_PcsActiveHigh#
-
enum _lpspi_pcs_polarity#
LPSPI Peripheral Chip Select (PCS) Polarity.
Values:
-
enumerator kLPSPI_Pcs0ActiveLow#
Pcs0 Active Low (idles high).
-
enumerator kLPSPI_Pcs1ActiveLow#
Pcs1 Active Low (idles high).
-
enumerator kLPSPI_Pcs2ActiveLow#
Pcs2 Active Low (idles high).
-
enumerator kLPSPI_Pcs3ActiveLow#
Pcs3 Active Low (idles high).
-
enumerator kLPSPI_PcsAllActiveLow#
Pcs0 to Pcs5 Active Low (idles high).
-
enumerator kLPSPI_Pcs0ActiveLow#
-
enum _lpspi_clock_polarity#
LPSPI clock polarity configuration.
Values:
-
enumerator kLPSPI_ClockPolarityActiveHigh#
CPOL=0. Active-high LPSPI clock (idles low)
-
enumerator kLPSPI_ClockPolarityActiveLow#
CPOL=1. Active-low LPSPI clock (idles high)
-
enumerator kLPSPI_ClockPolarityActiveHigh#
-
enum _lpspi_clock_phase#
LPSPI clock phase configuration.
Values:
-
enumerator kLPSPI_ClockPhaseFirstEdge#
CPHA=0. Data is captured on the leading edge of the SCK and changed on the following edge.
-
enumerator kLPSPI_ClockPhaseSecondEdge#
CPHA=1. Data is changed on the leading edge of the SCK and captured on the following edge.
-
enumerator kLPSPI_ClockPhaseFirstEdge#
-
enum _lpspi_shift_direction#
LPSPI data shifter direction options.
Values:
-
enumerator kLPSPI_MsbFirst#
Data transfers start with most significant bit.
-
enumerator kLPSPI_LsbFirst#
Data transfers start with least significant bit.
-
enumerator kLPSPI_MsbFirst#
-
enum _lpspi_host_request_select#
LPSPI Host Request select configuration.
Values:
-
enumerator kLPSPI_HostReqExtPin#
Host Request is an ext pin.
-
enumerator kLPSPI_HostReqInternalTrigger#
Host Request is an internal trigger.
-
enumerator kLPSPI_HostReqExtPin#
-
enum _lpspi_match_config#
LPSPI Match configuration options.
Values:
-
enumerator kLPSI_MatchDisabled#
LPSPI Match Disabled.
-
enumerator kLPSI_1stWordEqualsM0orM1#
LPSPI Match Enabled.
-
enumerator kLPSI_AnyWordEqualsM0orM1#
LPSPI Match Enabled.
-
enumerator kLPSI_1stWordEqualsM0and2ndWordEqualsM1#
LPSPI Match Enabled.
-
enumerator kLPSI_AnyWordEqualsM0andNxtWordEqualsM1#
LPSPI Match Enabled.
-
enumerator kLPSI_1stWordAndM1EqualsM0andM1#
LPSPI Match Enabled.
-
enumerator kLPSI_AnyWordAndM1EqualsM0andM1#
LPSPI Match Enabled.
-
enumerator kLPSI_MatchDisabled#
-
enum _lpspi_pin_config#
LPSPI pin (SDO and SDI) configuration.
Values:
-
enumerator kLPSPI_SdiInSdoOut#
LPSPI SDI input, SDO output.
-
enumerator kLPSPI_SdiInSdiOut#
LPSPI SDI input, SDI output.
-
enumerator kLPSPI_SdoInSdoOut#
LPSPI SDO input, SDO output.
-
enumerator kLPSPI_SdoInSdiOut#
LPSPI SDO input, SDI output.
-
enumerator kLPSPI_SdiInSdoOut#
-
enum _lpspi_data_out_config#
LPSPI data output configuration.
Values:
-
enumerator kLpspiDataOutRetained#
Data out retains last value when chip select is de-asserted
-
enumerator kLpspiDataOutTristate#
Data out is tristated when chip select is de-asserted
-
enumerator kLpspiDataOutRetained#
-
enum _lpspi_transfer_width#
LPSPI transfer width configuration.
Values:
-
enumerator kLPSPI_SingleBitXfer#
1-bit shift at a time, data out on SDO, in on SDI (normal mode)
-
enumerator kLPSPI_TwoBitXfer#
2-bits shift out on SDO/SDI and in on SDO/SDI
-
enumerator kLPSPI_FourBitXfer#
4-bits shift out on SDO/SDI/PCS[3:2] and in on SDO/SDI/PCS[3:2]
-
enumerator kLPSPI_SingleBitXfer#
-
enum _lpspi_delay_type#
LPSPI delay type selection.
Values:
-
enumerator kLPSPI_PcsToSck#
PCS-to-SCK delay.
-
enumerator kLPSPI_LastSckToPcs#
Last SCK edge to PCS delay.
-
enumerator kLPSPI_BetweenTransfer#
Delay between transfers.
-
enumerator kLPSPI_PcsToSck#
-
enum _lpspi_transfer_config_flag_for_master#
Use this enumeration for LPSPI master transfer configFlags.
Values:
-
enumerator kLPSPI_MasterPcs0#
LPSPI master PCS shift macro , internal used. LPSPI master transfer use PCS0 signal
-
enumerator kLPSPI_MasterPcs1#
LPSPI master PCS shift macro , internal used. LPSPI master transfer use PCS1 signal
-
enumerator kLPSPI_MasterPcs2#
LPSPI master PCS shift macro , internal used. LPSPI master transfer use PCS2 signal
-
enumerator kLPSPI_MasterPcs3#
LPSPI master PCS shift macro , internal used. LPSPI master transfer use PCS3 signal
-
enumerator kLPSPI_MasterPcsContinuous#
Is PCS signal continuous
-
enumerator kLPSPI_MasterByteSwap#
Is master swap the byte. For example, when want to send data 1 2 3 4 5 6 7 8 (suppose you set lpspi_shift_direction_t to MSB).
If you set bitPerFrame = 8 , no matter the kLPSPI_MasterByteSwapyou flag is used or not, the waveform is 1 2 3 4 5 6 7 8.
If you set bitPerFrame = 16 : (1) the waveform is 2 1 4 3 6 5 8 7 if you do not use the kLPSPI_MasterByteSwap flag. (2) the waveform is 1 2 3 4 5 6 7 8 if you use the kLPSPI_MasterByteSwap flag.
If you set bitPerFrame = 32 : (1) the waveform is 4 3 2 1 8 7 6 5 if you do not use the kLPSPI_MasterByteSwap flag. (2) the waveform is 1 2 3 4 5 6 7 8 if you use the kLPSPI_MasterByteSwap flag.
-
enumerator kLPSPI_MasterPcs0#
-
enum _lpspi_transfer_config_flag_for_slave#
Use this enumeration for LPSPI slave transfer configFlags.
Values:
-
enumerator kLPSPI_SlavePcs0#
LPSPI slave PCS shift macro , internal used. LPSPI slave transfer use PCS0 signal
-
enumerator kLPSPI_SlavePcs1#
LPSPI slave PCS shift macro , internal used. LPSPI slave transfer use PCS1 signal
-
enumerator kLPSPI_SlavePcs2#
LPSPI slave PCS shift macro , internal used. LPSPI slave transfer use PCS2 signal
-
enumerator kLPSPI_SlavePcs3#
LPSPI slave PCS shift macro , internal used. LPSPI slave transfer use PCS3 signal
-
enumerator kLPSPI_SlaveByteSwap#
Is slave swap the byte. For example, when want to send data 1 2 3 4 5 6 7 8 (suppose you set lpspi_shift_direction_t to MSB).
If you set bitPerFrame = 8 , no matter the kLPSPI_SlaveByteSwap flag is used or not, the waveform is 1 2 3 4 5 6 7 8.
If you set bitPerFrame = 16 : (1) the waveform is 2 1 4 3 6 5 8 7 if you do not use the kLPSPI_SlaveByteSwap flag. (2) the waveform is 1 2 3 4 5 6 7 8 if you use the kLPSPI_SlaveByteSwap flag.
If you set bitPerFrame = 32 : (1) the waveform is 4 3 2 1 8 7 6 5 if you do not use the kLPSPI_SlaveByteSwap flag. (2) the waveform is 1 2 3 4 5 6 7 8 if you use the kLPSPI_SlaveByteSwap flag.
-
enumerator kLPSPI_SlavePcs0#
-
enum _lpspi_transfer_state#
LPSPI transfer state, which is used for LPSPI transactional API state machine.
Values:
-
enumerator kLPSPI_Idle#
Nothing in the transmitter/receiver.
-
enumerator kLPSPI_Busy#
Transfer queue is not finished.
-
enumerator kLPSPI_Error#
Transfer error.
-
enumerator kLPSPI_Idle#
-
typedef enum _lpspi_master_slave_mode lpspi_master_slave_mode_t#
LPSPI master or slave mode configuration.
-
typedef enum _lpspi_which_pcs_config lpspi_which_pcs_t#
LPSPI Peripheral Chip Select (PCS) configuration (which PCS to configure).
-
typedef enum _lpspi_pcs_polarity_config lpspi_pcs_polarity_config_t#
LPSPI Peripheral Chip Select (PCS) Polarity configuration.
-
typedef enum _lpspi_clock_polarity lpspi_clock_polarity_t#
LPSPI clock polarity configuration.
-
typedef enum _lpspi_clock_phase lpspi_clock_phase_t#
LPSPI clock phase configuration.
-
typedef enum _lpspi_shift_direction lpspi_shift_direction_t#
LPSPI data shifter direction options.
-
typedef enum _lpspi_host_request_select lpspi_host_request_select_t#
LPSPI Host Request select configuration.
-
typedef enum _lpspi_match_config lpspi_match_config_t#
LPSPI Match configuration options.
-
typedef enum _lpspi_pin_config lpspi_pin_config_t#
LPSPI pin (SDO and SDI) configuration.
-
typedef enum _lpspi_data_out_config lpspi_data_out_config_t#
LPSPI data output configuration.
-
typedef enum _lpspi_transfer_width lpspi_transfer_width_t#
LPSPI transfer width configuration.
-
typedef enum _lpspi_delay_type lpspi_delay_type_t#
LPSPI delay type selection.
-
typedef struct _lpspi_master_config lpspi_master_config_t#
LPSPI master configuration structure.
-
typedef struct _lpspi_slave_config lpspi_slave_config_t#
LPSPI slave configuration structure.
-
typedef struct _lpspi_master_handle lpspi_master_handle_t#
Forward declaration of the _lpspi_master_handle typedefs.
-
typedef struct _lpspi_slave_handle lpspi_slave_handle_t#
Forward declaration of the _lpspi_slave_handle typedefs.
-
typedef void (*lpspi_master_transfer_callback_t)(LPSPI_Type *base, lpspi_master_handle_t *handle, status_t status, void *userData)#
Master completion callback function pointer type.
- Param base:
LPSPI peripheral address.
- Param handle:
Pointer to the handle for the LPSPI master.
- Param status:
Success or error code describing whether the transfer is completed.
- Param userData:
Arbitrary pointer-dataSized value passed from the application.
-
typedef void (*lpspi_slave_transfer_callback_t)(LPSPI_Type *base, lpspi_slave_handle_t *handle, status_t status, void *userData)#
Slave completion callback function pointer type.
- Param base:
LPSPI peripheral address.
- Param handle:
Pointer to the handle for the LPSPI slave.
- Param status:
Success or error code describing whether the transfer is completed.
- Param userData:
Arbitrary pointer-dataSized value passed from the application.
-
typedef struct _lpspi_transfer lpspi_transfer_t#
LPSPI master/slave transfer structure.
-
volatile uint8_t g_lpspiDummyData[]#
Global variable for dummy data value setting.
-
LPSPI_DUMMY_DATA#
LPSPI dummy data if no Tx data.
Dummy data used for tx if there is not txData.
-
SPI_RETRY_TIMES
Retry times for waiting flag.
-
LPSPI_MASTER_PCS_SHIFT#
LPSPI master PCS shift macro , internal used.
-
LPSPI_MASTER_PCS_MASK#
LPSPI master PCS shift macro , internal used.
-
LPSPI_SLAVE_PCS_SHIFT#
LPSPI slave PCS shift macro , internal used.
-
LPSPI_SLAVE_PCS_MASK#
LPSPI slave PCS shift macro , internal used.
-
struct _lpspi_master_config#
- #include <fsl_lpspi.h>
LPSPI master configuration structure.
Public Members
-
uint32_t baudRate#
Baud Rate for LPSPI.
-
uint32_t bitsPerFrame#
Bits per frame, minimum 8, maximum 4096.
-
lpspi_clock_polarity_t cpol#
Clock polarity.
-
lpspi_clock_phase_t cpha#
Clock phase.
-
lpspi_shift_direction_t direction#
MSB or LSB data shift direction.
-
uint32_t pcsToSckDelayInNanoSec#
PCS to SCK delay time in nanoseconds, setting to 0 sets the minimum delay. It sets the boundary value if out of range.
-
uint32_t lastSckToPcsDelayInNanoSec#
Last SCK to PCS delay time in nanoseconds, setting to 0 sets the minimum delay. It sets the boundary value if out of range.
-
uint32_t betweenTransferDelayInNanoSec#
After the SCK delay time with nanoseconds, setting to 0 sets the minimum delay. It sets the boundary value if out of range.
-
lpspi_which_pcs_t whichPcs#
Desired Peripheral Chip Select (PCS).
-
lpspi_pcs_polarity_config_t pcsActiveHighOrLow#
Desired PCS active high or low
-
lpspi_pin_config_t pinCfg#
Configures which pins are used for input and output data during single bit transfers.
-
lpspi_data_out_config_t dataOutConfig#
Configures if the output data is tristated between accesses (LPSPI_PCS is negated).
-
bool enableInputDelay#
Enable master to sample the input data on a delayed SCK. This can help improve slave setup time. Refer to device data sheet for specific time length.
-
uint32_t baudRate#
-
struct _lpspi_slave_config#
- #include <fsl_lpspi.h>
LPSPI slave configuration structure.
Public Members
-
uint32_t bitsPerFrame#
Bits per frame, minimum 8, maximum 4096.
-
lpspi_clock_polarity_t cpol#
Clock polarity.
-
lpspi_clock_phase_t cpha#
Clock phase.
-
lpspi_shift_direction_t direction#
MSB or LSB data shift direction.
-
lpspi_which_pcs_t whichPcs#
Desired Peripheral Chip Select (pcs)
-
lpspi_pcs_polarity_config_t pcsActiveHighOrLow#
Desired PCS active high or low
-
lpspi_pin_config_t pinCfg#
Configures which pins are used for input and output data during single bit transfers.
-
lpspi_data_out_config_t dataOutConfig#
Configures if the output data is tristated between accesses (LPSPI_PCS is negated).
-
uint32_t bitsPerFrame#
-
struct _lpspi_transfer#
- #include <fsl_lpspi.h>
LPSPI master/slave transfer structure.
Public Members
-
const uint8_t *txData#
Send buffer.
-
uint8_t *rxData#
Receive buffer.
-
volatile size_t dataSize#
Transfer bytes.
-
uint32_t configFlags#
Transfer transfer configuration flags. Set from _lpspi_transfer_config_flag_for_master if the transfer is used for master or _lpspi_transfer_config_flag_for_slave enumeration if the transfer is used for slave.
-
const uint8_t *txData#
-
struct _lpspi_master_handle#
- #include <fsl_lpspi.h>
LPSPI master transfer handle structure used for transactional API.
Public Members
-
volatile bool isPcsContinuous#
Is PCS continuous in transfer.
-
volatile bool writeTcrInIsr#
A flag that whether should write TCR in ISR.
-
volatile bool isByteSwap#
A flag that whether should byte swap.
-
volatile bool isTxMask#
A flag that whether TCR[TXMSK] is set.
-
volatile uint16_t bytesPerFrame#
Number of bytes in each frame
-
volatile uint16_t frameSize#
Backup of TCR[FRAMESZ]
-
volatile uint8_t fifoSize#
FIFO dataSize.
-
volatile uint8_t rxWatermark#
Rx watermark.
-
volatile uint8_t bytesEachWrite#
Bytes for each write TDR.
-
volatile uint8_t bytesEachRead#
Bytes for each read RDR.
-
const uint8_t *volatile txData#
Send buffer.
-
uint8_t *volatile rxData#
Receive buffer.
-
volatile size_t txRemainingByteCount#
Number of bytes remaining to send.
-
volatile size_t rxRemainingByteCount#
Number of bytes remaining to receive.
-
volatile uint32_t writeRegRemainingTimes#
Write TDR register remaining times.
-
volatile uint32_t readRegRemainingTimes#
Read RDR register remaining times.
-
uint32_t totalByteCount#
Number of transfer bytes
-
uint32_t txBuffIfNull#
Used if the txData is NULL.
-
volatile uint8_t state#
LPSPI transfer state , _lpspi_transfer_state.
-
lpspi_master_transfer_callback_t callback#
Completion callback.
-
void *userData#
Callback user data.
-
volatile bool isPcsContinuous#
-
struct _lpspi_slave_handle#
- #include <fsl_lpspi.h>
LPSPI slave transfer handle structure used for transactional API.
Public Members
-
volatile bool isByteSwap#
A flag that whether should byte swap.
-
volatile uint8_t fifoSize#
FIFO dataSize.
-
volatile uint8_t rxWatermark#
Rx watermark.
-
volatile uint8_t bytesEachWrite#
Bytes for each write TDR.
-
volatile uint8_t bytesEachRead#
Bytes for each read RDR.
-
const uint8_t *volatile txData#
Send buffer.
-
uint8_t *volatile rxData#
Receive buffer.
-
volatile size_t txRemainingByteCount#
Number of bytes remaining to send.
-
volatile size_t rxRemainingByteCount#
Number of bytes remaining to receive.
-
volatile uint32_t writeRegRemainingTimes#
Write TDR register remaining times.
-
volatile uint32_t readRegRemainingTimes#
Read RDR register remaining times.
-
uint32_t totalByteCount#
Number of transfer bytes
-
volatile uint8_t state#
LPSPI transfer state , _lpspi_transfer_state.
-
volatile uint32_t errorCount#
Error count for slave transfer.
-
lpspi_slave_transfer_callback_t callback#
Completion callback.
-
void *userData#
Callback user data.
-
volatile bool isByteSwap#
LPSPI eDMA Driver#
-
FSL_LPSPI_EDMA_DRIVER_VERSION#
LPSPI EDMA driver version.
-
DMA_MAX_TRANSFER_COUNT#
DMA max transfer size.
-
typedef struct _lpspi_master_edma_handle lpspi_master_edma_handle_t#
Forward declaration of the _lpspi_master_edma_handle typedefs.
-
typedef struct _lpspi_slave_edma_handle lpspi_slave_edma_handle_t#
Forward declaration of the _lpspi_slave_edma_handle typedefs.
-
typedef void (*lpspi_master_edma_transfer_callback_t)(LPSPI_Type *base, lpspi_master_edma_handle_t *handle, status_t status, void *userData)#
Completion callback function pointer type.
- Param base:
LPSPI peripheral base address.
- Param handle:
Pointer to the handle for the LPSPI master.
- Param status:
Success or error code describing whether the transfer completed.
- Param userData:
Arbitrary pointer-dataSized value passed from the application.
-
typedef void (*lpspi_slave_edma_transfer_callback_t)(LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, status_t status, void *userData)#
Completion callback function pointer type.
- Param base:
LPSPI peripheral base address.
- Param handle:
Pointer to the handle for the LPSPI slave.
- Param status:
Success or error code describing whether the transfer completed.
- Param userData:
Arbitrary pointer-dataSized value passed from the application.
-
void LPSPI_MasterTransferCreateHandleEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *handle, lpspi_master_edma_transfer_callback_t callback, void *userData, edma_handle_t *edmaRxRegToRxDataHandle, edma_handle_t *edmaTxDataToTxRegHandle)#
Initializes the LPSPI master eDMA handle.
This function initializes the LPSPI eDMA handle which can be used for other LPSPI transactional APIs. Usually, for a specified LPSPI instance, call this API once to get the initialized handle.
Note that the LPSPI eDMA has a separated (Rx and Tx as two sources) or shared (Rx and Tx are the same source) DMA request source. (1) For a separated DMA request source, enable and set the Rx DMAMUX source for edmaRxRegToRxDataHandle and Tx DMAMUX source for edmaTxDataToTxRegHandle. (2) For a shared DMA request source, enable and set the Rx/Tx DMAMUX source for edmaRxRegToRxDataHandle.
- Parameters:
base – LPSPI peripheral base address.
handle – LPSPI handle pointer to lpspi_master_edma_handle_t.
callback – LPSPI callback.
userData – callback function parameter.
edmaRxRegToRxDataHandle – edmaRxRegToRxDataHandle pointer to edma_handle_t.
edmaTxDataToTxRegHandle – edmaTxDataToTxRegHandle pointer to edma_handle_t.
-
status_t LPSPI_MasterTransferEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *handle, lpspi_transfer_t *transfer)#
LPSPI master transfer data using eDMA.
This function transfers data using eDMA. This is a non-blocking function, which returns right away. When all data is transferred, the callback function is called.
Note: The transfer data size should be an integer multiple of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not an integer multiple of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
- Parameters:
base – LPSPI peripheral base address.
handle – pointer to lpspi_master_edma_handle_t structure which stores the transfer state.
transfer – pointer to lpspi_transfer_t structure.
- Returns:
status of status_t.
-
status_t LPSPI_MasterTransferPrepareEDMALite(LPSPI_Type *base, lpspi_master_edma_handle_t *handle, uint32_t configFlags)#
LPSPI master config transfer parameter while using eDMA.
This function is preparing to transfer data using eDMA, work with LPSPI_MasterTransferEDMALite.
- Parameters:
base – LPSPI peripheral base address.
handle – pointer to lpspi_master_edma_handle_t structure which stores the transfer state.
configFlags – transfer configuration flags. _lpspi_transfer_config_flag_for_master.
- Return values:
kStatus_Success – Execution successfully.
kStatus_LPSPI_Busy – The LPSPI device is busy.
- Returns:
Indicates whether LPSPI master transfer was successful or not.
-
status_t LPSPI_MasterTransferEDMALite(LPSPI_Type *base, lpspi_master_edma_handle_t *handle, lpspi_transfer_t *transfer)#
LPSPI master transfer data using eDMA without configs.
This function transfers data using eDMA. This is a non-blocking function, which returns right away. When all data is transferred, the callback function is called.
Note: This API is only for transfer through DMA without configuration. Before calling this API, you must call LPSPI_MasterTransferPrepareEDMALite to configure it once. The transfer data size should be an integer multiple of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not an integer multiple of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
- Parameters:
base – LPSPI peripheral base address.
handle – pointer to lpspi_master_edma_handle_t structure which stores the transfer state.
transfer – pointer to lpspi_transfer_t structure, config field is not uesed.
- Return values:
kStatus_Success – Execution successfully.
kStatus_LPSPI_Busy – The LPSPI device is busy.
kStatus_InvalidArgument – The transfer structure is invalid.
- Returns:
Indicates whether LPSPI master transfer was successful or not.
-
void LPSPI_MasterTransferAbortEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *handle)#
LPSPI master aborts a transfer which is using eDMA.
This function aborts a transfer which is using eDMA.
- Parameters:
base – LPSPI peripheral base address.
handle – pointer to lpspi_master_edma_handle_t structure which stores the transfer state.
-
status_t LPSPI_MasterTransferGetCountEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *handle, size_t *count)#
Gets the master eDMA transfer remaining bytes.
This function gets the master eDMA transfer remaining bytes.
- Parameters:
base – LPSPI peripheral base address.
handle – pointer to lpspi_master_edma_handle_t structure which stores the transfer state.
count – Number of bytes transferred so far by the EDMA transaction.
- Returns:
status of status_t.
-
void LPSPI_SlaveTransferCreateHandleEDMA(LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, lpspi_slave_edma_transfer_callback_t callback, void *userData, edma_handle_t *edmaRxRegToRxDataHandle, edma_handle_t *edmaTxDataToTxRegHandle)#
Initializes the LPSPI slave eDMA handle.
This function initializes the LPSPI eDMA handle which can be used for other LPSPI transactional APIs. Usually, for a specified LPSPI instance, call this API once to get the initialized handle.
Note that LPSPI eDMA has a separated (Rx and Tx as two sources) or shared (Rx and Tx as the same source) DMA request source.
(1) For a separated DMA request source, enable and set the Rx DMAMUX source for edmaRxRegToRxDataHandle and Tx DMAMUX source for edmaTxDataToTxRegHandle. (2) For a shared DMA request source, enable and set the Rx/Rx DMAMUX source for edmaRxRegToRxDataHandle .
- Parameters:
base – LPSPI peripheral base address.
handle – LPSPI handle pointer to lpspi_slave_edma_handle_t.
callback – LPSPI callback.
userData – callback function parameter.
edmaRxRegToRxDataHandle – edmaRxRegToRxDataHandle pointer to edma_handle_t.
edmaTxDataToTxRegHandle – edmaTxDataToTxRegHandle pointer to edma_handle_t.
-
status_t LPSPI_SlaveTransferEDMA(LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, lpspi_transfer_t *transfer)#
LPSPI slave transfers data using eDMA.
This function transfers data using eDMA. This is a non-blocking function, which return right away. When all data is transferred, the callback function is called.
Note: The transfer data size should be an integer multiple of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not an integer multiple of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
- Parameters:
base – LPSPI peripheral base address.
handle – pointer to lpspi_slave_edma_handle_t structure which stores the transfer state.
transfer – pointer to lpspi_transfer_t structure.
- Returns:
status of status_t.
-
void LPSPI_SlaveTransferAbortEDMA(LPSPI_Type *base, lpspi_slave_edma_handle_t *handle)#
LPSPI slave aborts a transfer which is using eDMA.
This function aborts a transfer which is using eDMA.
- Parameters:
base – LPSPI peripheral base address.
handle – pointer to lpspi_slave_edma_handle_t structure which stores the transfer state.
-
status_t LPSPI_SlaveTransferGetCountEDMA(LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, size_t *count)#
Gets the slave eDMA transfer remaining bytes.
This function gets the slave eDMA transfer remaining bytes.
- Parameters:
base – LPSPI peripheral base address.
handle – pointer to lpspi_slave_edma_handle_t structure which stores the transfer state.
count – Number of bytes transferred so far by the eDMA transaction.
- Returns:
status of status_t.
-
struct _lpspi_master_edma_handle#
- #include <fsl_lpspi_edma.h>
LPSPI master eDMA transfer handle structure used for transactional API.
Public Members
-
volatile bool isPcsContinuous#
Is PCS continuous in transfer.
-
volatile bool isByteSwap#
A flag that whether should byte swap.
-
volatile uint8_t fifoSize#
FIFO dataSize.
-
volatile uint8_t rxWatermark#
Rx watermark.
-
volatile uint8_t bytesEachWrite#
Bytes for each write TDR.
-
volatile uint8_t bytesEachRead#
Bytes for each read RDR.
-
volatile uint8_t bytesLastRead#
Bytes for last read RDR.
-
volatile bool isThereExtraRxBytes#
Is there extra RX byte.
-
const uint8_t *volatile txData#
Send buffer.
-
uint8_t *volatile rxData#
Receive buffer.
-
volatile size_t txRemainingByteCount#
Number of bytes remaining to send.
-
volatile size_t rxRemainingByteCount#
Number of bytes remaining to receive.
-
volatile uint32_t writeRegRemainingTimes#
Write TDR register remaining times.
-
volatile uint32_t readRegRemainingTimes#
Read RDR register remaining times.
-
uint32_t totalByteCount#
Number of transfer bytes
-
edma_tcd_t *lastTimeTCD#
Pointer to the lastTime TCD
-
bool isMultiDMATransmit#
Is there multi DMA transmit
-
volatile uint8_t dmaTransmitTime#
DMA Transfer times.
-
uint32_t lastTimeDataBytes#
DMA transmit last Time data Bytes
-
uint32_t dataBytesEveryTime#
Bytes in a time for DMA transfer, default is DMA_MAX_TRANSFER_COUNT
-
edma_transfer_config_t transferConfigRx#
Config of DMA rx channel.
-
edma_transfer_config_t transferConfigTx#
Config of DMA tx channel.
-
uint32_t txBuffIfNull#
Used if there is not txData for DMA purpose.
-
uint32_t rxBuffIfNull#
Used if there is not rxData for DMA purpose.
-
uint32_t transmitCommand#
Used to write TCR for DMA purpose.
-
volatile uint8_t state#
LPSPI transfer state , _lpspi_transfer_state.
-
uint8_t nbytes#
eDMA minor byte transfer count initially configured.
-
lpspi_master_edma_transfer_callback_t callback#
Completion callback.
-
void *userData#
Callback user data.
-
edma_handle_t *edmaRxRegToRxDataHandle#
edma_handle_t handle point used for RxReg to RxData buff
-
edma_handle_t *edmaTxDataToTxRegHandle#
edma_handle_t handle point used for TxData to TxReg buff
-
edma_tcd_t lpspiSoftwareTCD[3]#
SoftwareTCD, internal used
-
volatile bool isPcsContinuous#
-
struct _lpspi_slave_edma_handle#
- #include <fsl_lpspi_edma.h>
LPSPI slave eDMA transfer handle structure used for transactional API.
Public Members
-
volatile bool isByteSwap#
A flag that whether should byte swap.
-
volatile uint8_t fifoSize#
FIFO dataSize.
-
volatile uint8_t rxWatermark#
Rx watermark.
-
volatile uint8_t bytesEachWrite#
Bytes for each write TDR.
-
volatile uint8_t bytesEachRead#
Bytes for each read RDR.
-
volatile uint8_t bytesLastRead#
Bytes for last read RDR.
-
volatile bool isThereExtraRxBytes#
Is there extra RX byte.
-
uint8_t nbytes#
eDMA minor byte transfer count initially configured.
-
const uint8_t *volatile txData#
Send buffer.
-
uint8_t *volatile rxData#
Receive buffer.
-
volatile size_t txRemainingByteCount#
Number of bytes remaining to send.
-
volatile size_t rxRemainingByteCount#
Number of bytes remaining to receive.
-
volatile uint32_t writeRegRemainingTimes#
Write TDR register remaining times.
-
volatile uint32_t readRegRemainingTimes#
Read RDR register remaining times.
-
uint32_t totalByteCount#
Number of transfer bytes
-
uint32_t txBuffIfNull#
Used if there is not txData for DMA purpose.
-
uint32_t rxBuffIfNull#
Used if there is not rxData for DMA purpose.
-
volatile uint8_t state#
LPSPI transfer state.
-
uint32_t errorCount#
Error count for slave transfer.
-
lpspi_slave_edma_transfer_callback_t callback#
Completion callback.
-
void *userData#
Callback user data.
-
edma_handle_t *edmaRxRegToRxDataHandle#
edma_handle_t handle point used for RxReg to RxData buff
-
edma_handle_t *edmaTxDataToTxRegHandle#
edma_handle_t handle point used for TxData to TxReg
-
edma_tcd_t lpspiSoftwareTCD[2]#
SoftwareTCD, internal used
-
volatile bool isByteSwap#
LPTMR: Low-Power Timer#
-
void LPTMR_Init(LPTMR_Type *base, const lptmr_config_t *config)#
Ungates the LPTMR clock and configures the peripheral for a basic operation.
Note
This API should be called at the beginning of the application using the LPTMR driver.
- Parameters:
base – LPTMR peripheral base address
config – A pointer to the LPTMR configuration structure.
-
void LPTMR_Deinit(LPTMR_Type *base)#
Gates the LPTMR clock.
- Parameters:
base – LPTMR peripheral base address
-
void LPTMR_GetDefaultConfig(lptmr_config_t *config)#
Fills in the LPTMR configuration structure with default settings.
The default values are as follows.
config->timerMode = kLPTMR_TimerModeTimeCounter; config->pinSelect = kLPTMR_PinSelectInput_0; config->pinPolarity = kLPTMR_PinPolarityActiveHigh; config->enableFreeRunning = false; config->bypassPrescaler = true; config->prescalerClockSource = kLPTMR_PrescalerClock_1; config->value = kLPTMR_Prescale_Glitch_0;
- Parameters:
config – A pointer to the LPTMR configuration structure.
-
static inline void LPTMR_EnableInterrupts(LPTMR_Type *base, uint32_t mask)#
Enables the selected LPTMR interrupts.
- Parameters:
base – LPTMR peripheral base address
mask – The interrupts to enable. This is a logical OR of members of the enumeration lptmr_interrupt_enable_t
-
static inline void LPTMR_DisableInterrupts(LPTMR_Type *base, uint32_t mask)#
Disables the selected LPTMR interrupts.
- Parameters:
base – LPTMR peripheral base address
mask – The interrupts to disable. This is a logical OR of members of the enumeration lptmr_interrupt_enable_t.
-
static inline uint32_t LPTMR_GetEnabledInterrupts(LPTMR_Type *base)#
Gets the enabled LPTMR interrupts.
- Parameters:
base – LPTMR peripheral base address
- Returns:
The enabled interrupts. This is the logical OR of members of the enumeration lptmr_interrupt_enable_t
-
static inline uint32_t LPTMR_GetStatusFlags(LPTMR_Type *base)#
Gets the LPTMR status flags.
- Parameters:
base – LPTMR peripheral base address
- Returns:
The status flags. This is the logical OR of members of the enumeration lptmr_status_flags_t
-
static inline void LPTMR_ClearStatusFlags(LPTMR_Type *base, uint32_t mask)#
Clears the LPTMR status flags.
- Parameters:
base – LPTMR peripheral base address
mask – The status flags to clear. This is a logical OR of members of the enumeration lptmr_status_flags_t.
-
static inline void LPTMR_SetTimerPeriod(LPTMR_Type *base, uint32_t ticks)#
Sets the timer period in units of count.
Timers counts from 0 until it equals the count value set here. The count value is written to the CMR register.
Note
The TCF flag is set with the CNR equals the count provided here and then increments.
Call the utility macros provided in the fsl_common.h to convert to ticks.
- Parameters:
base – LPTMR peripheral base address
ticks – A timer period in units of ticks
-
static inline uint32_t LPTMR_GetCurrentTimerCount(LPTMR_Type *base)#
Reads the current timer counting value.
This function returns the real-time timer counting value in a range from 0 to a timer period.
Note
Call the utility macros provided in the fsl_common.h to convert ticks to usec or msec.
- Parameters:
base – LPTMR peripheral base address
- Returns:
The current counter value in ticks
-
static inline void LPTMR_StartTimer(LPTMR_Type *base)#
Starts the timer.
After calling this function, the timer counts up to the CMR register value. Each time the timer reaches the CMR value and then increments, it generates a trigger pulse and sets the timeout interrupt flag. An interrupt is also triggered if the timer interrupt is enabled.
- Parameters:
base – LPTMR peripheral base address
-
static inline void LPTMR_StopTimer(LPTMR_Type *base)#
Stops the timer.
This function stops the timer and resets the timer’s counter register.
- Parameters:
base – LPTMR peripheral base address
-
FSL_LPTMR_DRIVER_VERSION#
Driver Version
-
enum _lptmr_pin_select#
LPTMR pin selection used in pulse counter mode.
Values:
-
enumerator kLPTMR_PinSelectInput_0#
Pulse counter input 0 is selected
-
enumerator kLPTMR_PinSelectInput_1#
Pulse counter input 1 is selected
-
enumerator kLPTMR_PinSelectInput_2#
Pulse counter input 2 is selected
-
enumerator kLPTMR_PinSelectInput_3#
Pulse counter input 3 is selected
-
enumerator kLPTMR_PinSelectInput_0#
-
enum _lptmr_pin_polarity#
LPTMR pin polarity used in pulse counter mode.
Values:
-
enumerator kLPTMR_PinPolarityActiveHigh#
Pulse Counter input source is active-high
-
enumerator kLPTMR_PinPolarityActiveLow#
Pulse Counter input source is active-low
-
enumerator kLPTMR_PinPolarityActiveHigh#
-
enum _lptmr_timer_mode#
LPTMR timer mode selection.
Values:
-
enumerator kLPTMR_TimerModeTimeCounter#
Time Counter mode
-
enumerator kLPTMR_TimerModePulseCounter#
Pulse Counter mode
-
enumerator kLPTMR_TimerModeTimeCounter#
-
enum _lptmr_prescaler_glitch_value#
LPTMR prescaler/glitch filter values.
Values:
-
enumerator kLPTMR_Prescale_Glitch_0#
Prescaler divide 2, glitch filter does not support this setting
-
enumerator kLPTMR_Prescale_Glitch_1#
Prescaler divide 4, glitch filter 2
-
enumerator kLPTMR_Prescale_Glitch_2#
Prescaler divide 8, glitch filter 4
-
enumerator kLPTMR_Prescale_Glitch_3#
Prescaler divide 16, glitch filter 8
-
enumerator kLPTMR_Prescale_Glitch_4#
Prescaler divide 32, glitch filter 16
-
enumerator kLPTMR_Prescale_Glitch_5#
Prescaler divide 64, glitch filter 32
-
enumerator kLPTMR_Prescale_Glitch_6#
Prescaler divide 128, glitch filter 64
-
enumerator kLPTMR_Prescale_Glitch_7#
Prescaler divide 256, glitch filter 128
-
enumerator kLPTMR_Prescale_Glitch_8#
Prescaler divide 512, glitch filter 256
-
enumerator kLPTMR_Prescale_Glitch_9#
Prescaler divide 1024, glitch filter 512
-
enumerator kLPTMR_Prescale_Glitch_10#
Prescaler divide 2048 glitch filter 1024
-
enumerator kLPTMR_Prescale_Glitch_11#
Prescaler divide 4096, glitch filter 2048
-
enumerator kLPTMR_Prescale_Glitch_12#
Prescaler divide 8192, glitch filter 4096
-
enumerator kLPTMR_Prescale_Glitch_13#
Prescaler divide 16384, glitch filter 8192
-
enumerator kLPTMR_Prescale_Glitch_14#
Prescaler divide 32768, glitch filter 16384
-
enumerator kLPTMR_Prescale_Glitch_15#
Prescaler divide 65536, glitch filter 32768
-
enumerator kLPTMR_Prescale_Glitch_0#
-
enum _lptmr_prescaler_clock_select#
LPTMR prescaler/glitch filter clock select.
Note
Clock connections are SoC-specific
Values:
-
enum _lptmr_interrupt_enable#
List of the LPTMR interrupts.
Values:
-
enumerator kLPTMR_TimerInterruptEnable#
Timer interrupt enable
-
enumerator kLPTMR_TimerInterruptEnable#
-
enum _lptmr_status_flags#
List of the LPTMR status flags.
Values:
-
enumerator kLPTMR_TimerCompareFlag#
Timer compare flag
-
enumerator kLPTMR_TimerCompareFlag#
-
typedef enum _lptmr_pin_select lptmr_pin_select_t#
LPTMR pin selection used in pulse counter mode.
-
typedef enum _lptmr_pin_polarity lptmr_pin_polarity_t#
LPTMR pin polarity used in pulse counter mode.
-
typedef enum _lptmr_timer_mode lptmr_timer_mode_t#
LPTMR timer mode selection.
-
typedef enum _lptmr_prescaler_glitch_value lptmr_prescaler_glitch_value_t#
LPTMR prescaler/glitch filter values.
-
typedef enum _lptmr_prescaler_clock_select lptmr_prescaler_clock_select_t#
LPTMR prescaler/glitch filter clock select.
Note
Clock connections are SoC-specific
-
typedef enum _lptmr_interrupt_enable lptmr_interrupt_enable_t#
List of the LPTMR interrupts.
-
typedef enum _lptmr_status_flags lptmr_status_flags_t#
List of the LPTMR status flags.
-
typedef struct _lptmr_config lptmr_config_t#
LPTMR config structure.
This structure holds the configuration settings for the LPTMR peripheral. To initialize this structure to reasonable defaults, call the LPTMR_GetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration struct can be made constant so it resides in flash.
-
static inline void LPTMR_EnableTimerDMA(LPTMR_Type *base, bool enable)#
Enable or disable timer DMA request.
Toggles CSR[TDRE] on the LPTMR side only: when enabled, every compare event (CSR[TCF]=1) raises an LPTMR DMA request line which is auto-cleared after the DMA controller services it.
Note
LPTMR runs on a low-power clock that is asynchronous to the EDMA bus clock. On some EDMA IP variants the channel has TWO gates that must BOTH be opened for an LPTMR request to be accepted: the base hardware request gate (ERQ, opened by EDMA_EnableChannelRequest()) and an extra asynchronous-request gate (opened by EDMA_EnableAsyncRequest() on EDMA4; the classic EDMA + DMAMUX combination does not need this).
- Parameters:
base – base LPTMR peripheral base address
enable – Switcher of timer DMA feature. “true” means to enable, “false” means to disable.
-
struct _lptmr_config#
- #include <fsl_lptmr.h>
LPTMR config structure.
This structure holds the configuration settings for the LPTMR peripheral. To initialize this structure to reasonable defaults, call the LPTMR_GetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration struct can be made constant so it resides in flash.
Public Members
-
lptmr_timer_mode_t timerMode#
Time counter mode or pulse counter mode
-
lptmr_pin_select_t pinSelect#
LPTMR pulse input pin select; used only in pulse counter mode
-
lptmr_pin_polarity_t pinPolarity#
LPTMR pulse input pin polarity; used only in pulse counter mode
-
bool enableFreeRunning#
True: enable free running, counter is reset on overflow False: counter is reset when the compare flag is set
-
bool bypassPrescaler#
True: bypass prescaler; false: use clock from prescaler
-
lptmr_prescaler_clock_select_t prescalerClockSource#
LPTMR clock source
-
lptmr_prescaler_glitch_value_t value#
Prescaler or glitch filter value
-
lptmr_timer_mode_t timerMode#
LPUART: Low Power Universal Asynchronous Receiver/Transmitter Driver#
LPUART Driver#
-
static inline void LPUART_SoftwareReset(LPUART_Type *base)#
Resets the LPUART using software.
This function resets all internal logic and registers except the Global Register. Remains set until cleared by software.
- Parameters:
base – LPUART peripheral base address.
-
status_t LPUART_Init(LPUART_Type *base, const lpuart_config_t *config, uint32_t srcClock_Hz)#
Initializes an LPUART instance with the user configuration structure and the peripheral clock.
This function configures the LPUART module with user-defined settings. Call the LPUART_GetDefaultConfig() function to configure the configuration structure and get the default configuration. The example below shows how to use this API to configure the LPUART.
lpuart_config_t lpuartConfig; lpuartConfig.baudRate_Bps = 115200U; lpuartConfig.parityMode = kLPUART_ParityDisabled; lpuartConfig.dataBitsCount = kLPUART_EightDataBits; lpuartConfig.isMsb = false; lpuartConfig.stopBitCount = kLPUART_OneStopBit; lpuartConfig.txFifoWatermark = 0; lpuartConfig.rxFifoWatermark = 1; LPUART_Init(LPUART1, &lpuartConfig, 20000000U);
- Parameters:
base – LPUART peripheral base address.
config – Pointer to a user-defined configuration structure.
srcClock_Hz – LPUART clock source frequency in HZ.
- Return values:
kStatus_LPUART_BaudrateNotSupport – Baudrate is not support in current clock source.
kStatus_Success – LPUART initialize succeed
-
status_t LPUART_Deinit(LPUART_Type *base)#
Deinitializes a LPUART instance.
This function waits for transmit to complete, disables TX and RX, and disables the LPUART clock.
- Parameters:
base – LPUART peripheral base address.
- Return values:
kStatus_Success – Deinit is success.
kStatus_LPUART_Timeout – Timeout during deinit.
-
void LPUART_GetDefaultConfig(lpuart_config_t *config)#
Gets the default configuration structure.
This function initializes the LPUART configuration structure to a default value. The default values are: lpuartConfig->baudRate_Bps = 115200U; lpuartConfig->parityMode = kLPUART_ParityDisabled; lpuartConfig->dataBitsCount = kLPUART_EightDataBits; lpuartConfig->isMsb = false; lpuartConfig->stopBitCount = kLPUART_OneStopBit; lpuartConfig->txFifoWatermark = 0; lpuartConfig->rxFifoWatermark = 1; lpuartConfig->rxIdleType = kLPUART_IdleTypeStartBit; lpuartConfig->rxIdleConfig = kLPUART_IdleCharacter1; lpuartConfig->enableTx = false; lpuartConfig->enableRx = false;
- Parameters:
config – Pointer to a configuration structure.
-
status_t LPUART_SetBaudRate(LPUART_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz)#
Sets the LPUART instance baudrate.
This function configures the LPUART module baudrate. This function is used to update the LPUART module baudrate after the LPUART module is initialized by the LPUART_Init.
LPUART_SetBaudRate(LPUART1, 115200U, 20000000U);
- Parameters:
base – LPUART peripheral base address.
baudRate_Bps – LPUART baudrate to be set.
srcClock_Hz – LPUART clock source frequency in HZ.
- Return values:
kStatus_LPUART_BaudrateNotSupport – Baudrate is not supported in the current clock source.
kStatus_Success – Set baudrate succeeded.
-
void LPUART_Enable9bitMode(LPUART_Type *base, bool enable)#
Enable 9-bit data mode for LPUART.
This function set the 9-bit mode for LPUART module. The 9th bit is not used for parity thus can be modified by user.
- Parameters:
base – LPUART peripheral base address.
enable – true to enable, flase to disable.
-
static inline void LPUART_SetMatchAddress(LPUART_Type *base, uint16_t address1, uint16_t address2)#
Set the LPUART address.
This function configures the address for LPUART module that works as slave in 9-bit data mode. One or two address fields can be configured. When the address field’s match enable bit is set, the frame it receices with MSB being 1 is considered as an address frame, otherwise it is considered as data frame. Once the address frame matches one of slave’s own addresses, this slave is addressed. This address frame and its following data frames are stored in the receive buffer, otherwise the frames will be discarded. To un-address a slave, just send an address frame with unmatched address.
Note
Any LPUART instance joined in the multi-slave system can work as slave. The position of the address mark is the same as the parity bit when parity is enabled for 8 bit and 9 bit data formats.
- Parameters:
base – LPUART peripheral base address.
address1 – LPUART slave address1.
address2 – LPUART slave address2.
-
static inline void LPUART_EnableMatchAddress(LPUART_Type *base, bool match1, bool match2)#
Enable the LPUART match address feature.
- Parameters:
base – LPUART peripheral base address.
match1 – true to enable match address1, false to disable.
match2 – true to enable match address2, false to disable.
-
static inline void LPUART_SetRxFifoWatermark(LPUART_Type *base, uint8_t water)#
Sets the rx FIFO watermark.
- Parameters:
base – LPUART peripheral base address.
water – Rx FIFO watermark.
-
static inline void LPUART_SetTxFifoWatermark(LPUART_Type *base, uint8_t water)#
Sets the tx FIFO watermark.
- Parameters:
base – LPUART peripheral base address.
water – Tx FIFO watermark.
-
static inline void LPUART_TransferEnable16Bit(lpuart_handle_t *handle, bool enable)#
Sets the LPUART using 16bit transmit, only for 9bit or 10bit mode.
This function Enable 16bit Data transmit in lpuart_handle_t.
- Parameters:
handle – LPUART handle pointer.
enable – true to enable, false to disable.
-
uint32_t LPUART_GetStatusFlags(LPUART_Type *base)#
Gets LPUART status flags.
This function gets all LPUART status flags. The flags are returned as the logical OR value of the enumerators _lpuart_flags. To check for a specific status, compare the return value with enumerators in the _lpuart_flags. For example, to check whether the TX is empty:
if (kLPUART_TxDataRegEmptyFlag & LPUART_GetStatusFlags(LPUART1)) { ... }
- Parameters:
base – LPUART peripheral base address.
- Returns:
LPUART status flags which are ORed by the enumerators in the _lpuart_flags.
-
status_t LPUART_ClearStatusFlags(LPUART_Type *base, uint32_t mask)#
Clears status flags with a provided mask.
This function clears LPUART status flags with a provided mask. Automatically cleared flags can’t be cleared by this function. Flags that can only cleared or set by hardware are: kLPUART_TxDataRegEmptyFlag, kLPUART_TransmissionCompleteFlag, kLPUART_RxDataRegFullFlag, kLPUART_RxActiveFlag, kLPUART_NoiseErrorFlag, kLPUART_ParityErrorFlag, kLPUART_TxFifoEmptyFlag,kLPUART_RxFifoEmptyFlag Note: This API should be called when the Tx/Rx is idle, otherwise it takes no effects.
- Parameters:
base – LPUART peripheral base address.
mask – the status flags to be cleared. The user can use the enumerators in the _lpuart_status_flag_t to do the OR operation and get the mask.
- Return values:
kStatus_LPUART_FlagCannotClearManually – The flag can’t be cleared by this function but it is cleared automatically by hardware.
kStatus_Success – Status in the mask are cleared.
- Returns:
0 succeed, others failed.
-
void LPUART_EnableInterrupts(LPUART_Type *base, uint32_t mask)#
Enables LPUART interrupts according to a provided mask.
This function enables the LPUART interrupts according to a provided mask. The mask is a logical OR of enumeration members. See the _lpuart_interrupt_enable. This examples shows how to enable TX empty interrupt and RX full interrupt:
LPUART_EnableInterrupts(LPUART1,kLPUART_TxDataRegEmptyInterruptEnable | kLPUART_RxDataRegFullInterruptEnable);
- Parameters:
base – LPUART peripheral base address.
mask – The interrupts to enable. Logical OR of _lpuart_interrupt_enable.
-
void LPUART_DisableInterrupts(LPUART_Type *base, uint32_t mask)#
Disables LPUART interrupts according to a provided mask.
This function disables the LPUART interrupts according to a provided mask. The mask is a logical OR of enumeration members. See _lpuart_interrupt_enable. This example shows how to disable the TX empty interrupt and RX full interrupt:
LPUART_DisableInterrupts(LPUART1,kLPUART_TxDataRegEmptyInterruptEnable | kLPUART_RxDataRegFullInterruptEnable);
- Parameters:
base – LPUART peripheral base address.
mask – The interrupts to disable. Logical OR of _lpuart_interrupt_enable.
-
uint32_t LPUART_GetEnabledInterrupts(LPUART_Type *base)#
Gets enabled LPUART interrupts.
This function gets the enabled LPUART interrupts. The enabled interrupts are returned as the logical OR value of the enumerators _lpuart_interrupt_enable. To check a specific interrupt enable status, compare the return value with enumerators in _lpuart_interrupt_enable. For example, to check whether the TX empty interrupt is enabled:
uint32_t enabledInterrupts = LPUART_GetEnabledInterrupts(LPUART1); if (kLPUART_TxDataRegEmptyInterruptEnable & enabledInterrupts) { ... }
- Parameters:
base – LPUART peripheral base address.
- Returns:
LPUART interrupt flags which are logical OR of the enumerators in _lpuart_interrupt_enable.
-
static inline uintptr_t LPUART_GetDataRegisterAddress(LPUART_Type *base)#
Gets the LPUART data register address.
This function returns the LPUART data register address, which is mainly used by the DMA/eDMA.
- Parameters:
base – LPUART peripheral base address.
- Returns:
LPUART data register addresses which are used both by the transmitter and receiver.
-
static inline void LPUART_EnableTxDMA(LPUART_Type *base, bool enable)#
Enables or disables the LPUART transmitter DMA request.
This function enables or disables the transmit data register empty flag, STAT[TDRE], to generate DMA requests.
- Parameters:
base – LPUART peripheral base address.
enable – True to enable, false to disable.
-
static inline void LPUART_EnableRxDMA(LPUART_Type *base, bool enable)#
Enables or disables the LPUART receiver DMA.
This function enables or disables the receiver data register full flag, STAT[RDRF], to generate DMA requests.
- Parameters:
base – LPUART peripheral base address.
enable – True to enable, false to disable.
-
uint32_t LPUART_GetInstance(LPUART_Type *base)#
Get the LPUART instance from peripheral base address.
- Parameters:
base – LPUART peripheral base address.
- Returns:
LPUART instance.
-
static inline void LPUART_EnableTx(LPUART_Type *base, bool enable)#
Enables or disables the LPUART transmitter.
This function enables or disables the LPUART transmitter.
- Parameters:
base – LPUART peripheral base address.
enable – True to enable, false to disable.
-
static inline void LPUART_EnableRx(LPUART_Type *base, bool enable)#
Enables or disables the LPUART receiver.
This function enables or disables the LPUART receiver.
- Parameters:
base – LPUART peripheral base address.
enable – True to enable, false to disable.
-
static inline void LPUART_WriteByte(LPUART_Type *base, uint8_t data)#
Writes to the transmitter register.
This function writes data to the transmitter register directly. The upper layer must ensure that the TX register is empty or that the TX FIFO has room before calling this function.
- Parameters:
base – LPUART peripheral base address.
data – Data write to the TX register.
-
static inline uint8_t LPUART_ReadByte(LPUART_Type *base)#
Reads the receiver register.
This function reads data from the receiver register directly. The upper layer must ensure that the receiver register is full or that the RX FIFO has data before calling this function.
- Parameters:
base – LPUART peripheral base address.
- Returns:
Data read from data register.
-
static inline uint8_t LPUART_GetRxFifoCount(LPUART_Type *base)#
Gets the rx FIFO data count.
- Parameters:
base – LPUART peripheral base address.
- Returns:
rx FIFO data count.
-
static inline uint8_t LPUART_GetTxFifoCount(LPUART_Type *base)#
Gets the tx FIFO data count.
- Parameters:
base – LPUART peripheral base address.
- Returns:
tx FIFO data count.
-
void LPUART_SendAddress(LPUART_Type *base, uint8_t address)#
Transmit an address frame in 9-bit data mode.
- Parameters:
base – LPUART peripheral base address.
address – LPUART slave address.
-
status_t LPUART_WriteBlocking(LPUART_Type *base, const uint8_t *data, size_t length)#
Writes to the transmitter register using a blocking method.
This function polls the transmitter register, first waits for the register to be empty or TX FIFO to have room, and writes data to the transmitter buffer, then waits for the dat to be sent out to the bus.
- Parameters:
base – LPUART peripheral base address.
data – Start address of the data to write.
length – Size of the data to write.
- Return values:
kStatus_LPUART_Timeout – Transmission timed out and was aborted.
kStatus_Success – Successfully wrote all data.
-
status_t LPUART_WriteBlocking16bit(LPUART_Type *base, const uint16_t *data, size_t length)#
Writes to the transmitter register using a blocking method in 9bit or 10bit mode.
Note
This function only support 9bit or 10bit transfer. Please make sure only 10bit of data is valid and other bits are 0.
- Parameters:
base – LPUART peripheral base address.
data – Start address of the data to write.
length – Size of the data to write.
- Return values:
kStatus_LPUART_Timeout – Transmission timed out and was aborted.
kStatus_Success – Successfully wrote all data.
-
status_t LPUART_ReadBlocking(LPUART_Type *base, uint8_t *data, size_t length)#
Reads the receiver data register using a blocking method.
This function polls the receiver register, waits for the receiver register full or receiver FIFO has data, and reads data from the TX register.
- Parameters:
base – LPUART peripheral base address.
data – Start address of the buffer to store the received data.
length – Size of the buffer.
- Return values:
kStatus_LPUART_RxHardwareOverrun – Receiver overrun happened while receiving data.
kStatus_LPUART_NoiseError – Noise error happened while receiving data.
kStatus_LPUART_FramingError – Framing error happened while receiving data.
kStatus_LPUART_ParityError – Parity error happened while receiving data.
kStatus_LPUART_Timeout – Transmission timed out and was aborted.
kStatus_Success – Successfully received all data.
-
status_t LPUART_ReadBlocking16bit(LPUART_Type *base, uint16_t *data, size_t length)#
Reads the receiver data register in 9bit or 10bit mode.
Note
This function only support 9bit or 10bit transfer.
- Parameters:
base – LPUART peripheral base address.
data – Start address of the buffer to store the received data by 16bit, only 10bit is valid.
length – Size of the buffer.
- Return values:
kStatus_LPUART_RxHardwareOverrun – Receiver overrun happened while receiving data.
kStatus_LPUART_NoiseError – Noise error happened while receiving data.
kStatus_LPUART_FramingError – Framing error happened while receiving data.
kStatus_LPUART_ParityError – Parity error happened while receiving data.
kStatus_LPUART_Timeout – Transmission timed out and was aborted.
kStatus_Success – Successfully received all data.
-
void LPUART_TransferCreateHandle(LPUART_Type *base, lpuart_handle_t *handle, lpuart_transfer_callback_t callback, void *userData)#
Initializes the LPUART handle.
This function initializes the LPUART handle, which can be used for other LPUART transactional APIs. Usually, for a specified LPUART instance, call this API once to get the initialized handle.
The LPUART driver supports the “background” receiving, which means that user can set up an RX ring buffer optionally. Data received is stored into the ring buffer even when the user doesn’t call the LPUART_TransferReceiveNonBlocking() API. If there is already data received in the ring buffer, the user can get the received data from the ring buffer directly. The ring buffer is disabled if passing NULL as
ringBuffer.- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
callback – Callback function.
userData – User data.
-
status_t LPUART_TransferSendNonBlocking(LPUART_Type *base, lpuart_handle_t *handle, lpuart_transfer_t *xfer)#
Transmits a buffer of data using the interrupt method.
This function send data using an interrupt method. This is a non-blocking function, which returns directly without waiting for all data written to the transmitter register. When all data is written to the TX register in the ISR, the LPUART driver calls the callback function and passes the kStatus_LPUART_TxIdle as status parameter.
Note
The kStatus_LPUART_TxIdle is passed to the upper layer when all data are written to the TX register. However, there is no check to ensure that all the data sent out. Before disabling the TX, check the kLPUART_TransmissionCompleteFlag to ensure that the transmit is finished.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
xfer – LPUART transfer structure, see lpuart_transfer_t.
- Return values:
kStatus_Success – Successfully start the data transmission.
kStatus_LPUART_TxBusy – Previous transmission still not finished, data not all written to the TX register.
kStatus_InvalidArgument – Invalid argument.
-
void LPUART_TransferStartRingBuffer(LPUART_Type *base, lpuart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)#
Sets up the RX ring buffer.
This function sets up the RX ring buffer to a specific UART handle.
When the RX ring buffer is used, data received is stored into the ring buffer even when the user doesn’t call the UART_TransferReceiveNonBlocking() API. If there is already data received in the ring buffer, the user can get the received data from the ring buffer directly.
Note
When using RX ring buffer, one byte is reserved for internal use. In other words, if
ringBufferSizeis 32, then only 31 bytes are used for saving data.- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
ringBuffer – Start address of ring buffer for background receiving. Pass NULL to disable the ring buffer.
ringBufferSize – size of the ring buffer.
-
void LPUART_TransferStopRingBuffer(LPUART_Type *base, lpuart_handle_t *handle)#
Aborts the background transfer and uninstalls the ring buffer.
This function aborts the background transfer and uninstalls the ring buffer.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
-
size_t LPUART_TransferGetRxRingBufferLength(LPUART_Type *base, lpuart_handle_t *handle)#
Get the length of received data in RX ring buffer.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
- Returns:
Length of received data in RX ring buffer.
-
void LPUART_TransferAbortSend(LPUART_Type *base, lpuart_handle_t *handle)#
Aborts the interrupt-driven data transmit.
This function aborts the interrupt driven data sending. The user can get the remainBtyes to find out how many bytes are not sent out.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
-
status_t LPUART_TransferGetSendCount(LPUART_Type *base, lpuart_handle_t *handle, uint32_t *count)#
Gets the number of bytes that have been sent out to bus.
This function gets the number of bytes that have been sent out to bus by an interrupt method.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
count – Send bytes count.
- Return values:
kStatus_NoTransferInProgress – No send in progress.
kStatus_InvalidArgument – Parameter is invalid.
kStatus_Success – Get successfully through the parameter
count;
-
status_t LPUART_TransferReceiveNonBlocking(LPUART_Type *base, lpuart_handle_t *handle, lpuart_transfer_t *xfer, size_t *receivedBytes)#
Receives a buffer of data using the interrupt method.
This function receives data using an interrupt method. This is a non-blocking function which returns without waiting to ensure that all data are received. If the RX ring buffer is used and not empty, the data in the ring buffer is copied and the parameter
receivedBytesshows how many bytes are copied from the ring buffer. After copying, if the data in the ring buffer is not enough for read, the receive request is saved by the LPUART driver. When the new data arrives, the receive request is serviced first. When all data is received, the LPUART driver notifies the upper layer through a callback function and passes a status parameter kStatus_UART_RxIdle. For example, the upper layer needs 10 bytes but there are only 5 bytes in ring buffer. The 5 bytes are copied to xfer->data, which returns with the parameterreceivedBytesset to 5. For the remaining 5 bytes, the newly arrived data is saved from xfer->data[5]. When 5 bytes are received, the LPUART driver notifies the upper layer. If the RX ring buffer is not enabled, this function enables the RX and RX interrupt to receive data to xfer->data. When all data is received, the upper layer is notified.- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
xfer – LPUART transfer structure, see uart_transfer_t.
receivedBytes – Bytes received from the ring buffer directly.
- Return values:
kStatus_Success – Successfully queue the transfer into the transmit queue.
kStatus_LPUART_RxBusy – Previous receive request is not finished.
kStatus_InvalidArgument – Invalid argument.
-
void LPUART_TransferAbortReceive(LPUART_Type *base, lpuart_handle_t *handle)#
Aborts the interrupt-driven data receiving.
This function aborts the interrupt-driven data receiving. The user can get the remainBytes to find out how many bytes not received yet.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
-
status_t LPUART_TransferGetReceiveCount(LPUART_Type *base, lpuart_handle_t *handle, uint32_t *count)#
Gets the number of bytes that have been received.
This function gets the number of bytes that have been received.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
count – Receive bytes count.
- Return values:
kStatus_NoTransferInProgress – No receive in progress.
kStatus_InvalidArgument – Parameter is invalid.
kStatus_Success – Get successfully through the parameter
count;
-
void LPUART_TransferHandleIRQ(LPUART_Type *base, void *irqHandle)#
LPUART IRQ handle function.
This function handles the LPUART transmit and receive IRQ request.
- Parameters:
base – LPUART peripheral base address.
irqHandle – LPUART handle pointer.
-
void LPUART_TransferHandleErrorIRQ(LPUART_Type *base, void *irqHandle)#
LPUART Error IRQ handle function.
This function handles the LPUART error IRQ request.
- Parameters:
base – LPUART peripheral base address.
irqHandle – LPUART handle pointer.
-
void LPUART_DriverIRQHandler(uint32_t instance)#
LPUART driver IRQ handler common entry.
This function provides the common IRQ request entry for LPUART.
- Parameters:
instance – LPUART instance.
-
FSL_LPUART_DRIVER_VERSION#
LPUART driver version.
Error codes for the LPUART driver.
Values:
-
enumerator kStatus_LPUART_TxBusy#
TX busy
-
enumerator kStatus_LPUART_RxBusy#
RX busy
-
enumerator kStatus_LPUART_TxIdle#
LPUART transmitter is idle.
-
enumerator kStatus_LPUART_RxIdle#
LPUART receiver is idle.
-
enumerator kStatus_LPUART_TxWatermarkTooLarge#
TX FIFO watermark too large
-
enumerator kStatus_LPUART_RxWatermarkTooLarge#
RX FIFO watermark too large
-
enumerator kStatus_LPUART_FlagCannotClearManually#
Some flag can’t manually clear
-
enumerator kStatus_LPUART_Error#
Error happens on LPUART.
-
enumerator kStatus_LPUART_RxRingBufferOverrun#
LPUART RX software ring buffer overrun.
-
enumerator kStatus_LPUART_RxHardwareOverrun#
LPUART RX receiver overrun.
-
enumerator kStatus_LPUART_NoiseError#
LPUART noise error.
-
enumerator kStatus_LPUART_FramingError#
LPUART framing error.
-
enumerator kStatus_LPUART_ParityError#
LPUART parity error.
-
enumerator kStatus_LPUART_BaudrateNotSupport#
Baudrate is not support in current clock source
-
enumerator kStatus_LPUART_IdleLineDetected#
IDLE flag.
-
enumerator kStatus_LPUART_Timeout#
LPUART times out.
-
enumerator kStatus_LPUART_TxBusy#
-
enum _lpuart_parity_mode#
LPUART parity mode.
Values:
-
enumerator kLPUART_ParityDisabled#
Parity disabled
-
enumerator kLPUART_ParityEven#
Parity enabled, type even, bit setting: PE|PT = 10
-
enumerator kLPUART_ParityOdd#
Parity enabled, type odd, bit setting: PE|PT = 11
-
enumerator kLPUART_ParityDisabled#
-
enum _lpuart_data_bits#
LPUART data bits count.
Values:
-
enumerator kLPUART_EightDataBits#
Eight data bit
-
enumerator kLPUART_SevenDataBits#
Seven data bit
-
enumerator kLPUART_EightDataBits#
-
enum _lpuart_stop_bit_count#
LPUART stop bit count.
Values:
-
enumerator kLPUART_OneStopBit#
One stop bit
-
enumerator kLPUART_TwoStopBit#
Two stop bits
-
enumerator kLPUART_OneStopBit#
-
enum _lpuart_transmit_cts_source#
LPUART transmit CTS source.
Values:
-
enumerator kLPUART_CtsSourcePin#
CTS resource is the LPUART_CTS pin.
-
enumerator kLPUART_CtsSourceMatchResult#
CTS resource is the match result.
-
enumerator kLPUART_CtsSourcePin#
-
enum _lpuart_transmit_cts_config#
LPUART transmit CTS configure.
Values:
-
enumerator kLPUART_CtsSampleAtStart#
CTS input is sampled at the start of each character.
-
enumerator kLPUART_CtsSampleAtIdle#
CTS input is sampled when the transmitter is idle
-
enumerator kLPUART_CtsSampleAtStart#
-
enum _lpuart_transmit_rts_polarity#
LPUART transmitter RTS polarity.
Values:
-
enumerator kLPUART_RtsPolarityLow#
Transmitter RTS is active low.
-
enumerator kLPUART_RtsPolarityHigh#
Transmitter RTS is active high.
-
enumerator kLPUART_RtsPolarityLow#
-
enum _lpuart_idle_type_select#
LPUART idle flag type defines when the receiver starts counting.
Values:
-
enumerator kLPUART_IdleTypeStartBit#
Start counting after a valid start bit.
-
enumerator kLPUART_IdleTypeStopBit#
Start counting after a stop bit.
-
enumerator kLPUART_IdleTypeStartBit#
-
enum _lpuart_idle_config#
LPUART idle detected configuration. This structure defines the number of idle characters that must be received before the IDLE flag is set.
Values:
-
enumerator kLPUART_IdleCharacter1#
the number of idle characters.
-
enumerator kLPUART_IdleCharacter2#
the number of idle characters.
-
enumerator kLPUART_IdleCharacter4#
the number of idle characters.
-
enumerator kLPUART_IdleCharacter8#
the number of idle characters.
-
enumerator kLPUART_IdleCharacter16#
the number of idle characters.
-
enumerator kLPUART_IdleCharacter32#
the number of idle characters.
-
enumerator kLPUART_IdleCharacter64#
the number of idle characters.
-
enumerator kLPUART_IdleCharacter128#
the number of idle characters.
-
enumerator kLPUART_IdleCharacter1#
-
enum _lpuart_interrupt_enable#
LPUART interrupt configuration structure, default settings all disabled.
This structure contains the settings for all LPUART interrupt configurations.
Values:
-
enumerator kLPUART_LinBreakInterruptEnable#
LIN break detect. bit 7
-
enumerator kLPUART_RxActiveEdgeInterruptEnable#
Receive Active Edge. bit 6
-
enumerator kLPUART_TxDataRegEmptyInterruptEnable#
Transmit data register empty. bit 23
-
enumerator kLPUART_TransmissionCompleteInterruptEnable#
Transmission complete. bit 22
-
enumerator kLPUART_RxDataRegFullInterruptEnable#
Receiver data register full. bit 21
-
enumerator kLPUART_IdleLineInterruptEnable#
Idle line. bit 20
-
enumerator kLPUART_RxOverrunInterruptEnable#
Receiver Overrun. bit 27
-
enumerator kLPUART_NoiseErrorInterruptEnable#
Noise error flag. bit 26
-
enumerator kLPUART_FramingErrorInterruptEnable#
Framing error flag. bit 25
-
enumerator kLPUART_ParityErrorInterruptEnable#
Parity error flag. bit 24
-
enumerator kLPUART_Match1InterruptEnable#
Parity error flag. bit 15
-
enumerator kLPUART_Match2InterruptEnable#
Parity error flag. bit 14
-
enumerator kLPUART_TxFifoOverflowInterruptEnable#
Transmit FIFO Overflow. bit 9
-
enumerator kLPUART_RxFifoUnderflowInterruptEnable#
Receive FIFO Underflow. bit 8
-
enumerator kLPUART_AllInterruptEnable#
-
enumerator kLPUART_LinBreakInterruptEnable#
-
enum _lpuart_flags#
LPUART status flags.
This provides constants for the LPUART status flags for use in the LPUART functions.
Values:
-
enumerator kLPUART_TxDataRegEmptyFlag#
Transmit data register empty flag, sets when transmit buffer is empty. bit 23
-
enumerator kLPUART_TransmissionCompleteFlag#
Transmission complete flag, sets when transmission activity complete. bit 22
-
enumerator kLPUART_RxDataRegFullFlag#
Receive data register full flag, sets when the receive data buffer is full. bit 21
-
enumerator kLPUART_IdleLineFlag#
Idle line detect flag, sets when idle line detected. bit 20
-
enumerator kLPUART_RxOverrunFlag#
Receive Overrun, sets when new data is received before data is read from receive register. bit 19
-
enumerator kLPUART_NoiseErrorFlag#
Receive takes 3 samples of each received bit. If any of these samples differ, noise flag sets. bit 18
-
enumerator kLPUART_FramingErrorFlag#
Frame error flag, sets if logic 0 was detected where stop bit expected. bit 17
-
enumerator kLPUART_ParityErrorFlag#
If parity enabled, sets upon parity error detection. bit 16
-
enumerator kLPUART_LinBreakFlag#
LIN break detect interrupt flag, sets when LIN break char detected and LIN circuit enabled. bit 31
-
enumerator kLPUART_RxActiveEdgeFlag#
Receive pin active edge interrupt flag, sets when active edge detected. bit 30
-
enumerator kLPUART_RxActiveFlag#
Receiver Active Flag (RAF), sets at beginning of valid start. bit 24
-
enumerator kLPUART_DataMatch1Flag#
The next character to be read from LPUART_DATA matches MA1. bit 15
-
enumerator kLPUART_DataMatch2Flag#
The next character to be read from LPUART_DATA matches MA2. bit 14
-
enumerator kLPUART_TxFifoEmptyFlag#
TXEMPT bit, sets if transmit buffer is empty. bit 7
-
enumerator kLPUART_RxFifoEmptyFlag#
RXEMPT bit, sets if receive buffer is empty. bit 6
-
enumerator kLPUART_TxFifoOverflowFlag#
TXOF bit, sets if transmit buffer overflow occurred. bit 1
-
enumerator kLPUART_RxFifoUnderflowFlag#
RXUF bit, sets if receive buffer underflow occurred. bit 0
-
enumerator kLPUART_AllClearFlags#
-
enumerator kLPUART_AllFlags#
-
enumerator kLPUART_TxDataRegEmptyFlag#
-
typedef enum _lpuart_parity_mode lpuart_parity_mode_t#
LPUART parity mode.
-
typedef enum _lpuart_data_bits lpuart_data_bits_t#
LPUART data bits count.
-
typedef enum _lpuart_stop_bit_count lpuart_stop_bit_count_t#
LPUART stop bit count.
-
typedef enum _lpuart_transmit_cts_source lpuart_transmit_cts_source_t#
LPUART transmit CTS source.
-
typedef enum _lpuart_transmit_cts_config lpuart_transmit_cts_config_t#
LPUART transmit CTS configure.
-
typedef enum _lpuart_transmit_rts_polarity lpuart_transmit_rts_polarity_t#
LPUART transmitter RTS polarity.
-
typedef enum _lpuart_idle_type_select lpuart_idle_type_select_t#
LPUART idle flag type defines when the receiver starts counting.
-
typedef enum _lpuart_idle_config lpuart_idle_config_t#
LPUART idle detected configuration. This structure defines the number of idle characters that must be received before the IDLE flag is set.
-
typedef struct _lpuart_config lpuart_config_t#
LPUART configuration structure.
-
typedef struct _lpuart_transfer lpuart_transfer_t#
LPUART transfer structure.
-
typedef struct _lpuart_handle lpuart_handle_t#
-
typedef void (*lpuart_transfer_callback_t)(LPUART_Type *base, lpuart_handle_t *handle, status_t status, void *userData)#
LPUART transfer callback function.
-
typedef void (*lpuart_isr_t)(LPUART_Type *base, void *handle)#
-
void *s_lpuartHandle[]#
-
const IRQn_Type s_lpuartTxIRQ[]#
-
lpuart_isr_t s_lpuartIsr[]#
-
UART_RETRY_TIMES
Retry times for waiting flag.
-
struct _lpuart_config#
- #include <fsl_lpuart.h>
LPUART configuration structure.
Public Members
-
uint32_t baudRate_Bps#
LPUART baud rate
-
lpuart_parity_mode_t parityMode#
Parity mode, disabled (default), even, odd
-
lpuart_data_bits_t dataBitsCount#
Data bits count, eight (default), seven
-
bool isMsb#
Data bits order, LSB (default), MSB
-
lpuart_stop_bit_count_t stopBitCount#
Number of stop bits, 1 stop bit (default) or 2 stop bits
-
uint8_t txFifoWatermark#
TX FIFO watermark
-
uint8_t rxFifoWatermark#
RX FIFO watermark
-
bool enableRxRTS#
RX RTS enable
-
bool enableTxRTS#
TX RTS enable
-
bool enableTxCTS#
TX CTS enable
-
lpuart_transmit_cts_source_t txCtsSource#
TX CTS source
-
lpuart_transmit_cts_config_t txCtsConfig#
TX CTS configure
-
lpuart_transmit_rts_polarity_t txRtsPolarity#
TX RTS polarity
-
uint8_t rtsWatermark#
RTS watermark
-
lpuart_idle_type_select_t rxIdleType#
RX IDLE type.
-
lpuart_idle_config_t rxIdleConfig#
RX IDLE configuration.
-
bool enableTx#
Enable TX
-
bool enableRx#
Enable RX
-
bool swapTxdRxd#
Swap TXD and RXD pins
-
bool inverseTxd#
Transmit Data Inversion - Setting true reverses the polarity of the transmitted data output
-
uint32_t baudRate_Bps#
-
struct _lpuart_transfer#
- #include <fsl_lpuart.h>
LPUART transfer structure.
Public Members
-
size_t dataSize#
The byte count to be transfer.
-
size_t dataSize#
-
struct _lpuart_handle#
- #include <fsl_lpuart.h>
LPUART handle structure.
Public Members
-
volatile size_t txDataSize#
Size of the remaining data to send.
-
size_t txDataSizeAll#
Size of the data to send out.
-
volatile size_t rxDataSize#
Size of the remaining data to receive.
-
size_t rxDataSizeAll#
Size of the data to receive.
-
size_t rxRingBufferSize#
Size of the ring buffer.
-
volatile uint16_t rxRingBufferHead#
Index for the driver to store received data into ring buffer.
-
volatile uint16_t rxRingBufferTail#
Index for the user to get data from the ring buffer.
-
lpuart_transfer_callback_t callback#
Callback function.
-
void *userData#
LPUART callback function parameter.
-
volatile uint8_t txState#
TX transfer state.
-
volatile uint8_t rxState#
RX transfer state.
-
bool isSevenDataBits#
Seven data bits flag.
-
bool is16bitData#
16bit data bits flag, only used for 9bit or 10bit data
-
volatile size_t txDataSize#
-
union __unnamed79__#
-
union __unnamed81__#
-
union __unnamed83__#
-
union __unnamed85__#
LPUART eDMA Driver#
-
void LPUART_TransferCreateHandleEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_edma_transfer_callback_t callback, void *userData, edma_handle_t *txEdmaHandle, edma_handle_t *rxEdmaHandle)#
Initializes the LPUART handle which is used in transactional functions.
Note
This function disables all LPUART interrupts.
- Parameters:
base – LPUART peripheral base address.
handle – Pointer to lpuart_edma_handle_t structure.
callback – Callback function.
userData – User data.
txEdmaHandle – User requested DMA handle for TX DMA transfer.
rxEdmaHandle – User requested DMA handle for RX DMA transfer.
-
status_t LPUART_SendEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_transfer_t *xfer)#
Sends data using eDMA.
This function sends data using eDMA. This is a non-blocking function, which returns right away. When all data is sent, the send callback function is called.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
xfer – LPUART eDMA transfer structure. See lpuart_transfer_t.
- Return values:
kStatus_Success – if succeed, others failed.
kStatus_LPUART_TxBusy – Previous transfer on going.
kStatus_InvalidArgument – Invalid argument.
-
status_t LPUART_ReceiveEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, lpuart_transfer_t *xfer)#
Receives data using eDMA.
This function receives data using eDMA. This is non-blocking function, which returns right away. When all data is received, the receive callback function is called.
- Parameters:
base – LPUART peripheral base address.
handle – Pointer to lpuart_edma_handle_t structure.
xfer – LPUART eDMA transfer structure, see lpuart_transfer_t.
- Return values:
kStatus_Success – if succeed, others fail.
kStatus_LPUART_RxBusy – Previous transfer ongoing.
kStatus_InvalidArgument – Invalid argument.
-
void LPUART_TransferAbortSendEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle)#
Aborts the sent data using eDMA.
This function aborts the sent data using eDMA.
- Parameters:
base – LPUART peripheral base address.
handle – Pointer to lpuart_edma_handle_t structure.
-
void LPUART_TransferAbortReceiveEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle)#
Aborts the received data using eDMA.
This function aborts the received data using eDMA.
- Parameters:
base – LPUART peripheral base address.
handle – Pointer to lpuart_edma_handle_t structure.
-
status_t LPUART_TransferGetSendCountEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, uint32_t *count)#
Gets the number of bytes written to the LPUART TX register.
This function gets the number of bytes written to the LPUART TX register by DMA.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
count – Send bytes count.
- Return values:
kStatus_NoTransferInProgress – No send in progress.
kStatus_InvalidArgument – Parameter is invalid.
kStatus_Success – Get successfully through the parameter
count;
-
status_t LPUART_TransferGetReceiveCountEDMA(LPUART_Type *base, lpuart_edma_handle_t *handle, uint32_t *count)#
Gets the number of received bytes.
This function gets the number of received bytes.
- Parameters:
base – LPUART peripheral base address.
handle – LPUART handle pointer.
count – Receive bytes count.
- Return values:
kStatus_NoTransferInProgress – No receive in progress.
kStatus_InvalidArgument – Parameter is invalid.
kStatus_Success – Get successfully through the parameter
count;
-
void LPUART_TransferEdmaHandleIRQ(LPUART_Type *base, void *lpuartEdmaHandle)#
LPUART eDMA IRQ handle function.
This function handles the LPUART tx complete IRQ request and invoke user callback. It is not set to static so that it can be used in user application.
Note
This function is used as default IRQ handler by double weak mechanism. If user’s specific IRQ handler is implemented, make sure this function is invoked in the handler.
- Parameters:
base – LPUART peripheral base address.
lpuartEdmaHandle – LPUART handle pointer.
-
FSL_LPUART_EDMA_DRIVER_VERSION#
LPUART EDMA driver version.
-
typedef struct _lpuart_edma_handle lpuart_edma_handle_t#
-
typedef void (*lpuart_edma_transfer_callback_t)(LPUART_Type *base, lpuart_edma_handle_t *handle, status_t status, void *userData)#
LPUART transfer callback function.
-
struct _lpuart_edma_handle#
- #include <fsl_lpuart_edma.h>
LPUART eDMA handle.
Public Members
-
lpuart_edma_transfer_callback_t callback#
Callback function.
-
void *userData#
LPUART callback function parameter.
-
size_t rxDataSizeAll#
Size of the data to receive.
-
size_t txDataSizeAll#
Size of the data to send out.
-
edma_handle_t *txEdmaHandle#
The eDMA TX channel used.
-
edma_handle_t *rxEdmaHandle#
The eDMA RX channel used.
-
uint8_t nbytes#
eDMA minor byte transfer count initially configured.
-
volatile uint8_t txState#
TX transfer state.
-
volatile uint8_t rxState#
RX transfer state
-
lpuart_edma_transfer_callback_t callback#
MCM Driver#
-
static inline void MCM_EnableInterrupts(MCM_Type *base, uint32_t mask)#
Enable MCM interrupt sources.
- Parameters:
base – MCM peripheral base.
mask – OR’ed mask of _mcm_interrupt_enable values.
-
static inline void MCM_DisableInterrupts(MCM_Type *base, uint32_t mask)#
Disable MCM interrupt sources.
- Parameters:
base – MCM peripheral base.
mask – OR’ed mask of _mcm_interrupt_enable values.
-
static inline uint32_t MCM_GetEnabledInterrupts(MCM_Type *base)#
Get the currently-enabled MCM interrupt sources.
- Parameters:
base – MCM peripheral base.
- Returns:
OR’ed mask of _mcm_interrupt_enable values currently enabled.
-
static inline uint32_t MCM_GetStatusFlags(MCM_Type *base)#
Get the asserted MCM status flags from ISCR.
The returned mask covers eight ISCR status bits with three different clear paths:
kMCM_StatusTcmWriteAbort (WABS): cleared via MCM_ClearTcmWriteAbort().
kMCM_StatusTcmWriteAbortOverrun (WABSO): auto-cleared by hardware when WABS clears.
kMCM_StatusFpuInvalidOp .. kMCM_StatusFpuInputDenom (FIOC..FIDC): read-only mirrors of FPSCR; clear by writing the matching bit in the core’s FPSCR.
- Parameters:
base – MCM peripheral base.
- Returns:
OR’ed mask of _mcm_status_flags currently asserted.
-
void MCM_ClearTcmWriteAbort(MCM_Type *base)#
Clear the TCM write-abort status.
Writes 1 to ISCR[WABS]; WABSO is auto-cleared by hardware. The FPU status bits cannot be cleared from MCM - clear the corresponding FPSCR bit instead.
- Parameters:
base – MCM peripheral base.
-
static inline uint32_t MCM_GetProcessFaultStateHigh(MCM_Type *base)#
Read the raw PFSHR register (FAULTSTAT[42:32]).
- Parameters:
base – MCM peripheral base.
- Returns:
Raw PFSHR value.
-
static inline uint32_t MCM_GetProcessFaultStateLow(MCM_Type *base)#
Read the raw PFSLR register (FAULTSTAT[31:0]).
- Parameters:
base – MCM peripheral base.
- Returns:
Raw PFSLR value.
-
void MCM_GetFaultStatus(MCM_Type *base, mcm_fault_status_t *status)#
Read and decode the process-fault state into a structure.
Reads PFSLR and PFSHR once and unpacks the fields. This is convenient when a non-CPU master (e.g. debugger) wants to inspect the CM85 fault state.
- Parameters:
base – MCM peripheral base.
status – Out: decoded fault status; must not be NULL.
-
static inline uint32_t MCM_GetCurrentPC(MCM_Type *base)#
Read the current program counter (CURRPC).
Returns the address of the instruction currently executing on the CM85 processor, or the address of the last instruction executed during exception entry / return. Bit 0 is always 0.
- Parameters:
base – MCM peripheral base.
- Returns:
32-bit instruction address.
-
FSL_MCM_DRIVER_VERSION#
MCM driver version 1.0.0.
MCM driver version.
-
FSL_MCM_DRIVER_VERSION
MCM driver version.
-
enum _mcm_interrupt_enable#
MCM ISCR interrupt-enable flags.
These flags can be OR’ed and passed to MCM_EnableInterrupts / MCM_DisableInterrupts. They live in the upper half of the ISCR register.
Values:
-
enumerator kMCM_IrqTcmWriteAbort#
TCM write abort interrupt enable.
-
enumerator kMCM_IrqFpuInvalidOp#
FPU invalid-operation interrupt enable.
-
enumerator kMCM_IrqFpuDivByZero#
FPU divide-by-zero interrupt enable.
-
enumerator kMCM_IrqFpuOverflow#
FPU overflow interrupt enable.
-
enumerator kMCM_IrqFpuUnderflow#
FPU underflow interrupt enable.
-
enumerator kMCM_IrqFpuInexact#
FPU inexact interrupt enable.
-
enumerator kMCM_IrqFpuInputDenom#
FPU input-denormal interrupt enable.
-
enumerator kMCM_IrqAll#
All ISCR enable bits.
-
enumerator kMCM_IrqTcmWriteAbort#
-
enum _mcm_status_flags#
MCM ISCR status flags (lower half of ISCR).
The FPU flags (FIOC..FIDC) mirror the corresponding bits in the core’s FPSCR and remain set until the matching FPSCR bit is cleared by software. WABS is the only software-clearable bit (W1C); WABSO is auto-cleared when WABS is cleared.
Values:
-
enumerator kMCM_StatusTcmWriteAbort#
TCM write-abort detected.
-
enumerator kMCM_StatusTcmWriteAbortOverrun#
TCM write-abort overrun.
-
enumerator kMCM_StatusFpuInvalidOp#
FPU invalid-operation.
-
enumerator kMCM_StatusFpuDivByZero#
FPU divide-by-zero.
-
enumerator kMCM_StatusFpuOverflow#
FPU overflow.
-
enumerator kMCM_StatusFpuUnderflow#
FPU underflow.
-
enumerator kMCM_StatusFpuInexact#
FPU inexact.
-
enumerator kMCM_StatusFpuInputDenom#
FPU input-denormal.
-
enumerator kMCM_StatusAll#
All ISCR status bits.
-
enumerator kMCM_StatusTcmWriteAbort#
Enum _mcm_interrupt_flag. Interrupt status flag mask. .
Values:
-
enumerator kMCM_CacheWriteBuffer#
Cache Write Buffer Error Enable.
-
enumerator kMCM_ParityError#
Cache Parity Error Enable.
-
enumerator kMCM_FPUInvalidOperation#
FPU Invalid Operation Interrupt Enable.
-
enumerator kMCM_FPUDivideByZero#
FPU Divide-by-zero Interrupt Enable.
-
enumerator kMCM_FPUOverflow#
FPU Overflow Interrupt Enable.
-
enumerator kMCM_FPUUnderflow#
FPU Underflow Interrupt Enable.
-
enumerator kMCM_FPUInexact#
FPU Inexact Interrupt Enable.
-
enumerator kMCM_FPUInputDenormalInterrupt#
FPU Input Denormal Interrupt Enable.
-
enumerator kMCM_CacheWriteBuffer#
-
typedef struct _mcm_fault_status mcm_fault_status_t#
Aggregated process-fault state read from PFSHR + PFSLR.
Mirrors the Cortex-M85 FAULTSTAT bus[42:0]: PFSLR holds bits [31:0] and PFSHR holds bits [42:32] arranged as follows:
PFSHR.HFSR_VECTTBL (bit 0) = FAULTSTAT[32]
PFSHR.HFSR_FORCED (bit 1) = FAULTSTAT[33]
PFSHR.HFSR_DEBUGEVT (bit 2) = FAULTSTAT[34]
PFSHR.SFSR (bits 10:3) = FAULTSTAT[42:35]
-
typedef union _mcm_buffer_fault_attribute mcm_buffer_fault_attribute_t#
The union of buffer fault attribute.
-
typedef union _mcm_lmem_fault_attribute mcm_lmem_fault_attribute_t#
The union of LMEM fault attribute.
-
static inline void MCM_EnableCrossbarRoundRobin(MCM_Type *base, bool enable)#
Enables/Disables crossbar round robin.
- Parameters:
base – MCM peripheral base address.
enable – Used to enable/disable crossbar round robin.
true Enable crossbar round robin.
false disable crossbar round robin.
-
static inline void MCM_EnableInterruptStatus(MCM_Type *base, uint32_t mask)#
Enables the interrupt.
- Parameters:
base – MCM peripheral base address.
mask – Interrupt status flags mask(_mcm_interrupt_flag).
-
static inline void MCM_DisableInterruptStatus(MCM_Type *base, uint32_t mask)#
Disables the interrupt.
- Parameters:
base – MCM peripheral base address.
mask – Interrupt status flags mask(_mcm_interrupt_flag).
-
static inline uint16_t MCM_GetInterruptStatus(MCM_Type *base)#
Gets the Interrupt status .
- Parameters:
base – MCM peripheral base address.
-
static inline void MCM_ClearCacheWriteBufferErroStatus(MCM_Type *base)#
Clears the Interrupt status .
- Parameters:
base – MCM peripheral base address.
-
static inline uint32_t MCM_GetBufferFaultAddress(MCM_Type *base)#
Gets buffer fault address.
- Parameters:
base – MCM peripheral base address.
-
static inline void MCM_GetBufferFaultAttribute(MCM_Type *base, mcm_buffer_fault_attribute_t *bufferfault)#
Gets buffer fault attributes.
- Parameters:
base – MCM peripheral base address.
bufferfault – Structure to store the result.
-
static inline uint32_t MCM_GetBufferFaultData(MCM_Type *base)#
Gets buffer fault data.
- Parameters:
base – MCM peripheral base address.
-
static inline void MCM_LimitCodeCachePeripheralWriteBuffering(MCM_Type *base, bool enable)#
Limit code cache peripheral write buffering.
- Parameters:
base – MCM peripheral base address.
enable – Used to enable/disable limit code cache peripheral write buffering.
true Enable limit code cache peripheral write buffering.
false disable limit code cache peripheral write buffering.
-
static inline void MCM_BypassFixedCodeCacheMap(MCM_Type *base, bool enable)#
Bypass fixed code cache map.
- Parameters:
base – MCM peripheral base address.
enable – Used to enable/disable bypass fixed code cache map.
true Enable bypass fixed code cache map.
false disable bypass fixed code cache map.
-
static inline void MCM_EnableCodeBusCache(MCM_Type *base, bool enable)#
Enables/Disables code bus cache.
- Parameters:
base – MCM peripheral base address.
enable – Used to disable/enable code bus cache.
true Enable code bus cache.
false disable code bus cache.
-
static inline void MCM_ForceCodeCacheToNoAllocation(MCM_Type *base, bool enable)#
Force code cache to no allocation.
- Parameters:
base – MCM peripheral base address.
enable – Used to force code cache to allocation or no allocation.
true Force code cache to no allocation.
false Force code cache to allocation.
-
static inline void MCM_EnableCodeCacheWriteBuffer(MCM_Type *base, bool enable)#
Enables/Disables code cache write buffer.
- Parameters:
base – MCM peripheral base address.
enable – Used to enable/disable code cache write buffer.
true Enable code cache write buffer.
false Disable code cache write buffer.
-
static inline void MCM_ClearCodeBusCache(MCM_Type *base)#
Clear code bus cache.
- Parameters:
base – MCM peripheral base address.
-
static inline void MCM_EnablePcParityFaultReport(MCM_Type *base, bool enable)#
Enables/Disables PC Parity Fault Report.
- Parameters:
base – MCM peripheral base address.
enable – Used to enable/disable PC Parity Fault Report.
true Enable PC Parity Fault Report.
false disable PC Parity Fault Report.
-
static inline void MCM_EnablePcParity(MCM_Type *base, bool enable)#
Enables/Disables PC Parity.
- Parameters:
base – MCM peripheral base address.
enable – Used to enable/disable PC Parity.
true Enable PC Parity.
false disable PC Parity.
-
static inline void MCM_LockConfigState(MCM_Type *base)#
Lock the configuration state.
- Parameters:
base – MCM peripheral base address.
-
static inline void MCM_EnableCacheParityReporting(MCM_Type *base, bool enable)#
Enables/Disables cache parity reporting.
- Parameters:
base – MCM peripheral base address.
enable – Used to enable/disable cache parity reporting.
true Enable cache parity reporting.
false disable cache parity reporting.
-
static inline uint32_t MCM_GetLmemFaultAddress(MCM_Type *base)#
Gets LMEM fault address.
- Parameters:
base – MCM peripheral base address.
-
static inline void MCM_GetLmemFaultAttribute(MCM_Type *base, mcm_lmem_fault_attribute_t *lmemFault)#
Get LMEM fault attributes.
- Parameters:
base – MCM peripheral base address.
lmemFault – Structure to store the result.
-
static inline uint64_t MCM_GetLmemFaultData(MCM_Type *base)#
Gets LMEM fault data.
- Parameters:
base – MCM peripheral base address.
-
MCM_LMFATR_TYPE_MASK#
-
MCM_LMFATR_MODE_MASK#
-
MCM_LMFATR_BUFF_MASK#
-
MCM_LMFATR_CACH_MASK#
-
MCM_ISCR_STAT_MASK#
-
FSL_COMPONENT_ID
-
struct _mcm_fault_status#
- #include <fsl_mcm.h>
Aggregated process-fault state read from PFSHR + PFSLR.
Mirrors the Cortex-M85 FAULTSTAT bus[42:0]: PFSLR holds bits [31:0] and PFSHR holds bits [42:32] arranged as follows:
PFSHR.HFSR_VECTTBL (bit 0) = FAULTSTAT[32]
PFSHR.HFSR_FORCED (bit 1) = FAULTSTAT[33]
PFSHR.HFSR_DEBUGEVT (bit 2) = FAULTSTAT[34]
PFSHR.SFSR (bits 10:3) = FAULTSTAT[42:35]
Public Members
-
uint8_t mmfsr#
Memory-Management Fault Status Register (FAULTSTAT[7:0]).
-
uint8_t bfsr#
Bus Fault Status Register (FAULTSTAT[15:8]).
-
uint16_t ufsr#
Usage Fault Status Register (FAULTSTAT[31:16]).
-
uint8_t sfsr#
Secure Fault Status Register (FAULTSTAT[42:35]).
-
bool hfsrVecttbl#
Hard fault vector-table read failure.
-
bool hfsrForced#
Hard fault forced.
-
bool hfsrDebugEvt#
Hard fault triggered by a debug event.
-
union _mcm_buffer_fault_attribute#
- #include <fsl_mcm.h>
The union of buffer fault attribute.
Public Members
-
uint32_t attribute#
Indicates the faulting attributes, when a properly-enabled cache write buffer error interrupt event is detected.
-
struct _mcm_buffer_fault_attribute._mcm_buffer_fault_attribut attribute_memory#
-
struct _mcm_buffer_fault_attribut#
Public Members
-
uint32_t busErrorDataAccessType#
Indicates the type of cache write buffer access.
-
uint32_t busErrorPrivilegeLevel#
Indicates the privilege level of the cache write buffer access.
-
uint32_t busErrorSize#
Indicates the size of the cache write buffer access.
-
uint32_t busErrorAccess#
Indicates the type of system bus access.
-
uint32_t busErrorMasterID#
Indicates the crossbar switch bus master number of the captured cache write buffer bus error.
-
uint32_t busErrorOverrun#
Indicates if another cache write buffer bus error is detected.
-
uint32_t busErrorDataAccessType#
-
uint32_t attribute#
-
union _mcm_lmem_fault_attribute#
- #include <fsl_mcm.h>
The union of LMEM fault attribute.
Public Members
-
uint32_t attribute#
Indicates the attributes of the LMEM fault detected.
-
struct _mcm_lmem_fault_attribute._mcm_lmem_fault_attribut attribute_memory#
-
struct _mcm_lmem_fault_attribut#
Public Members
-
uint32_t parityFaultProtectionSignal#
Indicates the features of parity fault protection signal.
-
uint32_t parityFaultMasterSize#
Indicates the parity fault master size.
-
uint32_t parityFaultWrite#
Indicates the parity fault is caused by read or write.
-
uint32_t backdoorAccess#
Indicates the LMEM access fault is initiated by core access or backdoor access.
-
uint32_t parityFaultSyndrome#
Indicates the parity fault syndrome.
-
uint32_t overrun#
Indicates the number of faultss.
-
uint32_t parityFaultProtectionSignal#
-
uint32_t attribute#
MEMCON Driver#
-
static inline uint32_t MEMCON_GLOBAL_GetVersion(MEMCON_GLOBAL_Type *base)#
Read the GLOBAL VERID register.
- Parameters:
base – MEMCON_GLOBAL peripheral base.
- Returns:
Raw VERID value.
-
void MEMCON_GLOBAL_SetAccessControl(MEMCON_GLOBAL_Type *base, const memcon_access_config_t *config)#
Configure GLOBAL access control (ACCCTRL).
- Parameters:
base – MEMCON_GLOBAL peripheral base.
config – Pointer to access-control configuration; must not be NULL.
-
static inline uint32_t MEMCON_GLOBAL_GetAccessControl(MEMCON_GLOBAL_Type *base)#
Read the raw GLOBAL ACCCTRL register.
- Parameters:
base – MEMCON_GLOBAL peripheral base.
- Returns:
Raw ACCCTRL value.
-
void MEMCON_GLOBAL_EnableFunctionClock(MEMCON_GLOBAL_Type *base, bool enable)#
Enable or disable the MEMCON function clock gate (FCEN).
SW must only configure to disabled when no work is active in PDCON / MEMCON. Warm reset always enables the clock.
- Parameters:
base – MEMCON_GLOBAL peripheral base.
enable – true: enable; false: gate the function clock.
-
static inline bool MEMCON_GLOBAL_IsFunctionClockEnabled(MEMCON_GLOBAL_Type *base)#
Check whether the GLOBAL function clock is enabled.
- Parameters:
base – MEMCON_GLOBAL peripheral base.
- Returns:
true if FCEN is set, false otherwise.
-
static inline uint32_t MEMCON_SLICE_GetVersion(MEMCON_SLICE_Type *base)#
Read the SLICE VERID register.
- Parameters:
base – MEMCON_SLICE peripheral base.
- Returns:
Raw VERID value.
-
void MEMCON_SLICE_SetAccessControl(MEMCON_SLICE_Type *base, const memcon_access_config_t *config)#
Configure SLICE access control (ACCCTRL).
Only the lower 4 bits of
config->domainMaskare written to DID.- Parameters:
base – MEMCON_SLICE peripheral base.
config – Pointer to access-control configuration; must not be NULL.
-
static inline uint32_t MEMCON_SLICE_GetAccessControl(MEMCON_SLICE_Type *base)#
Read the raw SLICE ACCCTRL register.
- Parameters:
base – MEMCON_SLICE peripheral base.
- Returns:
Raw ACCCTRL value.
-
void MEMCON_SLICE_SetTriggerMode(MEMCON_SLICE_Type *base, memcon_trigger_mode_t mode)#
Set the slice trigger mode (MDCTRL[TRGMODE]).
- Parameters:
base – MEMCON_SLICE peripheral base.
mode – See memcon_trigger_mode_t.
-
static inline memcon_trigger_mode_t MEMCON_SLICE_GetTriggerMode(MEMCON_SLICE_Type *base)#
Get the current trigger mode.
- Parameters:
base – MEMCON_SLICE peripheral base.
- Returns:
Current trigger mode.
-
void MEMCON_SLICE_SoftwareTrigger(MEMCON_SLICE_Type *base)#
Issue a software trigger (MDCTRL[SWTRG]) and wait until hardware clears it.
The trigger updates the memory power state to match MEM_RUNCFG0/1. Only valid when the trigger mode is Software or Hardware+Software.
- Parameters:
base – MEMCON_SLICE peripheral base.
-
static inline bool MEMCON_SLICE_IsSoftwareTriggerBusy(MEMCON_SLICE_Type *base)#
Check whether a previously-issued software trigger is still in progress.
- Parameters:
base – MEMCON_SLICE peripheral base.
- Returns:
true while SWTRG is still asserted, false once the update has completed.
-
void MEMCON_SLICE_SetSleepBlockMode(MEMCON_SLICE_Type *base, uint8_t blockIdx, memcon_power_mode_t mode)#
Set the low-power configuration of a single block (MEM_SLPCFGn[LPC_Bx]).
- Parameters:
base – MEMCON_SLICE peripheral base.
blockIdx – Block index 0..MEMCON_BLOCK_COUNT_PER_SLICE-1.
mode – Desired low-power mode.
-
memcon_power_mode_t MEMCON_SLICE_GetSleepBlockMode(MEMCON_SLICE_Type *base, uint8_t blockIdx)#
Get the low-power configuration of a single block.
- Parameters:
base – MEMCON_SLICE peripheral base.
blockIdx – Block index 0..MEMCON_BLOCK_COUNT_PER_SLICE-1.
- Returns:
Programmed low-power mode for the block.
-
void MEMCON_SLICE_SetActiveBlockMode(MEMCON_SLICE_Type *base, uint8_t blockIdx, memcon_power_mode_t mode)#
Set the active configuration of a single block (MEM_RUNCFGn[HPC_Bx]).
- Parameters:
base – MEMCON_SLICE peripheral base.
blockIdx – Block index 0..MEMCON_BLOCK_COUNT_PER_SLICE-1.
mode – Desired active-mode setting.
-
memcon_power_mode_t MEMCON_SLICE_GetActiveBlockMode(MEMCON_SLICE_Type *base, uint8_t blockIdx)#
Get the active configuration of a single block.
- Parameters:
base – MEMCON_SLICE peripheral base.
blockIdx – Block index 0..MEMCON_BLOCK_COUNT_PER_SLICE-1.
- Returns:
Programmed active mode for the block.
-
static inline void MEMCON_SLICE_SetSleepConfig(MEMCON_SLICE_Type *base, uint32_t cfg0, uint32_t cfg1)#
Bulk-write the SLICE low-power power-mode registers.
The two register values are written verbatim - callers should pre-pack the desired LPC_Bx fields. Bits in
cfg1are ignored on slices that do not implement MEM_SLPCFG1.- Parameters:
base – MEMCON_SLICE peripheral base.
cfg0 – Value for MEM_SLPCFG0 (blocks 0..7).
cfg1 – Value for MEM_SLPCFG1 (blocks 8..11), 0 if unused.
-
static inline void MEMCON_SLICE_SetActiveConfig(MEMCON_SLICE_Type *base, uint32_t cfg0, uint32_t cfg1)#
Bulk-write the SLICE active power-mode registers.
- Parameters:
base – MEMCON_SLICE peripheral base.
cfg0 – Value for MEM_RUNCFG0 (blocks 0..7).
cfg1 – Value for MEM_RUNCFG1 (blocks 8..11), 0 if unused.
-
static inline void MEMCON_SLICE_GetSleepConfig(MEMCON_SLICE_Type *base, uint32_t *cfg0, uint32_t *cfg1)#
Read the SLICE low-power register pair.
- Parameters:
base – MEMCON_SLICE peripheral base.
cfg0 – Out: raw MEM_SLPCFG0; may be NULL.
cfg1 – Out: raw MEM_SLPCFG1; may be NULL.
-
static inline void MEMCON_SLICE_GetActiveConfig(MEMCON_SLICE_Type *base, uint32_t *cfg0, uint32_t *cfg1)#
Read the SLICE active register pair.
- Parameters:
base – MEMCON_SLICE peripheral base.
cfg0 – Out: raw MEM_RUNCFG0; may be NULL.
cfg1 – Out: raw MEM_RUNCFG1; may be NULL.
-
FSL_MEMCON_DRIVER_VERSION#
MEMCON driver version 1.0.0.
-
enum _memcon_power_mode#
Per-block memory power mode shared by MEM_SLPCFGn and MEM_RUNCFGn.
Hardware only supports the transitions Active <-> Retention and Active <-> Power-down. Going directly between Retention and Power-down is not supported.
Values:
-
enumerator kMEMCON_PowerModeActive#
Active mode (full power).
-
enumerator kMEMCON_PowerModeRetention#
Retention mode (data preserved).
-
enumerator kMEMCON_PowerModePowerDown#
Power-down mode (data lost).
-
enumerator kMEMCON_PowerModeActive#
-
enum _memcon_trigger_mode#
Slice trigger-mode selection (MDCTRL[TRGMODE]).
Values:
-
enumerator kMEMCON_TriggerHardware#
Hardware (PDCON) only.
-
enumerator kMEMCON_TriggerSoftware#
Software only.
-
enumerator kMEMCON_TriggerBoth#
Hardware + software.
-
enumerator kMEMCON_TriggerHardware#
-
typedef enum _memcon_power_mode memcon_power_mode_t#
Per-block memory power mode shared by MEM_SLPCFGn and MEM_RUNCFGn.
Hardware only supports the transitions Active <-> Retention and Active <-> Power-down. Going directly between Retention and Power-down is not supported.
-
typedef enum _memcon_trigger_mode memcon_trigger_mode_t#
Slice trigger-mode selection (MDCTRL[TRGMODE]).
-
typedef struct _memcon_access_config memcon_access_config_t#
Access-control configuration for either the GLOBAL or SLICE block.
The GLOBAL ACCCTRL has a 16-bit DID; the SLICE ACCCTRL has a 4-bit DID. Bits beyond each register’s width are ignored automatically.
-
MEMCON_BLOCK_COUNT_PER_SLICE#
Maximum number of memory blocks addressable per MEMCON slice (B0..B11).
-
MEMCON_BLOCKS_IN_CFG0#
Number of blocks held in the *_CFG0 register (B0..B7).
-
MEMCON_BLOCK_FIELD_MASK#
2-bit power-mode field width inside a 4-bit nibble per block.
-
MEMCON_BLOCK_FIELD_STRIDE#
Distance (in bits) between two consecutive block fields.
-
MEMCON_SLICE_DID_LIMIT#
Exclusive upper bound for SLICE ACCCTRL.DID mask values (4-bit field, 0..15).
-
struct _memcon_access_config#
- #include <fsl_memcon.h>
Access-control configuration for either the GLOBAL or SLICE block.
The GLOBAL ACCCTRL has a 16-bit DID; the SLICE ACCCTRL has a 4-bit DID. Bits beyond each register’s width are ignored automatically.
MEMORY Driver#
MIPI_DSI: MIPI DSI Host Controller#
-
static inline void DSI_EnableHostInterrupts(const MIPI_DSI_Type *base, uint32_t interrupt)#
Enable the DSI host interrupts.
The interrupts to enable are passed in as OR’ed value of _dsi_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
interrupt – Interrupts to enable.
-
static inline void DSI_DisableHostInterrupts(const MIPI_DSI_Type *base, uint32_t interrupt)#
Disable the DSI host interrupts.
The interrupts to disable are passed in as OR’ed value of _dsi_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
interrupt – Interrupts to disable.
-
static inline uint32_t DSI_GetHostInterruptStatus(const MIPI_DSI_Type *base)#
Get the DSI host interrupt.
The host status are returned as OR’ed value of _dsi_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
- Returns:
The DSI host interrupt status.
-
static inline void DSI_ClearHostInterruptStatus(const MIPI_DSI_Type *base, uint32_t status)#
Clear the DSI host interrupt.
Clear the status of the host interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
status – The status to clear as OR’ed value of _dsi_interrupt.
-
static inline void DSI_EnableDpiInterrupts(const MIPI_DSI_Type *base, uint32_t interrupt)#
Enable the DSI DPI interrupts.
The interrupts to enable are passed in as OR’ed value of _dsi_dpi_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
interrupt – Interrupts to enable.
-
static inline void DSI_DisableDpiInterrupts(const MIPI_DSI_Type *base, uint32_t interrupt)#
Disable the DSI DPI interrupts.
The interrupts to disable are passed in as OR’ed value of _dsi_dpi_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
interrupt – Interrupts to disable.
-
static inline uint32_t DSI_GetDpiInterruptStatus(const MIPI_DSI_Type *base)#
Get the DSI DPI interrupt.
The host status are returned as OR’ed value of _dsi_dpi_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
- Returns:
The DSI host interrupt status.
-
static inline void DSI_ClearDpiInterruptStatus(const MIPI_DSI_Type *base, uint32_t status)#
Clear the DSI DPI interrupt.
Clear the status of the host interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
status – The status to clear as OR’ed value of _dsi_dpi_interrupt.
-
static inline void DSI_EnableApbInterrupts(const MIPI_DSI_Type *base, uint32_t interrupt)#
Enable the DSI APB interrupts.
The interrupts to enable are passed in as OR’ed value of _dsi_apb_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
interrupt – Interrupts to enable.
-
static inline void DSI_DisableApbInterrupts(const MIPI_DSI_Type *base, uint32_t interrupt)#
Disable the DSI APB interrupts.
The interrupts to disable are passed in as OR’ed value of _dsi_apb_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
interrupt – Interrupts to disable.
-
static inline uint32_t DSI_GetApbInterruptStatus(const MIPI_DSI_Type *base)#
Get the DSI APB interrupt.
The host status are returned as OR’ed value of _dsi_apb_interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
- Returns:
The DSI APB interrupt status.
-
static inline void DSI_ClearApbInterruptStatus(const MIPI_DSI_Type *base, uint32_t status)#
Clear the DSI APB interrupt.
Clear the status of the host interrupt.
- Parameters:
base – MIPI DSI peripheral base address.
status – The status to clear as OR’ed value of _dsi_apb_interrupt.
-
void DSI_Init(const MIPI_DSI_Type *base, const dsi_config_t *config)#
Initializes an MIPI DSI with the user configuration.
This function initializes the MIPI DSI with the configuration, it should be called first before other MIPI DSI driver functions.
- Parameters:
base – MIPI DSI peripheral base address.
config – Pointer to a user-defined configuration structure.
-
void DSI_Deinit(const MIPI_DSI_Type *base)#
Deinitializes an MIPI DSI.
This function should be called after all bother MIPI DSI driver functions.
- Parameters:
base – MIPI DSI peripheral base address.
-
void DSI_GetDefaultConfig(dsi_config_t *config)#
Get the default configuration to initialize the MIPI DSI.
The default value is:
config->enable = true; config->numLanes = 2; config->ppiWidth = kDSI_Ppi8Bit; config->enableContinuousHsClk = true; config->autoInsertEoTp = true; config->disableBurst = false; config->disableCrcCheck = false; config->enableScramble = false; config->enableWatchdog = false; config->htxTo_ByteClk = 0; config->lrxHostTo_ByteClk = 0; config->btaTo_ByteClk = 0;
- Parameters:
config – Pointer to a user-defined configuration structure.
-
void DSI_SetDpiConfig(const MIPI_DSI_Type *base, const dsi_dpi_config_t *config)#
Configure the DPI interface core.
This function sets the DPI interface configuration, it should be used in video mode.
- Parameters:
base – MIPI DSI peripheral base address.
config – Pointer to the DPI interface configuration.
-
static inline void DSI_SetDbiPixelFifoSendLevel(MIPI_DSI_Type *base, uint16_t sendLevel)#
Configure the DBI pixel FIFO send level.
This controls the level at which the DBI Host bridge begins sending pixels
- Parameters:
base – MIPI DSI peripheral base address.
sendLevel – Send level value set to register.
-
static inline void DSI_SetDbiPixelPayloadSize(MIPI_DSI_Type *base, uint16_t payloadSize)#
Configure the DBI pixel payload size.
Configures maximum number of pixels that should be sent as one DSI packet. Recommended to be evenly divisible by the line size (in pixels).
- Parameters:
base – MIPI DSI peripheral base address.
payloadSize – Payload size value set to register.
-
static inline uint32_t DSI_GetDbiHostStatus(MIPI_DSI_Type *base)#
Get the DBI host status.
- Parameters:
base – MIPI DSI peripheral base address.
- Returns:
The DBI host status, OR’ed value of _dsi_dbi_status.
-
void DSI_SetDbiConfig(const MIPI_DSI_Type *base, const dsi_dbi_config_t *config)#
Configure the DBI interface core.
This function sets the DBI interface configuration.
- Parameters:
base – MIPI DSI peripheral base address.
config – Pointer to the DBI interface configuration.
-
uint32_t DSI_InitDphy(const MIPI_DSI_Type *base, const dsi_dphy_config_t *config, uint32_t refClkFreq_Hz)#
Initializes the D-PHY.
This function configures the D-PHY timing and setups the D-PHY PLL based on user configuration. The configuration structure could be got by the function DSI_GetDphyDefaultConfig.
For some platforms there is not dedicated D-PHY PLL, indicated by the macro FSL_FEATURE_MIPI_DSI_NO_DPHY_PLL. For these platforms, the
refClkFreq_Hzis useless.- Parameters:
base – MIPI DSI peripheral base address.
config – Pointer to the D-PHY configuration.
refClkFreq_Hz – The REFCLK frequency in Hz.
- Returns:
The actual D-PHY PLL output frequency. If could not configure the PLL to the target frequency, the return value is 0.
-
void DSI_DeinitDphy(const MIPI_DSI_Type *base)#
Deinitializes the D-PHY.
Power down the D-PHY PLL and shut down D-PHY.
- Parameters:
base – MIPI DSI peripheral base address.
-
void DSI_GetDphyDefaultConfig(dsi_dphy_config_t *config, uint32_t txHsBitClk_Hz, uint32_t txEscClk_Hz, uint32_t rxEscClk_Hz)#
Get the default D-PHY configuration.
Gets the default D-PHY configuration, the timing parameters are set according to D-PHY specification. User could use the configuration directly, or change some parameters according to the special device.
- Parameters:
config – Pointer to the D-PHY configuration.
txHsBitClk_Hz – High speed bit clock in Hz.
txEscClk_Hz – tx Esc clock in Hz.
rxEscClk_Hz – rx Esc clock in Hz.
-
static inline uint32_t DSI_GetRxErrorStatus(const MIPI_DSI_Type *base)#
Get the receive error status during data transfer.
The return value is OR’ed value of _dsi_rx_error_status.
- Parameters:
base – MIPI DSI peripheral base address.
- Returns:
The error status.
-
void DSI_SetApbPacketControl(const MIPI_DSI_Type *base, uint16_t wordCount, uint8_t virtualChannel, dsi_tx_data_type_t dataType, uint8_t flags)#
Configure the APB packet to send.
This function configures the next APB packet transfer. After configuration, the packet transfer could be started with function DSI_SendApbPacket. If the packet is long packet, Use DSI_WriteApbTxPayload to fill the payload before start transfer.
- Parameters:
base – MIPI DSI peripheral base address.
wordCount – For long packet, this is the byte count of the payload. For short packet, this is (data1 << 8) | data0.
virtualChannel – Virtual channel.
dataType – The packet data type, (DI).
flags – The transfer control flags, see _dsi_transfer_flags.
-
void DSI_WriteApbTxPayload(const MIPI_DSI_Type *base, const uint8_t *payload, uint16_t payloadSize)#
Fill the long APB packet payload.
Write the long packet payload to TX FIFO.
- Parameters:
base – MIPI DSI peripheral base address.
payload – Pointer to the payload.
payloadSize – Payload size in byte.
-
void DSI_WriteApbTxPayloadExt(const MIPI_DSI_Type *base, const uint8_t *payload, uint16_t payloadSize, bool sendDcsCmd, uint8_t dcsCmd)#
Extended function to fill the payload to TX FIFO.
Write the long packet payload to TX FIFO. This function could be used in two ways
Include the DCS command in parameter
payload. In this case, the DCS command is the first byte ofpayload. The parametersendDcsCmdis set to false, thedcsCmdis not used. This function is the same as DSI_WriteApbTxPayload when used in this way.The DCS command in not in parameter
payload, but specified by parameterdcsCmd. In this case, the parametersendDcsCmdis set to true, thedcsCmdis the DCS command to send. Thepayloadis sent afterdcsCmd.
- Parameters:
base – MIPI DSI peripheral base address.
payload – Pointer to the payload.
payloadSize – Payload size in byte.
sendDcsCmd – If set to true, the DCS command is specified by
dcsCmd, otherwise the DCS command is included in thepayload.dcsCmd – The DCS command to send, only used when
sendDcsCmdis true.
-
void DSI_ReadApbRxPayload(const MIPI_DSI_Type *base, uint8_t *payload, uint16_t payloadSize)#
Read the long APB packet payload.
Read the long packet payload from RX FIFO. This function reads directly but does not check the RX FIFO status. Upper layer should make sure there are available data.
- Parameters:
base – MIPI DSI peripheral base address.
payload – Pointer to the payload.
payloadSize – Payload size in byte.
-
static inline void DSI_SendApbPacket(const MIPI_DSI_Type *base)#
Trigger the controller to send out APB packet.
Send the packet set by DSI_SetApbPacketControl.
- Parameters:
base – MIPI DSI peripheral base address.
-
static inline uint8_t DSI_GetEccRxErrorPosition(uint32_t rxErrorStatus)#
Get the one-bit RX ECC error position.
When one-bit ECC RX error detected using DSI_GetRxErrorStatus, this function could be used to get the error bit position.
uint8_t eccErrorPos; uint32_t rxErrorStatus = DSI_GetRxErrorStatus(MIPI_DSI); if (kDSI_RxErrorEccOneBit & rxErrorStatus) { eccErrorPos = DSI_GetEccRxErrorPosition(rxErrorStatus); }
- Parameters:
rxErrorStatus – The error status returned by DSI_GetRxErrorStatus.
- Returns:
The 1-bit ECC error position.
-
static inline uint32_t DSI_GetRxPacketHeader(const MIPI_DSI_Type *base)#
Get the RX packet header.
- Parameters:
base – MIPI DSI peripheral base address.
- Returns:
The RX packet header.
-
static inline dsi_rx_data_type_t DSI_GetRxPacketType(uint32_t rxPktHeader)#
Extract the RX packet type from the packet header.
Extract the RX packet type from the packet header get by DSI_GetRxPacketHeader.
- Parameters:
rxPktHeader – The RX packet header get by DSI_GetRxPacketHeader.
- Returns:
The RX packet type.
-
static inline uint16_t DSI_GetRxPacketWordCount(uint32_t rxPktHeader)#
Extract the RX packet word count from the packet header.
Extract the RX packet word count from the packet header get by DSI_GetRxPacketHeader.
- Parameters:
rxPktHeader – The RX packet header get by DSI_GetRxPacketHeader.
- Returns:
For long packet, return the payload word count (byte). For short packet, return the (data0 << 8) | data1.
-
static inline uint8_t DSI_GetRxPacketVirtualChannel(uint32_t rxPktHeader)#
Extract the RX packet virtual channel from the packet header.
Extract the RX packet virtual channel from the packet header get by DSI_GetRxPacketHeader.
- Parameters:
rxPktHeader – The RX packet header get by DSI_GetRxPacketHeader.
- Returns:
The virtual channel.
-
status_t DSI_TransferBlocking(const MIPI_DSI_Type *base, dsi_transfer_t *xfer)#
APB data transfer using blocking method.
Perform APB data transfer using blocking method. This function waits until all data send or received, or timeout happens.
When using this API to read data, the actually read data count could be got from xfer->rxDataSize.
- Parameters:
base – MIPI DSI peripheral base address.
xfer – Pointer to the transfer structure.
- Return values:
kStatus_Success – Data transfer finished with no error.
kStatus_Timeout – Transfer failed because of timeout.
kStatus_DSI_RxDataError – RX data error, user could use DSI_GetRxErrorStatus to check the error details.
kStatus_DSI_ErrorReportReceived – Error Report packet received, user could use DSI_GetAndClearHostStatus to check the error report status.
kStatus_DSI_NotSupported – Transfer format not supported.
kStatus_DSI_Invalid – The transmission is invalid.
kStatus_Fail – Transfer failed for other reasons.
-
status_t DSI_TransferCreateHandle(const MIPI_DSI_Type *base, dsi_handle_t *handle, dsi_callback_t callback, void *userData)#
Create the MIPI DSI handle.
This function initializes the MIPI DSI handle which can be used for other transactional APIs.
- Parameters:
base – MIPI DSI peripheral base address.
handle – Handle pointer.
callback – Callback function.
userData – User data.
-
status_t DSI_TransferNonBlocking(const MIPI_DSI_Type *base, dsi_handle_t *handle, dsi_transfer_t *xfer)#
APB data transfer using interrupt method.
Perform APB data transfer using interrupt method, when transfer finished, upper layer could be informed through callback function.
When using this API to read data, the actually read data count could be got from handle->xfer->rxDataSize after read finished.
- Parameters:
base – MIPI DSI peripheral base address.
handle – pointer to dsi_handle_t structure which stores the transfer state.
xfer – Pointer to the transfer structure.
- Return values:
kStatus_Success – Data transfer started successfully.
kStatus_DSI_Busy – Failed to start transfer because DSI is busy with pervious transfer.
kStatus_DSI_NotSupported – Transfer format not supported.
-
void DSI_TransferAbort(const MIPI_DSI_Type *base, dsi_handle_t *handle)#
Abort current APB data transfer.
- Parameters:
base – MIPI DSI peripheral base address.
handle – pointer to dsi_handle_t structure which stores the transfer state.
-
void DSI_TransferHandleIRQ(const MIPI_DSI_Type *base, dsi_handle_t *handle)#
Interrupt handler for the DSI.
- Parameters:
base – MIPI DSI peripheral base address.
handle – pointer to dsi_handle_t structure which stores the transfer state.
-
FSL_MIPI_DSI_DRIVER_VERSION#
Error codes for the MIPI DSI driver.
Values:
-
enumerator kStatus_DSI_Busy#
DSI is busy.
-
enumerator kStatus_DSI_RxDataError#
Read data error.
-
enumerator kStatus_DSI_ErrorReportReceived#
Error report package received.
-
enumerator kStatus_DSI_NotSupported#
The transfer type not supported.
-
enumerator kStatus_DSI_Invalid#
Invalid transmission.
-
enumerator kStatus_DSI_Busy#
_dsi_rx_error_status Host receive error status.
Values:
-
enumerator kDSI_RxErrorEccOneBit#
ECC single bit error detected.
-
enumerator kDSI_RxErrorEccMultiBit#
ECC multi bit error detected.
-
enumerator kDSI_RxErrorCrc#
CRC error detected.
-
enumerator kDSI_RxErrorHtxTo#
High Speed forward TX timeout detected.
-
enumerator kDSI_RxErrorLrxTo#
Reverse Low power data receive timeout detected.
-
enumerator kDSI_RxErrorBtaTo#
BTA timeout detected.
-
enumerator kDSI_RxErrorEccOneBit#
-
enum _dsi_interrupt#
DSI host controller interrupt status.
Values:
-
enumerator kDSI_HostSoTError#
SoT error from peripheral error report.
-
enumerator kDSI_HostSoTSyncError#
SoT Sync error from peripheral error report.
-
enumerator kDSI_HostEoTSyncError#
EoT Sync error from peripheral error report.
-
enumerator kDSI_HostEscEntryCmdError#
Escape Mode Entry Command Error from peripheral error report.
-
enumerator kDSI_HostLpTxSyncError#
Low-power transmit Sync Error from peripheral error report.
-
enumerator kDSI_HostPeriphToError#
Peripheral timeout error from peripheral error report.
-
enumerator kDSI_HostFalseControlError#
False control error from peripheral error report.
-
enumerator kDSI_HostContentionError#
Contention detected from peripheral error report.
-
enumerator kDSI_HostEccOneBitError#
Single bit ECC error (corrected) from peripheral error report.
-
enumerator kDSI_HostEccMultiBitError#
Multi bit ECC error (not corrected) from peripheral error report.
-
enumerator kDSI_HostCrcError#
Checksum error from peripheral error report.
-
enumerator kDSI_HostInvalidDataTypeError#
DSI data type not recognized.
-
enumerator kDSI_HostInvalidVcIdError#
DSI VC ID invalid.
-
enumerator kDSI_HostInvalidTxLengthError#
Invalid transmission length.
-
enumerator kDSI_HostProtocolViolationError#
DSI protocol violation.
-
enumerator kDSI_HostResetTriggerReceived#
Reset trigger received.
-
enumerator kDSI_HostTearTriggerReceived#
Tear effect trigger receive.
-
enumerator kDSI_HostAckTriggerReceived#
Acknowledge trigger message received.
-
enumerator kDSI_HostTearFailTriggerReceived#
Tear effect fail trigger receive.
-
enumerator kDSI_HostReadEccOneBit#
ECC single bit error detected.
-
enumerator kDSI_HostReadEccMultiBit#
ECC multi bit error detected.
-
enumerator kDSI_HostReadCrc#
CRC error detected.
-
enumerator kDSI_HostIrqRegParityError#
IRQ register parity error.
-
enumerator kDSI_HostSoTError#
-
enum _dsi_ppi_width#
MIPI DSI PPI width.
Values:
-
enumerator kDSI_Ppi8Bit#
PPI data width is 8-bit.
-
enumerator kDSI_Ppi16Bit#
PPI data width is 16-bit. Must use 16-bit for C-PHY support
-
enumerator kDSI_Ppi8Bit#
-
enum _dsi_dpi_interrupt#
DPI interrupt status.
Values:
-
enumerator kDSI_DpiFifoUnderflow#
DPI Host FIFO underflow error
-
enumerator kDSI_DpiFifoOverflow#
DPI Host FIFO overflow error
-
enumerator kDSI_DpiSyncWhenActive#
Sync When Video Active Error.
-
enumerator kDSI_DpiSyncPulseError#
Sync Pulse Error.
-
enumerator kDSI_DpiFifoUnderflow#
-
enum _dsi_dpi_pixel_packet#
MIPI DSI pixel packet type send through DPI interface.
Values:
-
enumerator kDSI_DpiPixelPacketCompressed#
Compressed.
-
enumerator kDSI_DpiPixelPacket20BitYCbCr#
20 bit YCbCr, 6 bytes per 2 pixels.
-
enumerator kDSI_DpiPixelPacket24BitYCbCr#
24 bit YCbCr, 6 bytes per 2 pixels.
-
enumerator kDSI_DpiPixelPacket16BitYCbCr#
16 bit YCbCr, 4 bytes per 2 pixels.
-
enumerator kDSI_DpiPixelPacket30Bit#
30 bit RGB10_10_10.
-
enumerator kDSI_DpiPixelPacket36Bit#
36 bit RGB12_12_12.
-
enumerator kDSI_DpiPixelPacket12BitYCbCr#
12 bit YCbCr, 3 bytes per 2 pixels.
-
enumerator kDSI_DpiPixelPacket16Bit#
16 bit RGB565, 2 bytes per pixel.
-
enumerator kDSI_DpiPixelPacket18Bit#
18 bit RGB666 packed.
-
enumerator kDSI_DpiPixelPacket18BitLoosely#
18 bit RGB666, one pixel loosely packed into three bytes.
-
enumerator kDSI_DpiPixelPacket24Bit#
24 bit RGB888, three bytes per pixel.
-
enumerator kDSI_DpiPixelPacketCompressed#
-
enum _dsi_dpi_extrenal_packet#
Mask to allow DPI external packet in which part of the frame.
Values:
-
enumerator kDSI_DpiExternalVsw#
External packets are allowed during vertical sync.
-
enumerator kDSI_DpiExternalVbp#
External packets are allowed during vertical back porch.
-
enumerator kDSI_DpiExternalVactive#
External packets are allowed during active video lines.
-
enumerator kDSI_DpiExternalVfp#
External packets are allowed during vertical front porch.
-
enumerator kDSI_DpiExternalVsw#
-
enum _dsi_dpi_video_mode#
DPI video mode.
Values:
-
enumerator kDSI_DpiNonBurstWithSyncPulse#
Non-Burst mode with Sync Pulses.
-
enumerator kDSI_DpiNonBurstWithSyncEvent#
Non-Burst mode with Sync Events.
-
enumerator kDSI_DpiBurst#
Burst mode.
-
enumerator kDSI_DpiNonBurstWithSyncPulse#
-
enum _dsi_dpi_polarity_flag#
DPI signal polarity.
Values:
-
enumerator kDSI_DpiHsyncActiveLow#
HSYNC active low.
-
enumerator kDSI_DpiVsyncActiveLow#
VSYNC active low.
-
enumerator kDSI_DpiHsyncActiveHigh#
HSYNC active high.
-
enumerator kDSI_DpiVsyncActiveHigh#
VSYNC active high.
-
enumerator kDSI_DpiHsyncActiveLow#
-
enum _dsi_dpi_bllp_mode#
Behavior in BLLP (Blanking or Low-Power Interval).
Values:
-
enumerator kDSI_DpiBllpBlanking#
Blanking packet used in BLLP periods.
-
enumerator kDSI_DpiBllpNull#
Null packet used in BLLP periods.
-
enumerator kDSI_DpiBllpVerticalLowPower#
LP mode is used in vertical BLLP periods.
-
enumerator kDSI_DpiBllpHorizontalLowPower#
LP mode is used in horizontal BLLP periods.
-
enumerator kDSI_DpiBllpBlanking#
-
enum _dsi_dbi_status#
DBI status.
Values:
-
enumerator kDSI_DbiFifoUnderflow#
DBI Host FIFO underflow error
-
enumerator kDSI_DbiFifoOverflow#
DBI Host FIFO overflow error
-
enumerator kDSI_DbiFifoUnderflow#
-
enum _dsi_dbi_pixel_format#
DBI pixel format.
Values:
-
enumerator kDSI_DbiNoMapping#
No pixel to bit mapping.
-
enumerator kDSI_DbiRGB888#
Send data to interface as RGB888 format.
-
enumerator kDSI_DbiRGB666#
Send data to interface as RGB666 format.
-
enumerator kDSI_DbiRGB565#
Send data to interface as RGB565 format.
-
enumerator kDSI_DbiRGB444#
Send data to interface as RGB444 format.
-
enumerator kDSI_DbiRGB332#
Send data to interface as RGB332 format.
-
enumerator kDSI_DbiNoMapping#
-
enum _dsi_apb_interrupt#
DSI APB interrupt status.
Values:
-
enumerator kDSI_ApbNotIdle#
State machine not idle
-
enumerator kDSI_ApbTxDone#
Tx packet done
-
enumerator kDSI_ApbRxControl#
DPHY direction 0 - tx had control, 1 - rx has control
-
enumerator kDSI_ApbTxOverflow#
TX fifo overflow
-
enumerator kDSI_ApbTxUnderflow#
TX fifo underflow
-
enumerator kDSI_ApbRxOverflow#
RX fifo overflow
-
enumerator kDSI_ApbRxUnderflow#
RX fifo underflow
-
enumerator kDSI_ApbRxHeaderReceived#
RX packet header has been received
-
enumerator kDSI_ApbRxPacketReceived#
All RX packet payload data has been received
-
enumerator kDSI_ApbBtaTo#
BTA timeout
-
enumerator kDSI_ApbLrxTo#
Low power receive timeout
-
enumerator kDSI_ApbHtxTo#
High speed transmit timeout
-
enumerator kDSI_ApbParityError#
Parity error
-
enumerator kDSI_ApbNotIdle#
-
enum _dsi_tx_data_type#
DSI TX data type.
Values:
-
enumerator kDSI_TxDataVsyncStart#
V Sync start.
-
enumerator kDSI_TxDataVsyncEnd#
V Sync end.
-
enumerator kDSI_TxDataHsyncStart#
H Sync start.
-
enumerator kDSI_TxDataHsyncEnd#
H Sync end.
-
enumerator kDSI_TxDataCompressionMode#
Compression Mode Command.
-
enumerator kDSI_TxDataEoTp#
End of transmission packet.
-
enumerator kDSI_TxDataCmOff#
Color mode off.
-
enumerator kDSI_TxDataCmOn#
Color mode on.
-
enumerator kDSI_TxDataShutDownPeriph#
Shut down peripheral.
-
enumerator kDSI_TxDataTurnOnPeriph#
Turn on peripheral.
-
enumerator kDSI_TxDataGenShortWrNoParam#
Generic Short WRITE, no parameters.
-
enumerator kDSI_TxDataGenShortWrOneParam#
Generic Short WRITE, one parameter.
-
enumerator kDSI_TxDataGenShortWrTwoParam#
Generic Short WRITE, two parameter.
-
enumerator kDSI_TxDataGenShortRdNoParam#
Generic Short READ, no parameters.
-
enumerator kDSI_TxDataGenShortRdOneParam#
Generic Short READ, one parameter.
-
enumerator kDSI_TxDataGenShortRdTwoParam#
Generic Short READ, two parameter.
-
enumerator kDSI_TxDataDcsShortWrNoParam#
DCS Short WRITE, no parameters.
-
enumerator kDSI_TxDataDcsShortWrOneParam#
DCS Short WRITE, one parameter.
-
enumerator kDSI_TxDataDcsShortRdNoParam#
DCS Short READ, no parameters.
-
enumerator kDSI_TxDataExecuteQueue#
Execute Queue.
-
enumerator kDSI_TxDataSetMaxReturnPktSize#
Set the Maximum Return Packet Size.
-
enumerator kDSI_TxDataScramblingMode#
Scrambling Mode Command.
-
enumerator kDSI_TxDataNull#
Null Packet, no data.
-
enumerator kDSI_TxDataBlanking#
Blanking Packet, no data.
-
enumerator kDSI_TxDataGenLongWr#
Generic long write.
-
enumerator kDSI_TxDataDcsLongWr#
DCS Long Write/write_LUT Command Packet.
-
enumerator kDSI_TxDataPictureParameterSet#
Picture Parameter Set.
-
enumerator kDSI_TxDataServiceExtensions#
Service Extensions Packet (SEP).
-
enumerator kDSI_TxDataPhysicalEventNotification#
Physical Event Notification Packet (PENP).
-
enumerator kDSI_TxDataCompressedPixel#
Compressed Pixel Stream.
-
enumerator kDSI_TxDataLooselyPackedPixel20BitYCbCr#
Loosely Packed Pixel Stream, 20-bit YCbCr, 4:2:2 Format.
-
enumerator kDSI_TxDataPackedPixel24BitYCbCr#
Packed Pixel Stream, 24-bit YCbCr, 4:2:2 Format.
-
enumerator kDSI_TxDataPackedPixel16BitYCbCr#
Packed Pixel Stream, 16-bit YCbCr, 4:2:2 Format.
-
enumerator kDSI_TxDataPackedPixel20BitYCbCr#
Packed Pixel Stream, 20-bit YCbCr, 4:2:2 Format.
-
enumerator kDSI_TxDataPackedPixel30BitRGB#
Packed Pixel Stream, 30-bit RGB, 10-10-10 Format.
-
enumerator kDSI_TxDataPackedPixel36BitRGB#
Packed Pixel Stream, 36-bit RGB, 12-12-12 Format.
-
enumerator kDSI_TxDataPackedPixel48BitRGB#
Packed Pixel Stream, 48-bit RGB, 16-16-16 Format.
-
enumerator kDSI_TxDataPackedPixel12BitYCrCb#
Packed Pixel Stream, 12-bit YCbCr, 4:2:0 Format.
-
enumerator kDSI_TxDataPackedPixel16BitRGB#
Packed Pixel Stream, 16-bit RGB, 5-6-5 Format.
-
enumerator kDSI_TxDataPackedPixel18BitRGB#
Packed Pixel Stream, 18-bit RGB, 6-6-6 Format.
-
enumerator kDSI_TxDataLooselyPackedPixel18BitRGB#
Loosely Packed Pixel Stream, 18-bit RGB, 6-6-6 Format.
-
enumerator kDSI_TxDataPackedPixel24BitRGB#
Packed Pixel Stream, 24-bit RGB, 8-8-8 Format.
-
enumerator kDSI_TxDataVsyncStart#
-
enum _dsi_rx_data_type#
DSI RX data type.
Values:
-
enumerator kDSI_RxDataAckAndErrorReport#
Acknowledge and Error Report
-
enumerator kDSI_RxDataEoTp#
End of Transmission packet.
-
enumerator kDSI_RxDataGenShortRdResponseOneByte#
Generic Short READ Response, 1 byte returned.
-
enumerator kDSI_RxDataGenShortRdResponseTwoByte#
Generic Short READ Response, 2 byte returned.
-
enumerator kDSI_RxDataGenLongRdResponse#
Generic Long READ Response.
-
enumerator kDSI_RxDataDcsLongRdResponse#
DCS Long READ Response.
-
enumerator kDSI_RxDataDcsShortRdResponseOneByte#
DCS Short READ Response, 1 byte returned.
-
enumerator kDSI_RxDataDcsShortRdResponseTwoByte#
DCS Short READ Response, 2 byte returned.
-
enumerator kDSI_RxDataServiceExtensions#
Service Extensions Packet (SEP).
-
enumerator kDSI_RxDataPhysicalEventNotification#
Physical Event Notification Packet (PENP).
-
enumerator kDSI_RxDataAckAndErrorReport#
-
enum _dsi_transfer_flags#
DSI transfer control flags.
Values:
-
enumerator kDSI_TransferUseHighSpeed#
Use high speed mode or not.
-
enumerator kDSI_TransferPerformBTA#
Perform BTA or not.
-
enumerator kDSI_TransferUseHighSpeed#
-
typedef enum _dsi_ppi_width dsi_ppi_width_t#
MIPI DSI PPI width.
-
typedef struct _dsi_config dsi_config_t#
MIPI DSI controller configuration.
-
typedef enum _dsi_dpi_pixel_packet dsi_dpi_pixel_packet_t#
MIPI DSI pixel packet type send through DPI interface.
-
typedef enum _dsi_dpi_video_mode dsi_dpi_video_mode_t#
DPI video mode.
-
typedef struct _dsi_dpi_config dsi_dpi_config_t#
MIPI DSI controller DPI interface configuration.
-
typedef enum _dsi_dbi_pixel_format dsi_dbi_pixel_format_t#
DBI pixel format.
-
typedef struct _dsi_dbi_config dsi_dbi_config_t#
MIPI DSI controller DBI interface configuration.
-
typedef struct _dsi_dphy_config dsi_dphy_config_t#
MIPI DSI D-PHY configuration.
-
typedef enum _dsi_tx_data_type dsi_tx_data_type_t#
DSI TX data type.
-
typedef enum _dsi_rx_data_type dsi_rx_data_type_t#
DSI RX data type.
-
typedef struct _dsi_transfer dsi_transfer_t#
Structure for the data transfer.
-
typedef struct _dsi_handle dsi_handle_t#
MIPI DSI transfer handle.
-
typedef void (*dsi_callback_t)(const MIPI_DSI_Type *base, dsi_handle_t *handle, status_t status, void *userData)#
MIPI DSI callback for finished transfer.
When transfer finished, one of these status values will be passed to the user:
kStatus_Success Data transfer finished with no error.
kStatus_Timeout Transfer failed because of timeout.
kStatus_DSI_RxDataError RX data error, user could use DSI_GetRxErrorStatus to check the error details.
kStatus_DSI_ErrorReportReceived Error Report packet received, user could use DSI_GetAndClearHostStatus to check the error report status.
kStatus_Fail Transfer failed for other reasons.
-
FSL_DSI_TX_MAX_PAYLOAD_BYTE#
-
FSL_DSI_RX_MAX_PAYLOAD_BYTE#
-
struct MIPI_DSI_Type#
- #include <fsl_mipi_dsi.h>
MIPI DSI structure definition.
-
struct _dsi_config#
- #include <fsl_mipi_dsi.h>
MIPI DSI controller configuration.
Public Members
-
uint32_t numLanes#
Number of lanes.
-
uint32_t __pad0__#
Reserved.
-
uint32_t enableContinuousHsClk#
Set to true, the high speed clock will not enter low power mode between transmissions.
-
uint32_t autoInsertEoTp#
Insert an EoTp short package when switching from HS to LP.
-
uint32_t __pad1__#
Reserved.
-
uint32_t disableBurst#
Set to true, each packet is sent separately with a return to LP between each packet, otherwise packets are combined in a burst.
-
uint32_t disableCrcCheck#
Set to true, controller will not check payload CRC from longs packets sent from peripheral.
-
uint32_t enableScramble#
Set to true to scramble long packet data and data CRC.
-
uint32_t __pad2__#
Reserved.
-
uint32_t enable#
Enable DSI controller.
-
uint32_t htxTo_ByteClk#
HS TX timeout count (HTX_TO) in byte clock.
-
uint32_t __pad3__#
Reserved.
-
uint32_t lrxHostTo_ByteClk#
LP RX host timeout count (LRX-H_TO) in byte clock.
-
uint32_t __pad4__#
Reserved.
-
uint32_t btaTo_ByteClk#
Bus turn around timeout count (TA_TO) in byte clock.
-
uint32_t __pad5__#
Reserved.
-
uint32_t numLanes#
-
struct _dsi_dpi_config#
- #include <fsl_mipi_dsi.h>
MIPI DSI controller DPI interface configuration.
Public Members
-
bool enable#
Enable DPI mode.
-
uint8_t virtualChannel#
Virtual channel.
-
dsi_dpi_pixel_packet_t pixelPacketFormat#
Pixel packet format. See dsi_dpi_pixel_packet_t.
-
dsi_dpi_video_mode_t videoMode#
Video mode. See dsi_dpi_video_mode_t.
-
uint8_t polarityFlags#
OR’ed value of _dsi_dpi_polarity_flag controls signal polarity.
-
uint8_t bllpMode#
OR’ed value of _dsi_dpi_bllp_mode to control behavior in BLLP.
-
bool overrideTiming#
Set to true to use hfp/hbp/hsw/vfp/vbp/panelHeight configurations directly, otherwise the host uses the first video frame to calibrate automatically by default.
-
uint16_t pixelPerPacket#
Number of pixels to be sent per packet. Suggest setting to the panel line size.
-
uint16_t hfp#
Horizontal front porch, in bytes.
-
uint16_t hbp#
Horizontal back porch, in bytes.
-
uint16_t hsw#
Horizontal sync width, in bytes.
-
uint16_t vbp#
Number of lines in vertical back porch.
-
uint16_t vfp#
Number of lines in vertical front porch.
-
uint16_t panelHeight#
Line number in vertical active area.
-
uint16_t vssPayload#
The payload value for Vertical Sync Start. Normally the 16 bit payload is 16’h0000 for all sync events, but the MIPI spec allows the VSS to send a non-zero payload.
-
uint8_t externalPacket#
OR’ed value of _dsi_dpi_extrenal_packet to configure when external packets are allowed.
-
bool enable#
-
struct _dsi_dbi_config#
- #include <fsl_mipi_dsi.h>
MIPI DSI controller DBI interface configuration.
Public Members
-
bool enable#
Enable DBI mode.
-
dsi_dbi_pixel_format_t format#
DBI pixel format.
-
uint8_t virtualChannel#
Virtual channel.
-
bool enable#
-
struct _dsi_dphy_config#
- #include <fsl_mipi_dsi.h>
MIPI DSI D-PHY configuration.
Public Members
-
uint32_t txHsBitClk_Hz#
The generated HS TX bit clock in Hz.
-
uint8_t tClkPre_ByteClk#
TLPX + TCLK-PREPARE + TCLK-ZERO + TCLK-PRE in byte clock. Set how long the controller will wait after enabling clock lane for HS before enabling data lanes for HS.
-
uint8_t tClkPost_ByteClk#
TCLK-POST + T_CLK-TRAIL in byte clock. Set how long the controller will wait before putting clock lane into LP mode after data lanes detected in stop state.
-
uint8_t tHsExit_ByteClk#
THS-EXIT in byte clock. Set how long the controller will wait after the clock lane has been put into LP mode before enabling clock lane for HS again.
-
uint8_t tClkGap_ByteClk#
The count that the controller waits when changing from continous to non-continuous clock in unit of byte clock.
-
uint32_t tWakeup_EscClk#
Number of clk_esc clock periods to keep a clock or data lane in Mark-1 state after exiting ULPS.
-
uint8_t tHsPrepare_HalfTxEscClk#
THS-PREPARE in tx_clk_esc/2. Set how long to drive the LP-00 state before HS transmissions, available values are 2, 3, 4, 5.
-
uint8_t tClkPrepare_HalfTxEscClk#
TCLK-PREPARE in tx_clk_esc/2. Set how long to drive the LP-00 state before HS transmissions, available values are 2, 3, 4, 5.
-
uint8_t tHsZero_ByteClk#
THS-ZERO in clk_byte. Set how long that controller drives data lane HS-0 state before transmit the Sync sequence.
-
uint8_t tClkZero_ByteClk#
TCLK-ZERO in clk_byte. Set how long that controller drives clock lane HS-0 state before transmit the Sync sequence.
-
uint8_t tHsTrail_ByteClk#
THS-TRAIL + 4*UI in clk_byte. Set the time of the flipped differential state after last payload data bit of HS transmission burst. Available values are 0, 1, …, 15.
-
uint8_t tClkTrail_ByteClk#
TCLK-TRAIL + 4*UI in clk_byte. Set the time of the flipped differential state after last payload data bit of HS transmission burst. Available values are 0, 1, …, 15.
-
uint8_t tClkSettle_RxEscClk#
T-CLK-SETTLE in tx_clk_esc. Time interval during which the HS receiver should ignore any Clock Lane HS transitions, starting from the beginning of TCLK-PREPARE.
-
uint8_t tHsSettle_RxEscClk#
T-HS-SETTLE + 4*UI in tx_clk_esc. Time interval during which the HS receiver shall ignore any Data Lane HS transitions, starting from the beginning of THS-PREPARE.
-
uint32_t txHsBitClk_Hz#
-
struct _dsi_transfer#
- #include <fsl_mipi_dsi.h>
Structure for the data transfer.
Public Members
-
uint8_t virtualChannel#
Virtual channel.
-
dsi_tx_data_type_t txDataType#
TX data type.
-
uint8_t flags#
Flags to control the transfer, see _dsi_transfer_flags.
-
const uint8_t *txData#
The TX data buffer.
-
uint8_t *rxData#
The TX data buffer.
-
uint16_t txDataSize#
Size of the TX data.
-
uint16_t rxDataSize#
Size of the RX data.
-
bool sendDcsCmd#
If set to true, the DCS command is specified by dcsCmd, otherwise the DCS command is included in the txData.
-
uint8_t dcsCmd#
The DCS command to send, only valid when sendDcsCmd is true.
-
uint8_t virtualChannel#
-
struct _dsi_handle#
- #include <fsl_mipi_dsi.h>
MIPI DSI transfer handle structure.
Public Members
-
volatile bool isBusy#
MIPI DSI is busy with APB data transfer.
-
dsi_transfer_t xfer#
Transfer information.
-
dsi_callback_t callback#
DSI callback
-
void *userData#
Callback parameter
-
const MIPI_DSI_Type *dsi#
Pointer to MIPI DSI peripheral.
-
bool videoModeWasEnabled#
Video mode was enabled and disabled for the in-flight APB transfer; restore it once that transfer completes.
-
volatile bool isBusy#
MMU: Memory Map Unit#
-
void MMU_Init(MMU_Type *base, const mmu_config_t *config)#
Initialize MMU:
Enable MMU clock;
Define the basic unit that is used in the memory map;
Configure valid address range;
Fill LUT SRAM;
Enable MMU remap function.
- Parameters:
base – MMU peripheral base address.
config – Pointer to the user defined variable in type of mmu_config_t.
-
void MMU_Deinit(MMU_Type *base)#
De-initialize MMU:
Disable MMU remap function;
Reset MMU logic;
Disable MMU clock.
- Parameters:
base –
-
void MMU_GetDefaultConfig(mmu_config_t *config)#
Get default configurations of MMU module.
config->unitSize = kMMU_UnitSize4KB; config->pageMode = kMMU_1PageMode; config->invalidAddrMode = kMMU_InvalidAddrRespondError; config->baseAddr = 0x0UL; config->maxAddr = 0x0UL; config->operationToWrite = kMMU_LUTBurstWrite; config->ptrLutWord = NULL; config->countOfWordToWrite = 0U; config->startPointer = 0U;
- Parameters:
config – Pointer to the user defined variable in type of mmu_config_t.
-
void MMU_SetupSimpleMap(MMU_Type *base, uint32_t virt, uint32_t phys)#
Map one physical unit to the virtual unit.
- Parameters:
base – MMU peripheral base address.
virt – The unit-aligned virtual address.
phys – The unit-aligned virtual address.
-
void MMU_TearDownSimpleMap(MMU_Type *base, uint32_t virt)#
Remove mapping for one unit of provided virtual address.
- Parameters:
base – MMU peripheral base address.
virt – The unit-aligned virtual address.
-
void MMU_SetupRegionMap(MMU_Type *base, uint32_t virt, uint32_t phys, size_t regionSize)#
Map a region of physical memory into the virtual address space.
- Parameters:
base – MMU peripheral base address.
virt – The unit-aligned destination virtual address to map.
phys – The unit-aligned source physical address to map.
regionSize – Unit-aligned size of mapped memory region in bytes.
-
void MMU_TearDownRegionMap(MMU_Type *base, uint32_t virt, size_t regionSize)#
Remove mapping for a provided virtual address region.
- Parameters:
base – MMU peripheral base address.
virt – The unit-aligned virtual address.
regionSize – The unit-aligned size of region in bytes.
-
void MMU_RemapRegion(MMU_Type *base, uint32_t oldVirt, uint32_t newVirt, size_t regionSize)#
Remap old virtual region into new address.
- Parameters:
base – MMU peripheral base address.
oldVirt – The unit-aligned old virtual address.
newVirt – The unit-aligned new virtual address.
regionSize – The unit-aligned size of region in bytes.
-
void MMU_MoveRegion(MMU_Type *base, uint32_t oldVirt, uint32_t newVirt, uint32_t newPhys, size_t regionSize)#
Physically move region of memory, with copy.
Maps a region of physical memory into the new virtual address space, and copy region of size from the old virtual address space. The new virtual memory region is mapped from physical memory starting
newPhysof sizeregionSize.- Parameters:
base – MMU peripheral base address.
oldVirt – Unit-aligned old virtual region address.
newVirt – Unit-aligned new virtual region address.
newPhys – Unit-aligned new physical region address which will map to new virtual region address.
regionSize – Unit-aligned size of region in bytes.
-
void MMU_SetupArrayMap(MMU_Type *base, uint32_t *ptrVirts, uint32_t *ptrPhys, uint32_t count)#
Map an array of physical memory address into an array of virtual memory address.
- Parameters:
base – MMU peripheral base address.
ptrVirts – Pointer to the array which contain unit-aligned virtual address.
ptrPhys – Pointer to the array which contain unit-aligned physical address.
count – Count of array elements.
-
void MMU_TearDownArrayMap(MMU_Type *base, uint32_t *ptrVirts, uint32_t count)#
Remove mapping of an array of virtual address.
- Parameters:
base – MMU peripheral base address.
ptrVirts – Pointer to the array which contains unit-aligned virtual address.
count – Count of array elements.
-
void MMU_MoveArray(MMU_Type *base, uint32_t *ptrOldVirts, uint32_t *ptrNewVirts, uint32_t *ptrNewPhys, uint32_t count)#
Physical move array of memory, with copy.
Maps an array of physical memory into the new array of virtual address space(
ptrNewVirts), and copy an unit size of data from old array of virtual address to new array of virtual address.- Parameters:
base – MMU peripheral base address.
ptrOldVirts – Pointer to the array which contain old unit-aligned virtual address.
ptrNewVirts – Pointer to the array which contain new unit-aligned virtual address.
ptrNewPhys – Pointer to the array which contain new unit-aligned physical address.
count – Count of array elements.
-
void MMU_GetPhyAddr(MMU_Type *base, uint32_t virt, uint32_t *ptrPtrs)#
Get mapped physical address from input virtual address.
- Parameters:
base – MMU peripheral base address.
virt – The virtual address.
ptrPtrs – [out] Pointer to the variable to store mapped physical address.
-
static inline void MMU_EnableMemoryMap(MMU_Type *base, bool enable)#
Enable/disable memory map.
- Parameters:
base – MMU peripheral base address.
enable – Used to enable/disable memory map:
true Enable memory map, the addresses of the AHB transaction are remapped by looking up LUT SRAM.
false Disable memory map, the AHB transaction passes through MMU without address remapping.
-
static inline void MMU_UpdateUnitSize(MMU_Type *base, mmu_unit_size_t unitSize)#
Update the basic size of the unit that is used in the memory map.
- Parameters:
base – MMU peripheral base address.
unitSize – Used to specify the basic size of unit in type of mmu_unit_size_t.
-
void MMU_DoSoftwareReset(MMU_Type *base)#
Trigger a software reset to reset the MMU logic.
- Parameters:
base – MMU peripheral base address.
-
static inline void MMU_UpdateValidAddressRange(MMU_Type *base, uint16_t baseAddr, uint16_t maxAddr)#
Update the valid address range.
To set AHB address from 0x51000000UL to 0x511FFFFF are valid: MMU_UpdateValidAddressRange(MMU0, 0x5100U, 0x511FU);
Note
Both baseAddr and maxAddr mean the upper 16 bits of a valid address.
- Parameters:
base – MMU peripheral base address.
baseAddr – Upper 16 bits of valid range’s base address.
maxAddr – Upper 16 bits of valid range’s maximum address.
-
static inline void MMU_ChangePageOption(MMU_Type *base, mmu_page_option_t pageOpt)#
Change page mode, the MMU module supports #kMMU_1PageMode and #kMMU_4PageMode.
- Parameters:
base – MMU peripheral base address.
pageMode – Page mode to use, please refer to mmu_page_option_t.
-
void MMU_UpdateLUTBlocking(MMU_Type *base, uint16_t startPointer, mmu_lut_word_t *ptrLutWord, uint16_t countOfWords, mmu_lut_write_operation_t writeOperation)#
Use the blocking method to update LUT SRAM with user-defined words.
Note
This function only return when all words that #ptrLutWord refers are set into LUT SRAM.
Note
This function supports both single write and burst write described in RM, please note that burst write is only useful when to fill continuous value into continuous addresses.
Note
startPointer + countOfWords should not exceed the maximum size of LUT SRAM(8192).
Fill continuous values into continuous addresses (E.g: initialize LUT SRAM address 2 and 3 with value 0x12 and 0x13) mmu_lut_word_t startLutWord = { .mappedValue = 0x12U; .valid = 1U; }; MMU_UpdateLUTBlocking(MMU0, 2U, &startLutWord, 2U, kMMU_LUTBurstWrite);
Fill discontinuous values into continuous addresses(E.g: initialize LUT SRAM address 2 and 3 with value 0x12 and 0x34) mmu_lut_word_t lutWordArray[2] = { { .mappedValue = 0x12U; .valid = 1U; }, { .mappedValue = 0x34U; .valid = 1U; }, }; MMU_UpdateLUTBlocking(MMU0, 2U, lutWordArray, 2U,kMMU_LUTSingleWrite);
Fill discontinuous values into discontinuous addresses(E.g: initialize LUT SRAM address 2 and 5 with value 0x12 and 0x34)): mmu_lut_word_t addr2LutWord = { .mappedValue = 0x12U; .valid = 1U; }; MMU_UpdateLUTBlocking(MMU0, 2U, &addr2LutWord, 1U, kMMU_LUTSingleWrite); mmu_lut_word_t addr5LutWord = { .mappedValue = 0x34U; .valid = 1U; }; MMU_UpdateLUTBlocking(MMU0, 5U, &addr5LutWord, 1U, kMMU_LUTSingleWrite);
- Parameters:
base – MMU peripheral base address.
startPointer – Start pointer of LUT SRAM to fill new mapping words, range from 0 to 8191.
ptrLutWord – Pointer to new lut words: if writeOperation is selected as kMMU_LUTBurstWrite this parameter should be a pointer to the variable which represents the first LUT word to set; if writeOperation is selected as kMMU_LUTSingleWrite this parameter can be set as a pointer to the array that contains all new LUT words to set or set as a pointer to one variable when only want to update one word into LUT’s specific pointer.
countOfWord – Count to new word to update into LUT SRAM, range from 1 to 8192.
writeOperation – Specify the write operation, the meaning of #ptrLutWord is different for different write operations.
-
void MMU_ReadLUT(MMU_Type *base, uint16_t startPointer, mmu_lut_word_t *ptrWordReadBuffer, uint16_t count)#
Read the specified number of LUT content from the specified pointer into the user-defined buffer.
Note
#startPointer + #count should not exceed maximum size of LUT SRAM(8192).
- Parameters:
base – MMU peripheral base address.
startPointer – Specify start address to read in LUT SRAM, range from 0 to 8191.
ptrWordReadBuffer – Pointer of a buffer that record read out words.
count – Specify number of continuous address in LUT SRAM to read, range from 1 to 8192.
-
void MMU_TriggerLUTVerificationBlocking(MMU_Type *base, uint16_t startPointer, mmu_lut_word_t goldenWordToCheck, uint16_t count)#
Trigger the specified number of read operations from LUT SRAM, compare with the input golden word, the read address and golden data are increased automatically each time.
Note
This function only return when all read-verify operations are complete.
- Parameters:
base – MMU peripheral base address.
startPointer – The pointer of LUT SRAM which start to check, range from 0 to 8191.
goldenWordToCheck – The first golden word to check, in following read-verify operation, the golden data will increase automatically.
count – Specify number of continuous address in LUT SRAM to check, range from 1 to 8192.
-
static inline void MMU_LockLUT(MMU_Type *base)#
Lock LUT SRAM to avoid an accidental update.
Note
If locked, writing to LUT SRAM will trigger kMMU_LockErrorFlag.
- Parameters:
base – MMU peripheral base address.
-
static inline void MMU_UnlockLUT(MMU_Type *base)#
Unlock LUT SRAM.
Note
To update LUT SRAM, please ensure LUT is unlocked.
- Parameters:
base – MMU peripheral base address.
-
static inline uint32_t MMU_GetStatusFlags(MMU_Type *base)#
Get status flags.
- Parameters:
base – MMU peripheral base address.
- Returns:
All status flags asserted, should be the OR’ed value of mmu_status_flags_t.
-
static inline void MMU_ClearStatusFlags(MMU_Type *base, uint32_t mask)#
Clear status flags.
- Parameters:
base – MMU peripheral base address.
mask – The mask of flags to clear, should be the OR’ed value of mmu_status_flags_t.
-
static inline uint16_t MMU_GetIPSReadErrorAddress(MMU_Type *base)#
Get the LUT SRAM address when an error is detected for the IPS read operation (including IPS read parity error and read-verify mismatch error).
- Parameters:
base – MMU peripheral base address.
- Returns:
The pointer in LUT SRAM, range from 0 to 8191.
-
void MMU_GetAHBErrorRecord(MMU_Type *base, mmu_ahb_error_record_t *ptrRecord)#
Get a record of AHB information when an error happens.
- Parameters:
base – MMU peripheral base address.
ptrRecord – Pointer to user-defined mmu_ahb_error_record_t variable which used to store current AHB error information.
- Returns:
The record of AHB information when an error happens, please refer to mmu_ahb_error_record_t for details.
-
static inline bool MMU_CheckMMUBusy(MMU_Type *base)#
Check if MMU is in the Busy state.
Note
There are some possible reasons to make MMU is busy state:
Initialization sequence
Burst-write operation
Read-verify operation
- Parameters:
base – MMU peripheral base address.
- Return values:
false – MMU not in the busy state.
true – MMU is in the busy state, wait for it is not busy before taking an action.
-
static inline void MMU_EnableInterrupts(MMU_Type *base, uint32_t mask)#
Enabled interrupts.
- Parameters:
base – MMU peripheral base address.
mask – Mask of interrupts to enable, should be the OR’ed value of mmu_interrupt_enable_t.
-
static inline void MMU_DisableInterrupts(MMU_Type *base, uint32_t mask)#
Disable interrupts.
- Parameters:
base – MMU peripheral base address.
mask – Mask of interrupts to disable, should be the OR’ed value of mmu_interrupt_enable_t.
-
FSL_MMU_DRIVER_VERSION#
mmu driver version 2.0.1.
-
enum _mmu_status_flags#
The enumeration of MMU status flags,.
Values:
-
enumerator kMMU_BusyFlag#
MMU is in Busy state, wait for it to clear before taking action.
-
enumerator kMMU_LUTInvalidFlag#
Indicate whether the valid bit in the access address is 0, which means the access operation is invalid in LUT.
-
enumerator kMMU_AddressInvalidFlag#
The AHB access address is out of the valid address range.
-
enumerator kMMU_ParityErrorFlag#
A parity error is detected in the access address.
-
enumerator kMMU_LockErrorFlag#
A lock error is detected when writing to LUT SRAM.
-
enumerator kMMU_IpsReadErrorFlag#
Indicate whether an IPS read error is detected when read LUT SRAM, including IPS read parity error and read-verify mismatch error.
-
enumerator kMMU_AllFlags#
All flags.
-
enumerator kMMU_BusyFlag#
-
enum _mmu_interrupt_enable#
The enumeration of MMU interrupts,.
Values:
-
enumerator kMMU_LUTInvalidInterruptEnable#
Enable the interrupt for kMMU_LUTInvalidFlag.
-
enumerator kMMU_AddressInvalidInterruptEnable#
Enable the interrupt for kMMU_AddressInvalidFlag.
-
enumerator kMMU_ParityErrorInterruptEnable#
Enable the interrupt for kMMU_ParityErrorFlag.
-
enumerator kMMU_LockErrorInterruptEnable#
Enable the interrupt for kMMU_LockErrorFlag.
-
enumerator kMMU_IpsReadErrorInterruptEnable#
Enable the interrupt for kMMU_IpsReadErrorFlag.
-
enumerator kMMU_AllInterruptsEnable#
Enable all interrupts.
-
enumerator kMMU_LUTInvalidInterruptEnable#
-
enum _mmu_unit_size#
The enumeration of unit size, available selections are 4KB, 8KB, 16KB, 32KB, and 64KB.
Values:
-
enumerator kMMU_UnitSize4KB#
Specify the basic size of unit is 4KB.
-
enumerator kMMU_UnitSize8KB#
Specify the basic size of unit is 8KB.
-
enumerator kMMU_UnitSize16KB#
Specify the basic size of unit is 16KB.
-
enumerator kMMU_UnitSize32KB#
Specify the basic size of unit is 32KB.
-
enumerator kMMU_UnitSize64KB#
Specify the basic size of unit is 64KB.
-
enumerator kMMU_UnitSize4KB#
-
enum _mmu_ahb_access_type#
The enumeration of AHB access type, available selections are read access and write access.
Values:
-
enumerator kMMU_ReadAccess#
The access type of the AHB transfer is read.
-
enumerator kMMU_WriteAccess#
The access type of the AHB transfer is write.
-
enumerator kMMU_ReadAccess#
-
enum _mmu_ahb_error_type#
The enumeration of error type in case of AHB transfer, available selections are LUT invalid error, address invalid error, and parity error.
Values:
-
enumerator kMMU_LUTInvalidError#
The error type information of the transfer is LUT invalid error.
-
enumerator kMMU_AddrInvalidError#
The error type information of the transfer is address invalid error.
-
enumerator kMMU_ParityError#
The error type information of the transfer is parity error.
-
enumerator kMMU_LUTInvalidError#
-
enum _mmu_page_option#
The MMU module supports two different page mode: 1 page mode and 4 pages mode.
Note
In 4 pages mode, each page contains 2K word. Different page can contain different mapping schema.
Values:
-
enumerator kMMU_PageOpt_1Page#
MMU takes LUT SRAM as 1 page for address remapping.
-
enumerator kMMU_PageOpt_4Page_Low2KWordSelected#
MMU takes LUT SRAM as 4 pages for address remapping, in this page mode the whole LUT is divided into 4 pages, use LUT SRAM low 2K words for address remapping.
-
enumerator kMMU_PageOpt_4Page_MidLow2KWordSelected#
MMU takes LUT SRAM as 4 pages for address remapping, in this page mode the whole LUT is divided into 4 pages, use LUT SRAM mid-low 2K words for address remapping.
-
enumerator kMMU_PageOpt_4Page_MidHigh2KWordSelected#
MMU takes LUT SRAM as 4 pages for address remapping, in this page mode the whole LUT is divided into 4 pages, use LUT SRAM mid-high 2K words for address remapping.
-
enumerator kMMU_PageOpt_4Page_High2KWordSelected#
MMU takes LUT SRAM as 4 pages for address remapping, in this page mode the whole LUT is divided into 4 pages, use LUT SRAM mid-low 2K words for address remapping.
-
enumerator kMMU_PageOpt_1Page#
-
enum _mmu_lut_write_operation#
The enumeration of LUT SRAM write operation, both burst-write and single-write are supported.
Values:
-
enumerator kMMU_LUTSingleWrite#
In this operation, words to write in consequent LUT pointer may not consequent. It is possible to write discontinuous value into discontinuous address.
-
enumerator kMMU_LUTBurstWrite#
In this operation, words to write in consequence LUT pointer must be consequent. write continuous value into continuous address.
-
enumerator kMMU_LUTSingleWrite#
-
enum _mmu_invalid_address_mode#
The behavior when an invalid address is detected is programmable.
Values:
-
enumerator kMMU_InvalidAddrRespondError#
MMU responds with a transfer error when a invalid address is detected.
-
enumerator kMMU_InvalidAddrAllowed#
MMU allows transfer when an invalid address is detected.
-
enumerator kMMU_InvalidAddrRespondError#
-
typedef enum _mmu_unit_size mmu_unit_size_t#
The enumeration of unit size, available selections are 4KB, 8KB, 16KB, 32KB, and 64KB.
-
typedef enum _mmu_ahb_access_type mmu_ahb_access_type_t#
The enumeration of AHB access type, available selections are read access and write access.
-
typedef enum _mmu_ahb_error_type mmu_ahb_error_type_t#
The enumeration of error type in case of AHB transfer, available selections are LUT invalid error, address invalid error, and parity error.
-
typedef enum _mmu_page_option mmu_page_option_t#
The MMU module supports two different page mode: 1 page mode and 4 pages mode.
Note
In 4 pages mode, each page contains 2K word. Different page can contain different mapping schema.
-
typedef enum _mmu_lut_write_operation mmu_lut_write_operation_t#
The enumeration of LUT SRAM write operation, both burst-write and single-write are supported.
-
typedef enum _mmu_invalid_address_mode mmu_invalid_address_mode_t#
The behavior when an invalid address is detected is programmable.
-
typedef struct _mmu_ahb_error_record mmu_ahb_error_record_t#
The record of AHB information when an error happens.
-
typedef struct _mmu_lut_word mmu_lut_word_t#
The word in LUT SRAM, there are 8K words exist in LUT SRAM.
-
typedef struct _mmu_config mmu_config_t#
The structure used to initialize the MMU instance includes unit size, page mode, address range, and LUT content.
-
mmu_unit_size_t g_selectedUnitSize#
-
mmu_page_option_t g_selectedPageOpt#
-
MMU_NUM_OF_UNIT_SIZE#
-
MMU_PAGE_OPT_MASK#
-
MMU_PAGE_OPT_SHIFT#
-
MMU_PAGE_OPT(x)#
-
struct _mmu_ahb_error_record#
- #include <fsl_mmu.h>
The record of AHB information when an error happens.
Public Members
-
uint32_t masterId#
Indicate the master ID of the transfer.
-
uint32_t protectionInfo#
Indicate the protection information of the transfer.
-
mmu_ahb_access_type_t accessType#
Indicate the access type of the transfer.
-
mmu_ahb_error_type_t errorType#
Indicate the error type of the transfer.
-
uint32_t failAddr#
Indicates the LUT address where an erro happens.
-
uint32_t masterId#
-
struct _mmu_lut_word#
- #include <fsl_mmu.h>
The word in LUT SRAM, there are 8K words exist in LUT SRAM.
-
struct _mmu_config#
- #include <fsl_mmu.h>
The structure used to initialize the MMU instance includes unit size, page mode, address range, and LUT content.
Public Members
-
mmu_unit_size_t unitSize#
Specify the basic size of unit that is used in the memory map.
-
mmu_page_option_t pageOpt#
Specify the behavior of page option.
-
mmu_invalid_address_mode_t invalidAddrMode#
Specify MMU behavior when an invalid address is detected.
-
uint16_t baseAddr#
Upper 16 bits of valid range’s base address.
-
uint16_t maxAddr#
Upper 16 bits of valid range’s maximum address.
-
uint32_t *ptrPhyAddrArray#
Pointer to the physical address array used for array mapping.
-
uint32_t *ptrVirtualAddrArray#
Pointer to the virtual address array used for array mapping.
-
uint16_t countOfAddr#
Count of array elements
-
bool enableMMP#
Enable/disable memory map feature, once enabled all AHB access to corresponding address are remapped by LUT SRAM.
-
mmu_unit_size_t unitSize#
MODCON Driver#
-
FSL_MODCON_DRIVER_VERSION#
MODCON driver version.
-
uint32_t MODCON_GetVersion(modcon_instance_t modcon)#
Get MODCON version.
- Parameters:
modcon – MODCON instance.
- Returns:
MODCON version register value.
-
uint32_t MODCON_GetTrustMask(modcon_instance_t modcon)#
Get MODCON trust mask.
- Parameters:
modcon – MODCON instance.
- Returns:
MODCON trust mask register value.
-
void MODCON_SetTrustMask(modcon_instance_t modcon, uint8_t trustMask, bool lock)#
Set MODCON trust mask.
- Parameters:
modcon – MODCON instance.
trustMask – Trust mask value to set.
lock – Whether to lock the trust mask setting.
-
uint32_t MODCON_GetIPDomainMask(uint32_t ip)#
Get IP domain mask.
- Parameters:
ip – IP identifier.
- Returns:
IP domain mask register value.
-
void MODCON_SetIPDomainMask(uint32_t ip, uint8_t domainMask, bool lock)#
Set IP domain mask.
- Parameters:
ip – IP identifier.
domainMask – Domain mask value to set.
lock – Whether to lock the domain mask setting.
-
uint32_t MODCON_GetIPRST(uint32_t ip)#
Get IP reset status.
- Parameters:
ip – IP identifier.
- Returns:
IP reset status register value.
-
void MODCON_SetIPRST(uint32_t ip)#
Set IP reset.
- Parameters:
ip – IP identifier.
-
void MODCON_ClearIPRST(uint32_t ip)#
Clear IP reset.
- Parameters:
ip – IP identifier.
-
uint32_t MODCON_GetCFG(uint32_t ip, uint8_t idx)#
Get IP configuration register value.
- Parameters:
ip – IP identifier.
idx – Configuration register index.
- Returns:
IP configuration register value.
-
void MODCON_SetCFG(uint32_t ip, uint8_t idx, uint32_t value)#
Set IP configuration register value.
- Parameters:
ip – IP identifier.
idx – Configuration register index.
value – Configuration value to set.
-
uint32_t MODCON_GetSts(uint32_t ip, uint8_t idx)#
Get IP status register value.
- Parameters:
ip – IP identifier.
idx – Status register index.
- Returns:
IP status register value.
-
ASRC_MODCONS#
MODCON IP name arrays.
MODCON IP name array for ASRC.
-
SPDIF_MODCONS#
MODCON IP name array for SPDIF.
-
SAI_MODCONS#
MODCON IP name array for SAI.
-
PDM_MODCONS#
MODCON IP name array for PDM.
-
FREQME_MODCONS#
MODCON IP name array for FREQME.
-
EDMA3_MODCONS#
MODCON IP name array for EDMA3.
-
EDMA5_MODCONS#
MODCON IP name array for EDMA5.
-
NPU_MODCONS#
MODCON IP name array for NPU.
-
SRAMCTL_MODCONS#
MODCON IP name array for SRAMCTL.
-
NIC_MODCONS#
MODCON IP name array for NIC.
-
ROMCP_MODCONS#
MODCON IP name array for ROMCP.
-
ENET_MODCONS#
MODCON IP name array for ENET.
-
ENET_QOS_MODCONS#
MODCON IP name array for ENET_QOS.
-
TENBASET_PHY_MODCONS#
MODCON IP name array for TENBASET_PHY.
-
USDHC_MODCONS#
MODCON IP name array for USDHC.
-
XSPIR_MODCONS#
MODCON IP name array for XSPIR.
-
XSPI_MODCONS#
MODCON IP name array for XSPI.
-
SRAMC_MODCONS#
MODCON IP name array for SRAMC.
-
I3C_MODCONS#
MODCON IP name array for I3C.
-
LPSPI_MODCONS#
MODCON IP name array for LPSPI.
-
LPI2C_MODCONS#
MODCON IP name array for LPI2C.
-
LPUART_MODCONS#
MODCON IP name array for LPUART.
-
CAN_MODCONS#
MODCON IP name array for CAN.
-
EQDC_MODCONS#
MODCON IP name array for EQDC.
-
GPIO_MODCONS#
MODCON IP name array for GPIO.
-
LPIT_MODCONS#
MODCON IP name array for LPIT.
-
FLEXIO_MODCONS#
MODCON IP name array for FLEXIO.
-
FLEXPWM_MODCONS#
MODCON IP name array for FLEXPWM.
-
SINC_MODCONS#
MODCON IP name array for SINC.
-
CRC_MODCONS#
MODCON IP name array for CRC.
-
IOMUXC_MODCONS#
MODCON IP name array for IOMUXC.
-
CGUA_MODCONS#
MODCON IP name array for CGUA.
-
STM_MODCONS#
MODCON IP name array for STM.
-
DAC_MODCONS#
MODCON IP name array for DAC.
-
QTMR_MODCONS#
MODCON IP name array for QTMR.
-
ADC_MODCONS#
MODCON IP name array for ADC.
-
MIPI_CSI_MODCONS#
MODCON IP name array for MIPI_CSI.
-
MIPI_DSI_MODCONS#
MODCON IP name array for MIPI_DSI.
-
ISI_MODCONS#
MODCON IP name array for ISI.
-
DCIF_MODCONS#
MODCON IP name array for DCIF.
-
JPEG_MODCONS#
MODCON IP name array for JPEG.
-
GPU_MODCONS#
MODCON IP name array for GPU.
-
REFORMATTER_MODCONS#
MODCON IP name array for REFORMATTER.
-
CSI_MODCONS#
MODCON IP name array for CSI.
-
LPTMR_MODCONS#
MODCON IP name array for LPTMR.
-
WAKE_MODCONS#
MODCON IP name array for WAKE.
-
SWT_MODCONS#
MODCON IP name array for SWT.
-
ACMP_MODCONS#
MODCON IP name array for ACMP.
-
CGUANA_MODCONS#
MODCON IP name array for CGUANA.
-
PMUANA_MODCONS#
MODCON IP name array for PMUANA.
-
CGU_MODCONS#
MODCON IP name array for CGU.
PDCON: Power Domain Controller Driver#
-
enum _pdcon_event#
PDCON power domain event/state encoding.
Unified 2-bit encoding for configuration and events.
Values:
-
enumerator kPDCON_EventNoneOrActive#
Active (config) / No event (status).
-
enumerator kPDCON_EventRetention#
Retention.
-
enumerator kPDCON_EventPowerOff#
Power-off.
-
enumerator kPDCON_EventNoneOrActive#
-
enum _pdcon_handshake_mask#
PDCON handshake mask.
Handshake mask must be non-zero.
Values:
-
enumerator kPDCON_HandshakeNone#
No handshake (invalid).
-
enumerator kPDCON_HandshakeUnit0#
Handshake with unit 0.
-
enumerator kPDCON_HandshakeUnit1#
Handshake with unit 1.
-
enumerator kPDCON_HandshakeUnit2#
Handshake with unit 2.
-
enumerator kPDCON_HandshakeAll#
Handshake with all units.
-
enumerator kPDCON_HandshakeNone#
-
typedef enum _pdcon_event pdcon_event_t#
PDCON power domain event/state encoding.
Unified 2-bit encoding for configuration and events.
-
typedef enum _pdcon_handshake_mask pdcon_handshake_mask_t#
PDCON handshake mask.
Handshake mask must be non-zero.
-
typedef struct _pdcon_access_ctrl pdcon_access_ctrl_t#
PDCON access control configuration.
-
typedef struct _pdcon_trigger_config pdcon_trigger_config_t#
PDCON trigger capability configuration.
-
typedef struct _pdcon_domain_cfg pdcon_domain_cfg_t#
PDCON domain configuration.
Target events for Run/Sleep planes.
-
typedef struct _pdcon_config pdcon_config_t#
PDCON module configuration.
-
FSL_PDCON_DRIVER_VERSION#
pdcon driver version 2.1.0.
-
PDCON_BUSY_TIMEOUT#
Max loops to wait for PDCON to stop being busy.
If defined as 0, the driver will wait until completion.
-
uint32_t PDCON_GetVersionID(PDCON_Type *base)#
Gets the PDCON version ID.
- Parameters:
base – PDCON peripheral base address.
- Returns:
Version ID of the PDCON module.
-
status_t PDCON_Init(PDCON_Type *base, const pdcon_config_t *config)#
Initializes the PDCON module.
This function initializes the PDCON module with the configuration provided.
Note
In default, after POR, all handshaked selections are enabled for each power domain.
- Parameters:
base – PDCON peripheral base address.
config – Pointer to the configuration structure, pdcon_config_t.
- Return values:
kStatus_Success – Initialization successful.
kStatus_ReadOnly – Access control or trigger configuration is locked.
-
status_t PDCON_SetAccessControl(PDCON_Type *base, const pdcon_access_ctrl_t *acc)#
Sets the access control configuration.
- Parameters:
base – PDCON peripheral base address.
acc – Pointer to the access control configuration, pdcon_access_ctrl_t.
- Return values:
kStatus_Success – Access control configuration set successfully.
kStatus_ReadOnly – Access control is locked and cannot be modified.
-
static inline void PDCON_UnlockAccessControl(PDCON_Type *base)#
Unlocks the access control configuration.
- Parameters:
base – PDCON peripheral base address.
-
status_t PDCON_SetTriggerConfig(PDCON_Type *base, const pdcon_trigger_config_t *cfg)#
Sets the trigger configuration.
- Parameters:
base – PDCON peripheral base address.
cfg – Pointer to the trigger configuration, pdcon_trigger_config_t.
- Return values:
kStatus_Success – Trigger configuration set successfully.
kStatus_ReadOnly – Trigger configuration is locked and cannot be modified.
-
static inline void PDCON_UnlockTriggerConfig(PDCON_Type *base)#
Unlocks the trigger configuration.
- Parameters:
base – PDCON peripheral base address.
-
static inline void PDCON_EnableDomainHwTrigger(PDCON_Type *base, uint8_t domain, bool enable)#
Enables or disables hardware trigger for a single power domain.
Read-modify-write on MDCTRL[5:0] (HW enable mask).
- Parameters:
base – PDCON peripheral base address.
domain – Power domain index (0–5).
enable – true = enable HW trigger; false = disable.
-
static inline void PDCON_EnableDomainSwTrigger(PDCON_Type *base, uint8_t domain, bool enable)#
Enables or disables software trigger for a single power domain.
Read-modify-write on MDCTRL[21:16] (SW enable mask). Must be enabled before calling PDCON_SoftwareTrigger() for a domain.
- Parameters:
base – PDCON peripheral base address.
domain – Power domain index (0–5).
enable – true = enable SW trigger; false = disable.
-
void PDCON_SetHandshake(PDCON_Type *base, uint8_t domainId, pdcon_handshake_mask_t mask)#
Sets the handshake configuration for a power domain.
- Parameters:
base – PDCON peripheral base address.
domainId – Power domain index (0–5).
mask – Handshake mask, see pdcon_handshake_mask_t.
-
void PDCON_SetWarmResetPostpone(PDCON_Type *base, uint8_t domainId, uint32_t postponeCycles)#
Sets the warm reset postpone cycles for a power domain.
- Parameters:
base – PDCON peripheral base address.
domainId – Power domain index (0–5).
postponeCycles – Number of cycles to postpone warm reset.
-
status_t PDCON_SetEventInActiveMode(PDCON_Type *base, uint8_t domainId, pdcon_event_t event)#
Sets the power domain event in active mode.
This function configures the power domain behavior in active mode.
- Parameters:
base – PDCON peripheral base address.
domainId – Power domain index. Only 3–5 are valid (domains 0–2 have no PDRUNCFG field).
event – Power event. See pdcon_event_t.
- Return values:
kStatus_Success – Power domain event set successfully.
kStatus_InvalidArgument – Invalid domain (only domains 3-5 are supported).
-
status_t PDCON_SetEventInLowPowerModes(PDCON_Type *base, uint8_t domainId, pdcon_event_t event)#
Sets the power domain event in low power modes.
This function configures the power domain behavior in low power modes.
- Parameters:
base – PDCON peripheral base address.
domainId – Power domain index. Only 1–5 are valid (domain 0 has no PDSLPCFG field).
event – Power event. See pdcon_event_t.
- Return values:
kStatus_Success – Power domain event set successfully.
kStatus_InvalidArgument – Invalid domain (only domains 1-5 are supported).
-
status_t PDCON_SetPowerDomainEventCfg(PDCON_Type *base, const pdcon_domain_cfg_t *eventCfg)#
Sets the power domain event configuration for both active and low power modes.
This function configures the power domain behavior for both active/run mode and low power/sleep mode in a single call.
Note
Active mode configuration only supports domains 3-5.
Note
Low power mode configuration only supports domains 1-5.
- Parameters:
base – PDCON peripheral base address.
eventCfg – Pointer to the domain event configuration. See pdcon_domain_cfg_t.
- Return values:
kStatus_Success – Power domain events set successfully for both modes.
kStatus_InvalidArgument – Invalid domain (see limitations for each mode).
-
status_t PDCON_SoftwareTrigger(PDCON_Type *base, uint8_t domainId)#
Triggers a software-initiated power domain transition.
This function triggers a software-initiated power domain transition. The function waits for the domain to be idle before triggering and waits for completion.
Note
If CONFIG_PDCON_BUSY_TIMEOUT is defined, the function will timeout after the specified cycles.
- Parameters:
base – PDCON peripheral base address.
domainId – Power domain index (0–5).
- Return values:
kStatus_Success – Software trigger completed successfully.
kStatus_Timeout – Timeout occurred while waiting for domain to be idle or transition to complete (only if PDCON_BUSY_TIMEOUT is defined).
-
bool PDCON_IsDomainBusy(PDCON_Type *base, uint8_t domainId)#
Checks if a power domain is busy.
- Parameters:
base – PDCON peripheral base address.
domainId – Power domain index (0–5).
- Returns:
true if the domain is busy, false otherwise.
-
pdcon_event_t PDCON_GetDomainState(PDCON_Type *base, uint8_t domainId)#
Gets the current state of a power domain.
- Parameters:
base – PDCON peripheral base address.
domainId – Power domain index (0–5).
- Returns:
Current state of the power domain. See pdcon_event_t.
-
bool PDCON_GetAndClearEvent(PDCON_Type *base, uint8_t domainId, bool clear)#
Gets and optionally clears the event flag for a power domain.
- Parameters:
base – PDCON peripheral base address.
domainId – Power domain index (0–5).
clear – true to clear the event flag after reading, false to only read.
- Returns:
true if the event flag was pending; false if no event was pending.
-
static inline void PDCON_EnableFunctionClock(PDCON_Type *base, bool enable)#
Enable or disable the PDCON functional clock (MISCCTRL.FCEN).
MUST be called (enable=true) before any PDCON register access. May be disabled to save power when PDCON is fully quiescent.
- Parameters:
base – PDCON peripheral base address.
enable – true = enable functional clock; false = gate it.
-
static inline void PDCON_SetObserveDomain(PDCON_Type *base, uint8_t domainId)#
Select the observe/debug mux output (MISCCTRL.SEL).
Routes internal PDCON signals from the specified domain to the observe bus. For debug and characterization use only — has no effect on normal operation.
- Parameters:
base – PDCON peripheral base address.
domainId – Domain index to observe (0–5).
-
struct _pdcon_access_ctrl#
- #include <fsl_pdcon.h>
PDCON access control configuration.
-
struct _pdcon_trigger_config#
- #include <fsl_pdcon.h>
PDCON trigger capability configuration.
-
struct _pdcon_domain_cfg#
- #include <fsl_pdcon.h>
PDCON domain configuration.
Target events for Run/Sleep planes.
Public Members
-
uint8_t domainId#
Power domain index (0–5).
-
pdcon_event_t activeEvent#
Event in active mode.
-
pdcon_event_t lowPowerEvent#
Event in low power modes.
-
uint8_t domainId#
-
struct _pdcon_config#
- #include <fsl_pdcon.h>
PDCON module configuration.
Public Members
-
pdcon_access_ctrl_t accessCtrl#
Access control configuration.
-
pdcon_trigger_config_t trigger#
Trigger capability configuration.
-
pdcon_access_ctrl_t accessCtrl#
PDM: Microphone Interface#
PDM Driver#
-
void PDM_Init(PDM_Type *base, const pdm_config_t *config)#
Initializes the PDM peripheral.
Ungates the PDM clock, resets the module, and configures PDM with a configuration structure. The configuration structure can be custom filled or set with default values by PDM_GetDefaultConfig().
Note
This API should be called at the beginning of the application to use the PDM driver. Otherwise, accessing the PDM module can cause a hard fault because the clock is not enabled.
- Parameters:
base – PDM base pointer
config – PDM configuration structure.
-
void PDM_Deinit(PDM_Type *base)#
De-initializes the PDM peripheral.
This API gates the PDM clock. The PDM module can’t operate unless PDM_Init is called to enable the clock.
- Parameters:
base – PDM base pointer
-
static inline void PDM_Reset(PDM_Type *base)#
Resets the PDM module.
- Parameters:
base – PDM base pointer
-
static inline void PDM_Enable(PDM_Type *base, bool enable)#
Enables/disables PDM interface.
- Parameters:
base – PDM base pointer
enable – True means PDM interface is enabled, false means PDM interface is disabled.
-
static inline void PDM_EnableDebugMode(PDM_Type *base, bool enable)#
Enables/disables debug mode for PDM. The PDM interface cannot enter debug mode once in Disable/Low Leakage or Low Power mode.
- Parameters:
base – PDM base pointer
enable – True means PDM interface enter debug mode, false means PDM interface in normal mode.
-
static inline void PDM_EnableInDebugMode(PDM_Type *base, bool enable)#
Enables/disables PDM interface in debug mode.
- Parameters:
base – PDM base pointer
enable – True means PDM interface is enabled debug mode, false means PDM interface is disabled after after completing the current frame in debug mode.
-
static inline void PDM_EnterLowLeakageMode(PDM_Type *base, bool enable)#
Enables/disables PDM interface disable/Low Leakage mode.
- Parameters:
base – PDM base pointer
enable – True means PDM interface is in disable/low leakage mode, False means PDM interface is in normal mode.
-
static inline void PDM_EnableChannel(PDM_Type *base, uint8_t channel, bool enable)#
Enables/disables the PDM channel.
- Parameters:
base – PDM base pointer
channel – PDM channel number need to enable or disable.
enable – True means enable PDM channel, false means disable.
-
void PDM_SetChannelConfig(PDM_Type *base, uint32_t channel, const pdm_channel_config_t *config)#
PDM one channel configurations.
- Parameters:
base – PDM base pointer
config – PDM channel configurations.
channel – channel number. after completing the current frame in debug mode.
-
status_t PDM_SetSampleRateConfig(PDM_Type *base, uint32_t sourceClock_HZ, uint32_t sampleRate_HZ)#
PDM set sample rate.
Note
This function is depend on the configuration of the PDM and PDM channel, so the correct call sequence is
PDM_Init(base, pdmConfig) PDM_SetChannelConfig(base, channel, &channelConfig) PDM_SetSampleRateConfig(base, source, sampleRate)
- Parameters:
base – PDM base pointer
sourceClock_HZ – PDM source clock frequency.
sampleRate_HZ – PDM sample rate.
-
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.
- Deprecated:
Do not use this function. It has been superceded by PDM_SetSampleRateConfig
- Parameters:
base – PDM base pointer
enableChannelMask – PDM channel enable mask.
qualityMode – quality mode.
osr – cic oversample rate
clkDiv – clock divider
-
uint32_t PDM_GetInstance(PDM_Type *base)#
Get the instance number for PDM.
- Parameters:
base – PDM base pointer.
-
static inline uint32_t PDM_GetStatus(PDM_Type *base)#
Gets the PDM internal status flag. Use the Status Mask in _pdm_internal_status to get the status value needed.
- Parameters:
base – PDM base pointer
- Returns:
PDM status flag value.
-
static inline uint32_t PDM_GetFifoStatus(PDM_Type *base)#
Gets the PDM FIFO status flag. Use the Status Mask in _pdm_fifo_status to get the status value needed.
- Parameters:
base – PDM base pointer
- Returns:
FIFO status.
-
static inline uint32_t PDM_GetRangeStatus(PDM_Type *base)#
Gets the PDM Range status flag. Use the Status Mask in _pdm_range_status to get the status value needed.
- Parameters:
base – PDM base pointer
- Returns:
output status.
-
static inline void PDM_ClearStatus(PDM_Type *base, uint32_t mask)#
Clears the PDM Tx status.
- Parameters:
base – PDM base pointer
mask – State mask. It can be a combination of the status between kPDM_StatusFrequencyLow and kPDM_StatusCh7FifoDataAvaliable.
-
static inline void PDM_ClearFIFOStatus(PDM_Type *base, uint32_t mask)#
Clears the PDM Tx status.
- Parameters:
base – PDM base pointer
mask – State mask.It can be a combination of the status in _pdm_fifo_status.
-
static inline void PDM_ClearRangeStatus(PDM_Type *base, uint32_t mask)#
Clears the PDM range status.
- Parameters:
base – PDM base pointer
mask – State mask. It can be a combination of the status in _pdm_range_status.
-
void PDM_EnableInterrupts(PDM_Type *base, uint32_t mask)#
Enables the PDM interrupt requests.
- Parameters:
base – PDM base pointer
mask – interrupt source The parameter can be a combination of the following sources if defined.
kPDM_ErrorInterruptEnable
kPDM_FIFOInterruptEnable
-
static inline void PDM_DisableInterrupts(PDM_Type *base, uint32_t mask)#
Disables the PDM interrupt requests.
- Parameters:
base – PDM base pointer
mask – interrupt source The parameter can be a combination of the following sources if defined.
kPDM_ErrorInterruptEnable
kPDM_FIFOInterruptEnable
-
static inline void PDM_EnableDMA(PDM_Type *base, bool enable)#
Enables/disables the PDM DMA requests.
- Parameters:
base – PDM base pointer
enable – True means enable DMA, false means disable DMA.
-
static inline uint32_t PDM_GetDataRegisterAddress(PDM_Type *base, uint32_t channel)#
Gets the PDM data register address.
This API is used to provide a transfer address for the PDM DMA transfer configuration.
- Parameters:
base – PDM base pointer.
channel – Which data channel used.
- Returns:
data register address.
-
void PDM_ReadFifo(PDM_Type *base, uint32_t startChannel, uint32_t channelNums, void *buffer, size_t size, uint32_t dataWidth)#
PDM read fifo.
Note
: This function support 16 bit only for IP version that only supports 16bit.
- Parameters:
base – PDM base pointer.
startChannel – start channel number.
channelNums – total enabled channelnums.
buffer – received buffer address.
size – number of samples to read.
dataWidth – sample width.
-
void PDM_SetChannelGain(PDM_Type *base, uint32_t channel, pdm_df_output_gain_t gain)#
Set the PDM channel gain.
Please note for different quality mode, the valid gain value is different, reference RM for detail.
- Parameters:
base – PDM base pointer.
channel – PDM channel index.
gain – channel gain, the register gain value range is 0 - 15.
-
void PDM_TransferCreateHandle(PDM_Type *base, pdm_handle_t *handle, pdm_transfer_callback_t callback, void *userData)#
Initializes the PDM handle.
This function initializes the handle for the PDM transactional APIs. Call this function once to get the handle initialized.
- Parameters:
base – PDM base pointer.
handle – PDM handle pointer.
callback – Pointer to the user callback function.
userData – User parameter passed to the callback function.
-
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.
- Parameters:
base – PDM base pointer.
handle – PDM handle pointer.
channel – PDM channel.
config – channel config.
format – data format, support data width configurations,_pdm_data_width.
- Return values:
kStatus_PDM_ChannelConfig_Failed – or kStatus_Success.
-
status_t PDM_TransferReceiveNonBlocking(PDM_Type *base, pdm_handle_t *handle, pdm_transfer_t *xfer)#
Performs an interrupt non-blocking receive transfer on PDM.
Note
This API returns immediately after the transfer initiates. Call the PDM_RxGetTransferStatusIRQ to poll the transfer status and check whether the transfer is finished. If the return status is not kStatus_PDM_Busy, the transfer is finished.
- Parameters:
base – PDM base pointer
handle – Pointer to the pdm_handle_t structure which stores the transfer state.
xfer – Pointer to the pdm_transfer_t structure.
- Return values:
kStatus_Success – Successfully started the data receive.
kStatus_PDM_Busy – Previous receive still not finished.
-
void PDM_TransferAbortReceive(PDM_Type *base, pdm_handle_t *handle)#
Aborts the current IRQ receive.
Note
This API can be called when an interrupt non-blocking transfer initiates to abort the transfer early.
- Parameters:
base – PDM base pointer
handle – Pointer to the pdm_handle_t structure which stores the transfer state.
-
void PDM_TransferHandleIRQ(PDM_Type *base, pdm_handle_t *handle)#
Tx interrupt handler.
- Parameters:
base – PDM base pointer.
handle – Pointer to the pdm_handle_t structure.
-
void PDM_EventHandleIRQ(uint32_t instance)#
-
FSL_PDM_DRIVER_VERSION#
Version 2.9.8
PDM return status.
Values:
-
enumerator kStatus_PDM_Busy#
PDM is busy.
-
enumerator kStatus_PDM_CLK_LOW#
PDM clock frequency low
-
enumerator kStatus_PDM_FIFO_ERROR#
PDM FIFO underrun or overflow
-
enumerator kStatus_PDM_QueueFull#
PDM FIFO underrun or overflow
-
enumerator kStatus_PDM_Idle#
PDM is idle
-
enumerator kStatus_PDM_Output_ERROR#
PDM is output error
-
enumerator kStatus_PDM_ChannelConfig_Failed#
PDM channel config failed
-
enumerator kStatus_PDM_Busy#
-
enum _pdm_interrupt_enable#
The PDM interrupt enable flag.
Values:
-
enumerator kPDM_ErrorInterruptEnable#
PDM channel error interrupt enable.
-
enumerator kPDM_FIFOInterruptEnable#
PDM channel FIFO interrupt
-
enumerator kPDM_ErrorInterruptEnable#
-
enum _pdm_internal_status#
The PDM status.
Values:
-
enumerator kPDM_StatusDfBusyFlag#
Decimation filter is busy processing data
-
enumerator kPDM_StatusFrequencyLow#
Mic app clock frequency not high enough
-
enumerator kPDM_StatusCh0FifoDataAvaliable#
channel 0 fifo data reached watermark level
-
enumerator kPDM_StatusCh1FifoDataAvaliable#
channel 1 fifo data reached watermark level
-
enumerator kPDM_StatusCh2FifoDataAvaliable#
channel 2 fifo data reached watermark level
-
enumerator kPDM_StatusCh3FifoDataAvaliable#
channel 3 fifo data reached watermark level
-
enumerator kPDM_StatusDfBusyFlag#
-
enum _pdm_channel_enable_mask#
PDM channel enable mask.
Values:
-
enumerator kPDM_EnableChannel0#
channgel 0 enable mask
-
enumerator kPDM_EnableChannel1#
channgel 1 enable mask
-
enumerator kPDM_EnableChannel2#
channgel 2 enable mask
-
enumerator kPDM_EnableChannel3#
channgel 3 enable mask
-
enumerator kPDM_EnableChannelAll#
-
enumerator kPDM_EnableChannel0#
-
enum _pdm_fifo_status#
The PDM fifo status.
Values:
-
enumerator kPDM_FifoStatusUnderflowCh0#
channel0 fifo status underflow
-
enumerator kPDM_FifoStatusUnderflowCh1#
channel1 fifo status underflow
-
enumerator kPDM_FifoStatusUnderflowCh2#
channel2 fifo status underflow
-
enumerator kPDM_FifoStatusUnderflowCh3#
channel3 fifo status underflow
-
enumerator kPDM_FifoStatusOverflowCh0#
channel0 fifo status overflow
-
enumerator kPDM_FifoStatusOverflowCh1#
channel1 fifo status overflow
-
enumerator kPDM_FifoStatusOverflowCh2#
channel2 fifo status overflow
-
enumerator kPDM_FifoStatusOverflowCh3#
channel3 fifo status overflow
-
enumerator kPDM_FifoStatusUnderflowCh0#
-
enum _pdm_range_status#
The PDM output status.
Values:
-
enumerator kPDM_RangeStatusUnderFlowCh0#
channel0 range status underflow
-
enumerator kPDM_RangeStatusUnderFlowCh1#
channel1 range status underflow
-
enumerator kPDM_RangeStatusUnderFlowCh2#
channel2 range status underflow
-
enumerator kPDM_RangeStatusUnderFlowCh3#
channel3 range status underflow
-
enumerator kPDM_RangeStatusOverFlowCh0#
channel0 range status overflow
-
enumerator kPDM_RangeStatusOverFlowCh1#
channel1 range status overflow
-
enumerator kPDM_RangeStatusOverFlowCh2#
channel2 range status overflow
-
enumerator kPDM_RangeStatusOverFlowCh3#
channel3 range status overflow
-
enumerator kPDM_RangeStatusUnderFlowCh0#
-
enum _pdm_dc_remover#
PDM DC remover configurations.
Values:
-
enumerator kPDM_DcRemoverCutOff20Hz#
DC remover cut off 20HZ
-
enumerator kPDM_DcRemoverCutOff13Hz#
DC remover cut off 13.3HZ
-
enumerator kPDM_DcRemoverCutOff40Hz#
DC remover cut off 40HZ
-
enumerator kPDM_DcRemoverBypass#
DC remover bypass
-
enumerator kPDM_DcRemoverCutOff20Hz#
-
enum _pdm_df_quality_mode#
PDM decimation filter quality mode.
Values:
-
enumerator kPDM_QualityModeMedium#
quality mode memdium
-
enumerator kPDM_QualityModeHigh#
quality mode high
-
enumerator kPDM_QualityModeLow#
quality mode low
-
enumerator kPDM_QualityModeVeryLow0#
quality mode very low0
-
enumerator kPDM_QualityModeVeryLow1#
quality mode very low1
-
enumerator kPDM_QualityModeVeryLow2#
quality mode very low2
-
enumerator kPDM_QualityModeMedium#
-
enum _pdm_qulaity_mode_k_factor#
PDM quality mode K factor.
Values:
-
enumerator kPDM_QualityModeHighKFactor#
high quality mode K factor = 1 / 2
-
enumerator kPDM_QualityModeMediumKFactor#
medium/very low0 quality mode K factor = 2 / 2
-
enumerator kPDM_QualityModeLowKFactor#
low/very low1 quality mode K factor = 4 / 2
-
enumerator kPDM_QualityModeVeryLow2KFactor#
very low2 quality mode K factor = 8 / 2
-
enumerator kPDM_QualityModeHighKFactor#
-
enum _pdm_df_output_gain#
PDM decimation filter output gain.
Values:
-
enumerator kPDM_DfOutputGain0#
Decimation filter output gain 0
-
enumerator kPDM_DfOutputGain1#
Decimation filter output gain 1
-
enumerator kPDM_DfOutputGain2#
Decimation filter output gain 2
-
enumerator kPDM_DfOutputGain3#
Decimation filter output gain 3
-
enumerator kPDM_DfOutputGain4#
Decimation filter output gain 4
-
enumerator kPDM_DfOutputGain5#
Decimation filter output gain 5
-
enumerator kPDM_DfOutputGain6#
Decimation filter output gain 6
-
enumerator kPDM_DfOutputGain7#
Decimation filter output gain 7
-
enumerator kPDM_DfOutputGain8#
Decimation filter output gain 8
-
enumerator kPDM_DfOutputGain9#
Decimation filter output gain 9
-
enumerator kPDM_DfOutputGain10#
Decimation filter output gain 10
-
enumerator kPDM_DfOutputGain11#
Decimation filter output gain 11
-
enumerator kPDM_DfOutputGain12#
Decimation filter output gain 12
-
enumerator kPDM_DfOutputGain13#
Decimation filter output gain 13
-
enumerator kPDM_DfOutputGain14#
Decimation filter output gain 14
-
enumerator kPDM_DfOutputGain15#
Decimation filter output gain 15
-
enumerator kPDM_DfOutputGain0#
-
enum _pdm_data_width#
PDM data width.
Values:
-
enumerator kPDM_DataWwidth24#
PDM data width 24bit
-
enumerator kPDM_DataWwidth32#
PDM data width 32bit
-
enumerator kPDM_DataWwidth24#
-
typedef enum _pdm_dc_remover pdm_dc_remover_t#
PDM DC remover configurations.
-
typedef enum _pdm_df_quality_mode pdm_df_quality_mode_t#
PDM decimation filter quality mode.
-
typedef enum _pdm_df_output_gain pdm_df_output_gain_t#
PDM decimation filter output gain.
-
typedef struct _pdm_channel_config pdm_channel_config_t#
PDM channel configurations.
-
typedef struct _pdm_config pdm_config_t#
PDM user configuration structure.
-
typedef struct _pdm_transfer pdm_transfer_t#
PDM SDMA transfer structure.
-
typedef struct _pdm_handle pdm_handle_t#
PDM handle.
-
typedef void (*pdm_transfer_callback_t)(PDM_Type *base, pdm_handle_t *handle, status_t status, void *userData)#
PDM transfer callback prototype.
-
PDM_XFER_QUEUE_SIZE#
PDM XFER QUEUE SIZE.
-
struct _pdm_channel_config#
- #include <fsl_pdm.h>
PDM channel configurations.
Public Members
-
pdm_dc_remover_t outputCutOffFreq#
PDM output DC remover cut off frequency
-
pdm_df_output_gain_t gain#
Decimation Filter Output Gain
-
pdm_dc_remover_t outputCutOffFreq#
-
struct _pdm_config#
- #include <fsl_pdm.h>
PDM user configuration structure.
Public Members
-
bool enableDoze#
This module will enter disable/low leakage mode if DOZEN is active with ipg_doze is asserted
-
bool enableFilterBypass#
Switchable bypass path for the decimation filter
-
uint8_t fifoWatermark#
Watermark value for FIFO
-
pdm_df_quality_mode_t qualityMode#
Quality mode
-
uint8_t cicOverSampleRate#
CIC filter over sampling rate
-
bool enableDoze#
-
struct _pdm_transfer#
- #include <fsl_pdm.h>
PDM SDMA transfer structure.
-
struct _pdm_handle#
- #include <fsl_pdm.h>
PDM handle structure.
Public Members
-
uint32_t state#
Transfer status
-
pdm_transfer_callback_t callback#
Callback function called at transfer event
-
void *userData#
Callback parameter passed to callback function
-
pdm_transfer_t pdmQueue[(4U)]#
Transfer queue storing queued transfer
-
size_t transferSize[(4U)]#
Data bytes need to transfer
-
volatile uint8_t queueUser#
Index for user to queue transfer
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
uint32_t format#
data format
-
uint8_t watermark#
Watermark value
-
uint8_t startChannel#
end channel
-
uint8_t channelNums#
Enabled channel number
-
uint32_t state#
PDM EDMA Driver#
-
void PDM_TransferInstallEDMATCDMemory(pdm_edma_handle_t *handle, void *tcdAddr, size_t tcdNum)#
Install EDMA descriptor memory.
- Parameters:
handle – Pointer to EDMA channel transfer handle.
tcdAddr – EDMA head descriptor address.
tcdNum – EDMA link descriptor address.
-
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.
This function initializes the PDM slave DMA handle, which can be used for other PDM master transactional APIs. Usually, for a specified PDM instance, call this API once to get the initialized handle.
- Parameters:
base – PDM base pointer.
handle – PDM eDMA handle pointer.
callback – Pointer to user callback function.
userData – User parameter passed to the callback function.
dmaHandle – eDMA handle pointer, this handle shall be static allocated by users.
-
void PDM_TransferSetMultiChannelInterleaveType(pdm_edma_handle_t *handle, pdm_edma_multi_channel_interleave_t multiChannelInterleaveType)#
Initializes the multi PDM channel interleave type.
This function initializes the PDM DMA handle member interleaveType, it shall be called only when application would like to use type kPDM_EDMAMultiChannelInterleavePerChannelBlock, since the default interleaveType is kPDM_EDMAMultiChannelInterleavePerChannelSample always
- Parameters:
handle – PDM eDMA handle pointer.
multiChannelInterleaveType – Multi channel interleave type.
-
void PDM_TransferSetChannelConfigEDMA(PDM_Type *base, pdm_edma_handle_t *handle, uint32_t channel, const pdm_channel_config_t *config)#
Configures the PDM channel.
- Parameters:
base – PDM base pointer.
handle – PDM eDMA handle pointer.
channel – channel index.
config – pdm channel configurations.
-
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.
Mcaro MCUX_SDK_PDM_EDMA_PDM_ENABLE_INTERNAL can control whether PDM is enabled internally or externally.
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:
pdm_edma_transfer_t pdmXfer[2] = { { .data = s_buffer, .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 =PDM_TransferSetChannelConfigEDMA(DEMO_PDM, &s_pdmRxHandle_0, DEMO_PDM_ENABLE_CHANNEL_0, &channelConfig); PDM_TransferSetChannelConfigEDMA(DEMO_PDM, &s_pdmRxHandle_0, DEMO_PDM_ENABLE_CHANNEL_1, &channelConfig); PDM_TransferReceiveEDMA(DEMO_PDM, &s_pdmRxHandle_0, pdmXfer);
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.
-
void PDM_TransferTerminateReceiveEDMA(PDM_Type *base, pdm_edma_handle_t *handle)#
Terminate all PDM receive.
This function will clear all transfer slots buffered in the pdm queue. If users only want to abort the current transfer slot, please call PDM_TransferAbortReceiveEDMA.
- Parameters:
base – PDM base pointer.
handle – PDM eDMA handle pointer.
-
void PDM_TransferAbortReceiveEDMA(PDM_Type *base, pdm_edma_handle_t *handle)#
Aborts a PDM receive using eDMA.
This function only aborts the current transfer slots, the other transfer slots’ information still kept in the handler. If users want to terminate all transfer slots, just call PDM_TransferTerminateReceiveEDMA.
- Parameters:
base – PDM base pointer
handle – PDM eDMA handle pointer.
-
status_t PDM_TransferGetReceiveCountEDMA(PDM_Type *base, pdm_edma_handle_t *handle, size_t *count)#
Gets byte count received by PDM.
- Parameters:
base – PDM base pointer
handle – PDM eDMA handle pointer.
count – Bytes count received by PDM.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is no non-blocking transaction in progress.
-
FSL_PDM_EDMA_DRIVER_VERSION#
Version 2.6.5
-
enum _pdm_edma_multi_channel_interleave#
pdm multi channel interleave type
Values:
-
enumerator kPDM_EDMAMultiChannelInterleavePerChannelSample#
-
enumerator kPDM_EDMAMultiChannelInterleavePerChannelBlock#
-
enumerator kPDM_EDMAMultiChannelInterleavePerChannelSample#
-
typedef struct _pdm_edma_handle pdm_edma_handle_t#
PDM edma handler.
-
typedef enum _pdm_edma_multi_channel_interleave pdm_edma_multi_channel_interleave_t#
pdm multi channel interleave type
-
typedef struct _pdm_edma_transfer pdm_edma_transfer_t#
PDM edma transfer.
-
typedef void (*pdm_edma_callback_t)(PDM_Type *base, pdm_edma_handle_t *handle, status_t status, void *userData)#
PDM eDMA transfer callback function for finish and error.
-
MCUX_SDK_PDM_EDMA_PDM_ENABLE_INTERNAL#
the PDM enable position When calling PDM_TransferReceiveEDMA
-
struct _pdm_edma_transfer#
- #include <fsl_pdm_edma.h>
PDM edma transfer.
Public Members
-
volatile uint8_t *data#
Data start address to transfer.
-
volatile size_t dataSize#
Total Transfer bytes size.
-
struct _pdm_edma_transfer *linkTransfer#
linked transfer configurations
-
volatile uint8_t *data#
-
struct _pdm_edma_handle#
- #include <fsl_pdm_edma.h>
PDM DMA transfer handle, users should not touch the content of the handle.
Public Members
-
edma_handle_t *dmaHandle#
DMA handler for PDM send
-
uint8_t count#
The transfer data count in a DMA request
-
uint32_t receivedBytes#
total transfer count
-
uint32_t state#
Internal state for PDM eDMA transfer
-
pdm_edma_callback_t callback#
Callback for users while transfer finish or error occurs
-
bool isLoopTransfer#
loop transfer
-
void *userData#
User callback parameter
-
edma_tcd_t *tcd#
TCD pool for eDMA transfer.
-
uint32_t tcdNum#
TCD number
-
uint32_t tcdUser#
Index for user to queue transfer.
-
uint32_t tcdDriver#
Index for driver to get the transfer data and size
-
volatile uint32_t tcdUsedNum#
Index for user to queue transfer.
-
pdm_edma_multi_channel_interleave_t interleaveType#
multi channel transfer interleave type
-
uint8_t endChannel#
The last enabled channel
-
uint8_t channelNums#
total channel numbers
-
edma_handle_t *dmaHandle#
Pmu#
-
uint32_t PMU_GetStatus(PMU_Type *base)#
Read the raw PMU status register.
- Parameters:
base – PMU peripheral base address.
- Returns:
Raw PMU_STS register value.
-
pmu_boot_error_reason_t PMU_GetBootErrorReason(PMU_Type *base)#
Return the boot error reason latched by the PMU at startup.
- Parameters:
base – PMU peripheral base address.
- Returns:
pmu_boot_error_reason_t value.
-
void PMU_ConfigDcdc(PMU_Type *base, const pmu_dcdc_config_t *config)#
Write the DCDC configuration registers.
- Parameters:
base – PMU peripheral base address.
config – Pointer to DCDC configuration. Must not be NULL.
-
void PMU_ConfigDcdcPwmMode(PMU_Type *base, const pmu_dcdc_pwm_config_t *config)#
Write the DCDC PWM loop compensation configuration.
Call only when the DCDC is operating in PWM mode (kPMU_DcdcModePWM).
- Parameters:
base – PMU peripheral base address.
config – Pointer to PWM loop configuration. Must not be NULL.
-
void PMU_ConfigLdoVdd0V8(PMU_Type *base, const pmu_ldo_vdd0v8_config_t *config)#
Configure LDO_VDD_0V8 (core voltage LDO).
- Parameters:
base – PMU peripheral base address.
config – Pointer to LDO_VDD_0V8 configuration. Must not be NULL.
-
void PMU_ConfigLdoVdd1V8(PMU_Type *base, const pmu_ldo_vdd1v8_config_t *config)#
Configure LDO_VDD_1V8 (I/O supply LDO).
- Parameters:
base – PMU peripheral base address.
config – Pointer to LDO_VDD_1V8 configuration. Must not be NULL.
-
void PMU_ConfigLdoVdda1V8(PMU_Type *base, const pmu_ldo_vdda1v8_config_t *config)#
Configure LDO_VDDA_1V8 (analog supply LDO).
- Parameters:
base – PMU peripheral base address.
config – Pointer to LDO_VDDA_1V8 configuration. Must not be NULL.
-
void PMU_ConfigVddPmu(PMU_Type *base, const pmu_vdd_pmu_config_t *config)#
Configure the VDD_PMU voltage monitor.
- Parameters:
base – PMU peripheral base address.
config – Pointer to VDD_PMU monitor configuration. Must not be NULL.
-
static inline bool PMU_IsVddPmu3VRange(PMU_Type *base)#
Check whether VDD_PMU is in the 3 V supply range.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the VDD_PMU 3 V range flag is set.
-
static inline bool PMU_IsVddPmu1V8Range(PMU_Type *base)#
Check whether VDD_PMU is in the 1.8 V supply range.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the VDD_PMU 1.8 V range flag is set.
-
void PMU_ConfigBodyBias(PMU_Type *base, const pmu_body_bias_config_t *config)#
Write the body bias configuration registers.
Writes configuration but does NOT trigger the body bias FSM update. Call PMU_ApplyBodyBiasBlocking or PMU_ApplyBodyBiasNonBlocking after this function to apply the new configuration to hardware.
Always updates mode/pwellClkSel/rampClkSel/advcEnable. Whether it also writes config->nwellVolSel/pwellVolSel to the NWELL_VOL/PWELL_VOL bitfields depends on PMU_DRIVER_UPDATE_TRIM_VALUE: disabled (default) does a read-modify-write that leaves those bitfields untouched, so a ROM-applied trim on parts with an untrimmed P-Well/N-Well fuse is never overwritten; enabled writes them like every other field.
- Parameters:
base – PMU peripheral base address.
config – Pointer to body bias configuration. Must not be NULL.
-
status_t PMU_ApplyBodyBiasBlocking(PMU_Type *base)#
Trigger the body bias FSM and block until the update is stable.
Clears previous done/error status, triggers the FSM, and polls until either the done flag or the error flag is set. After done, verifies PMU_BODYBIAS_STATUS_STS SAFE_STATE and mode-specific well voltage status.
- Parameters:
base – PMU peripheral base address.
- Return values:
kStatus_Success – Body bias update completed without error.
kStatus_Fail – Body bias FSM reported an error.
kStatus_Timeout – Update or stable-state polling timed out if timeout is configured.
-
void PMU_ApplyBodyBiasNonBlocking(PMU_Type *base)#
Trigger the body bias FSM without waiting for completion.
Use PMU_CheckBodyBiasUpdateDone and PMU_CheckBodyBiasUpdateError to poll for completion.
- Parameters:
base – PMU peripheral base address.
-
void PMU_GetDefaultBodyBiasConfig(pmu_body_bias_config_t *config)#
Fill a body bias config struct with ZBB power-on-safe defaults.
Default configuration: mode = ZBB, all voltage selections 0 mV, ramp clock 750 kHz, P-well clock divider 1, all interrupts disabled.
- Parameters:
config – Pointer to config struct to fill. Must not be NULL.
-
static inline bool PMU_GetBodyBiasNwellVoltageOk(PMU_Type *base)#
Check whether the N-well body bias voltage is within the target range.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the N-well voltage-OK flag is set.
-
static inline bool PMU_GetBodyBiasPwellVoltageOk(PMU_Type *base)#
Check whether the P-well body bias voltage is within the target range.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the P-well voltage-OK flag is set.
-
static inline bool PMU_GetBodyBiasSafeState(PMU_Type *base)#
Check whether the body bias is in a safe (non-ramping) state.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the body bias safe-state flag is set.
-
static inline bool PMU_CheckBodyBiasUpdateDone(PMU_Type *base)#
Check whether the body bias FSM update-done interrupt status is set.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the update-done interrupt status flag is set.
-
static inline void PMU_ClearBodyBiasUpdateStatus(PMU_Type *base)#
Clear the body bias update-done interrupt status flag.
- Parameters:
base – PMU peripheral base address.
-
static inline bool PMU_CheckBodyBiasUpdateError(PMU_Type *base)#
Check whether the body bias FSM error interrupt status is set.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the error interrupt status flag is set.
-
static inline void PMU_ClearBodyBiasUpdateError(PMU_Type *base)#
Clear the body bias error interrupt status flag.
- Parameters:
base – PMU peripheral base address.
-
void PMU_ConfigTemperatureSensor(PMU_Type *base, const pmu_temperature_sensor_config_t *config)#
Configure the on-die temperature sensor.
- Parameters:
base – PMU peripheral base address.
config – Pointer to temperature sensor configuration. Must not be NULL.
-
static inline bool PMU_IsTemperatureHigh(PMU_Type *base)#
Check whether the die temperature exceeds the high threshold.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the high-temperature status flag is set.
-
static inline bool PMU_IsTemperatureLow(PMU_Type *base)#
Check whether the die temperature is below the low threshold.
- Parameters:
base – PMU peripheral base address.
- Returns:
true if the low-temperature status flag is set.
-
void PMU_ConfigXOSC32K(PMU_Type *base, const pmu_xosc32k_config_t *config)#
Configure the 32 kHz crystal oscillator (XOSC 32K).
- Parameters:
base – PMU peripheral base address.
config – Pointer to XOSC 32K configuration. Must not be NULL.
-
static inline uint32_t PMU_GetXOSC32KStatus(PMU_Type *base)#
Read the XOSC 32K status register.
- Parameters:
base – PMU peripheral base address.
- Returns:
Raw PMU_XOSC32KNP_STS register value.
-
void PMU_ConfigWarmResetGates(PMU_Type *base, uint32_t mask, bool enable)#
Enable or disable PMU warm-reset source gates.
- Parameters:
base – PMU peripheral base address.
mask – Bitmask of warm-reset source bits to configure.
enable – true = allow warm reset from these sources; false = suppress.
-
void PMU_ConfigColdResetGates(PMU_Type *base, uint32_t mask, bool enable)#
Enable or disable PMU cold-reset source gates.
- Parameters:
base – PMU peripheral base address.
mask – Bitmask of cold-reset source bits to configure.
enable – true = allow cold reset from these sources; false = suppress.
-
void PMU_EnableInterrupts(PMU_Type *base, uint32_t mask)#
Enable PMU interrupt sources.
- Parameters:
base – PMU peripheral base address.
mask – Bitmask of interrupt sources to enable.
-
void PMU_DisableInterrupts(PMU_Type *base, uint32_t mask)#
Disable PMU interrupt sources.
- Parameters:
base – PMU peripheral base address.
mask – Bitmask of interrupt sources to disable.
-
void PMU_ClearInterruptStatusFlags(PMU_Type *base, uint32_t clearMask)#
Clear PMU interrupt status flags.
- Parameters:
base – PMU peripheral base address.
clearMask – Bitmask of interrupt status flags to clear.
-
uint32_t PMU_GetInterruptStatusFlags(PMU_Type *base)#
Read the PMU interrupt status for enabled (masked) sources only.
- Parameters:
base – PMU peripheral base address.
- Returns:
Bitmask of active, enabled interrupt flags.
-
uint32_t PMU_GetInterruptStatus(PMU_Type *base)#
Read the raw PMU interrupt status regardless of enable state.
- Parameters:
base – PMU peripheral base address.
- Returns:
Bitmask of all active interrupt flags.
-
FSL_PMU_DRIVER_VERSION#
PMU driver version 2.0.0.
-
enum _pmu_mode#
PMU overall operating mode.
Values match POWERCON_SOC_CTRL.PMUCFG_ACTIVE/PMUCFG_STBY.PMU_MODE encoding.
Values:
-
enumerator kPMU_ModeHP#
High-performance (HP/NP/LP RUN, Sleep)
-
enumerator kPMU_ModeHPProg#
HP programming mode (internal use)
-
enumerator kPMU_ModeLP#
Low-power (Deep Sleep standby)
-
enumerator kPMU_ModeRET#
Retention (Power Down)
-
enumerator kPMU_ModeBB#
Body Bias / VBAT domain (Deep Power Down)
-
enumerator kPMU_ModeHP#
-
enum _pmu_boot_error_reason#
PMU FSM boot error reason.
Encodes the 6-bit PMU_STS[13:8] field. Values 0x00–0x19 are defined by hardware; any other value indicates an undocumented FSM stop reason.
Values:
-
enumerator kPMU_BootErrorNone#
No error.
-
enumerator kPMU_BootErrorHqrefSettle#
HQ_VREF_OK not asserted during cold boot.
-
enumerator kPMU_BootErrorVddCoreAonSettle#
VDD_CORE_AON OK not asserted during cold boot.
-
enumerator kPMU_BootErrorLdoSettle#
PMU_MONITOR_VDD(A)1V8_OK not asserted during cold boot.
-
enumerator kPMU_BootErrorVdd0V8Settle#
PMU_MONITOR_VDD0V8_OK not asserted during cold boot.
-
enumerator kPMU_BootErrorPfmSettle#
PFM_RDY not asserted during cold boot.
-
enumerator kPMU_BootErrorMonVddCoreSettle#
VDD_CORE_OK not asserted during cold boot.
-
enumerator kPMU_BootErrorCguOtpRdyWait#
192 MHz not ready for OTP access.
-
enumerator kPMU_BootErrorOtpSettle#
OTP_RDY not asserted.
-
enumerator kPMU_BootErrorCguRdyWaitSettle#
192 MHz not ready for DC-DC PWM mode.
-
enumerator kPMU_BootErrorPwmSettle#
PMU PWM settle failure.
-
enumerator kPMU_BootErrorVoltCheck#
Not all main voltages OK.
-
enumerator kPMU_BootErrorPllOkSettle#
192 MHz or MAINPLL not ready.
-
enumerator kPMU_BootErrorBodyBiasSettle#
PWELL_OK or NWELL_OK not asserted.
-
enumerator kPMU_BootErrorHpUpdate#
Clocks requested by PSTATE not ready.
-
enumerator kPMU_BootErrorPfmLpSettle#
PFM_RDY not OK when PFM required in LP.
-
enumerator kPMU_BootErrorRetHqRefOffSettle#
DPD_RDY not asserted when waking from retention.
-
enumerator kPMU_BootErrorRetExitSettle#
HQ_VREF_OK not asserted when waking from PMU_RET.
-
enumerator kPMU_BootErrorLpExitSettle#
Not all main voltages OK when waking from PMU_LP.
-
enumerator kPMU_BootErrorCguReqFromLp#
VDD_CORE not ready when waking from PMU_LP.
-
enumerator kPMU_BootErrorWarmResetCguOffSettle#
Clock de-assert not confirmed by CGU during warm reset.
-
enumerator kPMU_BootErrorWarmHqrefSettle#
HQ_VREF_OK not asserted during warm reset.
-
enumerator kPMU_BootErrorWarmLdoSettle#
PMU_MONITOR_VDD(A)1V8_OK not asserted during warm reset.
-
enumerator kPMU_BootErrorWarmVdd0V8Settle#
PMU_MONITOR_VDD0V8_OK not asserted during warm reset.
-
enumerator kPMU_BootErrorWarmPfmSettle#
PFM_RDY not asserted during warm reset.
-
enumerator kPMU_BootErrorWarmMonVddCoreSettle#
VDD_CORE_OK not asserted during warm reset.
-
enumerator kPMU_BootErrorNone#
-
enum _pmu_sensor_upper_thres_0v8#
Voltage sensor upper threshold for 0.8 V rail (DCDC / LDO_VDD_0V8).
Values:
-
enumerator kPMU_SensorUpper0V8_875mV#
Upper threshold 875 mV.
-
enumerator kPMU_SensorUpper0V8_925mV#
Upper threshold 925 mV.
-
enumerator kPMU_SensorUpper0V8_975mV#
Upper threshold 975 mV.
-
enumerator kPMU_SensorUpper0V8_1025mV#
Upper threshold 1025 mV.
-
enumerator kPMU_SensorUpper0V8_875mV#
-
enum _pmu_sensor_lower_thres_0v8#
Voltage sensor lower threshold for 0.8 V rail (DCDC / LDO_VDD_0V8).
Values:
-
enumerator kPMU_SensorLower0V8_725mV#
Lower threshold 725 mV.
-
enumerator kPMU_SensorLower0V8_675mV#
Lower threshold 675 mV.
-
enumerator kPMU_SensorLower0V8_625mV#
Lower threshold 625 mV.
-
enumerator kPMU_SensorLower0V8_575mV#
Lower threshold 575 mV.
-
enumerator kPMU_SensorLower0V8_725mV#
-
enum _pmu_sensor_upper_thres_1v8#
Voltage sensor upper threshold for 1.8 V rail (LDO_VDD_1V8 / LDO_VDDA_1V8).
Values:
-
enumerator kPMU_SensorUpper1V8_2V05#
Upper threshold 2.05 V.
-
enumerator kPMU_SensorUpper1V8_2V10#
Upper threshold 2.10 V.
-
enumerator kPMU_SensorUpper1V8_2V15#
Upper threshold 2.15 V.
-
enumerator kPMU_SensorUpper1V8_2V20#
Upper threshold 2.20 V.
-
enumerator kPMU_SensorUpper1V8_2V05#
-
enum _pmu_sensor_lower_thres_1v8#
Voltage sensor lower threshold for 1.8 V rail (LDO_VDD_1V8 / LDO_VDDA_1V8).
Values:
-
enumerator kPMU_SensorLower1V8_1V65#
Lower threshold 1.65 V.
-
enumerator kPMU_SensorLower1V8_1V60#
Lower threshold 1.60 V.
-
enumerator kPMU_SensorLower1V8_1V55#
Lower threshold 1.55 V.
-
enumerator kPMU_SensorLower1V8_1V50#
Lower threshold 1.50 V.
-
enumerator kPMU_SensorLower1V8_1V65#
-
enum _pmu_sensor_upper_thres_3v#
Voltage sensor upper threshold for 3 V rail (VDD_PMU).
Values:
-
enumerator kPMU_SensorUpper3V_3V70#
Upper threshold 3.70 V.
-
enumerator kPMU_SensorUpper3V_3V75#
Upper threshold 3.75 V.
-
enumerator kPMU_SensorUpper3V_3V80#
Upper threshold 3.80 V.
-
enumerator kPMU_SensorUpper3V_3V85#
Upper threshold 3.85 V.
-
enumerator kPMU_SensorUpper3V_3V70#
-
enum _pmu_sensor_lower_thres_3v#
Voltage sensor lower threshold for 3 V rail (VDD_PMU).
Values:
-
enumerator kPMU_SensorLower3V_2V35#
Lower threshold 2.35 V.
-
enumerator kPMU_SensorLower3V_2V30#
Lower threshold 2.30 V.
-
enumerator kPMU_SensorLower3V_2V25#
Lower threshold 2.25 V.
-
enumerator kPMU_SensorLower3V_2V20#
Lower threshold 2.20 V.
-
enumerator kPMU_SensorLower3V_2V35#
-
enum _pmu_ldo_volt_sel#
LDO output voltage trim selection (offset from nominal).
Values:
-
enumerator kPMU_LdoVoltSelNom#
Nominal voltage.
-
enumerator kPMU_LdoVoltSelNomP5#
Nominal + 5 %.
-
enumerator kPMU_LdoVoltSelNomP10#
Nominal + 10 %.
-
enumerator kPMU_LdoVoltSelNomP20#
Nominal + 20 %.
-
enumerator kPMU_LdoVoltSelNom#
-
enum _pmu_dcdc_mode#
DCDC converter operating mode.
Values:
-
enumerator kPMU_DcdcModePFM#
PFM (pulse-frequency modulation) mode.
-
enumerator kPMU_DcdcModeStartup#
Startup mode (internal use).
-
enumerator kPMU_DcdcModePWM#
PWM (fixed-frequency) mode.
-
enumerator kPMU_DcdcModeDPD#
Deep power-down mode (DCDC off).
-
enumerator kPMU_DcdcModePFM#
-
enum _pmu_ldo_mode#
LDO operating mode (shared by LDO_VDD_0V8 and LDO_VDD_1V8).
Values:
-
enumerator kPMU_LdoModeOff#
LDO disabled.
-
enumerator kPMU_LdoModeHP#
High-performance (low-dropout) mode.
-
enumerator kPMU_LdoModeLP#
Low-power mode.
-
enumerator kPMU_LdoModeOff#
-
enum _pmu_ldo_vdda1v8_mode#
LDO_VDDA_1V8 (analog supply LDO) operating mode.
Values:
-
enumerator kPMU_LdoVdda1V8Off#
LDO disabled.
-
enumerator kPMU_LdoVdda1V8HP#
High-performance mode.
-
enumerator kPMU_LdoVdda1V8LP#
Low-power mode.
-
enumerator kPMU_LdoVdda1V8ULP#
Ultra-low-power mode.
-
enumerator kPMU_LdoVdda1V8Off#
-
enum _pmu_body_bias_mode#
Body bias operating mode.
Values:
-
enumerator kPMU_BodyBiasZBB#
Zero body bias (ZBB) — safe power-on default.
-
enumerator kPMU_BodyBiasFBBFull#
Forward body bias on both N-well and P-well.
-
enumerator kPMU_BodyBiasFBBPWell#
Forward body bias on P-well only.
-
enumerator kPMU_BodyBiasFBBNWell#
Forward body bias on N-well only.
-
enumerator kPMU_BodyBiasHiZ#
High-impedance (body floating).
-
enumerator kPMU_BodyBiasStandby#
Standby body bias mode (used during Deep Sleep).
-
enumerator kPMU_BodyBiasZBB#
-
enum _pmu_bb_ramp_clk#
Body bias voltage ramp clock frequency selection.
Values:
-
enumerator kPMU_BbRampClk750kHz#
Ramp clock 750 kHz (default).
-
enumerator kPMU_BbRampClk667kHz#
Ramp clock 667 kHz.
-
enumerator kPMU_BbRampClk375kHz#
Ramp clock 375 kHz.
-
enumerator kPMU_BbRampClk1200kHz#
Ramp clock 1200 kHz.
-
enumerator kPMU_BbRampClk750kHz#
-
enum _pmu_bb_pwell_clk#
P-well body bias charge pump clock divider selection.
Values:
-
enumerator kPMU_BbPwellClkDiv1#
P-well clock = ramp clock / 1 (default).
-
enumerator kPMU_BbPwellClkDiv2#
P-well clock = ramp clock / 2.
-
enumerator kPMU_BbPwellClkDiv4#
P-well clock = ramp clock / 4.
-
enumerator kPMU_BbPwellClkDiv8#
P-well clock = ramp clock / 8.
-
enumerator kPMU_BbPwellClkDiv1#
-
enum _pmu_temp_ht_thre#
On-die temperature sensor high-temperature threshold.
Values:
-
enumerator kPMU_TempHT120C#
High-temperature threshold 120 °C.
-
enumerator kPMU_TempHT125C#
High-temperature threshold 125 °C.
-
enumerator kPMU_TempHT130C#
High-temperature threshold 130 °C.
-
enumerator kPMU_TempHT135C#
High-temperature threshold 135 °C.
-
enumerator kPMU_TempHT120C#
-
enum _pmu_temp_lt_thre#
On-die temperature sensor low-temperature threshold.
Values:
-
enumerator kPMU_TempLT_Minus30C#
Low-temperature threshold -30 °C.
-
enumerator kPMU_TempLT_Minus40C#
Low-temperature threshold -40 °C.
-
enumerator kPMU_TempLT_Minus30C#
-
typedef enum _pmu_mode pmu_mode_t#
PMU overall operating mode.
Values match POWERCON_SOC_CTRL.PMUCFG_ACTIVE/PMUCFG_STBY.PMU_MODE encoding.
-
typedef enum _pmu_boot_error_reason pmu_boot_error_reason_t#
PMU FSM boot error reason.
Encodes the 6-bit PMU_STS[13:8] field. Values 0x00–0x19 are defined by hardware; any other value indicates an undocumented FSM stop reason.
-
typedef enum _pmu_sensor_upper_thres_0v8 pmu_sensor_upper_thres_0v8_t#
Voltage sensor upper threshold for 0.8 V rail (DCDC / LDO_VDD_0V8).
-
typedef enum _pmu_sensor_lower_thres_0v8 pmu_sensor_lower_thres_0v8_t#
Voltage sensor lower threshold for 0.8 V rail (DCDC / LDO_VDD_0V8).
-
typedef enum _pmu_sensor_upper_thres_1v8 pmu_sensor_upper_thres_1v8_t#
Voltage sensor upper threshold for 1.8 V rail (LDO_VDD_1V8 / LDO_VDDA_1V8).
-
typedef enum _pmu_sensor_lower_thres_1v8 pmu_sensor_lower_thres_1v8_t#
Voltage sensor lower threshold for 1.8 V rail (LDO_VDD_1V8 / LDO_VDDA_1V8).
-
typedef enum _pmu_sensor_upper_thres_3v pmu_sensor_upper_thres_3v_t#
Voltage sensor upper threshold for 3 V rail (VDD_PMU).
-
typedef enum _pmu_sensor_lower_thres_3v pmu_sensor_lower_thres_3v_t#
Voltage sensor lower threshold for 3 V rail (VDD_PMU).
-
typedef enum _pmu_ldo_volt_sel pmu_ldo_volt_sel_t#
LDO output voltage trim selection (offset from nominal).
-
typedef enum _pmu_dcdc_mode pmu_dcdc_mode_t#
DCDC converter operating mode.
-
typedef struct _pmu_dcdc_config pmu_dcdc_config_t#
DCDC converter configuration.
Controls operating mode, output voltage, protection thresholds, and the actions taken (IRQ / warm reset / cold reset) on fault events.
-
typedef struct _pmu_dcdc_pwm_config pmu_dcdc_pwm_config_t#
DCDC PWM loop compensation configuration.
Only relevant when the DCDC is in kPMU_DcdcModePWM mode.
-
typedef enum _pmu_ldo_mode pmu_ldo_mode_t#
LDO operating mode (shared by LDO_VDD_0V8 and LDO_VDD_1V8).
-
typedef struct _pmu_ldo_vdd0v8_config pmu_ldo_vdd0v8_config_t#
LDO_VDD_0V8 (core voltage LDO) configuration.
-
typedef struct _pmu_ldo_vdd1v8_config pmu_ldo_vdd1v8_config_t#
LDO_VDD_1V8 (I/O supply LDO) configuration.
-
typedef enum _pmu_ldo_vdda1v8_mode pmu_ldo_vdda1v8_mode_t#
LDO_VDDA_1V8 (analog supply LDO) operating mode.
-
typedef struct _pmu_ldo_vdda1v8_config pmu_ldo_vdda1v8_config_t#
LDO_VDDA_1V8 (analog supply LDO) configuration.
-
typedef struct _pmu_ldo_core_aon_config pmu_ldo_core_aon_config_t#
LDO_CORE_AON (always-on core LDO) configuration.
-
typedef struct _pmu_ldo_aon1v8_config pmu_ldo_aon1v8_config_t#
LDO_AON_1V8 (always-on 1.8 V LDO) configuration.
-
typedef struct _pmu_vdd_pmu_config pmu_vdd_pmu_config_t#
VDD_PMU supply monitor configuration.
-
typedef enum _pmu_body_bias_mode pmu_body_bias_mode_t#
Body bias operating mode.
-
typedef enum _pmu_bb_ramp_clk pmu_bb_ramp_clk_t#
Body bias voltage ramp clock frequency selection.
-
typedef enum _pmu_bb_pwell_clk pmu_bb_pwell_clk_t#
P-well body bias charge pump clock divider selection.
-
typedef struct _pmu_body_bias_config pmu_body_bias_config_t#
Body bias configuration. Pass to PMU_ConfigBodyBias.
-
typedef enum _pmu_temp_ht_thre pmu_temp_ht_thre_t#
On-die temperature sensor high-temperature threshold.
-
typedef enum _pmu_temp_lt_thre pmu_temp_lt_thre_t#
On-die temperature sensor low-temperature threshold.
-
typedef struct _pmu_temperature_sensor_config pmu_temperature_sensor_config_t#
On-die temperature sensor configuration.
-
typedef struct _pmu_xosc32k_config pmu_xosc32k_config_t#
XOSC 32K crystal oscillator configuration.
Maps directly to PMU_XOSC32KNP_CTRL_REG. gmSel0/gmSel1 together select the GM bias current; see RM for combined encoding. dll0/dll1 together select the DLL output delay cell count; see RM for combined encoding.
-
PMU_BB_UPDATE_TIMEOUT#
Body bias update polling timeout (iterations).
0 (default) = wait indefinitely. Override via Kconfig (CONFIG_PMU_BB_UPDATE_TIMEOUT) or a direct preprocessor definition.
-
PMU_DRIVER_UPDATE_TRIM_VALUE#
Let PMU_ConfigBodyBias() write the NWELL_VOL/PWELL_VOL trim bitfields.
0 (default) = PMU_ConfigBodyBias() does a read-modify-write and never touches NWELL_VOL/PWELL_VOL, so it cannot clobber a ROM-applied trim on parts whose P-Well/N-Well fuse is not yet trimmed. 1 = PMU_ConfigBodyBias() also writes config->nwellVolSel/pwellVolSel, for parts/boards where SW is meant to supply the trim. Override via Kconfig (CONFIG_PMU_DRIVER_UPDATE_TRIM_VALUE) or a direct preprocessor definition.
-
struct _pmu_dcdc_config#
- #include <fsl_pmu.h>
DCDC converter configuration.
Controls operating mode, output voltage, protection thresholds, and the actions taken (IRQ / warm reset / cold reset) on fault events.
Public Members
-
pmu_dcdc_mode_t mode#
DCDC operating mode.
-
uint8_t voutAdj#
Coarse output voltage adjustment code.
-
uint8_t voutFineAdj#
Fine output voltage adjustment code.
-
uint8_t ovlVthAdj#
Over-voltage lock-out threshold adjust.
-
bool vsensorVoutAdjEn#
true = enable voltage-sensor-controlled output adjustment.
-
bool bypassEn#
true = enable DCDC bypass path.
-
bool ovlPdEn#
true = pull down output on OVL event.
-
bool sensorEnable#
true = enable output voltage monitor.
-
pmu_sensor_upper_thres_0v8_t sensorUpperThres#
Over-voltage sensor threshold.
-
pmu_sensor_lower_thres_0v8_t sensorLowerThres#
Under-voltage sensor threshold.
-
bool irqOnVmaxError#
true = generate IRQ on over-voltage error.
-
bool irqOnVminError#
true = generate IRQ on under-voltage error.
-
bool irqOnClkLost#
true = generate IRQ when switching clock is lost.
-
bool irqOnUvlo#
true = generate IRQ on UVLO event.
-
bool irqOnOclWarn#
true = generate IRQ on over-current warning.
-
bool warmResetOnVmaxError#
true = trigger warm reset on over-voltage error.
-
bool warmResetOnVminError#
true = trigger warm reset on under-voltage error.
-
bool warmResetOnClkLost#
true = trigger warm reset when clock is lost.
-
bool warmResetOnUvlo#
true = trigger warm reset on UVLO event.
-
bool warmResetOnOclWarn#
true = trigger warm reset on over-current warning.
-
bool coldResetOnVmaxError#
true = trigger cold reset on over-voltage error.
-
bool coldResetOnVminError#
true = trigger cold reset on under-voltage error.
-
bool coldResetOnClkLost#
true = trigger cold reset when clock is lost.
-
bool coldResetOnUvlo#
true = trigger cold reset on UVLO event.
-
bool coldResetOnOclWarn#
true = trigger cold reset on over-current warning.
-
pmu_dcdc_mode_t mode#
-
struct _pmu_dcdc_pwm_config#
- #include <fsl_pmu.h>
DCDC PWM loop compensation configuration.
Only relevant when the DCDC is in kPMU_DcdcModePWM mode.
Public Members
-
uint8_t loopFilterResAdj#
Loop filter resistor adjustment code.
-
uint8_t loopFilterCapAdj#
Loop filter capacitor adjustment code.
-
uint8_t sawtoothAdj#
Sawtooth ramp adjustment code.
-
uint8_t gmAdj#
Transconductance (Gm) adjustment code.
-
bool gmOvlPullupDis#
true = disable Gm OVL pull-up.
-
bool gmIniCond#
true = enable Gm initial condition.
-
bool ipkOvr#
true = override peak current limit.
-
uint8_t pulseSkip#
Pulse skip threshold code.
-
uint8_t maskPeakP#
Peak-P mask code.
-
uint8_t maskSawtooth#
Sawtooth mask code.
-
uint8_t setPwm#
PWM set code.
-
uint8_t maskOcl#
Over-current limit mask code.
-
uint8_t maskZcs#
Zero-crossing sense mask code.
-
bool disPulseSkipping#
true = disable pulse skipping.
-
bool voutSteps#
true = enable voltage output stepping.
-
uint8_t loopFilterResAdj#
-
struct _pmu_ldo_vdd0v8_config#
- #include <fsl_pmu.h>
LDO_VDD_0V8 (core voltage LDO) configuration.
Public Members
-
pmu_ldo_mode_t mode#
LDO operating mode.
-
pmu_ldo_volt_sel_t voltSel#
Output voltage trim in HP mode.
-
pmu_ldo_volt_sel_t lpVoltSel#
Output voltage trim in LP mode.
-
bool bypassEn#
true = enable bypass (short) path.
-
bool limitDisable#
true = disable current limit.
-
bool sensorEnable#
true = enable output voltage monitor.
-
pmu_sensor_upper_thres_0v8_t sensorUpperThres#
Over-voltage sensor threshold.
-
pmu_sensor_lower_thres_0v8_t sensorLowerThres#
Under-voltage sensor threshold.
-
bool irqOnVmaxError#
true = generate IRQ on over-voltage error.
-
bool irqOnVminError#
true = generate IRQ on under-voltage error.
-
bool warmResetOnVmaxError#
true = trigger warm reset on over-voltage error.
-
bool warmResetOnVminError#
true = trigger warm reset on under-voltage error.
-
bool coldResetOnVmaxError#
true = trigger cold reset on over-voltage error.
-
bool coldResetOnVminError#
true = trigger cold reset on under-voltage error.
-
pmu_ldo_mode_t mode#
-
struct _pmu_ldo_vdd1v8_config#
- #include <fsl_pmu.h>
LDO_VDD_1V8 (I/O supply LDO) configuration.
Public Members
-
pmu_ldo_mode_t mode#
LDO operating mode.
-
pmu_ldo_volt_sel_t voltSel#
Output voltage trim in HP mode.
-
pmu_ldo_volt_sel_t lpVoltSel#
Output voltage trim in LP mode.
-
bool bypassEn#
true = enable bypass path.
-
bool sensorEnable#
true = enable output voltage monitor.
-
pmu_sensor_upper_thres_1v8_t sensorUpperThres#
Over-voltage sensor threshold.
-
pmu_sensor_lower_thres_1v8_t sensorLowerThres#
Under-voltage sensor threshold.
-
bool irqOnMonitorOk#
true = generate IRQ when monitor reports in-range.
-
bool irqOnVmaxError#
true = generate IRQ on over-voltage error.
-
bool irqOnVminError#
true = generate IRQ on under-voltage error.
-
bool warmResetOnMonitorOk#
true = trigger warm reset when monitor reports in-range.
-
bool warmResetOnVmaxError#
true = trigger warm reset on over-voltage error.
-
bool warmResetOnVminError#
true = trigger warm reset on under-voltage error.
-
bool coldResetOnMonitorOk#
true = trigger cold reset when monitor reports in-range.
-
bool coldResetOnVmaxError#
true = trigger cold reset on over-voltage error.
-
bool coldResetOnVminError#
true = trigger cold reset on under-voltage error.
-
pmu_ldo_mode_t mode#
-
struct _pmu_ldo_vdda1v8_config#
- #include <fsl_pmu.h>
LDO_VDDA_1V8 (analog supply LDO) configuration.
Public Members
-
pmu_ldo_vdda1v8_mode_t mode#
LDO operating mode.
-
pmu_ldo_volt_sel_t voltSel#
Output voltage trim.
-
bool bypassEn#
true = enable bypass path.
-
bool limitDisable#
true = disable current limit.
-
bool sensorEnable#
true = enable output voltage monitor.
-
pmu_sensor_upper_thres_1v8_t sensorUpperThres#
Over-voltage sensor threshold.
-
pmu_sensor_lower_thres_1v8_t sensorLowerThres#
Under-voltage sensor threshold.
-
bool irqOnVmaxError#
true = generate IRQ on over-voltage error.
-
bool irqOnVminError#
true = generate IRQ on under-voltage error.
-
bool warmResetOnVmaxError#
true = trigger warm reset on over-voltage error.
-
bool warmResetOnVminError#
true = trigger warm reset on under-voltage error.
-
bool coldResetOnVmaxError#
true = trigger cold reset on over-voltage error.
-
bool coldResetOnVminError#
true = trigger cold reset on under-voltage error.
-
pmu_ldo_vdda1v8_mode_t mode#
-
struct _pmu_ldo_core_aon_config#
- #include <fsl_pmu.h>
LDO_CORE_AON (always-on core LDO) configuration.
Public Members
-
bool useBatInput#
true = use VBAT as LDO input; false = use VDD_PMU.
-
bool useBatInput#
-
struct _pmu_ldo_aon1v8_config#
- #include <fsl_pmu.h>
LDO_AON_1V8 (always-on 1.8 V LDO) configuration.
Public Members
-
uint8_t reserved#
Reserved — set to 0.
-
uint8_t reserved#
-
struct _pmu_vdd_pmu_config#
- #include <fsl_pmu.h>
VDD_PMU supply monitor configuration.
Public Members
-
bool sensorEnable#
true = enable VDD_PMU voltage monitors.
-
pmu_sensor_upper_thres_1v8_t sensor1V8UpperThres#
1.8 V sensor over-voltage threshold.
-
pmu_sensor_lower_thres_1v8_t sensor1V8LowerThres#
1.8 V sensor under-voltage threshold.
-
pmu_sensor_upper_thres_3v_t sensor3VUpperThres#
3 V sensor over-voltage threshold.
-
pmu_sensor_lower_thres_3v_t sensor3VLowerThres#
3 V sensor under-voltage threshold.
-
bool irqOnMonitor3VOk#
true = IRQ when 3 V monitor reports in-range.
-
bool irqOnSensor1V8VmaxError#
true = IRQ on 1.8 V over-voltage error.
-
bool irqOnSensor1V8VminError#
true = IRQ on 1.8 V under-voltage error.
-
bool irqOnSensor3VVmaxError#
true = IRQ on 3 V over-voltage error.
-
bool irqOnSensor3VVminError#
true = IRQ on 3 V under-voltage error.
-
bool warmResetOnMonitor3VOk#
true = warm reset when 3 V monitor reports in-range.
-
bool warmResetOnSensor1V8VmaxError#
true = warm reset on 1.8 V over-voltage error.
-
bool warmResetOnSensor1V8VminError#
true = warm reset on 1.8 V under-voltage error.
-
bool warmResetOnSensor3VVmaxError#
true = warm reset on 3 V over-voltage error.
-
bool warmResetOnSensor3VVminError#
true = warm reset on 3 V under-voltage error.
-
bool coldResetOnMonitor3VOk#
true = cold reset when 3 V monitor reports in-range.
-
bool coldResetOnSensor1V8VmaxError#
true = cold reset on 1.8 V over-voltage error.
-
bool coldResetOnSensor1V8VminError#
true = cold reset on 1.8 V under-voltage error.
-
bool coldResetOnSensor3VVmaxError#
true = cold reset on 3 V over-voltage error.
-
bool coldResetOnSensor3VVminError#
true = cold reset on 3 V under-voltage error.
-
bool sensorEnable#
-
struct _pmu_body_bias_config#
- #include <fsl_pmu.h>
Body bias configuration. Pass to PMU_ConfigBodyBias.
Public Members
-
pmu_body_bias_mode_t mode#
Body bias operating mode.
-
uint8_t nwellVolSel#
N-well target voltage selection code. Only written to hardware by PMU_ConfigBodyBias when PMU_DRIVER_UPDATE_TRIM_VALUE is enabled; at its default (disabled) this field is diagnostic-only, since ROM owns the trim on parts whose P-Well/N-Well fuse is not yet trimmed. PMU_ApplyBodyBiasBlocking derives its own stability-check value straight from the register, not from this field.
-
uint8_t pwellVolSel#
P-well target voltage selection code. Same PMU_DRIVER_UPDATE_TRIM_VALUE gating as nwellVolSel.
-
bool advcEnable#
true = enable advanced body bias control.
-
pmu_bb_ramp_clk_t rampClkSel#
Voltage ramp clock frequency.
-
pmu_bb_pwell_clk_t pwellClkSel#
P-well charge pump clock divider.
-
bool irqOnCfgDone#
true = generate IRQ when body bias update completes.
-
bool irqOnCfgError#
true = generate IRQ on body bias update error.
-
pmu_body_bias_mode_t mode#
-
struct _pmu_temperature_sensor_config#
- #include <fsl_pmu.h>
On-die temperature sensor configuration.
Public Members
-
bool sensorEnable#
true = enable the temperature sensor.
-
bool trimEnable#
true = apply factory trim values.
-
pmu_temp_ht_thre_t htThreshold#
High-temperature alert threshold.
-
pmu_temp_lt_thre_t ltThreshold#
Low-temperature alert threshold.
-
bool irqOnHtOk#
true = generate IRQ when temperature exceeds high threshold.
-
bool irqOnLtOk#
true = generate IRQ when temperature falls below low threshold.
-
bool warmResetOnHtOk#
true = trigger warm reset on high-temperature event.
-
bool warmResetOnLtOk#
true = trigger warm reset on low-temperature event.
-
bool coldResetOnHtOk#
true = trigger cold reset on high-temperature event.
-
bool coldResetOnLtOk#
true = trigger cold reset on low-temperature event.
-
bool sensorEnable#
-
struct _pmu_xosc32k_config#
- #include <fsl_pmu.h>
XOSC 32K crystal oscillator configuration.
Maps directly to PMU_XOSC32KNP_CTRL_REG. gmSel0/gmSel1 together select the GM bias current; see RM for combined encoding. dll0/dll1 together select the DLL output delay cell count; see RM for combined encoding.
Public Members
-
bool clkoutEnable#
true = enable XOSC32K output clock to the chip.
-
bool tcxoMode#
true = TCXO (high-power) mode; false = SCXO (nano-power) mode.
-
bool bypassEnable#
true = bypass OSC32K; clock taken from EXTAL pin directly.
-
bool clkMonEnable#
true = enable XOSC32K output clock monitoring.
-
bool gmSel0#
GM bias current select bit 0.
-
bool gmSel1#
GM bias current select bit 1.
-
bool dll0#
DLL output delay cell select bit 0.
-
bool dll1#
DLL output delay cell select bit 1.
-
bool clkoutEnable#
Power#
-
enum _power_step_mode#
CMC/SSC step operating mode.
Values:
-
enumerator kPOWER_StepModeHandshake#
Wait for handshake ACK (hardware reset default)
-
enumerator kPOWER_StepModeCount#
Advance after a fixed count of POWERCON clocks
-
enumerator kPOWER_StepModeHandshake#
-
typedef union _power_pmu_state power_pmu_state_t#
PMU analog state - word-sized bitfield union that overlays POWERCON_SOC_CTRL.PMUCFG_ACTIVE / PMUCFG_STBY.
Write
.worddirectly to the PMUCFG register via POWERCON P-Channel.
-
typedef enum _power_step_mode power_step_mode_t#
CMC/SSC step operating mode.
-
typedef struct _power_step_config power_step_config_t#
Configuration for one CMC or SSC step (sleep and wakeup directions).
countValueis used only when sleepMode or wakeupMode is kPOWER_StepModeCount. All steps within the same CMC/SSC block share one COUNT register - if multiple steps use count mode their countValue fields MUST be identical.
-
typedef struct _power_cmc_step_config power_cmc_step_config_t#
Step configuration for one CMC instance (5 steps).
Each CMC instance (CMC0, CMC1, CMC2) has its own step-mode mask and COUNT register. Different CMC instances may require different step modes or count values.
-
typedef struct _power_handshake_routing_config power_handshake_routing_config_t#
Init-time SoC handshake routing configuration.
Configures the routing of root clocks and clock sources to CMC handshake partners (POWERCON HSK_SEL registers) and PDCON per-domain handshake masks. Pass via power_policy_config_t::handshakeRouting (or NULL for POR defaults), or pass directly to POWER_SetHandshakeRouting() for post-init reconfiguration.
-
FSL_POWER_DRIVER_VERSION#
power driver version 2.0.0.
-
void POWER_Init(void)#
One-time hardware baseline setup: POWERCON/PDCON function clocks, body-bias trim, standby gating baseline, active-mode clock sources, NPU/Media/Comm domain power-up, and MEMCON slice init.
Call once at boot, before POWER_SetPolicy(). Not safe to call more than once (re-runs the one-time PDCON/MEMCON bring-up).
-
void POWER_GetDefaultPolicyConfig(power_policy_config_t *config)#
Fill power_policy_config_t with hardware reset defaults.
All CMC and SSC steps set to Handshake mode; CSSI enabled and unlocked; handshakeRouting set to NULL (POWER_SetPolicy will apply POR-default routing).
- Parameters:
config – Pointer to config struct to populate. Must not be NULL.
-
void POWER_SetPolicy(const power_policy_config_t *config)#
Applies the power management policy: active/low-power baseline for POWERCON, PDCON, and MEMCON, plus the NPU/Media/Comm domain and active-mode clock source state.
Enables POWERCON, PDCON, and MEMCON function clocks; applies SoC handshake routing (NULL = POR defaults, non-NULL = *config->handshakeRouting); configures CMC/SSC step modes and CSSI; sets the standby-gating baseline (XMC_STBY_MASK); initialises PDCON domain trigger config; enables active-mode clock sources 0-8; brings the NPU/Media/Comm domains to kPDCON_EventNoneOrActive if not already there (idempotent); initialises all MEMCON slices to their default active states; initialises SW wakeup masks to all-masked.
Safe to call more than once (e.g. to apply a different handshakeRouting later). No ordering constraint relative to BOARD_InitBootClocks() — the domain-enable step runs before the MEMCON slice writes internally, so a MEMCON slice is never touched before its hosting domain (NPU/Media/Comm) is powered active.
- Parameters:
config – Pointer to policy configuration. Must not be NULL. Call POWER_GetDefaultPolicyConfig() first to populate defaults, then adjust fields as needed before passing to this function.
-
void POWER_SetExtRegulatorHooks(const power_ext_regulator_hooks_t *hooks)#
Register (or clear) board-supplied external-regulator hooks.
When a non-NULL
hooksis registered,POWER_EnterHpRun/EnterNormalRun/EnterLpRuncallhooks->setCoreVoltage()instead of programming the on-chip DCDC, andPOWER_EnterDeepSleep/EnterPowerDown/EnterDeepPowerDowncallhooks->setStandbyTarget()for their low-power entry. Pass NULL to fall back to the on-chip DCDC path (the default). Call before the firstPOWER_Enter*()call if the board wants the external-regulator path from the very first transition — in particular, before the boot-clock ramp to HP run, which needs VDD_CORE already at its HP set point.- Parameters:
hooks – Pointer to a board-owned, statically-allocated
power_ext_regulator_hooks_t(the driver stores the pointer, not a copy), or NULL to clear.
-
void POWER_GetDefaultHandshakeRoutingConfig(power_handshake_routing_config_t *config)#
Fill power_handshake_routing_config_t with POR-default routing values.
All HSK_SEL fields are set to 0 (hardware reset default). All domainHsk entries are set to 0 (no explicit handshake units).
- Parameters:
config – Pointer to config struct to populate. Must not be NULL.
-
void POWER_SetHandshakeRouting(const power_handshake_routing_config_t *config)#
Apply the init-time SoC handshake routing configuration.
Writes POWERCON HSK_SEL registers and PDCON HSKCTRL for all six domains. Must be called after POWER_InitStepCtrl() and before the first standby entry. Call with POR-default config (from POWER_GetDefaultHandshakeRoutingConfig()) for the standard routing, or customize fields for non-default routing.
- Parameters:
config – Pointer to handshake routing config. Must not be NULL.
-
void POWER_EnableWakeupSource(power_wakeup_source_t source)#
Accumulates a wakeup source into the driver-private SW state.
No register access; registers are written inside POWER_Enter*() via POWER_ApplyWakeupSources(). State persists across Sleep/Deep Sleep entries.
- Parameters:
source – Encoded wakeup source. Construct with POWER_WAKEUP_IRQ, POWER_WAKEUP_MAIN_DMA, or POWER_WAKEUP_WAKE_DMA.
-
void POWER_DisableWakeupSource(power_wakeup_source_t source)#
Removes a wakeup source from the driver-private SW state.
- Parameters:
source – Encoded wakeup source, same value as passed to POWER_EnableWakeupSource.
-
void POWER_ClearAllWakeupSources(void)#
Masks all accumulated wakeup sources (IRQ, DMA, debug).
Call before re-configuring the wakeup source between consecutive standby entries.
-
void POWER_ApplyWakeupSources(void)#
Flushes the accumulated SW wakeup masks to the CMC0/1/2 hardware registers.
Writes each driver-private shadow mask to the CMC that owns it on RT2660:
CMC0 IRQ_WAKEUP_MASK <- IRQ wakeup shadow (CPU / M85 core)
CMC1 DMA_WAKEUP_MASK <- MAIN-domain DMA wakeup shadow
CMC2 DMA_WAKEUP_MASK <- WAKE-domain DMA wakeup shadow
This is called automatically inside every POWER_Enter*() before WFI, so an application that always enters low power through those APIs does not need to call it. It is exposed for callers that arm wakeup sources ahead of a bare
__WFI()outside the POWER_Enter*() paths, or that want the CMC mask registers written immediately after POWER_EnableWakeupSource() / POWER_DisableWakeupSource() (e.g. for inspection). The function is idempotent — it rewrites all CMC masks from the shadow arrays — so an extra call before a POWER_Enter*() is harmless.
-
status_t POWER_SetDomainRunMode(power_domain_t domain, pdcon_event_t event)#
Software-triggered power domain state change during active operation.
- Parameters:
domain – Target power domain. See power_domain_t.
event – Target event. See pdcon_event_t. RT2660 does not integrate PDCON domain retention, so use kPDCON_EventNoneOrActive (On) or kPDCON_EventPowerOff only; kPDCON_EventRetention must not be used.
- Return values:
kStatus_Success – Transition completed.
-
status_t POWER_SetMemoryRunMode(power_memory_t mem, memcon_power_mode_t mode)#
Set SRAM block active-mode power state and apply immediately.
- Parameters:
mem – Memory identifier. See power_memory_t.
mode – Target power mode. See memcon_power_mode_t.
- Return values:
kStatus_Success – Configuration applied.
kStatus_InvalidArgument – Memory does not support SW trigger.
-
void POWER_EnableRunRootClock(power_root_clock_t ss)#
Enable a subsystem root clock during active mode.
RMW clears the corresponding bit in POWERCON_SOC_CTRL.RCGCFG_ACTIVE. RCGCFG_ACTIVE uses active-low polarity: 0b=enables, 1b=disables. Direct register write - no P-Channel trigger required.
- Parameters:
ss – Subsystem root clock identifier.
-
void POWER_DisableRunRootClock(power_root_clock_t ss)#
Disable a subsystem root clock during active mode.
RMW sets the corresponding bit in POWERCON_SOC_CTRL.RCGCFG_ACTIVE. Caller MUST ensure no active consumer depends on this root clock. Direct register write - no P-Channel trigger required.
- Parameters:
ss – Subsystem root clock identifier.
-
void POWER_EnableRunClockSource(power_clock_source_t src)#
Enable a clock source during active mode via POWERCON P-Channel.
Sets the corresponding bit in CSRCCFG_ACTIVE (1b=enables, 0b=disables). Read-modify-write, then trigger SOC P-Channel update and poll for completion. Active-high polarity - opposite of RCGCFG_ACTIVE.
- Parameters:
src – Clock source bit index (power_clock_source_t).
-
void POWER_DisableRunClockSource(power_clock_source_t src)#
Disable a clock source during active mode via POWERCON P-Channel.
Clears the corresponding bit in CSRCCFG_ACTIVE (1b=enables, 0b=disables). Caller MUST ensure no active consumer uses this source. Do NOT call while the CMC FSM is active.
- Parameters:
src – Clock source bit index (power_clock_source_t).
-
void POWER_SetRunRegulatorsConfig(const power_run_regulators_config_t *config)#
Apply PMU regulator config and synchronize PMUCFG_ACTIVE through POWERCON P-channel handshake.
-
void POWER_EnableRunPmicStandbyRequest(bool enable)#
Assert or deassert the PMIC standby request while the chip is in Run mode.
Writes PMICCFG_ACTIVE: enable=true sets PMIC_MODE[1:0]=1 (standby request asserted); enable=false clears the field (no standby request). Takes effect immediately - no P-Channel trigger is required.
- Parameters:
enable – true = assert PMIC standby request; false = deassert.
-
void POWER_EnterHpRun(power_clock_cb_t clockCb)#
Switch to HP run mode (VDD_CORE=0.9 V, FBB, CM85 up to 1 GHz).
Determines the current run mode from hardware body-bias state, applies the correct voltage/clock ordering (raises voltage before calling
clockCbwhen coming from a lower-voltage mode), then applies HP regulator settings and FBB.- Parameters:
clockCb – Callback invoked at the point in the sequence where CCM frequencies should be changed to HP values. May be NULL.
-
void POWER_EnterNormalRun(power_clock_cb_t clockCb)#
Switch to Normal run mode (VDD_CORE=0.8 V, FBB, CM85 up to 800 MHz).
- Parameters:
clockCb – Callback invoked at the point where CCM frequencies should be changed to Normal run values. May be NULL.
-
void POWER_EnterLpRun(power_clock_cb_t clockCb)#
Switch to LP run mode (VDD_CORE=0.8 V, ZBB, CM85 up to 600 MHz).
- Parameters:
clockCb – Callback invoked at the point where CCM frequencies should be changed to LP values. May be NULL.
-
power_run_mode_t POWER_GetCurrentRunMode(void)#
Get the current active run mode.
Classifies the run mode from the CPU core clock frequency (
CLOCK_GetRootClockFreq(kCLOCK_Root_CGU_MAIN_ROOTCLK)): >= 900 MHz -> HP, >= 700 MHz -> Normal, otherwise -> LP. Thresholds carry margin because Normal Run is typically ~792 MHz rather than an exact 800 MHz.Reflects the instantaneous core frequency, so query it from a settled operating point (not mid-transition, and not while the CPU is transiently parked on a low-frequency source).
- Returns:
The current power_run_mode_t.
-
void POWER_EnterRunMode(power_run_mode_t runMode, power_clock_cb_t clockCb)#
Unified run-mode entry point.
Dispatches to POWER_EnterHpRun() / POWER_EnterNormalRun() / POWER_EnterLpRun() based on
runMode, so a caller can select the target run mode with data instead of a 3-way switch over the three POWER_Enter*Run() functions.- Parameters:
runMode – Target run mode.
clockCb – Callback invoked at the point in the sequence where CCM frequencies should be changed to
runMode'svalues. May be NULL.
-
void POWER_SetCssiLpHandshakeBypass(bool bypass)#
Configure whether the CSSI/ELS LP handshake is bypassed on standby entry.
The full production handshake communicates with the CSSI (S110 / ELE) security subsystem via MU before each low-power entry. CSSI must grant permission before the entry sequence proceeds; if CSSI denies, POWER_EnterSleep() and POWER_EnterDeepSleep() return kStatus_Fail.
Communication with CSSI uses the Messaging Unit (MU). The full handshake sequence will be added here when the CSSI firmware MU protocol is finalised.
Warning
TEST ONLY - bypass mode is the default (bypass=true) because CSSI firmware is not yet available for early bring-up testing. Call POWER_SetCssiLpHandshakeBypass(false) before production validation once CSSI firmware is ready. Do NOT ship products with bypass=true.
- Parameters:
bypass – true = skip CSSI handshake entirely (TEST ONLY, default). false = perform the full MU + MODCON handshake.
-
status_t POWER_EnterSleep(const power_sleep_config_t *config)#
Enter Sleep mode; returns after wakeup.
Note
PLL clock outputs: if MAINPLL or SYSPLL was kept enabled in standby (config->enableMainPllClockSource / config->enableSysPllClockSource = true), only the DIV4 output of each PLL is automatically re-enabled by hardware on wakeup. All other outputs (DIV5, DIV8, DIV10, DIV20, PFD0/1/2) remain gated. The caller must re-enable any required non-DIV4 PLL outputs after this function returns.
- Parameters:
config – Pointer to sleep configuration.
- Return values:
kStatus_Success – Wakeup occurred normally.
kStatus_InvalidArgument – config is NULL.
kStatus_Fail – CSSI denied LP entry (bypass=false only).
-
status_t POWER_EnterDeepSleep(const power_deep_sleep_config_t *config)#
Enter Deep Sleep mode; returns after wakeup (~150 µs restore).
WAKE-domain LPUART clocks are gated during Deep Sleep. If a WAKE-domain LPUART is active, the caller must stop transmitting and deinitialize the peripheral before entry, and reinitialize it after return.
Note
PLL clock outputs: on wakeup from Deep Sleep, only the DIV4 output of MAINPLL and SYSPLL is automatically re-enabled by hardware. All other outputs (DIV5, DIV8, DIV10, DIV20, PFD0/1/2) remain gated. The caller must re-enable any required non-DIV4 PLL outputs after this function returns before using peripherals that depend on them.
Note
This function returns only when M85 TCM and stack memory were retained (setM85TcmMode = kMEMCON_PowerModeRetention). If TCM was powered off the wakeup path is a PoR reboot and this function never returns.
- Parameters:
config – Pointer to deep sleep configuration.
- Return values:
kStatus_Success – Wakeup occurred normally.
kStatus_InvalidArgument – config is NULL.
kStatus_Fail – CSSI denied LP entry (bypass=false only).
- Pre:
The M85 CPU core clock (SYSCON CCM root clock 1) must be sourced from COREPLL before calling this function. MAINPLL and SYSPLL are typically gated during Deep Sleep standby; running the CPU from a MAINPLL/SYSPLL- derived clock at WFI will cause the CPU to stall when those PLLs are gated by POWERCON. COREPLL frequency is preserved across Deep Sleep without a reset, so no CPU clock restoration is needed after return.
-
status_t POWER_EnterPowerDown(const power_down_config_t *config)#
Enter Power Down mode.
On successful entry the CPU does not return: wakeup triggers a fast PoR. Returns kStatus_Fail before executing WFI if the CSSI/ELS LP handshake denies entry (only possible when bypass is disabled via POWER_SetCssiLpHandshakeBypass). In the default (bypass=true) state this function always proceeds to WFI.
- Parameters:
config – Pointer to power down configuration. Must not be NULL.
- Return values:
kStatus_Fail – CSSI denied LP entry (bypass=false only).
-
status_t POWER_EnterDeepPowerDown(const power_deep_power_down_config_t *config)#
Enter Deep Power Down mode.
On successful entry the CPU does not return: wakeup via PMIC restoring VDD_PMU triggers a PoR. Configure VBATCON wakeup latches directly before calling this function. Returns kStatus_Fail before executing WFI if the CSSI/ELS LP handshake denies entry (only possible when bypass is disabled via POWER_SetCssiLpHandshakeBypass).
- Parameters:
config – Pointer to deep power down configuration. Must not be NULL.
- Return values:
kStatus_Fail – CSSI denied LP entry (bypass=false only).
-
status_t POWER_EnterLowPowerMode(power_low_power_mode_t lowPowerMode, const void *lpModeConfig)#
Unified low-power entry point.
Dispatches to POWER_EnterSleep() / POWER_EnterDeepSleep() / POWER_EnterPowerDown() / POWER_EnterDeepPowerDown() based on
lowPowerMode.- Parameters:
lowPowerMode – Target low-power mode.
lpModeConfig – Pointer to the config struct matching
lowPowerMode:power_sleep_config_t for kPOWER_Sleep, power_deep_sleep_config_t for kPOWER_DeepSleep, power_down_config_t for kPOWER_PowerDown, power_deep_power_down_config_t for kPOWER_DeepPowerDown. Must not be NULL.
- Return values:
kStatus_Success – Wakeup occurred normally (Sleep / Deep Sleep only).
kStatus_InvalidArgument – lpModeConfig is NULL.
kStatus_Fail – CSSI denied LP entry (bypass=false only).
-
POWER_PMUCFG_CORELEVEL_090V#
0.9 V (VOUT_ADJ=27) - HP run mode.
-
POWER_PMUCFG_CORELEVEL_080V#
0.8 V (VOUT_ADJ=0) - NP / LP run mode.
-
enum _power_low_power_mode#
The four low-power modes
fsl_powersupports, matchingPOWER_EnterSleep/EnterDeepSleep/EnterPowerDown/EnterDeepPowerDown. Passed topower_ext_regulator_hooks_t::setStandbyTargetso a board-registered hook can tell which entry point is in progress. Not a raw PF9453 (or other PMIC) register value.Values:
-
enumerator kPOWER_Sleep#
POWER_EnterSleep() - hook is not called for this mode.
-
enumerator kPOWER_DeepSleep#
-
enumerator kPOWER_PowerDown#
-
enumerator kPOWER_DeepPowerDown#
-
enumerator kPOWER_Sleep#
-
enum _power_wakeup_source#
Encoded wakeup source for POWER_EnableWakeupSource() / POWER_DisableWakeupSource().
Encoding: bits[31:28] = wakeup path; remaining bits = source index. 0x0xxxxxxx : IRQ wakeup -> CMC0 IRQ_WAKEUP_MASK (NVIC index 0-383) 0x1xxxxxxx : MAIN DMA -> CMC1 DMA_WAKEUP_MASK (RM wakeup source index 0-63) 0x2xxxxxxx : WAKE DMA -> CMC2 DMA_WAKEUP_MASK (RM wakeup source index 31-43)
DMA wakeup source index is the RM Chapter 4 peripheral index - NOT an eDMA channel number. One peripheral maps to one index regardless of how many DMA request lines it uses.
Use the named enum members for known peripherals. Use the constructor macros (POWER_WAKEUP_IRQ / POWER_WAKEUP_MAIN_DMA / POWER_WAKEUP_WAKE_DMA) when the source index is determined at run time.
Wakeup sources are accumulated in SW state; POWERCON registers are written inside POWER_Enter*() via the internal POWER_ApplyWakeupSources() call.
Power-mode applicability (RT2660 domain power map): WAKE domain : Sleep, Deep Sleep, Power Down VBAT domain : Sleep, Deep Sleep, Power Down, Deep Power Down (DPD1) HSP domain : Sleep, Deep Sleep - HSP is in PD_MAIN (on in Sleep and Deep Sleep, off in Power Down and deeper). In Deep Sleep the functional clock is gated, so an HSP wakeup source must use a clock-less event (e.g. the LPUART RX active-edge, BAUD[RXEDGIE]); a clocked interrupt fires in Sleep only. MAIN DMA (CMC1) : Sleep, Deep Sleep WAKE DMA (CMC2) : Sleep, Deep Sleep, Power Down
Values:
-
enumerator kPOWER_WakeupIrq_CmptCm85Cti#
CMPT CM85 CTI (0)
-
enumerator kPOWER_WakeupIrq_CmptCm85EccError#
CMPT CM85 ECC error (3)
-
enumerator kPOWER_WakeupIrq_CmptCm85Mcm#
CMPT CM85 MCM (6)
-
enumerator kPOWER_WakeupIrq_CmptTrdc#
CMPT TRDC (7)
-
enumerator kPOWER_WakeupIrq_CmptSramctl0#
CMPT SRAMCTL0 (9)
-
enumerator kPOWER_WakeupIrq_CmptSramctl1#
CMPT SRAMCTL1 (10)
-
enumerator kPOWER_WakeupIrq_CmptSramctl2#
CMPT SRAMCTL2 (11)
-
enumerator kPOWER_WakeupIrq_CmptFreqme#
CMPT FREQME (16)
-
enumerator kPOWER_WakeupIrq_CmptLlc#
CMPT LLC (20)
-
enumerator kPOWER_WakeupIrq_CmptDap#
CMPT DAP (24)
-
enumerator kPOWER_WakeupIrq_MainTrdc#
MAIN TRDC (25)
-
enumerator kPOWER_WakeupIrq_MainAhb2Axi#
MAIN AHB2AXI bus error (26)
-
enumerator kPOWER_WakeupIrq_MainMmu#
MAIN MMU (28)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch0#
MAIN eDMA3 ch 0 IRQ (29)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch1#
MAIN eDMA3 ch 1 IRQ (30)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch2#
MAIN eDMA3 ch 2 IRQ (31)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch3#
MAIN eDMA3 ch 3 IRQ (32)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch4#
MAIN eDMA3 ch 4 IRQ (33)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch5#
MAIN eDMA3 ch 5 IRQ (34)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch6#
MAIN eDMA3 ch 6 IRQ (35)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch7#
MAIN eDMA3 ch 7 IRQ (36)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch8#
MAIN eDMA3 ch 8 IRQ (37)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch9#
MAIN eDMA3 ch 9 IRQ (38)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch10#
MAIN eDMA3 ch 10 IRQ (39)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch11#
MAIN eDMA3 ch 11 IRQ (40)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch12#
MAIN eDMA3 ch 12 IRQ (41)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch13#
MAIN eDMA3 ch 13 IRQ (42)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch14#
MAIN eDMA3 ch 14 IRQ (43)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch15#
MAIN eDMA3 ch 15 IRQ (44)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch16#
MAIN eDMA3 ch 16 IRQ (45)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch17#
MAIN eDMA3 ch 17 IRQ (46)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch18#
MAIN eDMA3 ch 18 IRQ (47)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch19#
MAIN eDMA3 ch 19 IRQ (48)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch20#
MAIN eDMA3 ch 20 IRQ (49)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch21#
MAIN eDMA3 ch 21 IRQ (50)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch22#
MAIN eDMA3 ch 22 IRQ (51)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch23#
MAIN eDMA3 ch 23 IRQ (52)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch24#
MAIN eDMA3 ch 24 IRQ (53)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch25#
MAIN eDMA3 ch 25 IRQ (54)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch26#
MAIN eDMA3 ch 26 IRQ (55)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch27#
MAIN eDMA3 ch 27 IRQ (56)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch28#
MAIN eDMA3 ch 28 IRQ (57)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch29#
MAIN eDMA3 ch 29 IRQ (58)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch30#
MAIN eDMA3 ch 30 IRQ (59)
-
enumerator kPOWER_WakeupIrq_MainEdma3Ch31#
MAIN eDMA3 ch 31 IRQ (60)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch0#
MAIN eDMA5 ch 0 IRQ (61)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch1#
MAIN eDMA5 ch 1 IRQ (62)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch2#
MAIN eDMA5 ch 2 IRQ (63)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch3#
MAIN eDMA5 ch 3 IRQ (64)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch4#
MAIN eDMA5 ch 4 IRQ (65)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch5#
MAIN eDMA5 ch 5 IRQ (66)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch6#
MAIN eDMA5 ch 6 IRQ (67)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch7#
MAIN eDMA5 ch 7 IRQ (68)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch8#
MAIN eDMA5 ch 8 IRQ (69)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch9#
MAIN eDMA5 ch 9 IRQ (70)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch10#
MAIN eDMA5 ch 10 IRQ (71)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch11#
MAIN eDMA5 ch 11 IRQ (72)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch12#
MAIN eDMA5 ch 12 IRQ (73)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch13#
MAIN eDMA5 ch 13 IRQ (74)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch14#
MAIN eDMA5 ch 14 IRQ (75)
-
enumerator kPOWER_WakeupIrq_MainEdma5Ch15#
MAIN eDMA5 ch 15 IRQ (76)
-
enumerator kPOWER_WakeupIrq_MainFreqme#
MAIN FREQME (77)
-
enumerator kPOWER_WakeupIrq_HspStm#
HSP STM (78)
-
enumerator kPOWER_WakeupIrq_MainXspi0#
MAIN XSPI0 (82)
-
enumerator kPOWER_WakeupIrq_MainXspi1#
MAIN XSPI1 (83)
-
enumerator kPOWER_WakeupIrq_SysconCguInt0#
SYSCON CGU Vdda0V8 (86)
-
enumerator kPOWER_WakeupIrq_SysconCguInt1#
SYSCON CGU AudioPLL (87)
-
enumerator kPOWER_WakeupIrq_SysconCguInt2#
SYSCON CGU VideoPLL (88)
-
enumerator kPOWER_WakeupIrq_MainCssi#
MAIN CSSI (89)
-
enumerator kPOWER_WakeupIrq_MainCssiMu0a#
MAIN CSSI MU0A (90)
-
enumerator kPOWER_WakeupIrq_MainCssiMu1a#
MAIN CSSI MU1A (91)
-
enumerator kPOWER_WakeupIrq_SysconPmuInt0#
SYSCON PMU sensor/monitor (93)
-
enumerator kPOWER_WakeupIrq_SysconPmuInt1#
SYSCON PMU body bias (94)
-
enumerator kPOWER_WakeupIrq_SysconResetcon#
SYSCON RESETCON (95)
-
enumerator kPOWER_WakeupIrq_SysconFreqme#
SYSCON FREQME (96)
-
enumerator kPOWER_WakeupIrq_HspXbar0Ch0#
HSP XBAR0 ch 0 (100)
-
enumerator kPOWER_WakeupIrq_HspXbar0Ch1#
HSP XBAR0 ch 1 (101)
-
enumerator kPOWER_WakeupIrq_HspXbar0Ch2#
HSP XBAR0 ch 2 (102)
-
enumerator kPOWER_WakeupIrq_HspXbar0Ch3#
HSP XBAR0 ch 3 (103)
-
enumerator kPOWER_WakeupIrq_HspXbar0Ch4#
HSP XBAR0 ch 4 (104)
-
enumerator kPOWER_WakeupIrq_HspXbar0Ch5#
HSP XBAR0 ch 5 (105)
-
enumerator kPOWER_WakeupIrq_HspXbar0Ch6#
HSP XBAR0 ch 6 (106)
-
enumerator kPOWER_WakeupIrq_HspXbar0Ch7#
HSP XBAR0 ch 7 (107)
-
enumerator kPOWER_WakeupIrq_HspAdc0#
HSP ADC0 (112)
-
enumerator kPOWER_WakeupIrq_HspAdc1#
HSP ADC1 (113)
-
enumerator kPOWER_WakeupIrq_HspDac#
HSP DAC (114)
-
enumerator kPOWER_WakeupIrq_HspLpit0#
HSP LPIT0 (115)
-
enumerator kPOWER_WakeupIrq_HspLpit1#
HSP LPIT1 (116)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm0Ch0#
HSP EFLEXPWM0 ch 0 (117)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm0Ch1#
HSP EFLEXPWM0 ch 1 (118)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm0Ch2#
HSP EFLEXPWM0 ch 2 (119)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm0Ch3#
HSP EFLEXPWM0 ch 3 (120)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm0Err#
HSP EFLEXPWM0 fault (121)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm1Ch0#
HSP EFLEXPWM1 ch 0 (122)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm1Ch1#
HSP EFLEXPWM1 ch 1 (123)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm1Ch2#
HSP EFLEXPWM1 ch 2 (124)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm1Ch3#
HSP EFLEXPWM1 ch 3 (125)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm1Err#
HSP EFLEXPWM1 fault (126)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm2Ch0#
HSP EFLEXPWM2 ch 0 (127)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm2Ch1#
HSP EFLEXPWM2 ch 1 (128)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm2Ch2#
HSP EFLEXPWM2 ch 2 (129)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm2Ch3#
HSP EFLEXPWM2 ch 3 (130)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm2Err#
HSP EFLEXPWM2 fault (131)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm3Ch0#
HSP EFLEXPWM3 ch 0 (132)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm3Ch1#
HSP EFLEXPWM3 ch 1 (133)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm3Ch2#
HSP EFLEXPWM3 ch 2 (134)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm3Ch3#
HSP EFLEXPWM3 ch 3 (135)
-
enumerator kPOWER_WakeupIrq_HspEflexPwm3Err#
HSP EFLEXPWM3 fault (136)
-
enumerator kPOWER_WakeupIrq_HspQtpm0Ch0#
HSP QTPM0 (137)
-
enumerator kPOWER_WakeupIrq_HspQtpm0Ch1#
HSP QTPM1 (138)
-
enumerator kPOWER_WakeupIrq_HspQtpm0Ch2#
HSP QTPM2 (139)
-
enumerator kPOWER_WakeupIrq_HspQtpm0Ch3#
HSP QTPM3 (140)
-
enumerator kPOWER_WakeupIrq_HspQtmr0#
HSP QTMR0 (149)
-
enumerator kPOWER_WakeupIrq_HspQtmr1#
HSP QTMR1 (150)
-
enumerator kPOWER_WakeupIrq_HspQtmr2#
HSP QTMR2 (151)
-
enumerator kPOWER_WakeupIrq_HspQtmr3#
HSP QTMR3 (152)
-
enumerator kPOWER_WakeupIrq_HspEqdc0#
HSP EQDC0 (153)
-
enumerator kPOWER_WakeupIrq_HspEqdc1#
HSP EQDC1 (154)
-
enumerator kPOWER_WakeupIrq_HspEqdc2#
HSP EQDC2 (155)
-
enumerator kPOWER_WakeupIrq_HspEqdc3#
HSP EQDC3 (156)
-
enumerator kPOWER_WakeupIrq_HspSinc0Ch0#
HSP SINC0 ch 0 (157)
-
enumerator kPOWER_WakeupIrq_HspSinc0Ch1#
HSP SINC0 ch 1 (158)
-
enumerator kPOWER_WakeupIrq_HspSinc0Ch2#
HSP SINC0 ch 2 (159)
-
enumerator kPOWER_WakeupIrq_HspSinc0Ch3#
HSP SINC0 ch 3 (160)
-
enumerator kPOWER_WakeupIrq_HspSinc1Ch0#
HSP SINC1 ch 0 (161)
-
enumerator kPOWER_WakeupIrq_HspSinc1Ch1#
HSP SINC1 ch 1 (162)
-
enumerator kPOWER_WakeupIrq_HspSinc1Ch2#
HSP SINC1 ch 2 (163)
-
enumerator kPOWER_WakeupIrq_HspSinc1Ch3#
HSP SINC1 ch 3 (164)
-
enumerator kPOWER_WakeupIrq_HspFlexCan0#
HSP FlexCAN0 (165)
-
enumerator kPOWER_WakeupIrq_HspFlexCan0Error#
HSP FlexCAN0 error (166)
-
enumerator kPOWER_WakeupIrq_HspFlexCan1#
HSP FlexCAN1 (167)
-
enumerator kPOWER_WakeupIrq_HspFlexCan1Error#
HSP FlexCAN1 error (168)
-
enumerator kPOWER_WakeupIrq_HspFlexCan2#
HSP FlexCAN2 (169)
-
enumerator kPOWER_WakeupIrq_HspFlexCan2Error#
HSP FlexCAN2 error (170)
-
enumerator kPOWER_WakeupIrq_HspFlexIo0#
HSP FlexIO0 (171)
-
enumerator kPOWER_WakeupIrq_HspFlexIo1#
HSP FlexIO1 (172)
-
enumerator kPOWER_WakeupIrq_HspFlexIo2#
HSP FlexIO2 (173)
-
enumerator kPOWER_WakeupIrq_HspI3c#
HSP I3C (174)
-
enumerator kPOWER_WakeupIrq_HspLpi2c0#
HSP LPI2C0 (175)
-
enumerator kPOWER_WakeupIrq_HspLpi2c1#
HSP LPI2C1 (176)
-
enumerator kPOWER_WakeupIrq_HspLpspi0#
HSP LPSPI0 (179)
-
enumerator kPOWER_WakeupIrq_HspLpspi1#
HSP LPSPI1 (180)
-
enumerator kPOWER_WakeupIrq_HspLpspi2#
HSP LPSPI2 (181)
-
enumerator kPOWER_WakeupIrq_HspLpspi3#
HSP LPSPI3 (182)
-
enumerator kPOWER_WakeupIrq_HspLpspi4#
HSP LPSPI4 (183)
-
enumerator kPOWER_WakeupIrq_HspLpuart0#
HSP LPUART0 (184)
-
enumerator kPOWER_WakeupIrq_HspLpuart1#
HSP LPUART1 (185)
-
enumerator kPOWER_WakeupIrq_HspLpuart2#
HSP LPUART2 (186)
-
enumerator kPOWER_WakeupIrq_HspLpuart3#
HSP LPUART3 (187)
-
enumerator kPOWER_WakeupIrq_HspLpuart4#
HSP LPUART4 (188)
-
enumerator kPOWER_WakeupIrq_HspLpuart5#
HSP LPUART5 (189)
-
enumerator kPOWER_WakeupIrq_HspGpio0Ch0#
HSP GPIO0 ch 0 (190)
-
enumerator kPOWER_WakeupIrq_HspGpio0Ch1#
HSP GPIO0 ch 1 (191)
-
enumerator kPOWER_WakeupIrq_HspGpio1Ch0#
HSP GPIO1 ch 0 (192)
-
enumerator kPOWER_WakeupIrq_HspGpio1Ch1#
HSP GPIO1 ch 1 (193)
-
enumerator kPOWER_WakeupIrq_HspGpio2Ch0#
HSP GPIO2 ch 0 (194)
-
enumerator kPOWER_WakeupIrq_HspGpio2Ch1#
HSP GPIO2 ch 1 (195)
-
enumerator kPOWER_WakeupIrq_HspGpio3Ch0#
HSP GPIO3 ch 0 (196)
-
enumerator kPOWER_WakeupIrq_HspGpio3Ch1#
HSP GPIO3 ch 1 (197)
-
enumerator kPOWER_WakeupIrq_HspGpio4Ch0#
HSP GPIO4 ch 0 (198)
-
enumerator kPOWER_WakeupIrq_HspGpio4Ch1#
HSP GPIO4 ch 1 (199)
-
enumerator kPOWER_WakeupIrq_WakeTrdc#
WAKE TRDC (205)
-
enumerator kPOWER_WakeupIrq_WakeXbarCh0#
WAKE XBAR ch 0 (206)
-
enumerator kPOWER_WakeupIrq_WakeXbarCh1#
WAKE XBAR ch 1 (207)
-
enumerator kPOWER_WakeupIrq_WakeEdma3Ch0#
WAKE eDMA3 ch 0 IRQ (208)
-
enumerator kPOWER_WakeupIrq_WakeEdma3Ch1#
WAKE eDMA3 ch 1 IRQ (209)
-
enumerator kPOWER_WakeupIrq_WakeEdma3Ch2#
WAKE eDMA3 ch 2 IRQ (210)
-
enumerator kPOWER_WakeupIrq_WakeEdma3Ch3#
WAKE eDMA3 ch 3 IRQ (211)
-
enumerator kPOWER_WakeupIrq_WakeEdma3Ch4#
WAKE eDMA3 ch 4 IRQ (212)
-
enumerator kPOWER_WakeupIrq_WakeEdma3Ch5#
WAKE eDMA3 ch 5 IRQ (213)
-
enumerator kPOWER_WakeupIrq_WakeEdma3Ch6#
WAKE eDMA3 ch 6 IRQ (214)
-
enumerator kPOWER_WakeupIrq_WakeEdma3Ch7#
WAKE eDMA3 ch 7 IRQ (215)
-
enumerator kPOWER_WakeupIrq_WakeAcmp0#
WAKE CMP0 (216)
-
enumerator kPOWER_WakeupIrq_WakeAcmp1#
WAKE CMP1 (217)
-
enumerator kPOWER_WakeupIrq_WakeAcmp2#
WAKE CMP2 (218)
-
enumerator kPOWER_WakeupIrq_WakeAcmp3#
WAKE CMP3 (219)
-
enumerator kPOWER_WakeupIrq_WakeEwm#
WAKE EWM watchdog (220)
-
enumerator kPOWER_WakeupIrq_WakeFreqme#
WAKE FREQME (221)
-
enumerator kPOWER_WakeupIrq_WakeLptmr0#
WAKE LPTMR0 (222)
-
enumerator kPOWER_WakeupIrq_WakeLptmr1#
WAKE LPTMR1 (223)
-
enumerator kPOWER_WakeupIrq_WakeQtpmCh0#
WAKE QTPM0 (224)
-
enumerator kPOWER_WakeupIrq_WakeQtpmCh1#
WAKE QTPM1 (225)
-
enumerator kPOWER_WakeupIrq_WakeQtpmCh2#
WAKE QTPM2 (226)
-
enumerator kPOWER_WakeupIrq_WakeQtpmCh3#
WAKE QTPM3 (227)
-
enumerator kPOWER_WakeupIrq_WakeSwt0#
WAKE SWT0 (228)
-
enumerator kPOWER_WakeupIrq_WakeSwt1#
WAKE SWT1 (229)
-
enumerator kPOWER_WakeupIrq_WakeI3c#
WAKE I3C (234)
-
enumerator kPOWER_WakeupIrq_WakeLpi2c0#
WAKE LPI2C0 (235)
-
enumerator kPOWER_WakeupIrq_WakeLpi2c1#
WAKE LPI2C1 (236)
-
enumerator kPOWER_WakeupIrq_WakeLpspi#
WAKE LPSPI (237)
-
enumerator kPOWER_WakeupIrq_WakeLpuart0#
WAKE LPUART0 (238)
-
enumerator kPOWER_WakeupIrq_WakeLpuart1#
WAKE LPUART1 (239)
-
enumerator kPOWER_WakeupIrq_WakeGpioCh0#
WAKE GPIO ch 0 (240)
-
enumerator kPOWER_WakeupIrq_WakeGpioCh1#
WAKE GPIO ch 1 (241)
-
enumerator kPOWER_WakeupIrq_WakePdmEvent#
WAKE MICFIL FIFO event (242)
-
enumerator kPOWER_WakeupIrq_WakePdmError#
WAKE MICFIL error (243)
-
enumerator kPOWER_WakeupIrq_WakePdmHwvadEvent#
WAKE MICFIL HWVAD event (244)
-
enumerator kPOWER_WakeupIrq_WakePdmHwvadError#
WAKE MICFIL HWVAD error (245)
-
enumerator kPOWER_WakeupIrq_VbatBbsmInt0#
VBAT BBSM alarm 0 (247)
-
enumerator kPOWER_WakeupIrq_VbatTdet#
VBAT tamper detect (249)
-
enumerator kPOWER_WakeupIrq_VbatLptmr#
VBAT LPTMR (250)
-
enumerator kPOWER_WakeupIrq_VbatRtc#
VBAT RTC (251)
-
enumerator kPOWER_WakeupIrq_VbatGpioCh0#
VBAT GPIO ch 0 / AON pad (252)
-
enumerator kPOWER_WakeupIrq_VbatGpioCh1#
VBAT GPIO ch 1 / AON pad (253)
-
enumerator kPOWER_WakeupIrq_VbatVbatcon#
VBAT VBATCON (254)
-
enumerator kPOWER_WakeupIrq_AudioTrdc#
AUDIO TRDC (255)
-
enumerator kPOWER_WakeupIrq_AudioSai0#
AUDIO SAI0 (256)
-
enumerator kPOWER_WakeupIrq_AudioSai1#
AUDIO SAI1 (257)
-
enumerator kPOWER_WakeupIrq_AudioSai2#
AUDIO SAI2 (258)
-
enumerator kPOWER_WakeupIrq_AudioPdmEvent#
AUDIO MICFIL FIFO event (262)
-
enumerator kPOWER_WakeupIrq_AudioPdmError#
AUDIO MICFIL error (263)
-
enumerator kPOWER_WakeupIrq_AudioSpdif#
AUDIO SPDIF (270)
-
enumerator kPOWER_WakeupIrq_AudioEdma3Ch0#
AUDIO eDMA3 ch 0 IRQ (271)
-
enumerator kPOWER_WakeupIrq_AudioEdma3Ch1#
AUDIO eDMA3 ch 1 IRQ (272)
-
enumerator kPOWER_WakeupIrq_AudioEdma3Ch2#
AUDIO eDMA3 ch 2 IRQ (273)
-
enumerator kPOWER_WakeupIrq_AudioEdma3Ch3#
AUDIO eDMA3 ch 3 IRQ (274)
-
enumerator kPOWER_WakeupIrq_AudioEdma3Ch4#
AUDIO eDMA3 ch 4 IRQ (275)
-
enumerator kPOWER_WakeupIrq_AudioEdma3Ch5#
AUDIO eDMA3 ch 5 IRQ (276)
-
enumerator kPOWER_WakeupIrq_AudioEdma3Ch6#
AUDIO eDMA3 ch 6 IRQ (277)
-
enumerator kPOWER_WakeupIrq_AudioEdma3Ch7#
AUDIO eDMA3 ch 7 IRQ (278)
-
enumerator kPOWER_WakeupIrq_AudioAsrc#
AUDIO ASRC (288)
-
enumerator kPOWER_WakeupIrq_AudioFreqme#
AUDIO FREQME (289)
-
enumerator kPOWER_WakeupIrq_CommTrdc#
COMM TRDC (295)
-
enumerator kPOWER_WakeupIrq_CommEnetQos#
COMM ENET_QOS (296)
-
enumerator kPOWER_WakeupIrq_CommEnetQosTx#
COMM ENET_QOS TX per-ch (297)
-
enumerator kPOWER_WakeupIrq_CommEnetQosRx#
COMM ENET_QOS RX per-ch (298)
-
enumerator kPOWER_WakeupIrq_CommEnetTx#
COMM ENET TX (299)
-
enumerator kPOWER_WakeupIrq_CommEnetRx#
COMM ENET RX (300)
-
enumerator kPOWER_WakeupIrq_CommEnetOther#
COMM ENET other (301)
-
enumerator kPOWER_WakeupIrq_CommEnet1588#
COMM ENET 1588 timer (302)
-
enumerator kPOWER_WakeupIrq_CommFlexspiSlv#
COMM FlexSPI follower (303)
-
enumerator kPOWER_WakeupIrq_CommUsb0#
COMM USB0 (304)
-
enumerator kPOWER_WakeupIrq_CommUsbPhy#
COMM USBPHY (305)
-
enumerator kPOWER_WakeupIrq_CommUsb1#
COMM USB1 (306)
-
enumerator kPOWER_WakeupIrq_CommUsdhc0#
COMM uSDHC0 (307)
-
enumerator kPOWER_WakeupIrq_CommUsdhc1#
COMM uSDHC1 (308)
-
enumerator kPOWER_WakeupIrq_CommTenbaseTphy0#
COMM 10BASE-T PHY0 (310)
-
enumerator kPOWER_WakeupIrq_CommTenbaseTphy1#
COMM 10BASE-T PHY1 (312)
-
enumerator kPOWER_WakeupIrq_CommFreqme#
COMM FREQME (314)
-
enumerator kPOWER_WakeupIrq_MediaTrdc#
MEDIA TRDC (315)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh0#
MEDIA DCIF ch 0 (317)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh1#
MEDIA DCIF ch 1 (318)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh2#
MEDIA DCIF ch 2 (319)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh3#
MEDIA DCIF ch 3 (320)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh4#
MEDIA DCIF ch 4 (321)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh5#
MEDIA DCIF ch 5 (322)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh6#
MEDIA DCIF ch 6 (323)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh7#
MEDIA DCIF ch 7 (324)
-
enumerator kPOWER_WakeupIrq_MediaDcifCh8#
MEDIA DCIF ch 8 (325)
-
enumerator kPOWER_WakeupIrq_MediaCsi#
MEDIA CSI (326)
-
enumerator kPOWER_WakeupIrq_MediaReformatter#
MEDIA Reformatter (327)
-
enumerator kPOWER_WakeupIrq_MediaIsi#
MEDIA ISI (328)
-
enumerator kPOWER_WakeupIrq_MediaTingpu#
MEDIA TinyGPU (329)
-
enumerator kPOWER_WakeupIrq_MediaJpegDec#
MEDIA JPEG decoder (330)
-
enumerator kPOWER_WakeupIrq_MediaMipiCsi#
MEDIA MIPI CSI (331)
-
enumerator kPOWER_WakeupIrq_MediaMipiDsi#
MEDIA MIPI DSI (332)
-
enumerator kPOWER_WakeupIrq_MediaFreqme#
MEDIA FREQME (333)
-
enumerator kPOWER_WakeupMainDma_Adc0#
HSP_ADC_0 FIFO0+1 (index 0)
-
enumerator kPOWER_WakeupMainDma_Adc1#
HSP_ADC_1 FIFO0+1 (index 1)
-
enumerator kPOWER_WakeupMainDma_Dac#
HSP_DAC (index 2)
-
enumerator kPOWER_WakeupMainDma_Qtpm0#
HSP_QTPM_0 (index 3)
-
enumerator kPOWER_WakeupMainDma_FlexIo0#
HSP_FLEXIO_0 (index 6)
-
enumerator kPOWER_WakeupMainDma_FlexIo1#
HSP_FLEXIO_1 (index 7)
-
enumerator kPOWER_WakeupMainDma_FlexIo2#
HSP_FLEXIO_2 (index 8)
-
enumerator kPOWER_WakeupMainDma_Lpi2c0#
HSP_LPI2C_0 (index 9)
-
enumerator kPOWER_WakeupMainDma_Lpi2c1#
HSP_LPI2C_1 (index 10)
-
enumerator kPOWER_WakeupMainDma_Lpspi0#
HSP_LPSPI_0 (index 13)
-
enumerator kPOWER_WakeupMainDma_Lpspi1#
HSP_LPSPI_1 (index 14)
-
enumerator kPOWER_WakeupMainDma_Lpspi2#
HSP_LPSPI_2 (index 15)
-
enumerator kPOWER_WakeupMainDma_Lpspi3#
HSP_LPSPI_3 (index 16)
-
enumerator kPOWER_WakeupMainDma_Lpspi4#
HSP_LPSPI_4 (index 17)
-
enumerator kPOWER_WakeupMainDma_Lpuart0#
HSP_LPUART_0 (index 18)
-
enumerator kPOWER_WakeupMainDma_Lpuart1#
HSP_LPUART_1 (index 19)
-
enumerator kPOWER_WakeupMainDma_Lpuart2#
HSP_LPUART_2 (index 20)
-
enumerator kPOWER_WakeupMainDma_Lpuart3#
HSP_LPUART_3 (index 21)
-
enumerator kPOWER_WakeupMainDma_Lpuart4#
HSP_LPUART_4 (index 22)
-
enumerator kPOWER_WakeupMainDma_Lpuart5#
HSP_LPUART_5 (index 23)
-
enumerator kPOWER_WakeupMainDma_Gpio0#
HSP_GPIO_0 (index 24)
-
enumerator kPOWER_WakeupMainDma_Gpio1#
HSP_GPIO_1 (index 25)
-
enumerator kPOWER_WakeupMainDma_Gpio2#
HSP_GPIO_2 (index 26)
-
enumerator kPOWER_WakeupMainDma_Gpio3#
HSP_GPIO_3 (index 27)
-
enumerator kPOWER_WakeupMainDma_Gpio4#
HSP_GPIO_4 (index 28)
-
enumerator kPOWER_WakeupMainDma_AudioMicfil#
AUDIO_MICFIL (index 44)
-
enumerator kPOWER_WakeupMainDma_AudioSai0#
AUDIO_SAI_0 (index 46)
-
enumerator kPOWER_WakeupMainDma_AudioSai1#
AUDIO_SAI_1 (index 47)
-
enumerator kPOWER_WakeupMainDma_AudioSai2#
AUDIO_SAI_2 (index 48)
-
enumerator kPOWER_WakeupWakeDma_Lptmr0#
WAKE_LPTMR_0 (index 31)
-
enumerator kPOWER_WakeupWakeDma_Lptmr1#
WAKE_LPTMR_1 (index 32)
-
enumerator kPOWER_WakeupWakeDma_Qtpm#
WAKE_QTPM (index 33)
-
enumerator kPOWER_WakeupWakeDma_Lpi2c0#
WAKE_LPI2C_0 (index 34)
-
enumerator kPOWER_WakeupWakeDma_Lpi2c1#
WAKE_LPI2C_1 (index 35)
-
enumerator kPOWER_WakeupWakeDma_Lpspi#
WAKE_LPSPI (index 36)
-
enumerator kPOWER_WakeupWakeDma_Lpuart0#
WAKE_LPUART_0 (index 37)
-
enumerator kPOWER_WakeupWakeDma_Lpuart1#
WAKE_LPUART_1 (index 38)
-
enumerator kPOWER_WakeupWakeDma_Gpio#
WAKE_GPIO (index 39)
-
enumerator kPOWER_WakeupWakeDma_Micfil#
WAKE_MICFIL (index 40)
-
enumerator kPOWER_WakeupWakeDma_VbatLptmr#
VBAT_LPTMR (index 42)
-
enumerator kPOWER_WakeupWakeDma_VbatGpio#
VBAT_GPIO (index 43)
-
enumerator kPOWER_WakeupIrq_CmptCm85Cti#
-
enum _power_memory#
RT2660 memory identifiers for MEMCON active-mode control.
Encodes (sliceIndex << 8) | blockIndex. Slice 0-11 map to SYSCON__MEMCON_S0–S11.
Values:
-
enumerator kPOWER_Mem_WakeSram#
WAKE_SS SRAM 8KB (S0 B0, 0x2600_0000-0x2600_1FFF, 8 KB)
-
enumerator kPOWER_Mem_WakeEdma3TcdRam#
WAKE eDMA3 TCD / MICFIL FIR (S1 B0, no CPU-view range)
-
enumerator kPOWER_Mem_ComputeSram01#
SRAMCTL_0 Mem 0/1 (S2 B0, block 0x2200_0000-0x2201_1FFF = 72 KB with ECC; usable 0x2200_0000-0x2200_FFFF = 64 KB, 8 KB ECC). Unique: in Power Down, MEM_SLPCFG=01 routes this block to an always-on retention supply so contents survive. It is the only block that retains content across Power Down.
-
enumerator kPOWER_Mem_ComputeSram23#
SRAMCTL_0 Mem 2/3 (S2 B1, block 0x2201_2000-0x2202_3FFF = 72 KB with ECC; usable 0x2201_2000-0x2202_1FFF = 64 KB, 8 KB ECC)
-
enumerator kPOWER_Mem_ComputeSram4#
SRAMCTL_0 Mem 4 (S2 B2, block 0x2202_4000-0x2203_3FFF = 64 KB with ECC; usable size pending vendor confirmation, est. ~56 KB)
-
enumerator kPOWER_Mem_ComputeSram5#
SRAMCTL_0 Mem 5 (S2 B3, block 0x2203_4000-0x2203_FFFF = 48 KB with ECC; usable size pending vendor confirmation, est. ~42 KB)
-
enumerator kPOWER_Mem_ComputeSram6#
SRAMCTL_1 Mem 0 (S2 B4, block 0x2204_0000-0x2206_3FFF = 144 KB with ECC; usable 0x2204_0000-0x2205_FFFF = 128 KB, 16 KB ECC)
-
enumerator kPOWER_Mem_ComputeSram7#
SRAMCTL_1 Mem 1 (S2 B5, block 0x2206_4000-0x2207_FFFF = 112 KB with ECC; usable size pending vendor confirmation, est. ~99 KB)
-
enumerator kPOWER_Mem_ComputeSram8#
SRAMCTL_2 Mem 0 (S2 B6, block 0x2208_0000-0x220A_3FFF = 144 KB with ECC; usable 0x2208_0000-0x2209_FFFF = 128 KB, 16 KB ECC)
-
enumerator kPOWER_Mem_ComputeSram9#
SRAMCTL_2 Mem 1 (S2 B7, block 0x220A_4000-0x220B_FFFF = 112 KB with ECC; usable size pending vendor confirmation, est. ~99 KB)
-
enumerator kPOWER_Mem_LlcCacheBuffer#
LLC Cache buffer (S2 B8, block 0x220C_0000-0x220F_7FFF = 224 KB with ECC; usable size pending vendor confirmation, est. ~199 KB)
-
enumerator kPOWER_Mem_Audio8Kb#
Audio SRAM 8KB (S2 B10, 0x2800_0000-0x2800_1FFF, 8 KB audio). Note: MEMCON block B10 is shared with MMU lookup table, ELE Instr&Data, MICFIL FIR, and ASRC RAM - retention here affects all five modules.
-
enumerator kPOWER_Mem_CpuICache#
M85 I-Cache (S4 B0, no CPU-view range)
-
enumerator kPOWER_Mem_CpuDCacheData#
M85 D-Cache data (S4 B1, no CPU-view range)
-
enumerator kPOWER_Mem_CpuITCM#
M85 I-TCM (S4 B2, 0x0000_0000-0x0003_FFFF, 256 KB)
-
enumerator kPOWER_Mem_CpuDTCM#
M85 D-TCM (S4 B3, 0x2000_0000-0x2003_FFFF, 256 KB)
-
enumerator kPOWER_Mem_CpuDCacheTag#
M85 D-Cache tag (S5 B0, no CPU-view range)
-
enumerator kPOWER_Mem_NpuWeightCache#
NPU Zen-V I-TCM/D-TCM/Zone TCM/Weight cache (S6 B0, 0x0010_8000-0x0011_FFFF, 96 KB)
-
enumerator kPOWER_Mem_NpuResultBuffers#
NPU result buffers (S7 B0, no CPU-view range)
MEDIA_SS shared block (S9 B0, no CPU-view range). Shared: DCIF / JPEGDEC / MIPI_DSI / ISI / CSI / TinGPU.
COMM_SS ENET_QOS EST/RX/TX (S10 B0, no CPU-view range)
-
enumerator kPOWER_Mem_CommType2#
COMM_SS shared block (S11 B0, no CPU-view range). Shared: ENET_1G / uSDHC0/1 / USBHS / FlexSPI FLR / ENET RXP.
-
enumerator kPOWER_Mem_WakeSram#
-
enum _power_root_clock#
RT2660 subsystem root clock identifier.
Each value is the bit index within POWERCON_SOC_CTRL.RCGCFG_ACTIVE. Polarity: clearing a bit enables the root clock; setting it disables (gates) it. Note: NPU has no separate RCGCFG_ACTIVE bit. The NPU lives inside the Compute subsystem (CMPT_SS) and is gated by the COMPUTE_SS root clock (bit 0), shared with CM85. Clock and power are not 1:1: bit 0 clocks both CM85 (PD_CPU) and NPU (PD_NPU), which remain independent PDCON power domains.
Values:
-
enumerator kPOWER_RootClock_COMPUTE_SS#
Compute subsystem (CMPT_SS): CM85 + NPU root clock - bit 0
-
enumerator kPOWER_RootClock_MAIN_SS#
Main subsystem root clock - bit 1
-
enumerator kPOWER_RootClock_WAKE_SS#
Wake subsystem root clock - bit 2
-
enumerator kPOWER_RootClock_COMM_SS#
Communication subsystem root clock - bit 3
-
enumerator kPOWER_RootClock_MEDIA_SS#
Media subsystem root clock - bit 4
-
enumerator kPOWER_RootClock_AUDIO_SS#
Audio subsystem root clock - bit 5
-
enumerator kPOWER_RootClock_WAKE_SS_1MHz#
Wake subsystem 1 MHz root clock - bit 6
-
enumerator kPOWER_RootClock_WAKE_SS_2MHz#
Wake subsystem 2 MHz root clock - bit 7
-
enumerator kPOWER_RootClock_COMPUTE_SS#
-
enum _power_clock_source#
RT2660 clock source identifier.
Each value is the bit index within POWERCON_SOC_CTRL.CSRCCFG_ACTIVE. Polarity: 0b = disable, 1b = enable (active-high, unlike RCGCFG_ACTIVE). Modifying CSRCCFG_ACTIVE requires a P-Channel trigger (POWERCON_TriggerSocUpdate).
Values:
-
enumerator kPOWER_ClockSource_LDOA_0V8#
LDOA 0.8 V supply enable - bit 0
-
enumerator kPOWER_ClockSource_FRO192M#
Internal 192 MHz FRO - bit 1
-
enumerator kPOWER_ClockSource_FRO12M#
Internal 12 MHz FRO - bit 2
-
enumerator kPOWER_ClockSource_MAINPLL#
Main PLL - bit 3
-
enumerator kPOWER_ClockSource_COREPLL#
Core PLL - bit 4
-
enumerator kPOWER_ClockSource_SYSPLL#
System PLL - bit 5
-
enumerator kPOWER_ClockSource_LDOQ_0V8#
LDOQ 0.8 V supply enable - bit 6
-
enumerator kPOWER_ClockSource_SXOSC#
External crystal oscillator - bit 7
-
enumerator kPOWER_ClockSource_FRO12M_LP#
Low-power 12 MHz FRO (wake) - bit 8
-
enumerator kPOWER_ClockSource_LDOA_0V8#
-
enum _power_run_mode#
Active run mode, classified from the CPU core clock frequency.
Returned by POWER_GetCurrentRunMode. The PMU pmuMode field cannot distinguish HP from Normal run (both use pmuMode=0), so the run mode is detected from the CGU MAIN root clock frequency instead.
Values:
-
enumerator kPOWER_RunModeHp#
Over Drive Run (~1 GHz, FBB, 0.9 V).
-
enumerator kPOWER_RunModeNormal#
Normal Drive Run (~800 MHz, FBB, 0.8 V).
-
enumerator kPOWER_RunModeLp#
Low Performance Run (~600 MHz, ZBB, 0.8 V).
-
enumerator kPOWER_RunModeHp#
-
enum _power_domain#
RT2660 software-controllable power domain identifiers.
These map directly to PDCON domain indices. Only these four domains are SW-triggerable on RT2660.
Values:
-
enumerator kPOWER_DomainWake#
PD_WAKE - wake subsystem
-
enumerator kPOWER_DomainMain#
PD_MAIN - main subsystem
-
enumerator kPOWER_DomainCpu#
PD_CPU - M85 compute domain
-
enumerator kPOWER_DomainNpu#
PD_NPU - neural processing unit
-
enumerator kPOWER_DomainMedia#
PD_MEDIA - media subsystem
-
enumerator kPOWER_DomainComm#
PD_COMM - communication subsystem
-
enumerator kPOWER_DomainWake#
-
typedef enum _power_low_power_mode power_low_power_mode_t#
The four low-power modes
fsl_powersupports, matchingPOWER_EnterSleep/EnterDeepSleep/EnterPowerDown/EnterDeepPowerDown. Passed topower_ext_regulator_hooks_t::setStandbyTargetso a board-registered hook can tell which entry point is in progress. Not a raw PF9453 (or other PMIC) register value.
-
typedef struct _power_ext_regulator_hooks power_ext_regulator_hooks_t#
Board-supplied hooks that let an external PMIC supply VDD_CORE (and other rails the board wires to that PMIC) instead of the on-chip DCDC/LDOs. Registered via
POWER_SetExtRegulatorHooks().fsl_powerhas no PMIC-specific knowledge; both members are generic and board/PMIC-specific translation lives entirely in board code.
-
typedef struct _power_policy_config power_policy_config_t#
Configuration passed to POWER_SetPolicy().
-
typedef enum _power_wakeup_source power_wakeup_source_t#
Encoded wakeup source for POWER_EnableWakeupSource() / POWER_DisableWakeupSource().
Encoding: bits[31:28] = wakeup path; remaining bits = source index. 0x0xxxxxxx : IRQ wakeup -> CMC0 IRQ_WAKEUP_MASK (NVIC index 0-383) 0x1xxxxxxx : MAIN DMA -> CMC1 DMA_WAKEUP_MASK (RM wakeup source index 0-63) 0x2xxxxxxx : WAKE DMA -> CMC2 DMA_WAKEUP_MASK (RM wakeup source index 31-43)
DMA wakeup source index is the RM Chapter 4 peripheral index - NOT an eDMA channel number. One peripheral maps to one index regardless of how many DMA request lines it uses.
Use the named enum members for known peripherals. Use the constructor macros (POWER_WAKEUP_IRQ / POWER_WAKEUP_MAIN_DMA / POWER_WAKEUP_WAKE_DMA) when the source index is determined at run time.
Wakeup sources are accumulated in SW state; POWERCON registers are written inside POWER_Enter*() via the internal POWER_ApplyWakeupSources() call.
Power-mode applicability (RT2660 domain power map): WAKE domain : Sleep, Deep Sleep, Power Down VBAT domain : Sleep, Deep Sleep, Power Down, Deep Power Down (DPD1) HSP domain : Sleep, Deep Sleep - HSP is in PD_MAIN (on in Sleep and Deep Sleep, off in Power Down and deeper). In Deep Sleep the functional clock is gated, so an HSP wakeup source must use a clock-less event (e.g. the LPUART RX active-edge, BAUD[RXEDGIE]); a clocked interrupt fires in Sleep only. MAIN DMA (CMC1) : Sleep, Deep Sleep WAKE DMA (CMC2) : Sleep, Deep Sleep, Power Down
-
typedef struct _power_run_regulators_config power_run_regulators_config_t#
Run-mode regulator configuration bundle.
-
typedef enum _power_memory power_memory_t#
RT2660 memory identifiers for MEMCON active-mode control.
Encodes (sliceIndex << 8) | blockIndex. Slice 0-11 map to SYSCON__MEMCON_S0–S11.
-
typedef enum _power_root_clock power_root_clock_t#
RT2660 subsystem root clock identifier.
Each value is the bit index within POWERCON_SOC_CTRL.RCGCFG_ACTIVE. Polarity: clearing a bit enables the root clock; setting it disables (gates) it. Note: NPU has no separate RCGCFG_ACTIVE bit. The NPU lives inside the Compute subsystem (CMPT_SS) and is gated by the COMPUTE_SS root clock (bit 0), shared with CM85. Clock and power are not 1:1: bit 0 clocks both CM85 (PD_CPU) and NPU (PD_NPU), which remain independent PDCON power domains.
-
typedef enum _power_clock_source power_clock_source_t#
RT2660 clock source identifier.
Each value is the bit index within POWERCON_SOC_CTRL.CSRCCFG_ACTIVE. Polarity: 0b = disable, 1b = enable (active-high, unlike RCGCFG_ACTIVE). Modifying CSRCCFG_ACTIVE requires a P-Channel trigger (POWERCON_TriggerSocUpdate).
-
typedef void (*power_clock_cb_t)(void)#
Callback type for run-mode clock frequency changes.
-
typedef enum _power_run_mode power_run_mode_t#
Active run mode, classified from the CPU core clock frequency.
Returned by POWER_GetCurrentRunMode. The PMU pmuMode field cannot distinguish HP from Normal run (both use pmuMode=0), so the run mode is detected from the CGU MAIN root clock frequency instead.
-
typedef enum _power_domain power_domain_t#
RT2660 software-controllable power domain identifiers.
These map directly to PDCON domain indices. Only these four domains are SW-triggerable on RT2660.
-
typedef struct _power_sleep_config power_sleep_config_t#
Sleep config.
Wakeup sources are configured separately via POWER_EnableWakeupSource(). PD_MAIN, PD_WAKE, PD_BAT always ON. PMU stays in HP mode (same voltage as the preceding run mode, FBB disabled for Sleep entry).
Fields marked [EXPERIMENTAL] may be removed or renamed in a future release.
-
typedef struct _power_deep_sleep_config power_deep_sleep_config_t#
Deep Sleep config.
PD_MAIN, PD_WAKE, PD_BAT always ON. The SSC P-Channel IS triggered in Deep Sleep, so PMU analog fields cause actual hardware state transitions.
Fields marked [EXPERIMENTAL] may be removed or renamed in a future release.
Note
RT2660 does not integrate PDCON domain retention (omitted for die size). The SW-controllable domain events below are only ever On (kPDCON_EventNoneOrActive) or PowerOff (kPDCON_EventPowerOff); Deep Sleep power saving comes from PMU analog/clock state and from powering domains fully off, not from domain retention.
Note
Active mode (kMEMCON_PowerModeNormal) is NOT valid for most memory fields in Deep Sleep — only Retention and PowerDown are allowed. The two exceptions are setWakeSramMode (WAKE_SS is always-on, so Active is safe and is the default) and setComputeSram01Mode (the block has a hardware retention supply that makes Active valid, though Retention is the default). See each field’s own docstring.
-
typedef struct _power_down_config power_down_config_t#
Power Down config.
Two memcon fields — one per block whose retention supply survives Power Down. All other memcon blocks lose their supply and their contents in Power Down regardless of
MEM_SLPCFGvalue, so no field is exposed for them and the driver issues no writes for them.Domain events and PMU state are fixed by the driver (all SW-controllable domains power off; PMU→RET; DCDC off).
Note
Valid values for both memory fields in Power Down: kMEMCON_PowerModeRetention and kMEMCON_PowerModePowerDown. kMEMCON_PowerModeNormal (Active) is semantically null in PD (VDD_CORE is off, no bus clock) and is not offered as a valid caller choice by the demo
g_powerModeTable; the driver does not reject it if written but treats it functionally as Retention on both blocks (they are on always-on retention paths that do not depend on the SLPCFG bit being 0 vs 1).Note
POWER_EnterPowerDown() does NOT return. Wakeup triggers a fast PoR.
-
typedef struct _power_deep_power_down_config power_deep_power_down_config_t#
Deep Power Down config - covers both DPD1 and DPD2 variants.
DPD1 (retainVbatSram=true): VBAT_SS powered; 2 KB VBAT SRAM retained. DPD2 (retainVbatSram=false): VBAT_SS off; PMIC_CTRL asserted (VDD_PMU removed).
Note
This function does NOT return. Wakeup via PMIC restoring VDD_PMU.
-
union _power_pmu_state#
- #include <fsl_power.h>
PMU analog state - word-sized bitfield union that overlays POWERCON_SOC_CTRL.PMUCFG_ACTIVE / PMUCFG_STBY.
Write
.worddirectly to the PMUCFG register via POWERCON P-Channel.Public Members
- struct _power_pmu_state
-
uint32_t word#
Raw 32-bit value; write directly to PMUCFG_ACTIVE / PMUCFG_STBY
-
struct _power_step_config#
- #include <fsl_power.h>
Configuration for one CMC or SSC step (sleep and wakeup directions).
countValueis used only when sleepMode or wakeupMode is kPOWER_StepModeCount. All steps within the same CMC/SSC block share one COUNT register - if multiple steps use count mode their countValue fields MUST be identical.Public Members
-
power_step_mode_t sleepMode#
Mode for the sleep (entry) direction
-
power_step_mode_t wakeupMode#
Mode for the wakeup (exit) direction
-
uint32_t countValue#
POWERCON clock cycles; ignored for Handshake mode
-
power_step_mode_t sleepMode#
-
struct _power_cmc_step_config#
- #include <fsl_power.h>
Step configuration for one CMC instance (5 steps).
Each CMC instance (CMC0, CMC1, CMC2) has its own step-mode mask and COUNT register. Different CMC instances may require different step modes or count values.
Public Members
-
power_step_config_t busMasterLpcg#
STEP1: Bus master LPCG handshake/gate
-
power_step_config_t busSlaveLpcg#
STEP2: Bus slave LPCG handshake/gate
-
power_step_config_t rootClockGate#
STEP3: SS root clock gate/ungate
-
power_step_config_t clockSource#
STEP4: Clock source via P-Channel
-
power_step_config_t powerDomain#
STEP5: Power domain control (PDCON)
-
power_step_config_t busMasterLpcg#
-
struct _power_handshake_routing_config#
- #include <fsl_power.h>
Init-time SoC handshake routing configuration.
Configures the routing of root clocks and clock sources to CMC handshake partners (POWERCON HSK_SEL registers) and PDCON per-domain handshake masks. Pass via power_policy_config_t::handshakeRouting (or NULL for POR defaults), or pass directly to POWER_SetHandshakeRouting() for post-init reconfiguration.
Public Members
-
uint32_t rcgcfgHskSel#
POWERCON RCGCFG_HSK_SEL: root clock -> CMC routing.
-
uint32_t csrccfgHskSel#
POWERCON CSRCCFG_HSK_SEL: clock source -> CMC routing, word 0.
-
uint32_t csrccfgHskSel1#
POWERCON CSRCCFG_HSK_SEL1: clock source -> CMC routing, word 1.
-
pdcon_handshake_mask_t domainHsk[6]#
PDCON HSKCTRL per-domain handshake mask, indexed by domain (0-5).
-
uint32_t rcgcfgHskSel#
-
struct _power_ext_regulator_hooks#
- #include <fsl_power.h>
Board-supplied hooks that let an external PMIC supply VDD_CORE (and other rails the board wires to that PMIC) instead of the on-chip DCDC/LDOs. Registered via
POWER_SetExtRegulatorHooks().fsl_powerhas no PMIC-specific knowledge; both members are generic and board/PMIC-specific translation lives entirely in board code.Public Members
-
status_t (*setCoreVoltage)(uint8_t voutAdjCode)#
< Run-mode VDD_CORE voltage set.
voutAdjCodeis one of thePOWER_PMUCFG_CORELEVEL_*codes above, NOT a millivolt value - the board’s implementation must translate it (e.g. to whatever units its PMIC’s voltage-set API expects) rather than assign a PMIC driver function directly. ReturnkStatus_Success, or a failure status thatfsl_powercan assert on. Low-power entry.modeidentifies whichPOWER_Enter*()call is in progress. The board’s implementation is responsible for whatever its PMIC needs at this transition (e.g. selecting a PMIC standby profile, reconfiguring other rails), and must write a board/PMIC-specific code into*pmicModeCodeforfsl_powerto forward toPOWERCON_SOC_CTRL->PMICCFG_STBY’sPMIC_MODE[1:0]field. ReturnkStatus_Success, or a failure status thatfsl_powertreats as fatal for this transition.
-
status_t (*setCoreVoltage)(uint8_t voutAdjCode)#
-
struct _power_policy_config#
- #include <fsl_power.h>
Configuration passed to POWER_SetPolicy().
Public Members
-
power_cmc_step_config_t cmcCpu#
CMC0 - CPU / M85 core (COMPUTE_SS domain)
-
power_cmc_step_config_t cmcMain#
CMC1 - MAIN domain (eDMA3 + eDMA5 DMA wakeup)
-
power_cmc_step_config_t cmcWake#
CMC2 - WAKE domain (eDMA3 DMA wakeup)
-
power_step_config_t sscPmu#
SSC STEP1: PMU standby/exit via P-Channel
-
power_step_config_t sscPmic#
SSC STEP2: PMIC standby/exit Init-time SoC handshake routing (HSK_SEL routing and PDCON HSKCTRL). NULL = apply POR-default values (hardware reset defaults). Non-NULL = apply *handshakeRouting directly (skips internal default lookup).
-
power_cmc_step_config_t cmcCpu#
-
struct _power_run_regulators_config#
- #include <fsl_power.h>
Run-mode regulator configuration bundle.
-
struct _power_sleep_config#
- #include <fsl_power.h>
Sleep config.
Wakeup sources are configured separately via POWER_EnableWakeupSource(). PD_MAIN, PD_WAKE, PD_BAT always ON. PMU stays in HP mode (same voltage as the preceding run mode, FBB disabled for Sleep entry).
Fields marked [EXPERIMENTAL] may be removed or renamed in a future release.
Public Members
-
pdcon_event_t setCpuDomainEvent#
PD_CPU: On (NoneOrActive) or PowerOff
-
pdcon_event_t setNpuDomainEvent#
PD_NPU: On (NoneOrActive) or PowerOff
-
pdcon_event_t setCommDomainEvent#
PD_COMM: On (NoneOrActive) or PowerOff
-
pdcon_event_t setMediaDomainEvent#
PD_MEDIA: On (NoneOrActive) or PowerOff
-
uint8_t setPmuMode#
[EXPERIMENTAL] PMU mode bits[22:20]: 0=HP, 2=LP, 3=RET
-
pmu_dcdc_mode_t setDcdcMode#
[EXPERIMENTAL] DCDC mode bit[7]
-
uint8_t setCoreLevel#
[EXPERIMENTAL] VDD_CORE DAC code bits[19:15]
-
pmu_ldo_mode_t setLdo0V8Mode#
[EXPERIMENTAL] LDO_VDD_0V8 bits[9:8]
-
pmu_ldo_mode_t setLdo1V8Mode#
[EXPERIMENTAL] LDO_VDD_1V8 bits[11:10]
-
uint8_t setLdoVdda1V8Mode#
[EXPERIMENTAL] LDO_VDDA_1V8 bits[13:12]: 0=off, 1=HP, 2=LP, 3=ULP
-
bool enableHqref#
[EXPERIMENTAL] High-quality reference enable bit[6]
-
uint8_t enableSensors#
[EXPERIMENTAL] Sensor enable mask bits[5:0]: [0]=Temp, [1]=0V8, [2]=1V8, [3]=Vdda, [4]=Core, [5]=PMU
-
bool enableLdoa0V8ClockSource#
[EXPERIMENTAL] LDOA 0V8 supply (bit 0)
-
bool enableFro192MClockSource#
[EXPERIMENTAL] FRO 192 MHz (bit 1)
-
bool enableFro12MClockSource#
[EXPERIMENTAL] FRO 12 MHz (bit 2)
-
bool enableMainPllClockSource#
[EXPERIMENTAL] Main PLL (bit 3)
-
bool enableCorePllClockSource#
[EXPERIMENTAL] Core PLL (bit 4)
-
bool enableSysPllClockSource#
[EXPERIMENTAL] System PLL (bit 5)
-
bool enableLdoq0V8ClockSource#
[EXPERIMENTAL] LDOQ 0V8 supply (bit 6)
-
bool enableSxoscClockSource#
[EXPERIMENTAL] SXOSC (bit 7)
-
bool enableFro12MLpClockSource#
[EXPERIMENTAL] FRO 12 MHz LP (bit 8)
-
bool enableComputeRootClock#
[EXPERIMENTAL] COMPUTE_SS root clock (bit 0)
-
bool enableMainRootClock#
[EXPERIMENTAL] MAIN_SS root clock (bit 1)
-
bool enableWakeRootClock#
[EXPERIMENTAL] WAKE_SS root clock (bit 2)
-
bool enableCommRootClock#
[EXPERIMENTAL] COMM_SS root clock (bit 3)
-
bool enableMediaRootClock#
[EXPERIMENTAL] MEDIA_SS root clock (bit 4)
-
bool enableAudioRootClock#
[EXPERIMENTAL] AUDIO_SS root clock (bit 5)
-
bool enableWake1MRootClock#
[EXPERIMENTAL] WAKE_1M root clock (bit 6)
-
bool enableWake2MRootClock#
[EXPERIMENTAL] WAKE_2M root clock (bit 7)
-
pdcon_event_t setCpuDomainEvent#
-
struct _power_deep_sleep_config#
- #include <fsl_power.h>
Deep Sleep config.
PD_MAIN, PD_WAKE, PD_BAT always ON. The SSC P-Channel IS triggered in Deep Sleep, so PMU analog fields cause actual hardware state transitions.
Fields marked [EXPERIMENTAL] may be removed or renamed in a future release.
Note
RT2660 does not integrate PDCON domain retention (omitted for die size). The SW-controllable domain events below are only ever On (kPDCON_EventNoneOrActive) or PowerOff (kPDCON_EventPowerOff); Deep Sleep power saving comes from PMU analog/clock state and from powering domains fully off, not from domain retention.
Note
Active mode (kMEMCON_PowerModeNormal) is NOT valid for most memory fields in Deep Sleep — only Retention and PowerDown are allowed. The two exceptions are setWakeSramMode (WAKE_SS is always-on, so Active is safe and is the default) and setComputeSram01Mode (the block has a hardware retention supply that makes Active valid, though Retention is the default). See each field’s own docstring.
Public Members
-
pdcon_event_t setCpuDomainEvent#
PD_CPU: On (NoneOrActive) or PowerOff
-
pdcon_event_t setNpuDomainEvent#
PD_NPU: On (NoneOrActive) or PowerOff
-
pdcon_event_t setCommDomainEvent#
PD_COMM: On (NoneOrActive) or PowerOff
-
pdcon_event_t setMediaDomainEvent#
PD_MEDIA: On (NoneOrActive) or PowerOff
-
uint8_t setPmuMode#
[EXPERIMENTAL] PMU mode bits[22:20]: 0=HP, 2=LP, 3=RET
-
pmu_dcdc_mode_t setDcdcMode#
[EXPERIMENTAL] DCDC mode bit[7]
-
uint8_t setCoreLevel#
[EXPERIMENTAL] VDD_CORE DAC code bits[19:15]
-
pmu_ldo_mode_t setLdo0V8Mode#
[EXPERIMENTAL] LDO_VDD_0V8 bits[9:8]
-
pmu_ldo_mode_t setLdo1V8Mode#
[EXPERIMENTAL] LDO_VDD_1V8 bits[11:10]
-
uint8_t setLdoVdda1V8Mode#
[EXPERIMENTAL] LDO_VDDA_1V8 bits[13:12]: 0=off, 1=HP, 2=LP, 3=ULP
-
bool enableHqref#
[EXPERIMENTAL] High-quality reference enable bit[6]
-
uint8_t enableSensors#
[EXPERIMENTAL] Sensor enable mask bits[5:0]: [0]=Temp, [1]=0V8, [2]=1V8, [3]=Vdda, [4]=Core, [5]=PMU
-
bool enableLdoa0V8ClockSource#
[EXPERIMENTAL] LDOA 0V8 supply (bit 0)
-
bool enableFro192MClockSource#
[EXPERIMENTAL] FRO 192 MHz (bit 1)
-
bool enableFro12MClockSource#
[EXPERIMENTAL] FRO 12 MHz (bit 2)
-
bool enableMainPllClockSource#
[EXPERIMENTAL] Main PLL (bit 3)
-
bool enableCorePllClockSource#
[EXPERIMENTAL] Core PLL (bit 4)
-
bool enableSysPllClockSource#
[EXPERIMENTAL] System PLL (bit 5)
-
bool enableLdoq0V8ClockSource#
[EXPERIMENTAL] LDOQ 0V8 supply (bit 6)
-
bool enableSxoscClockSource#
[EXPERIMENTAL] SXOSC (bit 7)
-
bool enableFro12MLpClockSource#
[EXPERIMENTAL] FRO 12 MHz LP (bit 8)
-
bool enableComputeRootClock#
[EXPERIMENTAL] COMPUTE_SS root clock (bit 0)
-
bool enableMainRootClock#
[EXPERIMENTAL] MAIN_SS root clock (bit 1)
-
bool enableWakeRootClock#
[EXPERIMENTAL] WAKE_SS root clock (bit 2)
-
bool enableCommRootClock#
[EXPERIMENTAL] COMM_SS root clock (bit 3)
-
bool enableMediaRootClock#
[EXPERIMENTAL] MEDIA_SS root clock (bit 4)
-
bool enableAudioRootClock#
[EXPERIMENTAL] AUDIO_SS root clock (bit 5)
-
bool enableWake1MRootClock#
[EXPERIMENTAL] WAKE_1M root clock (bit 6); keep true for wakeup logic
-
bool enableWake2MRootClock#
[EXPERIMENTAL] WAKE_2M root clock (bit 7); keep true for wakeup logic
-
memcon_power_mode_t setWakeSramMode#
[EXPERIMENTAL] Wake SRAM (S0 B0, 8 KB). Valid in DS: {Active, Retention, PowerDown}.
-
memcon_power_mode_t setComputeSram01Mode#
[EXPERIMENTAL] OCRAM0 Memory 0/1 (S2 B0, 72 KB total, 64 KB usable). Valid in DS: {Active, Retention, PowerDown}. Recommended: Retention. WARNING: PowerDown in DS loses the front 64 KB of OCRAM0 — do not select unless caller guarantees no live data in this block.
-
memcon_power_mode_t setOcram0M23Mode#
[EXPERIMENTAL] OCRAM0 Memory 2/3 (S2 B1, 72 KB total, ~64 KB usable est.)
-
memcon_power_mode_t setOcram0M4Mode#
[EXPERIMENTAL] OCRAM0 Memory 4 (S2 B2, 64 KB total, ~56 KB usable est.)
-
memcon_power_mode_t setOcram0M5Mode#
[EXPERIMENTAL] OCRAM0 Memory 5 (S2 B3, 48 KB total, ~42 KB usable est.)
-
memcon_power_mode_t setOcram1M0Mode#
[EXPERIMENTAL] OCRAM1 Memory 0 (S2 B4, 144 KB total, 128 KB usable)
-
memcon_power_mode_t setOcram1M1Mode#
[EXPERIMENTAL] OCRAM1 Memory 1 (S2 B5, 112 KB total, ~99 KB usable est.)
-
memcon_power_mode_t setOcram2M0Mode#
[EXPERIMENTAL] OCRAM2 Memory 0 (S2 B6, 144 KB total, 128 KB usable)
-
memcon_power_mode_t setOcram2M1Mode#
[EXPERIMENTAL] OCRAM2 Memory 1 (S2 B7, 112 KB total, ~99 KB usable est.)
-
memcon_power_mode_t setLlcCacheMode#
[EXPERIMENTAL] LLC cache 224KB (S2 B8)
-
memcon_power_mode_t setAudio8KbMode#
[EXPERIMENTAL] Audio SRAM 8KB (S2 B10; block is shared with MMU LUT / ELE Instr&Data / MICFIL FIR / ASRC RAM)
-
memcon_power_mode_t setM85TcmMode#
[EXPERIMENTAL] M85 CPU TCM + cache (S4 B0–B3, S5 B0)
-
memcon_power_mode_t setNpuTcmMode#
[EXPERIMENTAL] NPU TCM (S6 B0, S7 B0)
-
memcon_power_mode_t setCommTcmMode#
[EXPERIMENTAL] COMM SRAM (S10 B0, S11 B0)
-
memcon_power_mode_t setMediaTcmMode#
[EXPERIMENTAL] Media SRAM (S9 B0)
-
pdcon_event_t setCpuDomainEvent#
-
struct _power_down_config#
- #include <fsl_power.h>
Power Down config.
Two memcon fields — one per block whose retention supply survives Power Down. All other memcon blocks lose their supply and their contents in Power Down regardless of
MEM_SLPCFGvalue, so no field is exposed for them and the driver issues no writes for them.Domain events and PMU state are fixed by the driver (all SW-controllable domains power off; PMU→RET; DCDC off).
Note
Valid values for both memory fields in Power Down: kMEMCON_PowerModeRetention and kMEMCON_PowerModePowerDown. kMEMCON_PowerModeNormal (Active) is semantically null in PD (VDD_CORE is off, no bus clock) and is not offered as a valid caller choice by the demo
g_powerModeTable; the driver does not reject it if written but treats it functionally as Retention on both blocks (they are on always-on retention paths that do not depend on the SLPCFG bit being 0 vs 1).Note
POWER_EnterPowerDown() does NOT return. Wakeup triggers a fast PoR.
Public Members
-
memcon_power_mode_t setWakeSramMode#
Wake SRAM (S0 B0, 8 KB). Valid in PD: {Retention, PowerDown}.
-
memcon_power_mode_t setComputeSram01Mode#
OCRAM0 Memory 0/1 (S2 B0, 64 KB usable). Valid in PD: {Retention, PowerDown}. This is the only block whose contents can survive Power Down; select Retention when the application needs OCRAM0 M0/1 contents preserved across the PoR wakeup boot.
-
memcon_power_mode_t setWakeSramMode#
-
struct _power_deep_power_down_config#
- #include <fsl_power.h>
Deep Power Down config - covers both DPD1 and DPD2 variants.
DPD1 (retainVbatSram=true): VBAT_SS powered; 2 KB VBAT SRAM retained. DPD2 (retainVbatSram=false): VBAT_SS off; PMIC_CTRL asserted (VDD_PMU removed).
Note
This function does NOT return. Wakeup via PMIC restoring VDD_PMU.
Public Members
-
bool retainVbatSram#
true=DPD1 (VBAT_SS powered, SRAM retained), false=DPD2 (PMIC_CTRL asserted).
-
bool retainVbatSram#
-
struct __unnamed1__#
Public Members
-
uint32_t sensorTemp#
bit[0] Temperature sensor enable
-
uint32_t sensor0V8#
bit[1] VDD_0V8 sensor enable
-
uint32_t sensor1V8#
bit[2] VDD_1V8 sensor enable
-
uint32_t sensorVdda#
bit[3] VDDA_1V8 sensor enable
-
uint32_t sensorCore#
bit[4] VDD_CORE sensor enable
-
uint32_t sensorPmu#
bit[5] VDD_PMU sensor enable
-
uint32_t hqref#
bit[6] High-quality reference enable
-
uint32_t dcdcMode#
bit[7] DCDC mode: 0=PFM, 1=PWM
-
uint32_t ldo0V8Mode#
bits[9:8] LDO_VDD_0V8: 0=off, 1=HP, 2=LP
-
uint32_t ldo1V8Mode#
bits[11:10] LDO_VDD_1V8: 0=off, 1=HP, 2=LP
-
uint32_t ldoVdda1V8Mode#
bits[13:12] LDO_VDDA_1V8: 0=off, 1=HP, 2=LP, 3=ULP
-
uint32_t dcdcOffPmuRet#
bit[14] DCDC off when PMU_MODE=RET/BB
-
uint32_t coreLvl#
bits[19:15] VDD_CORE DAC: 0x00=0.8 V (others TBD)
-
uint32_t pmuMode#
bits[22:20] PMU mode: 0=HP, 1=HP-prog, 2=LP, 3=RET, 4=BB
-
uint32_t __pad0__#
bits[31:23] Reserved; write as zero
-
uint32_t sensorTemp#
POWERCON: Power Controller (CMC/SSC) Driver#
-
typedef struct _powercon_topology_config powercon_topology_config_t#
Init-time SoC topology configuration for POWERCON.
Routes root clocks and clock sources to their CMC handshake partners. Written once at initialisation — do not change during standby or at runtime. Use POWERCON_SetTopologyConfig() after the POWERCON function clock is enabled.
-
typedef struct _powercon_soc_standby_config powercon_soc_standby_config_t#
Per-mode standby state written to POWERCON_SOC_CTRL before WFI.
Contains only the per-sleep-entry fields. HSK_SEL routing is init-time topology; use powercon_topology_config_t and POWERCON_SetTopologyConfig() for that. MUST be written before __WFI() and NOT while POWERCON_IsCmcSleepBusy() returns true.
-
FSL_POWERCON_DRIVER_VERSION#
powercon driver version 2.0.0.
-
static inline void POWERCON_EnableFunctionClock(POWERCON_SOC_CTRL_Type *base)#
Enable the POWERCON_SOC_CTRL functional clock (FCEN).
MUST be called before any other POWERCON_SOC_CTRL_Type register access. After PoR wakeup (PoR resets POWERCON registers), this MUST be re-called before restoring any other POWERCON state.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
-
static inline void POWERCON_DisableFunctionClock(POWERCON_SOC_CTRL_Type *base)#
Disable the POWERCON_SOC_CTRL functional clock (FCEN).
Gates the functional clock. Subsequent accesses to POWERCON_SOC_CTRL_Type registers will fail until POWERCON_EnableFunctionClock() is called again.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
-
static inline void POWERCON_EnableSwAllowLowPower(POWERCON_CMC_CTRL_Type *base)#
Assert SW_ALLOW_LP for explicit software-request low-power entry.
Normal SDK POWER_Enter*() paths use __WFI() as the hardware trigger and do not require this bit. Use this helper only for explicit software-request or debug flows that intentionally drive CMC_CTRL.SW_ALLOW_LP.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_DisableSwAllowLowPower(POWERCON_CMC_CTRL_Type *base)#
Deassert SW_ALLOW_LP after an explicit software-request flow.
Normal SDK POWER_Enter*() WFI paths do not set this bit.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_EnableSystemSleepTrigger(POWERCON_CMC_CTRL_Type *base)#
Allow this CMC’s standby entry to trigger the System Sleep Controller.
When enabled, completing this CMC’s standby entry triggers the SSC (system-level standby sequence: PMU/PMIC steps). The silicon default is enabled; callers program it explicitly per low-power mode and must not rely on the default.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_DisableSystemSleepTrigger(POWERCON_CMC_CTRL_Type *base)#
Prevent this CMC’s standby entry from triggering the System Sleep Controller.
The CMC’s own standby step sequence still runs (unless disabled via the XMC standby mask, see POWERCON_SetXmcStandbyMask); only the system-level SSC trigger is suppressed. Used for Sleep, where CMC0’s flow runs without a PMU/PMIC standby transition.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
void POWERCON_EnableWakeupIRQ(POWERCON_CMC_CTRL_Type *base, const uint32_t *idMasks)#
Enable wakeup for the specified IRQ sources (RMW-clear in IRQ_WAKEUP_MASK).
Register polarity: 0 = wakeup enabled, 1 = masked. For each word i, bits set in idMasks[i] are CLEARED in IRQ_WAKEUP_MASK[i].
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
idMasks – Pointer to 12 words where each bit identifies an IRQ to enable for wakeup.
-
void POWERCON_DisableWakeupIRQ(POWERCON_CMC_CTRL_Type *base, const uint32_t *idMasks)#
Disable wakeup for the specified IRQ sources (RMW-set in IRQ_WAKEUP_MASK).
For each word i, bits set in idMasks[i] are SET in IRQ_WAKEUP_MASK[i].
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
idMasks – Pointer to 12 words where each bit identifies an IRQ to mask from wakeup.
-
void POWERCON_EnableWakeupDMA(POWERCON_CMC_CTRL_Type *base, const uint32_t *idMasks)#
Enable wakeup for the specified DMA sources (RMW-clear in DMA_WAKEUP_MASK).
Register polarity: 0 = wakeup enabled, 1 = masked. For each word i, bits set in idMasks[i] are CLEARED in DMA_WAKEUP_MASK[i].
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
idMasks – Pointer to 2 words where each bit identifies a DMA channel to enable for wakeup.
-
void POWERCON_DisableWakeupDMA(POWERCON_CMC_CTRL_Type *base, const uint32_t *idMasks)#
Disable wakeup for the specified DMA sources (RMW-set in DMA_WAKEUP_MASK).
For each word i, bits set in idMasks[i] are SET in DMA_WAKEUP_MASK[i].
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
idMasks – Pointer to 2 words where each bit identifies a DMA channel to mask from wakeup.
-
static inline void POWERCON_EnableDebugWakeup(POWERCON_CMC_CTRL_Type *base)#
Enable debugger-attach wakeup (NON_IRQ_CS.DBG_EN).
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_DisableDebugWakeup(POWERCON_CMC_CTRL_Type *base)#
Disable debugger-attach wakeup (NON_IRQ_CS.DBG_EN).
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_EnableCssi(POWERCON_CMC_CTRL_Type *base)#
Enable Non-IRQ Clock Source Stop Inhibit (CSSI).
When enabled, CSSI prevents a non-IRQ clock source from stopping if still in use during standby.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_DisableCssi(POWERCON_CMC_CTRL_Type *base)#
Bypass Non-IRQ Clock Source Stop Inhibit (CSSI).
When bypassed, non-IRQ clock sources are not inhibited from stopping during standby. Use only when the application manages clocks independently.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_LockCssiControl(POWERCON_CMC_CTRL_Type *base)#
Lock CSSI control (write-once; survives until next reset).
Sets CSSI_CTRL_LOCK. Once set, further CSSI enable/disable calls have no effect.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline bool POWERCON_GetCssiAllowLpStatus(POWERCON_CMC_CTRL_Type *base)#
Return the CSSI allow-low-power status.
Read-only hardware status. true means CSSI logic currently permits low-power entry.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
- Returns:
true if CSSI_ALLOW_LP_STS is set.
-
static inline bool POWERCON_IsCmcSleepBusy(POWERCON_CMC_CTRL_Type *base)#
Return true if the CMC sleep FSM is progressing.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
- Returns:
true if CMC_SLEEP_BUSY is set.
-
static inline bool POWERCON_IsCmcWakeupBusy(POWERCON_CMC_CTRL_Type *base)#
Return true if the CMC wakeup FSM is progressing.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
- Returns:
true if CMC_WAKEUP_BUSY is set.
-
static inline bool POWERCON_IsCmcSleepIdle(POWERCON_CMC_CTRL_Type *base)#
Return true if the CMC sleep FSM is idle.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
- Returns:
true if CMC_SLEEP_IDLE is set.
-
static inline uint8_t POWERCON_GetCmcFsmState(POWERCON_CMC_CTRL_Type *base)#
Return the current CMC FSM state (0–5).
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
- Returns:
FSM_STATE field value.
-
static inline void POWERCON_EnableSleepHold(POWERCON_CMC_CTRL_Type *base)#
Prevent the CMC FSM from advancing past the current step (debug only).
Production code MUST NOT leave sleep hold enabled during normal standby.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_DisableSleepHold(POWERCON_CMC_CTRL_Type *base)#
Release the CMC FSM sleep hold (debug only).
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_EnablePretendSleep(POWERCON_CMC_CTRL_Type *base)#
Cause CMC to behave as if in sleep without WFI (debug only).
Production code MUST NOT leave pretend-sleep enabled during normal operation.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_DisablePretendSleep(POWERCON_CMC_CTRL_Type *base)#
Cancel pretend-sleep mode (debug only).
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
-
static inline void POWERCON_SetCmcStepModeMask(POWERCON_CMC_CTRL_Type *base, uint8_t sleepCountModeMask, uint8_t wakeupCountModeMask)#
Configure CMC step count mode for sleep and wakeup directions.
MUST be called before __WFI(). Do NOT call while POWERCON_IsCmcSleepBusy() is true. Bit n = 0: step n uses handshake mode. Bit n = 1: step n uses count mode.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
sleepCountModeMask – 5-bit mask for sleep steps 0–4.
wakeupCountModeMask – 5-bit mask for wakeup steps 0–4.
-
static inline void POWERCON_SetCmcCountValue(POWERCON_CMC_CTRL_Type *base, uint32_t countValue)#
Set the shared CMC step count value.
Shared across all 5 sleep steps and all 5 wakeup steps in this CMC instance. MUST be called before __WFI(). Do NOT call while POWERCON_IsCmcSleepBusy() is true.
- Parameters:
base – POWERCON_CMC_CTRL peripheral base address.
countValue – 24-bit count value.
-
static inline void POWERCON_EnableRootClockInActiveMode(POWERCON_SOC_CTRL_Type *base, uint8_t clockIndex)#
Enable one root clock in active mode (RMW-clear one bit in RCGCFG_ACTIVE).
RCGCFG_ACTIVE is active-low: bit=1 enables the clock, bit=0 disables it. This function clears the bit for the given clockIndex, enabling that root clock. Takes effect immediately — no P-Channel trigger required.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
clockIndex – Bit index of the root clock to enable (0-based).
-
static inline void POWERCON_DisableRootClockInActiveMode(POWERCON_SOC_CTRL_Type *base, uint8_t clockIndex)#
Disable one root clock in active mode (RMW-set one bit in RCGCFG_ACTIVE).
RCGCFG_ACTIVE is active-low: bit=1 disables the clock, bit=0 enables it. This function sets the bit for the given clockIndex, disabling that root clock. Takes effect immediately — no P-Channel trigger required.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
clockIndex – Bit index of the root clock to disable (0-based).
-
static inline void POWERCON_EnableClockSourceInActiveMode(POWERCON_SOC_CTRL_Type *base, uint8_t clockSourceId)#
Enable one clock source in active mode (RMW-set one bit in CSRCCFG_ACTIVE).
CSRCCFG_ACTIVE is active-high: bit=1 enables the clock source. Staged — call POWERCON_TriggerSocUpdate() to apply.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
clockSourceId – Bit index of the clock source to enable (0-based).
-
static inline void POWERCON_DisableClockSourceInActiveMode(POWERCON_SOC_CTRL_Type *base, uint8_t clockSourceId)#
Disable one clock source in active mode (RMW-clear one bit in CSRCCFG_ACTIVE).
Staged — call POWERCON_TriggerSocUpdate() to apply.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
clockSourceId – Bit index of the clock source to disable (0-based).
-
static inline bool POWERCON_IsClockSourceEnabledInActiveMode(POWERCON_SOC_CTRL_Type *base, uint8_t clockSourceId)#
Return true if the specified clock source is enabled in active mode.
Reads CSRCCFG_ACTIVE and returns the bit for the given clockSourceId.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
clockSourceId – Bit index of the clock source to query (0-based).
- Returns:
true if the clock source bit is set in CSRCCFG_ACTIVE.
-
static inline void POWERCON_SetPmucfgActive(POWERCON_SOC_CTRL_Type *base, uint32_t cfg)#
Write PMUCFG_ACTIVE (PMU config word for active mode).
Applied via PMU P-Channel handshake after POWERCON_TriggerSocUpdate().
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
cfg – PMU configuration word.
-
static inline void POWERCON_SetPmiccfgActive(POWERCON_SOC_CTRL_Type *base, uint8_t cfg)#
Write PMICCFG_ACTIVE (2-bit PMIC mode for active mode).
Drives PMIC_MODE[1:0] output pins immediately — no P-Channel trigger required.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
cfg – PMIC mode value (2-bit): 0 = no standby request; non-zero = standby request asserted.
-
static inline void POWERCON_TriggerSocUpdate(POWERCON_SOC_CTRL_Type *base)#
Trigger a P-Channel SOC update to apply staged CSRCCFG_ACTIVE and PMUCFG_ACTIVE changes.
Sets P_TRG. HW sends PREQ to PMU; after acceptance HW auto-clears P_TRG and sets P_OVER. SW MUST poll POWERCON_IsSocUpdateDone() before calling this function again.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
-
static inline bool POWERCON_IsSocUpdateDone(POWERCON_SOC_CTRL_Type *base)#
Return true when the previous P-Channel SOC update is complete.
Checks P_OVER. SW MUST poll this before issuing a subsequent trigger.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
- Returns:
true if P_OVER is set.
-
void POWERCON_SetTopologyConfig(POWERCON_SOC_CTRL_Type *base, const powercon_topology_config_t *config)#
Write the init-time SoC topology configuration.
Writes RCGCFG_HSK_SEL, CSRCCFG_HSK_SEL, and CSRCCFG_HSK_SEL1 to route root clocks and clock sources to their CMC handshake partners. Call once at initialisation after the POWERCON function clock is enabled. Do NOT call during standby (while POWERCON_IsCmcSleepBusy() returns true).
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
config – Pointer to the topology configuration struct.
-
void POWERCON_SetSocStandbyConfig(POWERCON_SOC_CTRL_Type *base, const powercon_soc_standby_config_t *config)#
Write the per-mode SOC standby configuration before WFI.
Writes RCGCFG_STBY, CSRCCFG_STBY, PMUCFG_STBY, and PMICCFG_STBY — the per-sleep-entry state POWERCON applies autonomously during the CMC/SSC sleep sequence. HSK_SEL routing is not written here; use POWERCON_SetTopologyConfig() at initialisation for that. MUST be called before __WFI(). Do NOT call while POWERCON_IsCmcSleepBusy() is true.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
config – Pointer to the standby configuration struct.
-
static inline void POWERCON_EnableSysSleepCtrlStepMode(POWERCON_SYS_SLEEP_CTRL_Type *base, uint8_t sleepCountModeMask, uint8_t wakeupCountModeMask)#
Configure SSC step count mode for sleep and wakeup directions.
MUST be called before __WFI(). Do NOT call while POWERCON_IsCmcSleepBusy() is true. Bit n = 0: handshake mode. Bit n = 1: count mode.
- Parameters:
base – POWERCON_SYS_SLEEP_CTRL peripheral base address.
sleepCountModeMask – 2-bit mask for SSC sleep steps 0–1.
wakeupCountModeMask – 2-bit mask for SSC wakeup steps 0–1.
-
static inline void POWERCON_SetSysSleepCtrlCountValue(POWERCON_SYS_SLEEP_CTRL_Type *base, uint32_t countValue)#
Set the shared SSC step count value.
Shared across all SSC sleep and wakeup steps. MUST be called before __WFI(). Do NOT call while POWERCON_IsCmcSleepBusy() is true.
- Parameters:
base – POWERCON_SYS_SLEEP_CTRL peripheral base address.
countValue – 24-bit count value.
-
static inline void POWERCON_SetForceStandbyMask(POWERCON_SYS_SLEEP_CTRL_Type *base, uint32_t mask)#
Configure which CMC instances the SSC must wait for before proceeding (FORCE_SS).
MUST be set before __WFI(). The SSC waits until all unmasked CMCs are in SLEEP_SYS before proceeding with PMU/PMIC sequencing.
- Parameters:
base – POWERCON_SYS_SLEEP_CTRL peripheral base address.
mask – 3-bit mask: bit 0 = CMC0, bit 1 = CMC1, bit 2 = CMC2.
-
static inline void POWERCON_SetWakeupStandbyMask(POWERCON_SYS_SLEEP_CTRL_Type *base, uint32_t mask)#
Configure the wakeup suppress mask (WKMASK_SS).
When a CMC wakes up, this mask can suppress the wakeup signal to CMC0/CPU.
- Parameters:
base – POWERCON_SYS_SLEEP_CTRL peripheral base address.
mask – 3-bit mask: bit 0 = CMC0, bit 1 = CMC1, bit 2 = CMC2.
-
static inline void POWERCON_SetXmcStandbyMask(POWERCON_GLOBAL_Type *base, uint32_t mask)#
Set the XMC standby mask (per-CMC internal-standby-flow disable).
Controls bits 1-3 of XMC_STBY_MASK. Bit 0 (free-running clock) is NOT controlled by this API. A mask bit set to 1 disables that CMC’s internal standby step sequence entirely (the CMC stays active on WFI); 0 enables it. This gate is independent of the System Sleep Controller - SSC triggering is controlled per CMC by CMC_CTRL.TRIGGER_SS (POWERCON_EnableSystemSleepTrigger / POWERCON_DisableSystemSleepTrigger).
Reset state = 0x07 (all CMC standby flows disabled). Bit 0 of mask = CMC0 (register bit 1), bit 1 = CMC1 (bit 2), bit 2 = CMC2 (bit 3).
- Parameters:
base – POWERCON_GLOBAL peripheral base address.
mask – 3-bit mask value (0x00 = all CMC standby flows enabled).
-
static inline void POWERCON_EnableFastClockOff(POWERCON_GLOBAL_Type *base)#
Gate the POWERCON functional clock immediately on standby request.
When enabled, the functional clock is gated immediately when standby is requested (faster standby entry). When disabled, the clock runs until the CMC FSM advances past step 1.
- Parameters:
base – POWERCON_GLOBAL peripheral base address.
-
static inline void POWERCON_DisableFastClockOff(POWERCON_GLOBAL_Type *base)#
Allow the POWERCON functional clock to run until CMC FSM advances past step 1.
- Parameters:
base – POWERCON_GLOBAL peripheral base address.
-
static inline void POWERCON_SetObserveMux(POWERCON_GLOBAL_Type *base, uint8_t sel)#
Route an internal POWERCON signal to the observe pin (debug only).
Production code MUST NOT rely on this function.
- Parameters:
base – POWERCON_GLOBAL peripheral base address.
sel – 2-bit OBS_CTRL selector (0=CMC0, 1=CMC1, 2=CMC2).
-
static inline void POWERCON_EnableGlobalDebugWakeup(POWERCON_GLOBAL_Type *base)#
Source debug wakeup from the global POWERCON path.
Use when debug wakeup must span multiple CMC domains simultaneously.
- Parameters:
base – POWERCON_GLOBAL peripheral base address.
-
static inline void POWERCON_EnablePerCmcDebugWakeup(POWERCON_GLOBAL_Type *base)#
Source debug wakeup from the per-CMC path (hardware default after reset).
- Parameters:
base – POWERCON_GLOBAL peripheral base address.
-
static inline void POWERCON_SetWarmGPR(POWERCON_SOC_CTRL_Type *base, uint8_t index, uint32_t data)#
Write a warm GPR word.
Warm GPRs survive warm reset. For index 0 (GPR_WARM_0), bits[20:0] are CCM ACK masks reserved by hardware and are preserved automatically; only bits[31:21] carry user data.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
index – GPR index: 0 = GPR_WARM_0, 1–3 = GPR_WARM[0..2].
data – Value to write.
-
static inline uint32_t POWERCON_GetWarmGPR(POWERCON_SOC_CTRL_Type *base, uint8_t index)#
Read a warm GPR word.
For index 0, bits[20:0] contain CCM ACK masks — mask them off if only user data (bits[31:21]) is needed.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
index – GPR index: 0 = GPR_WARM_0, 1–3 = GPR_WARM[0..2].
- Returns:
GPR value.
-
static inline void POWERCON_SetColdGPR(POWERCON_SOC_CTRL_Type *base, uint8_t index, uint32_t data)#
Write a cold GPR word.
Cold GPRs survive PoR. All 32 bits are user-accessible.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
index – GPR index 0–3.
data – Value to write.
-
static inline uint32_t POWERCON_GetColdGPR(POWERCON_SOC_CTRL_Type *base, uint8_t index)#
Read a cold GPR word.
- Parameters:
base – POWERCON_SOC_CTRL peripheral base address.
index – GPR index 0–3.
- Returns:
GPR value.
-
struct _powercon_topology_config#
- #include <fsl_powercon.h>
Init-time SoC topology configuration for POWERCON.
Routes root clocks and clock sources to their CMC handshake partners. Written once at initialisation — do not change during standby or at runtime. Use POWERCON_SetTopologyConfig() after the POWERCON function clock is enabled.
-
struct _powercon_soc_standby_config#
- #include <fsl_powercon.h>
Per-mode standby state written to POWERCON_SOC_CTRL before WFI.
Contains only the per-sleep-entry fields. HSK_SEL routing is init-time topology; use powercon_topology_config_t and POWERCON_SetTopologyConfig() for that. MUST be written before __WFI() and NOT while POWERCON_IsCmcSleepBusy() returns true.
Public Members
-
uint32_t rcgcfgStby#
Root clock gating configuration applied during standby.
-
uint32_t csrccfgStby#
Clock source selection active during standby.
-
uint32_t pmucfgStby#
Full PMU configuration word for standby state.
-
uint8_t pmiccfgStby#
PMIC mode code driven on PMIC_MODE pins during standby.
-
uint32_t rcgcfgStby#
PWM: Pulse Width Modulator#
-
status_t PWM_Init(PWM_Type *base, pwm_submodule_t subModule, const pwm_config_t *config)#
Ungates the PWM submodule clock and configures the peripheral for basic operation.
This API should be called at the beginning of the application using the PWM driver. When user select PWMX, user must choose edge aligned output, becasue there are some limitation on center aligned PWMX output. When output PWMX in center aligned mode, VAL1 register controls both PWM period and PWMX duty cycle, PWMA and PWMB output will be corrupted. But edge aligned PWMX output do not have such limit. In master reload counter initialization mode, PWM period is depended by period of set LDOK in submodule 0 because this operation will reload register. Submodule 0 counter initialization cannot be master sync or master reload.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
config – Pointer to user’s PWM config structure.
- Returns:
kStatus_Success means success; else failed.
-
void PWM_Deinit(PWM_Type *base, pwm_submodule_t subModule)#
Gate the PWM submodule clock.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to deinitialize
-
void PWM_GetDefaultConfig(pwm_config_t *config)#
Fill in the PWM config struct with the default settings.
The default values are:
config->enableDebugMode = false; config->enableWait = false; config->reloadSelect = kPWM_LocalReload; config->clockSource = kPWM_BusClock; config->prescale = kPWM_Prescale_Divide_1; config->initializationControl = kPWM_Initialize_LocalSync; config->forceTrigger = kPWM_Force_Local; config->reloadFrequency = kPWM_LoadEveryOportunity; config->reloadLogic = kPWM_ReloadImmediate; config->pairOperation = kPWM_Independent;
- Parameters:
config – Pointer to user’s PWM config structure.
-
status_t PWM_SetupPwm(PWM_Type *base, pwm_submodule_t subModule, const pwm_signal_param_t *chnlParams, uint8_t numOfChnls, pwm_mode_t mode, uint32_t pwmFreq_Hz, uint32_t srcClock_Hz)#
Sets up the PWM signals for a PWM submodule.
The function initializes the submodule according to the parameters passed in by the user. The function also sets up the value compare registers to match the PWM signal requirements. If the dead time insertion logic is enabled, the pulse period is reduced by the dead time period specified by the user. When user select PWMX, user must choose edge aligned output, becasue there are some limitation on center aligned PWMX output. Due to edge aligned PWMX is negative true signal, need to configure PWMX active low true level to get correct duty cycle. The half cycle point will not be exactly in the middle of the PWM cycle when PWMX enabled.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
chnlParams – Array of PWM channel parameters to configure the channel(s).
numOfChnls – Number of channels to configure, this should be the size of the array passed in. Array size should not be more than 3 as each submodule has 3 pins to output PWM.
mode – PWM operation mode, options available in enumeration pwm_mode_t
pwmFreq_Hz – PWM signal frequency in Hz
srcClock_Hz – PWM source clock of correspond submodule in Hz. If source clock of submodule1,2,3 is from submodule0 AUX_CLK, its source clock is submodule0 source clock divided with submodule0 prescaler value instead of submodule0 source clock.
- Returns:
Returns kStatus_Fail if there was error setting up the signal; kStatus_Success otherwise
-
status_t PWM_SetupPwmPhaseShift(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, uint32_t pwmFreq_Hz, uint32_t srcClock_Hz, uint8_t shiftvalue, bool doSync)#
Set PWM phase shift for PWM channel running on channel PWM_A, PWM_B which with 50% duty cycle.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – PWM channel to configure
pwmFreq_Hz – PWM signal frequency in Hz
srcClock_Hz – PWM main counter clock in Hz.
shiftvalue – Phase shift value, range in 0 ~ 50
doSync – true: Set LDOK bit for the submodule list; false: LDOK bit don’t set, need to call PWM_SetPwmLdok to sync update.
- Returns:
Returns kStatus_Fail if there was error setting up the signal; kStatus_Success otherwise
-
void PWM_UpdatePwmDutycycle(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmSignal, pwm_mode_t currPwmMode, uint8_t dutyCyclePercent)#
Updates the PWM signal’s dutycycle.
The function updates the PWM dutycyle to the new value that is passed in. If the dead time insertion logic is enabled then the pulse period is reduced by the dead time period specified by the user.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmSignal – Signal (PWM A, PWM B, PWM X) to update
currPwmMode – The current PWM mode set during PWM setup
dutyCyclePercent – New PWM pulse width, value should be between 0 to 100 0=inactive signal(0% duty cycle)… 100=active signal (100% duty cycle)
-
void PWM_UpdatePwmDutycycleHighAccuracy(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmSignal, pwm_mode_t currPwmMode, uint16_t dutyCycle)#
Updates the PWM signal’s dutycycle with 16-bit accuracy.
The function updates the PWM dutycyle to the new value that is passed in. If the dead time insertion logic is enabled then the pulse period is reduced by the dead time period specified by the user.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmSignal – Signal (PWM A, PWM B, PWM X) to update
currPwmMode – The current PWM mode set during PWM setup
dutyCycle – New PWM pulse width, value should be between 0 to 65535 0=inactive signal(0% duty cycle)… 65535=active signal (100% duty cycle)
-
void PWM_UpdatePwmPeriodAndDutycycle(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmSignal, pwm_mode_t currPwmMode, uint16_t pulseCnt, uint16_t dutyCycle)#
Update the PWM signal’s period and dutycycle for a PWM submodule.
The function updates PWM signal period generated by a specific submodule according to the parameters passed in by the user. This function can also set dutycycle weather you want to keep original dutycycle or update new dutycycle. Call this function in local sync control mode because PWM period is depended by
INIT and VAL1 register of each submodule. In master sync initialization control mode, call this function to update INIT and VAL1 register of all submodule because PWM period is depended by INIT and VAL1 register in submodule0. If the dead time insertion logic is enabled, the pulse period is reduced by the dead time period specified by the user. PWM signal will not be generated if its period is less than dead time duration.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmSignal – Signal (PWM A or PWM B) to update
currPwmMode – The current PWM mode set during PWM setup, options available in enumeration pwm_mode_t
pulseCnt – New PWM period, value should be between 0 to 65535 0=minimum PWM period… 65535=maximum PWM period
dutyCycle – New PWM pulse width of channel, value should be between 0 to 65535 0=inactive signal(0% duty cycle)… 65535=active signal (100% duty cycle) You can keep original duty cycle or update new duty cycle
-
static inline void PWM_EnableInterrupts(PWM_Type *base, pwm_submodule_t subModule, uint32_t mask)#
Enables the selected PWM interrupts.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
mask – The interrupts to enable. This is a logical OR of members of the enumeration pwm_interrupt_enable_t
-
static inline void PWM_DisableInterrupts(PWM_Type *base, pwm_submodule_t subModule, uint32_t mask)#
Disables the selected PWM interrupts.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
mask – The interrupts to enable. This is a logical OR of members of the enumeration pwm_interrupt_enable_t
-
static inline uint32_t PWM_GetEnabledInterrupts(PWM_Type *base, pwm_submodule_t subModule)#
Gets the enabled PWM interrupts.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
- Returns:
The enabled interrupts. This is the logical OR of members of the enumeration pwm_interrupt_enable_t
-
static inline void PWM_DMAFIFOWatermarkControl(PWM_Type *base, pwm_submodule_t subModule, pwm_watermark_control_t pwm_watermark_control)#
Capture DMA Enable Source Select.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwm_watermark_control – PWM FIFO watermark and control
-
static inline void PWM_DMACaptureSourceSelect(PWM_Type *base, pwm_submodule_t subModule, pwm_dma_source_select_t pwm_dma_source_select)#
Capture DMA Enable Source Select.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwm_dma_source_select – PWM capture DMA enable source select
-
static inline void PWM_EnableDMACapture(PWM_Type *base, pwm_submodule_t subModule, uint16_t mask, bool activate)#
Enables or disables the selected PWM DMA Capture read request.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
mask – The DMA to enable or disable. This is a logical OR of members of the enumeration pwm_dma_enable_t
activate – true: Enable DMA read request; false: Disable DMA read request
-
static inline void PWM_EnableDMAWrite(PWM_Type *base, pwm_submodule_t subModule, bool activate)#
Enables or disables the PWM DMA write request.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
activate – true: Enable DMA write request; false: Disable DMA write request
-
static inline uint32_t PWM_GetStatusFlags(PWM_Type *base, pwm_submodule_t subModule)#
Gets the PWM status flags.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
- Returns:
The status flags. This is the logical OR of members of the enumeration pwm_status_flags_t
-
static inline void PWM_ClearStatusFlags(PWM_Type *base, pwm_submodule_t subModule, uint32_t mask)#
Clears the PWM status flags.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
mask – The status flags to clear. This is a logical OR of members of the enumeration pwm_status_flags_t
-
static inline void PWM_StartTimer(PWM_Type *base, uint8_t subModulesToStart)#
Starts the PWM counter for a single or multiple submodules.
Sets the Run bit which enables the clocks to the PWM submodule. This function can start multiple submodules at the same time.
- Parameters:
base – PWM peripheral base address
subModulesToStart – PWM submodules to start. This is a logical OR of members of the enumeration pwm_module_control_t
-
static inline void PWM_StopTimer(PWM_Type *base, uint8_t subModulesToStop)#
Stops the PWM counter for a single or multiple submodules.
Clears the Run bit which resets the submodule’s counter. This function can stop multiple submodules at the same time.
- Parameters:
base – PWM peripheral base address
subModulesToStop – PWM submodules to stop. This is a logical OR of members of the enumeration pwm_module_control_t
-
FSL_PWM_DRIVER_VERSION#
Version 2.10.2
-
enum _pwm_submodule#
List of PWM submodules.
Values:
-
enumerator kPWM_Module_0#
Submodule 0
-
enumerator kPWM_Module_1#
Submodule 1
-
enumerator kPWM_Module_2#
Submodule 2
-
enumerator kPWM_Module_0#
-
enum _pwm_channels#
List of PWM channels in each module.
Values:
-
enumerator kPWM_PwmB#
-
enumerator kPWM_PwmA#
-
enumerator kPWM_PwmX#
-
enumerator kPWM_PwmB#
-
enum _pwm_value_register#
List of PWM value registers.
Values:
-
enumerator kPWM_ValueRegister_0#
PWM Value0 register
-
enumerator kPWM_ValueRegister_1#
PWM Value1 register
-
enumerator kPWM_ValueRegister_2#
PWM Value2 register
-
enumerator kPWM_ValueRegister_3#
PWM Value3 register
-
enumerator kPWM_ValueRegister_4#
PWM Value4 register
-
enumerator kPWM_ValueRegister_5#
PWM Value5 register
-
enumerator kPWM_ValueRegister_0#
-
enum _pwm_value_register_mask#
List of PWM value registers mask.
Values:
-
enumerator kPWM_ValueRegisterMask_0#
PWM Value0 register mask
-
enumerator kPWM_ValueRegisterMask_1#
PWM Value1 register mask
-
enumerator kPWM_ValueRegisterMask_2#
PWM Value2 register mask
-
enumerator kPWM_ValueRegisterMask_3#
PWM Value3 register mask
-
enumerator kPWM_ValueRegisterMask_4#
PWM Value4 register mask
-
enumerator kPWM_ValueRegisterMask_5#
PWM Value5 register mask
-
enumerator kPWM_ValueRegisterMask_0#
-
enum _pwm_clock_source#
PWM clock source selection.
Values:
-
enumerator kPWM_BusClock#
Device specific IPBus clock, refer reference manual for frequency
-
enumerator kPWM_ExternalClock#
EXT_CLK is used as the clock
-
enumerator kPWM_Submodule0Clock#
Clock of the submodule 0 (AUX_CLK) is used as the source clock
-
enumerator kPWM_BusClock#
-
enum _pwm_clock_prescale#
PWM prescaler factor selection for clock source.
Values:
-
enumerator kPWM_Prescale_Divide_1#
PWM clock frequency = fclk/1
-
enumerator kPWM_Prescale_Divide_2#
PWM clock frequency = fclk/2
-
enumerator kPWM_Prescale_Divide_4#
PWM clock frequency = fclk/4
-
enumerator kPWM_Prescale_Divide_8#
PWM clock frequency = fclk/8
-
enumerator kPWM_Prescale_Divide_16#
PWM clock frequency = fclk/16
-
enumerator kPWM_Prescale_Divide_32#
PWM clock frequency = fclk/32
-
enumerator kPWM_Prescale_Divide_64#
PWM clock frequency = fclk/64
-
enumerator kPWM_Prescale_Divide_128#
PWM clock frequency = fclk/128
-
enumerator kPWM_Prescale_Divide_1#
-
enum _pwm_force_output_trigger#
Options that can trigger a PWM FORCE_OUT.
Values:
-
enumerator kPWM_Force_Local#
The local force signal, CTRL2[FORCE], from the submodule is used to force updates
-
enumerator kPWM_Force_Master#
The master force signal from submodule 0 is used to force updates
-
enumerator kPWM_Force_LocalReload#
The local reload signal from this submodule is used to force updates without regard to the state of LDOK
-
enumerator kPWM_Force_MasterReload#
The master reload signal from submodule 0 is used to force updates if LDOK is set
-
enumerator kPWM_Force_LocalSync#
The local sync signal from this submodule is used to force updates
-
enumerator kPWM_Force_MasterSync#
The master sync signal from submodule0 is used to force updates
-
enumerator kPWM_Force_External#
The external force signal, EXT_FORCE, from outside the PWM module causes updates
-
enumerator kPWM_Force_ExternalSync#
The external sync signal, EXT_SYNC, from outside the PWM module causes updates
-
enumerator kPWM_Force_Local#
-
enum _pwm_output_state#
PWM channel output status.
Values:
-
enumerator kPWM_HighState#
The output state of PWM channel is high
-
enumerator kPWM_LowState#
The output state of PWM channel is low
-
enumerator kPWM_NormalState#
The output state of PWM channel is normal
-
enumerator kPWM_InvertState#
The output state of PWM channel is invert
-
enumerator kPWM_MaskState#
The output state of PWM channel is mask
-
enumerator kPWM_HighState#
-
enum _pwm_init_source#
PWM counter initialization options.
Values:
-
enumerator kPWM_Initialize_LocalSync#
Local sync causes initialization
-
enumerator kPWM_Initialize_MasterReload#
Master reload from submodule 0 causes initialization
-
enumerator kPWM_Initialize_MasterSync#
Master sync from submodule 0 causes initialization
-
enumerator kPWM_Initialize_ExtSync#
EXT_SYNC causes initialization
-
enumerator kPWM_Initialize_LocalSync#
-
enum _pwm_load_frequency#
PWM load frequency selection.
Values:
-
enumerator kPWM_LoadEveryOportunity#
Every PWM opportunity
-
enumerator kPWM_LoadEvery2Oportunity#
Every 2 PWM opportunities
-
enumerator kPWM_LoadEvery3Oportunity#
Every 3 PWM opportunities
-
enumerator kPWM_LoadEvery4Oportunity#
Every 4 PWM opportunities
-
enumerator kPWM_LoadEvery5Oportunity#
Every 5 PWM opportunities
-
enumerator kPWM_LoadEvery6Oportunity#
Every 6 PWM opportunities
-
enumerator kPWM_LoadEvery7Oportunity#
Every 7 PWM opportunities
-
enumerator kPWM_LoadEvery8Oportunity#
Every 8 PWM opportunities
-
enumerator kPWM_LoadEvery9Oportunity#
Every 9 PWM opportunities
-
enumerator kPWM_LoadEvery10Oportunity#
Every 10 PWM opportunities
-
enumerator kPWM_LoadEvery11Oportunity#
Every 11 PWM opportunities
-
enumerator kPWM_LoadEvery12Oportunity#
Every 12 PWM opportunities
-
enumerator kPWM_LoadEvery13Oportunity#
Every 13 PWM opportunities
-
enumerator kPWM_LoadEvery14Oportunity#
Every 14 PWM opportunities
-
enumerator kPWM_LoadEvery15Oportunity#
Every 15 PWM opportunities
-
enumerator kPWM_LoadEvery16Oportunity#
Every 16 PWM opportunities
-
enumerator kPWM_LoadEveryOportunity#
-
enum _pwm_fault_input#
List of PWM fault selections.
Values:
-
enumerator kPWM_Fault_0#
Fault 0 input pin
-
enumerator kPWM_Fault_1#
Fault 1 input pin
-
enumerator kPWM_Fault_2#
Fault 2 input pin
-
enumerator kPWM_Fault_3#
Fault 3 input pin
-
enumerator kPWM_Fault_0#
-
enum _pwm_fault_disable#
List of PWM fault disable mapping selections.
Values:
-
enumerator kPWM_FaultDisable_0#
Fault 0 disable mapping
-
enumerator kPWM_FaultDisable_1#
Fault 1 disable mapping
-
enumerator kPWM_FaultDisable_2#
Fault 2 disable mapping
-
enumerator kPWM_FaultDisable_3#
Fault 3 disable mapping
-
enumerator kPWM_FaultDisable_0#
-
enum _pwm_input_capture_edge#
PWM capture edge select.
Values:
-
enumerator kPWM_Disable#
Disabled
-
enumerator kPWM_FallingEdge#
Capture on falling edge only
-
enumerator kPWM_RisingEdge#
Capture on rising edge only
-
enumerator kPWM_RiseAndFallEdge#
Capture on rising or falling edge
-
enumerator kPWM_Disable#
-
enum _pwm_force_signal#
PWM output options when a FORCE_OUT signal is asserted.
Values:
-
enumerator kPWM_UsePwm#
Generated PWM signal is used by the deadtime logic.
-
enumerator kPWM_InvertedPwm#
Inverted PWM signal is used by the deadtime logic.
-
enumerator kPWM_SoftwareControl#
Software controlled value is used by the deadtime logic.
-
enumerator kPWM_UseExternal#
PWM_EXTA signal is used by the deadtime logic.
-
enumerator kPWM_UsePwm#
-
enum _pwm_chnl_pair_operation#
Options available for the PWM A & B pair operation.
Values:
-
enumerator kPWM_Independent#
PWM A & PWM B operate as 2 independent channels
-
enumerator kPWM_ComplementaryPwmA#
PWM A & PWM B are complementary channels, PWM A generates the signal
-
enumerator kPWM_ComplementaryPwmB#
PWM A & PWM B are complementary channels, PWM B generates the signal
-
enumerator kPWM_Independent#
-
enum _pwm_register_reload#
Options available on how to load the buffered-registers with new values.
Values:
-
enumerator kPWM_ReloadImmediate#
Buffered-registers get loaded with new values as soon as LDOK bit is set
-
enumerator kPWM_ReloadPwmHalfCycle#
Registers loaded on a PWM half cycle
-
enumerator kPWM_ReloadPwmFullCycle#
Registers loaded on a PWM full cycle
-
enumerator kPWM_ReloadPwmHalfAndFullCycle#
Registers loaded on a PWM half & full cycle
-
enumerator kPWM_ReloadImmediate#
-
enum _pwm_fault_recovery_mode#
Options available on how to re-enable the PWM output when recovering from a fault.
Values:
-
enumerator kPWM_NoRecovery#
PWM output will stay inactive
-
enumerator kPWM_RecoverHalfCycle#
PWM output re-enabled at the first half cycle
-
enumerator kPWM_RecoverFullCycle#
PWM output re-enabled at the first full cycle
-
enumerator kPWM_RecoverHalfAndFullCycle#
PWM output re-enabled at the first half or full cycle
-
enumerator kPWM_NoRecovery#
-
enum _pwm_interrupt_enable#
List of PWM interrupt options.
Values:
-
enumerator kPWM_CompareVal0InterruptEnable#
PWM VAL0 compare interrupt
-
enumerator kPWM_CompareVal1InterruptEnable#
PWM VAL1 compare interrupt
-
enumerator kPWM_CompareVal2InterruptEnable#
PWM VAL2 compare interrupt
-
enumerator kPWM_CompareVal3InterruptEnable#
PWM VAL3 compare interrupt
-
enumerator kPWM_CompareVal4InterruptEnable#
PWM VAL4 compare interrupt
-
enumerator kPWM_CompareVal5InterruptEnable#
PWM VAL5 compare interrupt
-
enumerator kPWM_CaptureX0InterruptEnable#
PWM capture X0 interrupt
-
enumerator kPWM_CaptureX1InterruptEnable#
PWM capture X1 interrupt
-
enumerator kPWM_CaptureB0InterruptEnable#
PWM capture B0 interrupt
-
enumerator kPWM_CaptureB1InterruptEnable#
PWM capture B1 interrupt
-
enumerator kPWM_CaptureA0InterruptEnable#
PWM capture A0 interrupt
-
enumerator kPWM_CaptureA1InterruptEnable#
PWM capture A1 interrupt
-
enumerator kPWM_ReloadInterruptEnable#
PWM reload interrupt
-
enumerator kPWM_ReloadErrorInterruptEnable#
PWM reload error interrupt
-
enumerator kPWM_Fault0InterruptEnable#
PWM fault 0 interrupt
-
enumerator kPWM_Fault1InterruptEnable#
PWM fault 1 interrupt
-
enumerator kPWM_Fault2InterruptEnable#
PWM fault 2 interrupt
-
enumerator kPWM_Fault3InterruptEnable#
PWM fault 3 interrupt
-
enumerator kPWM_CompareVal0InterruptEnable#
-
enum _pwm_status_flags#
List of PWM status flags.
Values:
-
enumerator kPWM_CompareVal0Flag#
PWM VAL0 compare flag
-
enumerator kPWM_CompareVal1Flag#
PWM VAL1 compare flag
-
enumerator kPWM_CompareVal2Flag#
PWM VAL2 compare flag
-
enumerator kPWM_CompareVal3Flag#
PWM VAL3 compare flag
-
enumerator kPWM_CompareVal4Flag#
PWM VAL4 compare flag
-
enumerator kPWM_CompareVal5Flag#
PWM VAL5 compare flag
-
enumerator kPWM_CaptureX0Flag#
PWM capture X0 flag
-
enumerator kPWM_CaptureX1Flag#
PWM capture X1 flag
-
enumerator kPWM_CaptureB0Flag#
PWM capture B0 flag
-
enumerator kPWM_CaptureB1Flag#
PWM capture B1 flag
-
enumerator kPWM_CaptureA0Flag#
PWM capture A0 flag
-
enumerator kPWM_CaptureA1Flag#
PWM capture A1 flag
-
enumerator kPWM_ReloadFlag#
PWM reload flag
-
enumerator kPWM_ReloadErrorFlag#
PWM reload error flag
-
enumerator kPWM_RegUpdatedFlag#
PWM registers updated flag
-
enumerator kPWM_Fault0Flag#
PWM fault 0 flag
-
enumerator kPWM_Fault1Flag#
PWM fault 1 flag
-
enumerator kPWM_Fault2Flag#
PWM fault 2 flag
-
enumerator kPWM_Fault3Flag#
PWM fault 3 flag
-
enumerator kPWM_CompareVal0Flag#
-
enum _pwm_dma_enable#
List of PWM DMA options.
Values:
-
enumerator kPWM_CaptureX0DMAEnable#
PWM capture X0 DMA
-
enumerator kPWM_CaptureX1DMAEnable#
PWM capture X1 DMA
-
enumerator kPWM_CaptureB0DMAEnable#
PWM capture B0 DMA
-
enumerator kPWM_CaptureB1DMAEnable#
PWM capture B1 DMA
-
enumerator kPWM_CaptureA0DMAEnable#
PWM capture A0 DMA
-
enumerator kPWM_CaptureA1DMAEnable#
PWM capture A1 DMA
-
enumerator kPWM_CaptureX0DMAEnable#
-
enum _pwm_dma_source_select#
List of PWM capture DMA enable source select.
Values:
-
enumerator kPWM_DMARequestDisable#
Read DMA requests disabled
-
enumerator kPWM_DMAWatermarksEnable#
Exceeding a FIFO watermark sets the DMA read request
-
enumerator kPWM_DMALocalSync#
A local sync (VAL1 matches counter) sets the read DMA request
-
enumerator kPWM_DMALocalReload#
A local reload (STS[RF] being set) sets the read DMA request
-
enumerator kPWM_DMARequestDisable#
-
enum _pwm_watermark_control#
PWM FIFO Watermark AND Control.
Values:
-
enumerator kPWM_FIFOWatermarksOR#
Selected FIFO watermarks are OR’ed together
-
enumerator kPWM_FIFOWatermarksAND#
Selected FIFO watermarks are AND’ed together
-
enumerator kPWM_FIFOWatermarksOR#
-
enum _pwm_mode#
PWM operation mode.
Values:
-
enumerator kPWM_SignedCenterAligned#
Signed center-aligned
-
enumerator kPWM_CenterAligned#
Unsigned cente-aligned
-
enumerator kPWM_SignedEdgeAligned#
Signed edge-aligned
-
enumerator kPWM_EdgeAligned#
Unsigned edge-aligned
-
enumerator kPWM_SignedCenterAligned#
-
enum _pwm_level_select#
PWM output pulse mode, high-true or low-true.
Values:
-
enumerator kPWM_HighTrue#
High level represents “on” or “active” state
-
enumerator kPWM_LowTrue#
Low level represents “on” or “active” state
-
enumerator kPWM_HighTrue#
-
enum _pwm_fault_state#
PWM output fault status.
Values:
-
enumerator kPWM_PwmFaultState0#
Output is forced to logic 0 state prior to consideration of output polarity control.
-
enumerator kPWM_PwmFaultState1#
Output is forced to logic 1 state prior to consideration of output polarity control.
-
enumerator kPWM_PwmFaultState2#
Output is tristated.
-
enumerator kPWM_PwmFaultState3#
Output is tristated.
-
enumerator kPWM_PwmFaultState0#
-
enum _pwm_reload_source_select#
PWM reload source select.
Values:
-
enumerator kPWM_LocalReload#
The local reload signal is used to reload registers
-
enumerator kPWM_MasterReload#
The master reload signal (from submodule 0) is used to reload
-
enumerator kPWM_LocalReload#
-
enum _pwm_fault_clear#
PWM fault clearing options.
Values:
-
enumerator kPWM_Automatic#
Automatic fault clearing
-
enumerator kPWM_ManualNormal#
Manual fault clearing with no fault safety mode
-
enumerator kPWM_ManualSafety#
Manual fault clearing with fault safety mode
-
enumerator kPWM_Automatic#
-
enum _pwm_stretch_count_prescaler#
Trigger signal stretch IPBus clock count prescaler (MCTRL2[STRETCH_CNT_PRSC]).
Values:
-
enumerator kPWM_StretchIPBusClockPrescaler1#
Stretch count is zero, no stretch.
-
enumerator kPWM_StretchIPBusClockPrescaler2#
Stretch trigger signal for 2 IPBus clock periods.
-
enumerator kPWM_StretchIPBusClockPrescaler4#
Stretch trigger signal for 4 IPBus clock periods.
-
enumerator kPWM_StretchIPBusClockPrescaler8#
Stretch trigger signal for 8 IPBus clock periods.
-
enumerator kPWM_StretchIPBusClockPrescaler1#
-
enum _pwm_module_control#
Options for submodule master control operation.
Values:
-
enumerator kPWM_Control_Module_0#
Control submodule 0’s start/stop,buffer reload operation
-
enumerator kPWM_Control_Module_1#
Control submodule 1’s start/stop,buffer reload operation
-
enumerator kPWM_Control_Module_2#
Control submodule 2’s start/stop,buffer reload operation
-
enumerator kPWM_Control_Module_3#
Control submodule 3’s start/stop,buffer reload operation
-
enumerator kPWM_Control_Module_0#
-
typedef enum _pwm_submodule pwm_submodule_t#
List of PWM submodules.
-
typedef enum _pwm_channels pwm_channels_t#
List of PWM channels in each module.
-
typedef enum _pwm_value_register pwm_value_register_t#
List of PWM value registers.
-
typedef enum _pwm_clock_source pwm_clock_source_t#
PWM clock source selection.
-
typedef enum _pwm_clock_prescale pwm_clock_prescale_t#
PWM prescaler factor selection for clock source.
-
typedef enum _pwm_force_output_trigger pwm_force_output_trigger_t#
Options that can trigger a PWM FORCE_OUT.
-
typedef enum _pwm_output_state pwm_output_state_t#
PWM channel output status.
-
typedef enum _pwm_init_source pwm_init_source_t#
PWM counter initialization options.
-
typedef enum _pwm_load_frequency pwm_load_frequency_t#
PWM load frequency selection.
-
typedef enum _pwm_fault_input pwm_fault_input_t#
List of PWM fault selections.
-
typedef enum _pwm_fault_disable pwm_fault_disable_t#
List of PWM fault disable mapping selections.
-
typedef enum _pwm_fault_channels pwm_fault_channels_t#
List of PWM fault channels.
-
typedef enum _pwm_input_capture_edge pwm_input_capture_edge_t#
PWM capture edge select.
-
typedef enum _pwm_force_signal pwm_force_signal_t#
PWM output options when a FORCE_OUT signal is asserted.
-
typedef enum _pwm_chnl_pair_operation pwm_chnl_pair_operation_t#
Options available for the PWM A & B pair operation.
-
typedef enum _pwm_register_reload pwm_register_reload_t#
Options available on how to load the buffered-registers with new values.
-
typedef enum _pwm_fault_recovery_mode pwm_fault_recovery_mode_t#
Options available on how to re-enable the PWM output when recovering from a fault.
-
typedef enum _pwm_interrupt_enable pwm_interrupt_enable_t#
List of PWM interrupt options.
-
typedef enum _pwm_status_flags pwm_status_flags_t#
List of PWM status flags.
-
typedef enum _pwm_dma_enable pwm_dma_enable_t#
List of PWM DMA options.
-
typedef enum _pwm_dma_source_select pwm_dma_source_select_t#
List of PWM capture DMA enable source select.
-
typedef enum _pwm_watermark_control pwm_watermark_control_t#
PWM FIFO Watermark AND Control.
-
typedef enum _pwm_level_select pwm_level_select_t#
PWM output pulse mode, high-true or low-true.
-
typedef enum _pwm_fault_state pwm_fault_state_t#
PWM output fault status.
-
typedef enum _pwm_reload_source_select pwm_reload_source_select_t#
PWM reload source select.
-
typedef enum _pwm_fault_clear pwm_fault_clear_t#
PWM fault clearing options.
-
typedef enum _pwm_stretch_count_prescaler pwm_stretch_count_prescaler_t#
Trigger signal stretch IPBus clock count prescaler (MCTRL2[STRETCH_CNT_PRSC]).
-
typedef enum _pwm_module_control pwm_module_control_t#
Options for submodule master control operation.
-
typedef struct _pwm_signal_param pwm_signal_param_t#
Structure for the user to define the PWM signal characteristics.
-
typedef struct _pwm_config pwm_config_t#
PWM config structure.
This structure holds the configuration settings for the PWM peripheral. To initialize this structure to reasonable defaults, call the PWM_GetDefaultConfig() function and pass a pointer to your config structure instance.
The config struct can be made const so it resides in flash
-
typedef struct _pwm_fault_input_filter_param pwm_fault_input_filter_param_t#
Structure for the user to configure the fault input filter.
-
typedef struct _pwm_fault_param pwm_fault_param_t#
Structure is used to hold the parameters to configure a PWM fault.
-
typedef struct _pwm_input_capture_param pwm_input_capture_param_t#
Structure is used to hold parameters to configure the capture capability of a signal pin.
-
void PWM_SetupInputCapture(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, const pwm_input_capture_param_t *inputCaptureParams)#
Sets up the PWM input capture.
Each PWM submodule has 3 pins that can be configured for use as input capture pins. This function sets up the capture parameters for each pin and enables the pin for input capture operation.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – Channel in the submodule to setup
inputCaptureParams – Parameters passed in to set up the input pin
-
status_t PWM_GetInputCaptureValue(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, uint8_t captureIndex, uint16_t *captureValue)#
Read the capture value.
This function reads the capture value stored in channel’s capture value register. It should be called when a valid edge is detected on the input capture pin(related capture flag is set). The capture circuit has two input capture registers per channel for first edge and second edge capture.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – PWM channel to read from (PWM A, PWM B, or PWM X)
captureIndex – Capture register to read (0 for first edge capture, 1 for second edge capture)
- Returns:
Returns kStatus_InvalidArgument if pwmChannel does not support capture feature; kStatus_Success otherwise
-
void PWM_SetupFaultInputFilter(PWM_Type *base, const pwm_fault_input_filter_param_t *faultInputFilterParams)#
Sets up the PWM fault channel 0 input filter.
- Parameters:
base – PWM peripheral base address
faultInputFilterParams – Parameters passed in to set up the fault input filter.
-
void PWM_SetupFaultInputFilterExt(PWM_Type *base, pwm_fault_channels_t faultChannel, const pwm_fault_input_filter_param_t *faultInputFilterParams)#
Sets up the PWM fault input filter.
- Parameters:
base – PWM peripheral base address
faultChannel – PWM fault channel to configure.
faultInputFilterParams – Parameters passed in to set up the fault input filter.
-
void PWM_SetupFaults(PWM_Type *base, pwm_fault_input_t faultNum, const pwm_fault_param_t *faultParams)#
Sets up the PWM fault channel 0 protection.
- Parameters:
base – PWM peripheral base address
faultNum – PWM fault to configure.
faultParams – Pointer to the PWM fault config structure
-
void PWM_SetupFaultsExt(PWM_Type *base, pwm_fault_channels_t faultChannel, pwm_fault_input_t faultNum, const pwm_fault_param_t *faultParams)#
Sets up the PWM fault protection.
- Parameters:
base – PWM peripheral base address
faultChannel – PWM fault channel to configure.
faultNum – PWM fault to configure.
faultParams – Pointer to the PWM fault config structure
-
void PWM_FaultDefaultConfig(pwm_fault_param_t *config)#
Fill in the PWM fault config struct with the default settings.
The default values are:
config->faultClearingMode = kPWM_Automatic; config->faultLevel = false; config->enableCombinationalPath = true; config->recoverMode = kPWM_NoRecovery;
- Parameters:
config – Pointer to user’s PWM fault config structure.
-
void PWM_SetupForceSignal(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, pwm_force_signal_t mode)#
Selects the signal to output on a PWM pin when a FORCE_OUT signal is asserted.
The user specifies which channel to configure by supplying the submodule number and whether to modify PWM A or PWM B within that submodule.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – Channel to configure
mode – Signal to output when a FORCE_OUT is triggered
-
static inline void PWM_EnableLocalForce(PWM_Type *base, pwm_submodule_t subModule)#
Enables local software force initialization on a PWM submodule.
This function performs a software-controlled initialization, causes a FORCE_OUT event which latches all double-buffered fields (DTSRCSEL, MCTRL[IPOL], SWCOUT) into their active registers and, if MCTRL[LDOK] is set, also triggers a register reload.
Call this function after updating the desired buffered registers (e.g. after PWM_SetupForceSignal()) to apply the new values synchronously.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to enable local force on
-
void PWM_UpdateCurrentPolarity(PWM_Type *base, pwm_submodule_t subModule, pwm_chnl_pair_operation_t polarity)#
Updates the current polarity (MCTRL[IPOL]) for a PWM submodule.
MCTRL[IPOL] is a double-buffered field. This function only writes the shadow register; the value does NOT take effect until a FORCE_OUT event occurs. Call PWM_EnableLocalForce() after this function to apply all pending changes atomically in one FORCE_OUT event.
Only meaningful when the submodule operates in complementary mode (CTRL2[INDEP] = 0).
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
polarity – kPWM_ComplementaryPwmA: PWM23 (VAL2/VAL3) drives the complementary pair kPWM_ComplementaryPwmB: PWM45 (VAL4/VAL5) drives the complementary pair
-
static inline void PWM_SetVALxValue(PWM_Type *base, pwm_submodule_t subModule, pwm_value_register_t valueRegister, uint16_t value)#
Set the PWM VALx registers.
This function allows the user to write value into VAL registers directly. And it will destroying the PWM clock period set by the PWM_SetupPwm()/PWM_SetupPwmPhaseShift() functions. Due to VALx registers are bufferd, the new value will not active uless call PWM_SetPwmLdok() and the reload point is reached.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
valueRegister – VALx register that will be writen new value
value – Value that will been write into VALx register
-
static inline uint16_t PWM_GetVALxValue(PWM_Type *base, pwm_submodule_t subModule, pwm_value_register_t valueRegister)#
Get the PWM VALx registers.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
valueRegister – VALx register that will be read value
- Returns:
The VALx register value
-
static inline void PWM_OutputTriggerEnable(PWM_Type *base, pwm_submodule_t subModule, pwm_value_register_t valueRegister, bool activate)#
Enables or disables the PWM output trigger.
This function allows the user to enable or disable the PWM trigger. The PWM has 2 triggers. Trigger 0 is activated when the counter matches VAL 0, VAL 2, or VAL 4 register. Trigger 1 is activated when the counter matches VAL 1, VAL 3, or VAL 5 register.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
valueRegister – Value register that will activate the trigger
activate – true: Enable the trigger; false: Disable the trigger
-
static inline void PWM_ActivateOutputTrigger(PWM_Type *base, pwm_submodule_t subModule, uint16_t valueRegisterMask)#
Enables the PWM output trigger.
This function allows the user to enable one or more (VAL0-5) PWM trigger.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
valueRegisterMask – Value register mask that will activate one or more (VAL0-5) trigger enumeration _pwm_value_register_mask
-
static inline void PWM_DeactivateOutputTrigger(PWM_Type *base, pwm_submodule_t subModule, uint16_t valueRegisterMask)#
Disables the PWM output trigger.
This function allows the user to disables one or more (VAL0-5) PWM trigger.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
valueRegisterMask – Value register mask that will Deactivate one or more (VAL0-5) trigger enumeration _pwm_value_register_mask
-
static inline void PWM_SetTriggerStretchPrescaler(PWM_Type *base, pwm_stretch_count_prescaler_t prescaler)#
Sets the trigger signal stretch IPBus clock count prescaler (MCTRL2[STRETCH_CNT_PRSC]).
MCTRL2[STRETCH_CNT_PRSC] is a module-level register that controls the stretch prescaler for all trigger outputs (mux0_trig, mux1_trig, out0_trig, out1_trig, pwma_trig, pwmb_trig) across all submodules. Call this function once after all submodules have been initialised with PWM_Init(), rather than configuring it per submodule, to avoid unintentional overwrite.
- Parameters:
base – PWM peripheral base address
prescaler – Stretch prescaler value, see pwm_stretch_count_prescaler_t.
-
static inline void PWM_SetupSwCtrlOut(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, bool value)#
Sets the software control output for a pin to high or low.
The user specifies which channel to modify by supplying the submodule number and whether to modify PWM A or PWM B within that submodule.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – Channel to configure
value – true: Supply a logic 1, false: Supply a logic 0.
-
static inline void PWM_SetPwmLdok(PWM_Type *base, uint8_t subModulesToUpdate, bool value)#
Sets or clears the PWM LDOK bit on a single or multiple submodules.
Set LDOK bit to load buffered values into CTRL[PRSC] and the INIT, FRACVAL and VAL registers. The values are loaded immediately if kPWM_ReloadImmediate option was choosen during config. Else the values are loaded at the next PWM reload point. This function can issue the load command to multiple submodules at the same time.
- Parameters:
base – PWM peripheral base address
subModulesToUpdate – PWM submodules to update with buffered values. This is a logical OR of members of the enumeration pwm_module_control_t
value – true: Set LDOK bit for the submodule list; false: Clear LDOK bit
-
static inline void PWM_SetPwmFaultState(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, pwm_fault_state_t faultState)#
Set PWM output fault status.
These bits determine the fault state for the PWM_A output in fault conditions and STOP mode. It may also define the output state in WAIT and DEBUG modes depending on the settings of CTRL2[WAITEN] and CTRL2[DBGEN]. This function can update PWM output fault status.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – Channel to configure
faultState – PWM output fault status
-
static inline void PWM_SetupFaultDisableMap(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, pwm_fault_channels_t pwm_fault_channels, uint16_t value)#
Set PWM fault disable mapping.
Each of the four bits of this read/write field is one-to-one associated with the four FAULTx inputs of fault channel 0/1. The PWM output will be turned off if there is a logic 1 on an FAULTx input and a 1 in the corresponding bit of this field. A reset sets all bits in this field.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – PWM channel to configure
pwm_fault_channels – PWM fault channel to configure
value – Fault disable mapping mask value enumeration pwm_fault_disable_t
-
static inline void PWM_OutputEnable(PWM_Type *base, pwm_channels_t pwmChannel, pwm_submodule_t subModule)#
Set PWM output enable.
This feature allows the user to enable the PWM Output. Recommend to invoke this API after PWM and fault configuration. But invoke this API before configure MCTRL register is okay, such as set LDOK or start timer.
- Parameters:
base – PWM peripheral base address
pwmChannel – PWM channel to configure
subModule – PWM submodule to configure
-
static inline void PWM_OutputDisable(PWM_Type *base, pwm_channels_t pwmChannel, pwm_submodule_t subModule)#
Set PWM output disable.
This feature allows the user to disable the PWM output. Recommend to invoke this API after PWM and fault configuration. But invoke this API before configure MCTRL register is okay, such as set LDOK or start timer.
- Parameters:
base – PWM peripheral base address
pwmChannel – PWM channel to configure
subModule – PWM submodule to configure
-
uint8_t PWM_GetPwmChannelState(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel)#
Get the dutycycle value.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – PWM channel to configure
- Returns:
Current channel dutycycle value.
-
status_t PWM_SetOutputToIdle(PWM_Type *base, pwm_channels_t pwmChannel, pwm_submodule_t subModule, bool idleStatus)#
Set PWM output in idle status (high or low).
Note
This API should call after PWM_SetupPwm() APIs, and PWMX submodule is not supported.
- Parameters:
base – PWM peripheral base address
pwmChannel – PWM channel to configure
subModule – PWM submodule to configure
idleStatus – True: PWM output is high in idle status; false: PWM output is low in idle status.
- Returns:
kStatus_Fail if there was error setting up the signal; kStatus_Success if set output idle success
-
void PWM_SetClockMode(PWM_Type *base, pwm_submodule_t subModule, pwm_clock_prescale_t prescaler)#
Set the pwm submodule prescaler.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
prescaler – Set prescaler value
-
void PWM_SetPwmForceOutputToZero(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, bool forcetozero)#
This function enables-disables the forcing of the output of a given eFlexPwm channel to logic 0.
- Parameters:
base – PWM peripheral base address
pwmChannel – PWM channel to configure
subModule – PWM submodule to configure
forcetozero – True: Enable the pwm force output to zero; False: Disable the pwm output resumes normal function.
-
void PWM_SetChannelOutput(PWM_Type *base, pwm_submodule_t subModule, pwm_channels_t pwmChannel, pwm_output_state_t outputstate)#
This function set the output state of the PWM pin as requested for the current cycle.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – PWM channel to configure
outputstate – Set pwm output state, see pwm_output_state_t.
-
status_t PWM_SetPhaseDelay(PWM_Type *base, pwm_channels_t pwmChannel, pwm_submodule_t subModule, uint16_t delayCycles)#
This function set the phase delay from the master sync signal of submodule 0.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – PWM channel to configure
delayCycles – Number of cycles delayed from submodule 0.
- Returns:
kStatus_Fail if the number of delay cycles is set larger than the period defined in submodule 0; kStatus_Success if set phase delay success
-
static inline void PWM_SetFilterSampleCount(PWM_Type *base, pwm_channels_t pwmChannel, pwm_submodule_t subModule, uint8_t filterSampleCount)#
This function set the number of consecutive samples that must agree prior to the input filter.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – PWM channel to configure
filterSampleCount – Number of consecutive samples.
-
static inline void PWM_SetFilterSamplePeriod(PWM_Type *base, pwm_channels_t pwmChannel, pwm_submodule_t subModule, uint8_t filterSamplePeriod)#
This function set the sampling period of the fault pin input filter.
- Parameters:
base – PWM peripheral base address
subModule – PWM submodule to configure
pwmChannel – PWM channel to configure
filterSamplePeriod – Sampling period of input filter.
-
PWM_SUBMODULE_SWCONTROL_WIDTH#
Number of bits per submodule for software output control
-
PWM_SUBMODULE_CHANNEL#
Submodule channels include PWMA, PWMB, PWMX.
-
struct _pwm_signal_param#
- #include <fsl_pwm.h>
Structure for the user to define the PWM signal characteristics.
Public Members
-
pwm_channels_t pwmChannel#
PWM channel being configured; PWM A or PWM B
-
uint8_t dutyCyclePercent#
PWM pulse width, value should be between 0 to 100 0=inactive signal(0% duty cycle)… 100=always active signal (100% duty cycle)
-
pwm_level_select_t level#
PWM output active level select
-
uint16_t deadtimeValue#
The deadtime value; only used if channel pair is operating in complementary mode
-
pwm_fault_state_t faultState#
PWM output fault status
-
bool pwmchannelenable#
Enable PWM output
-
pwm_channels_t pwmChannel#
-
struct _pwm_config#
- #include <fsl_pwm.h>
PWM config structure.
This structure holds the configuration settings for the PWM peripheral. To initialize this structure to reasonable defaults, call the PWM_GetDefaultConfig() function and pass a pointer to your config structure instance.
The config struct can be made const so it resides in flash
Public Members
-
bool enableDebugMode#
true: PWM continues to run in debug mode; false: PWM is paused in debug mode
-
pwm_init_source_t initializationControl#
Option to initialize the counter
-
pwm_clock_source_t clockSource#
Clock source for the counter
-
pwm_clock_prescale_t prescale#
Pre-scaler to divide down the clock
-
pwm_chnl_pair_operation_t pairOperation#
Channel pair in indepedent or complementary mode
-
pwm_register_reload_t reloadLogic#
PWM Reload logic setup
-
pwm_reload_source_select_t reloadSelect#
Reload source select
-
pwm_load_frequency_t reloadFrequency#
Specifies when to reload, used when user’s choice is not immediate reload
-
pwm_force_output_trigger_t forceTrigger#
Specify which signal will trigger a FORCE_OUT
-
bool enableDebugMode#
-
struct _pwm_fault_input_filter_param#
- #include <fsl_pwm.h>
Structure for the user to configure the fault input filter.
-
struct _pwm_fault_param#
- #include <fsl_pwm.h>
Structure is used to hold the parameters to configure a PWM fault.
Public Members
-
pwm_fault_clear_t faultClearingMode#
Fault clearing mode to use
-
bool faultLevel#
true: Logic 1 indicates fault; false: Logic 0 indicates fault
-
bool enableCombinationalPath#
true: Combinational Path from fault input is enabled; false: No combination path is available
-
pwm_fault_recovery_mode_t recoverMode#
Specify when to re-enable the PWM output
-
pwm_fault_clear_t faultClearingMode#
-
struct _pwm_input_capture_param#
- #include <fsl_pwm.h>
Structure is used to hold parameters to configure the capture capability of a signal pin.
Public Members
-
bool captureInputSel#
true: Use the edge counter signal as source false: Use the raw input signal from the pin as source
-
uint8_t edgeCompareValue#
Compare value, used only if edge counter is used as source
-
pwm_input_capture_edge_t edge0#
Specify which edge causes a capture for input circuitry 0
-
pwm_input_capture_edge_t edge1#
Specify which edge causes a capture for input circuitry 1
-
bool enableOneShotCapture#
true: Use one-shot capture mode; false: Use free-running capture mode
-
uint8_t fifoWatermark#
Watermark level for capture FIFO. The capture flags in the status register will set if the word count in the FIFO is greater than this watermark level
-
bool captureInputSel#
QTMR: Quad Timer Driver#
-
void QTMR_Init(TMR_Type *base, qtmr_channel_selection_t channel, const qtmr_config_t *config)#
Ungates the Quad Timer clock and configures the peripheral for basic operation.
Note
This API should be called at the beginning of the application using the Quad Timer driver.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
config – Pointer to user’s Quad Timer config structure
-
void QTMR_Deinit(TMR_Type *base, qtmr_channel_selection_t channel)#
Stops the counter and gates the Quad Timer clock.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
-
void QTMR_GetDefaultConfig(qtmr_config_t *config)#
Fill in the Quad Timer config struct with the default settings.
The default values are:
config->debugMode = kQTMR_RunNormalInDebug; config->enableExternalForce = false; config->enableMasterMode = false; config->faultFilterCount = 0; config->faultFilterPeriod = 0; config->primarySource = kQTMR_ClockDivide_2; config->secondarySource = kQTMR_Counter0InputPin;
- Parameters:
config – Pointer to user’s Quad Timer config structure.
-
void QTMR_EnableInterrupts(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t mask)#
Enables the selected Quad Timer interrupts.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
mask – The interrupts to enable. This is a logical OR of members of the enumeration qtmr_interrupt_enable_t
-
void QTMR_DisableInterrupts(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t mask)#
Disables the selected Quad Timer interrupts.
- Parameters:
base – Quad Timer peripheral base addres
channel – Quad Timer channel number
mask – The interrupts to enable. This is a logical OR of members of the enumeration qtmr_interrupt_enable_t
-
uint32_t QTMR_GetEnabledInterrupts(TMR_Type *base, qtmr_channel_selection_t channel)#
Gets the enabled Quad Timer interrupts.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
- Returns:
The enabled interrupts. This is the logical OR of members of the enumeration qtmr_interrupt_enable_t
-
uint32_t QTMR_GetStatus(TMR_Type *base, qtmr_channel_selection_t channel)#
Gets the Quad Timer status flags.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
- Returns:
The status flags. This is the logical OR of members of the enumeration qtmr_status_flags_t
-
void QTMR_ClearStatusFlags(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t mask)#
Clears the Quad Timer status flags.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
mask – The status flags to clear. This is a logical OR of members of the enumeration qtmr_status_flags_t
-
void QTMR_SetTimerPeriod(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t ticks)#
Sets the timer period in ticks.
Timers counts from initial value till it equals the count value set here. The counter will then reinitialize to the value specified in the Load register.
Note
This function will write the time period in ticks to COMP1 or COMP2 register depending on the count direction
User can call the utility macros provided in fsl_common.h to convert to ticks
This function supports cases, providing only primary source clock without secondary source clock.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
ticks – Timer period in units of ticks
-
void QTMR_SetCompareValue(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t ticks)#
Set compare value.
This function sets the value used for comparison with the counter value.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
ticks – Timer period in units of ticks.
-
static inline void QTMR_SetLoadValue(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t value)#
Set load value.
This function sets the value used to initialize the counter after a counter comparison.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
value – Load register initialization value.
-
static inline uint32_t QTMR_GetCurrentTimerCount(TMR_Type *base, qtmr_channel_selection_t channel)#
Reads the current timer counting value.
This function returns the real-time timer counting value, in a range from 0 to a timer period.
Note
User can call the utility macros provided in fsl_common.h to convert ticks to usec or msec
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
- Returns:
Current counter value in ticks
-
static inline void QTMR_StartTimer(TMR_Type *base, qtmr_channel_selection_t channel, qtmr_counting_mode_t clockSource)#
Starts the Quad Timer counter.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
clockSource – Quad Timer clock source
-
static inline void QTMR_StopTimer(TMR_Type *base, qtmr_channel_selection_t channel)#
Stops the Quad Timer counter.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
-
void QTMR_EnableDma(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t mask)#
Enable the Quad Timer DMA.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
mask – The DMA to enable. This is a logical OR of members of the enumeration qtmr_dma_enable_t
-
void QTMR_DisableDma(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t mask)#
Disable the Quad Timer DMA.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
mask – The DMA to enable. This is a logical OR of members of the enumeration qtmr_dma_enable_t
-
FSL_QTMR_DRIVER_VERSION#
Version
-
enum _qtmr_primary_count_source#
Quad Timer primary clock source selection.
Values:
-
enumerator kQTMR_ClockCounter0InputPin#
Use counter 0 input pin
-
enumerator kQTMR_ClockCounter1InputPin#
Use counter 1 input pin
-
enumerator kQTMR_ClockCounter2InputPin#
Use counter 2 input pin
-
enumerator kQTMR_ClockCounter3InputPin#
Use counter 3 input pin
-
enumerator kQTMR_ClockCounter0Output#
Use counter 0 output
-
enumerator kQTMR_ClockCounter1Output#
Use counter 1 output
-
enumerator kQTMR_ClockCounter2Output#
Use counter 2 output
-
enumerator kQTMR_ClockCounter3Output#
Use counter 3 output
-
enumerator kQTMR_ClockDivide_1#
IP bus clock divide by 1 prescaler
-
enumerator kQTMR_ClockDivide_2#
IP bus clock divide by 2 prescaler
-
enumerator kQTMR_ClockDivide_4#
IP bus clock divide by 4 prescaler
-
enumerator kQTMR_ClockDivide_8#
IP bus clock divide by 8 prescaler
-
enumerator kQTMR_ClockDivide_16#
IP bus clock divide by 16 prescaler
-
enumerator kQTMR_ClockDivide_32#
IP bus clock divide by 32 prescaler
-
enumerator kQTMR_ClockDivide_64#
IP bus clock divide by 64 prescaler
-
enumerator kQTMR_ClockDivide_128#
IP bus clock divide by 128 prescaler
-
enumerator kQTMR_ClockCounter0InputPin#
-
enum _qtmr_input_source#
Quad Timer input sources selection.
Values:
-
enumerator kQTMR_Counter0InputPin#
Use counter 0 input pin
-
enumerator kQTMR_Counter1InputPin#
Use counter 1 input pin
-
enumerator kQTMR_Counter2InputPin#
Use counter 2 input pin
-
enumerator kQTMR_Counter3InputPin#
Use counter 3 input pin
-
enumerator kQTMR_Counter0InputPin#
-
enum _qtmr_counting_mode#
Quad Timer counting mode selection.
Values:
-
enumerator kQTMR_NoOperation#
No operation
-
enumerator kQTMR_PriSrcRiseEdge#
Count rising edges of primary source
-
enumerator kQTMR_PriSrcRiseAndFallEdge#
Count rising and falling edges of primary source
-
enumerator kQTMR_PriSrcRiseEdgeSecInpHigh#
Count rise edges of pri SRC while sec inp high active
-
enumerator kQTMR_QuadCountMode#
Quadrature count mode, uses pri and sec sources
-
enumerator kQTMR_PriSrcRiseEdgeSecDir#
Count rising edges of pri SRC; sec SRC specifies dir
-
enumerator kQTMR_SecSrcTrigPriCnt#
Edge of sec SRC trigger primary count until compare
-
enumerator kQTMR_CascadeCount#
Cascaded count mode (up/down)
-
enumerator kQTMR_NoOperation#
-
enum _qtmr_pwm_out_state#
Quad Timer PWM output state.
Values:
-
enumerator kQTMR_PwmLow#
The output state of PWM channel is low
-
enumerator kQTMR_PwmHigh#
The output state of PWM channel is low
-
enumerator kQTMR_PwmLow#
-
enum _qtmr_output_mode#
Quad Timer output mode selection.
Values:
-
enumerator kQTMR_AssertWhenCountActive#
Assert OFLAG while counter is active
-
enumerator kQTMR_ClearOnCompare#
Clear OFLAG on successful compare
-
enumerator kQTMR_SetOnCompare#
Set OFLAG on successful compare
-
enumerator kQTMR_ToggleOnCompare#
Toggle OFLAG on successful compare
-
enumerator kQTMR_ToggleOnAltCompareReg#
Toggle OFLAG using alternating compare registers
-
enumerator kQTMR_SetOnCompareClearOnSecSrcInp#
Set OFLAG on compare, clear on sec SRC input edge
-
enumerator kQTMR_SetOnCompareClearOnCountRoll#
Set OFLAG on compare, clear on counter rollover
-
enumerator kQTMR_EnableGateClock#
Enable gated clock output while count is active
-
enumerator kQTMR_AssertWhenCountActive#
-
enum _qtmr_input_capture_edge#
Quad Timer input capture edge mode, rising edge, or falling edge.
Values:
-
enumerator kQTMR_NoCapture#
Capture is disabled
-
enumerator kQTMR_RisingEdge#
Capture on rising edge (IPS=0) or falling edge (IPS=1)
-
enumerator kQTMR_FallingEdge#
Capture on falling edge (IPS=0) or rising edge (IPS=1)
-
enumerator kQTMR_RisingAndFallingEdge#
Capture on both edges
-
enumerator kQTMR_NoCapture#
-
enum _qtmr_preload_control#
Quad Timer input capture edge mode, rising edge, or falling edge.
Values:
-
enumerator kQTMR_NoPreload#
Never preload
-
enumerator kQTMR_LoadOnComp1#
Load upon successful compare with value in COMP1
-
enumerator kQTMR_LoadOnComp2#
Load upon successful compare with value in COMP2
-
enumerator kQTMR_NoPreload#
-
enum _qtmr_debug_action#
List of Quad Timer run options when in Debug mode.
Values:
-
enumerator kQTMR_RunNormalInDebug#
Continue with normal operation
-
enumerator kQTMR_HaltCounter#
Halt counter
-
enumerator kQTMR_ForceOutToZero#
Force output to logic 0
-
enumerator kQTMR_HaltCountForceOutZero#
Halt counter and force output to logic 0
-
enumerator kQTMR_RunNormalInDebug#
-
enum _qtmr_interrupt_enable#
List of Quad Timer interrupts.
Values:
-
enumerator kQTMR_CompareInterruptEnable#
Compare interrupt.
-
enumerator kQTMR_Compare1InterruptEnable#
Compare 1 interrupt.
-
enumerator kQTMR_Compare2InterruptEnable#
Compare 2 interrupt.
-
enumerator kQTMR_OverflowInterruptEnable#
Timer overflow interrupt.
-
enumerator kQTMR_EdgeInterruptEnable#
Input edge interrupt.
-
enumerator kQTMR_CompareInterruptEnable#
-
enum _qtmr_status_flags#
List of Quad Timer flags.
Values:
-
enumerator kQTMR_CompareFlag#
Compare flag
-
enumerator kQTMR_Compare1Flag#
Compare 1 flag
-
enumerator kQTMR_Compare2Flag#
Compare 2 flag
-
enumerator kQTMR_OverflowFlag#
Timer overflow flag
-
enumerator kQTMR_EdgeFlag#
Input edge flag
-
enumerator kQTMR_CompareFlag#
-
enum _qtmr_channel_selection#
List of channel selection.
Values:
-
enumerator kQTMR_Channel_0#
TMR Channel 0
-
enumerator kQTMR_Channel_1#
TMR Channel 1
-
enumerator kQTMR_Channel_2#
TMR Channel 2
-
enumerator kQTMR_Channel_3#
TMR Channel 3
-
enumerator kQTMR_Channel_0#
-
enum _qtmr_dma_enable#
List of Quad Timer DMA enable.
Values:
-
enumerator kQTMR_InputEdgeFlagDmaEnable#
Input Edge Flag DMA Enable.
-
enumerator kQTMR_ComparatorPreload1DmaEnable#
Comparator Preload Register 1 DMA Enable.
-
enumerator kQTMR_ComparatorPreload2DmaEnable#
Comparator Preload Register 2 DMA Enable.
-
enumerator kQTMR_InputEdgeFlagDmaEnable#
-
typedef uint32_t qtmrRegType#
-
typedef enum _qtmr_primary_count_source qtmr_primary_count_source_t#
Quad Timer primary clock source selection.
-
typedef enum _qtmr_input_source qtmr_input_source_t#
Quad Timer input sources selection.
-
typedef enum _qtmr_counting_mode qtmr_counting_mode_t#
Quad Timer counting mode selection.
-
typedef enum _qtmr_pwm_out_state qtmr_pwm_out_state_t#
Quad Timer PWM output state.
-
typedef enum _qtmr_output_mode qtmr_output_mode_t#
Quad Timer output mode selection.
-
typedef enum _qtmr_input_capture_edge qtmr_input_capture_edge_t#
Quad Timer input capture edge mode, rising edge, or falling edge.
-
typedef enum _qtmr_preload_control qtmr_preload_control_t#
Quad Timer input capture edge mode, rising edge, or falling edge.
-
typedef enum _qtmr_debug_action qtmr_debug_action_t#
List of Quad Timer run options when in Debug mode.
-
typedef enum _qtmr_interrupt_enable qtmr_interrupt_enable_t#
List of Quad Timer interrupts.
-
typedef enum _qtmr_status_flags qtmr_status_flags_t#
List of Quad Timer flags.
-
typedef enum _qtmr_channel_selection qtmr_channel_selection_t#
List of channel selection.
-
typedef enum _qtmr_dma_enable qtmr_dma_enable_t#
List of Quad Timer DMA enable.
-
typedef struct _qtmr_config qtmr_config_t#
Quad Timer config structure.
This structure holds the configuration settings for the Quad Timer peripheral. To initialize this structure to reasonable defaults, call the QTMR_GetDefaultConfig() function and pass a pointer to your config structure instance.
The config struct can be made const so it resides in flash
-
status_t QTMR_SetupPwm(TMR_Type *base, qtmr_channel_selection_t channel, uint32_t pwmFreqHz, uint8_t dutyCyclePercent, bool outputPolarity, uint32_t srcClock_Hz)#
Sets up Quad timer module for PWM signal output.
The function initializes the timer module according to the parameters passed in by the user. The function also sets up the value compare registers to match the PWM signal requirements.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
pwmFreqHz – PWM signal frequency in Hz
dutyCyclePercent – PWM pulse width, value should be between 0 to 100 0=inactive signal(0% duty cycle)… 100=active signal (100% duty cycle)
outputPolarity – true: invert polarity of the output signal, false: no inversion
srcClock_Hz – Main counter clock in Hz.
- Returns:
Returns an error if there was error setting up the signal.
-
void QTMR_SetupInputCapture(TMR_Type *base, qtmr_channel_selection_t channel, qtmr_input_source_t capturePin, bool inputPolarity, bool reloadOnCapture, qtmr_input_capture_edge_t captureMode)#
Allows the user to count the source clock cycles until a capture event arrives.
The count is stored in the capture register.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
capturePin – Pin through which we receive the input signal to trigger the capture
inputPolarity – true: invert polarity of the input signal, false: no inversion
reloadOnCapture – true: reload the counter when an input capture occurs, false: no reload
captureMode – Specifies which edge of the input signal triggers a capture
-
void QTMR_SetPwmOutputToIdle(TMR_Type *base, qtmr_channel_selection_t channel, bool idleStatus)#
Set PWM output in idle status (high or low).
Note
When the PWM is set again, the counting needs to be restarted.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
idleStatus – True: PWM output is high in idle status; false: PWM output is low in idle status.
-
static inline qtmr_pwm_out_state_t QTMR_GetPwmOutputStatus(TMR_Type *base, qtmr_channel_selection_t channel)#
Get the channel output status.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
- Returns:
Current channel output status.
-
uint8_t QTMR_GetPwmChannelStatus(TMR_Type *base, qtmr_channel_selection_t channel)#
Get the PWM channel dutycycle value.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
- Returns:
Current channel dutycycle value.
-
void QTMR_SetPwmClockMode(TMR_Type *base, qtmr_channel_selection_t channel, qtmr_primary_count_source_t prescaler)#
This function set the value of the prescaler on QTimer channels.
- Parameters:
base – Quad Timer peripheral base address
channel – Quad Timer channel number
prescaler – Set prescaler value
-
TMR_CSCTRL_OFLAG_MASK#
-
TMR_CSCTRL_OFLAG_SHIFT#
-
struct _qtmr_config#
- #include <fsl_qtmr.h>
Quad Timer config structure.
This structure holds the configuration settings for the Quad Timer peripheral. To initialize this structure to reasonable defaults, call the QTMR_GetDefaultConfig() function and pass a pointer to your config structure instance.
The config struct can be made const so it resides in flash
Public Members
-
qtmr_primary_count_source_t primarySource#
Specify the primary count source
-
qtmr_input_source_t secondarySource#
Specify the secondary count source
-
bool enableMasterMode#
true: Broadcast compare function output to other counters; false no broadcast
-
bool enableExternalForce#
true: Compare from another counter force state of OFLAG signal false: OFLAG controlled by local counter
-
uint8_t faultFilterCount#
Fault filter count
-
uint8_t faultFilterPeriod#
Fault filter period;value of 0 will bypass the filter
-
qtmr_debug_action_t debugMode#
Operation in Debug mode
-
qtmr_primary_count_source_t primarySource#
REFORMATTER: Pixel reformatter#
-
void REFORMATTER_Init(REFORMATTER_Type *base, const reformatter_config_t *config)#
Initializes the REFORMATTER.
The default configuration can be got by calling REFORMATTER_GetDefaultConfig().
- Parameters:
base – REFORMATTER peripheral base address.
config – Pointer to REFORMATTER configuration structure.
-
void REFORMATTER_Deinit(REFORMATTER_Type *base)#
Disables the REFORMATTER peripheral module.
- Parameters:
base – REFORMATTER peripheral address.
-
void REFORMATTER_GetDefaultConfig(reformatter_config_t *config)#
Set default values to the REFORMATTER configuration structure.
The default values are as follows.
config->dataShift = kREFORMATTER_ShiftLsb; config->streamFence = 0U; config->signalConfig.enable = true; config->signalConfig.vsyncForceHigh = false; config->signalConfig.hsyncForceHigh = false; config->signalConfig.validForceHigh = false; config->signalConfig.syncInvert = false; config->yuv420LineOrder = kREFORMATTER_YUV420OddFirst; config->yuv420Interlace = 0U; config->enableConversion = true; config->interupt = kREFORMATTER_InterruptIsiDataNotRGB888; config->typeDisable = 0U;
- Parameters:
config – REFORMATTER module configuration structure.
-
static inline uint8_t REFORMATTER_GetVcFenceState(REFORMATTER_Type *base)#
Gets the fencing state of the virtual channels.
- Parameters:
base – REFORMATTER peripheral address.
- Returns:
Mask of the virtual channel fencing state.
-
static inline void REFORMATTER_EnableInterrupts(REFORMATTER_Type *base, uint8_t mask)#
Enables REFORMATTER interrupt requests.
- Parameters:
base – REFORMATTER peripheral base address.
mask – The interrupts to enable, pass in as OR’ed value of _reformatter_interrupt.
-
static inline void REFORMATTER_DisableInterrupts(REFORMATTER_Type *base, uint8_t mask)#
Disable REFORMATTER interrupt requests.
- Parameters:
base – REFORMATTER peripheral base address.
mask – The interrupts to disable, pass in as OR’ed value of _reformatter_interrupt.
-
static inline uint8_t REFORMATTER_GetAndClearInterruptFlags(REFORMATTER_Type *base)#
Get and clear REFORMATTER interrupt status.
- Parameters:
base – REFORMATTER peripheral base address.
- Returns:
The interrupt status.
-
FSL_REFORMATTER_DRIVER_VERSION#
-
enum _reformatter_mipi_csi_data_shift#
Raw data shift control.
Values:
-
enumerator kREFORMATTER_ShiftLsb#
MIPI-CSI Raw data is shifted and sligned to LSB.
-
enumerator kREFORMATTER_ShiftNone#
No data shift.
-
enumerator kREFORMATTER_ShiftLsb#
-
enum _reformatter_stream_fence#
Virtual channel data fencing mask.
Values:
-
enumerator kREFORMATTER_FenceCh0#
Fence virtual channel 0 data stream.
-
enumerator kREFORMATTER_FenceCh1#
Fence virtual channel 1 data stream.
-
enumerator kREFORMATTER_FenceCh2#
Fence virtual channel 2 data stream.
-
enumerator kREFORMATTER_FenceCh3#
Fence virtual channel 3 data stream.
-
enumerator kREFORMATTER_FenceCh0#
-
enum _reformatter_yuv420_line_order#
The line order when the MIPI-CSI pixel format is YUV420. For legacy 8-bit, the UY/VY component is sent in odd/even line; for 8-bit and 10-bit, the Y/UV component is sent in odd/even line.
Values:
-
enumerator kREFORMATTER_YUV420OddFirst#
Odd line sent first.
-
enumerator kREFORMATTER_YUV420EvenFirst#
Even line sent first.
-
enumerator kREFORMATTER_YUV420OddFirst#
-
enum _reformatter_type_disable#
Mask of which data types to disable.
Values:
-
enumerator kREFORMATTER_DisableYUV420_8Bit#
Disable YUV420 8Bit.
-
enumerator kREFORMATTER_DisableYUV420_10Bit#
Disable YUV420 10Bit.
-
enumerator kREFORMATTER_DisableYUV420_8BitLegacy#
Disable Legacy YUV420 8Bit.
-
enumerator kREFORMATTER_DisableYUV420_8BitCS#
Disable YUV420 8BitCS.
-
enumerator kREFORMATTER_DisableYUV420_10BitCS#
Disable YUV420 10BitCS.
-
enumerator kREFORMATTER_DisableYUV422_8Bit#
Disable YUV422 8Bit.
-
enumerator kREFORMATTER_DisableYUV422_10Bit#
Disable YUV422 10Bit.
-
enumerator kREFORMATTER_DisableRGB444#
Disable RGB444.
-
enumerator kREFORMATTER_DisableRGB555#
Disable RGB555.
-
enumerator kREFORMATTER_DisableRGB565#
Disable RGB565.
-
enumerator kREFORMATTER_DisableRGB666#
Disable RGB666.
-
enumerator kREFORMATTER_DisableRGB888#
Disable RGB888.
-
enumerator kREFORMATTER_DisableRawEmbedded#
Disable Embedded Raw.
-
enumerator kREFORMATTER_DisableRaw24#
Disable Raw 24.
-
enumerator kREFORMATTER_DisableRaw6#
Disable Raw 6.
-
enumerator kREFORMATTER_DisableRaw7#
Disable Raw 7.
-
enumerator kREFORMATTER_DisableRaw8#
Disable Raw 8.
-
enumerator kREFORMATTER_DisableRaw10#
Disable Raw 10.
-
enumerator kREFORMATTER_DisableRaw12#
Disable Raw 12 .
-
enumerator kREFORMATTER_DisableRaw14#
Disable Raw 14 .
-
enumerator kREFORMATTER_DisableRaw16#
Disable Raw 16.
-
enumerator kREFORMATTER_DisableRaw20#
Disable Raw 20.
-
enumerator kREFORMATTER_DisableYUV420_8Bit#
-
enum _reformatter_yuv420_interlace#
Interlace mode mask for virtual channels when the data type is YUV420. If set, the odd lines and even lines are sent in different frames(interlaced).
Values:
-
enumerator kREFORMATTER_YUV420InterlaceCh0OddFirst#
Channel 0 interlaced mode enable, odd line sent first.
-
enumerator kREFORMATTER_YUV420InterlaceCh0EvenFirst#
Channel 0 interlaced mode enable, even line sent first.
-
enumerator kREFORMATTER_YUV420InterlaceCh1OddFirst#
Channel 1 interlaced mode enable, odd line sent first.
-
enumerator kREFORMATTER_YUV420InterlaceCh1EvenFirst#
Channel 1 interlaced mode enable, even line sent first.
-
enumerator kREFORMATTER_YUV420InterlaceCh2OddFirst#
Channel 2 interlaced mode enable, odd line sent first.
-
enumerator kREFORMATTER_YUV420InterlaceCh2EvenFirst#
Channel 2 interlaced mode enable, even line sent first.
-
enumerator kREFORMATTER_YUV420InterlaceCh3OddFirst#
Channel 3 interlaced mode enable, odd line sent first.
-
enumerator kREFORMATTER_YUV420InterlaceCh3EvenFirst#
Channel 3 interlaced mode enable, even line sent first.
-
enumerator kREFORMATTER_YUV420InterlaceCh0OddFirst#
-
enum _reformatter_interrupt#
Interrupt and status.
Values:
-
enumerator kREFORMATTER_InterruptIsiDataNotRGB888#
The data type of ISI to pixel link is not RGB888 interrupt.
-
enumerator kREFORMATTER_InterruptIsiDataNotRGB888#
-
typedef enum _reformatter_mipi_csi_data_shift reformatter_mipi_csi_data_shift_t#
Raw data shift control.
-
typedef struct _reformatter_signal_config reformatter_signal_config_t#
Pixel link signal configuration.
-
typedef enum _reformatter_yuv420_line_order reformatter_yuv420_line_order_t#
The line order when the MIPI-CSI pixel format is YUV420. For legacy 8-bit, the UY/VY component is sent in odd/even line; for 8-bit and 10-bit, the Y/UV component is sent in odd/even line.
-
typedef struct _reformatter_config reformatter_config_t#
REFORMATTER configuration.
-
struct _reformatter_signal_config#
- #include <fsl_reformatter.h>
Pixel link signal configuration.
-
struct _reformatter_config#
- #include <fsl_reformatter.h>
REFORMATTER configuration.
Public Members
-
reformatter_mipi_csi_data_shift_t dataShift#
Data shift control.
-
uint8_t streamFence#
Mask of which data streams to fence, enable the fence to prevent the data coming from MIPI for the corresponding VC to get converted. _reformatter_stream_fence.
-
reformatter_signal_config_t signalConfig#
Pixel link signal configuration.
-
reformatter_yuv420_line_order_t yuv420LineOrder#
YUV420 line order.
-
uint8_t yuv420Interlace#
Interlace mode mask for virtual channels when the data type is YUV420, _reformatter_yuv420_interlace.
-
bool enableConversion#
Enable pixel conversion from ISI to PDI.
-
uint8_t interupt#
Interrupt enable mask.
-
uint32_t typeDisable#
Mask of which data types to disable, _reformatter_type_disable.
-
reformatter_mipi_csi_data_shift_t dataShift#
RESETCON Driver#
-
static inline uint32_t RESETCON_GetVersion(RESETCON_Type *base)#
Get the RESETCON version-ID register value.
- Parameters:
base – RESETCON peripheral base.
- Returns:
Raw VERID value.
-
static inline uint32_t RESETCON_GetPmuBootErrorStatus(RESETCON_Type *base)#
Get the PMU boot-error status from INITS.
- Parameters:
base – RESETCON peripheral base.
- Returns:
PMU boot-error code (6 bits).
-
void RESETCON_SetAccessControl(RESETCON_Type *base, const resetcon_access_config_t *config)#
Configure RESETCON access control (ACCCTRL).
- Parameters:
base – RESETCON peripheral base.
config – Pointer to access-control configuration; must not be NULL.
-
static inline uint32_t RESETCON_GetAccessControl(RESETCON_Type *base)#
Read the raw ACCCTRL register.
- Parameters:
base – RESETCON peripheral base.
- Returns:
Raw ACCCTRL value.
-
static inline void RESETCON_SystemReset(RESETCON_Type *base)#
Trigger a global warm reset of the chip.
Writes the magic value 0x0123FAFA to SWRST.EN. The reset can be escalated to a cold reset if RESET_SW is enabled in ESCAEN. This function does not return.
- Parameters:
base – RESETCON peripheral base.
-
static inline uint32_t RESETCON_GetResetStatus(RESETCON_Type *base)#
Get the latest-reset source flags from RSTSTAT.
- Parameters:
base – RESETCON peripheral base.
- Returns:
OR’ed mask of _resetcon_reset_source_flags.
-
static inline uint32_t RESETCON_GetStickyResetStatus(RESETCON_Type *base)#
Get the sticky-reset source flags from RSTSTAT_STICKY.
- Parameters:
base – RESETCON peripheral base.
- Returns:
OR’ed mask of _resetcon_reset_source_flags.
-
static inline void RESETCON_ClearStickyResetStatus(RESETCON_Type *base, uint32_t mask)#
Clear sticky-reset flags in RSTSTAT_STICKY (write-1-to-clear).
- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_reset_source_flags to clear.
-
static inline uint32_t RESETCON_GetResetCount(RESETCON_Type *base)#
Get the current reset count.
- Parameters:
base – RESETCON peripheral base.
- Returns:
Number of warm-reset sequences completed since the last cold reset.
-
static inline void RESETCON_ClearResetCount(RESETCON_Type *base)#
Clear the reset count register (writes the magic 0xDEEDBEEF).
- Parameters:
base – RESETCON peripheral base.
-
static inline uint32_t RESETCON_GetPowerDomainResetStatus(RESETCON_Type *base)#
Get power-domain reset status from PD_RSTSTAT.
- Parameters:
base – RESETCON peripheral base.
- Returns:
OR’ed mask of _resetcon_pd_reset_flags currently in reset.
-
static inline uint32_t RESETCON_GetStickyPowerDomainResetStatus(RESETCON_Type *base)#
Get sticky power-domain reset status from PD_RSTSTAT_STICKY.
- Parameters:
base – RESETCON peripheral base.
- Returns:
OR’ed mask of _resetcon_pd_reset_flags ever asserted since last clear.
-
static inline void RESETCON_ClearStickyPowerDomainResetStatus(RESETCON_Type *base, uint32_t mask)#
Clear sticky power-domain reset flags (write-1-to-clear).
- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_pd_reset_flags to clear.
-
void RESETCON_TriggerPowerDomainReset(RESETCON_Type *base, uint32_t mask)#
Trigger a software-controlled power-domain reset.
Software must ensure the bus initiator and fabric are idle. The MAGIC field (0x0520) is automatically written along with the requested domain bits.
- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_pd_reset_ctrl: NPU, MEDIA, or COMM only.
-
static inline void RESETCON_EnableResetEscalation(RESETCON_Type *base, uint32_t mask)#
Enable warm-to-cold reset escalation for the given sources.
Bits in ESCAEN are write-once-set: once enabled, they cannot be cleared until the next cold reset.
- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_warm_reset_flags.
-
static inline uint32_t RESETCON_GetResetEscalation(RESETCON_Type *base)#
Read the ESCAEN register.
- Parameters:
base – RESETCON peripheral base.
- Returns:
Raw ESCAEN value.
-
static inline void RESETCON_EnableInterrupts(RESETCON_Type *base, uint32_t mask)#
Enable warm-reset interrupts (RSTIE).
- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_warm_reset_flags. Bit 1 (RESET_SW) is reserved in RSTIE.
-
static inline void RESETCON_DisableInterrupts(RESETCON_Type *base, uint32_t mask)#
Disable warm-reset interrupts (RSTIE).
- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_warm_reset_flags.
-
static inline uint32_t RESETCON_GetInterruptStatus(RESETCON_Type *base)#
Read the warm-reset interrupt status (RSTIS).
- Parameters:
base – RESETCON peripheral base.
- Returns:
OR’ed mask of _resetcon_warm_reset_flags currently asserted.
-
static inline void RESETCON_ClearInterruptStatus(RESETCON_Type *base, uint32_t mask)#
Clear warm-reset interrupt status (write-1-to-clear).
- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_warm_reset_flags to clear.
-
static inline void RESETCON_SetInterruptTimeout(RESETCON_Type *base, uint32_t value)#
Set the interrupt-timeout (cycles) before an unhandled reset interrupt is escalated.
- Parameters:
base – RESETCON peripheral base.
value – 32-bit timeout value.
-
static inline void RESETCON_SetResetMask(RESETCON_Type *base, uint32_t mask)#
Mask warm reset sources (RMSK).
Setting a bit disables the corresponding reset and interrupt.
- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_warm_reset_flags.
-
static inline void RESETCON_SetResetTriggerMode(RESETCON_Type *base, uint32_t mask, resetcon_trigger_mode_t mode)#
Configure the trigger mode (level/edge) for selected warm reset sources (RTM).
Only the bits indicated by
maskare modified; trigger-mode settings of sources that are not inmaskare preserved.- Parameters:
base – RESETCON peripheral base.
mask – OR’ed mask of _resetcon_warm_reset_flags identifying which sources to (re)configure.
mode – Trigger mode applied to the selected sources; see resetcon_trigger_mode_t.
-
void RESETCON_SetResetTimeout(RESETCON_Type *base, uint16_t value)#
Set the maximum number of consecutive warm-reset sequences (RTO).
If exceeded, the next warm reset is escalated to a cold reset. Set 0 to disable.
- Parameters:
base – RESETCON peripheral base.
value – 12-bit timeout value.
-
void RESETCON_SetResetPinFilter(RESETCON_Type *base, uint16_t value)#
Configure the RESET_b pin digital filter (FILTER).
- Parameters:
base – RESETCON peripheral base.
value – 16-bit cycle count; 0 disables the filter.
-
void RESETCON_SetPorPinFilter(RESETCON_Type *base, uint16_t value)#
Configure the POR_b pin digital filter (PORPC.PFT).
- Parameters:
base – RESETCON peripheral base.
value – 16-bit cycle count; 0 disables the filter.
-
void RESETCON_EnablePorTriggerPmuRestart(RESETCON_Type *base, bool enable)#
Enable or disable the POR_b pin triggering a PMU restart (PORPC.TPC).
- Parameters:
base – RESETCON peripheral base.
enable – true: enable PMU restart; false: disable.
-
static inline void RESETCON_AssertResetOutput(RESETCON_Type *base, bool assert)#
Drive the RESET_b output pin under software control (ROUT.OUTEN).
- Parameters:
base – RESETCON peripheral base.
assert – true: assert RESET_b; false: release.
-
static inline resetcon_boot_mode_t RESETCON_GetBootMode(RESETCON_Type *base)#
Read the latched boot-mode pins (MODESTAT.MS).
- Parameters:
base – RESETCON peripheral base.
- Returns:
Latched boot mode, see resetcon_boot_mode_t.
-
void RESETCON_SetBootModeOverride(RESETCON_Type *base, resetcon_boot_mode_t mode, bool enable)#
Override the boot mode for the next warm-reset sequence.
- Parameters:
base – RESETCON peripheral base.
mode – Boot mode to force.
enable – true: enable override; false: disable override.
-
void RESETCON_SetQuickResponseTriggerMode(RESETCON_Type *base, resetcon_trigger_mode_t mode)#
Configure the trigger mode for the JTAGC quick-response warm reset path (MISCCTRL.QRSP_EN).
Only the QRSP_EN bit is modified; other MISCCTRL fields (e.g. ACGOV) are preserved.
- Parameters:
base – RESETCON peripheral base.
mode – Trigger mode applied to the quick-response source; see resetcon_trigger_mode_t.
-
void RESETCON_OverrideAutoClockGating(RESETCON_Type *base, bool enable)#
Override automatic clock gating (MISCCTRL.ACGOV).
- Parameters:
base – RESETCON peripheral base.
enable – true: free-running clock; false: use auto clock gating.
-
static inline void RESETCON_WriteGPR(RESETCON_Type *base, uint8_t index, uint32_t value)#
Write a 32-bit value to a RESETCON GPR.
- Parameters:
base – RESETCON peripheral base.
index – GPR index (0 .. RESETCON_GPR_COUNT - 1).
value – 32-bit value.
-
static inline uint32_t RESETCON_ReadGPR(RESETCON_Type *base, uint8_t index)#
Read a 32-bit value from a RESETCON GPR.
- Parameters:
base – RESETCON peripheral base.
index – GPR index (0 .. RESETCON_GPR_COUNT - 1).
- Returns:
Stored 32-bit value.
-
static inline void RESETCON_LockGPR(RESETCON_Type *base, uint16_t mask)#
Lock individual GPR(s) until next reset.
Each bit n in
masksets LOCKn for GPRn. Lock bits are sticky and can only be cleared by reset.- Parameters:
base – RESETCON peripheral base.
mask – 16-bit mask of GPR indices to lock.
-
static inline uint16_t RESETCON_GetGPRLockStatus(RESETCON_Type *base)#
Read the GPR lock register (GPR_LOCK).
- Parameters:
base – RESETCON peripheral base.
- Returns:
16-bit lock mask, bit n indicates GPRn is locked.
-
FSL_RESETCON_DRIVER_VERSION#
RESETCON driver version 1.0.0.
-
RESETCON_SWRST_MAGIC#
Magic value that must be written to SWRST.EN to trigger the global warm reset.
-
RESETCON_PD_RSTCTRL_MAGIC_VALUE#
Magic value that must be present in PD_RSTCTRL.MAGIC[31:16] to allow PD reset writes.
-
RESETCON_RSTCNT_CLR_MAGIC#
Magic value that clears the RSTCNT counter.
-
enum _resetcon_reset_source_flags#
Latched-reset source flags (RSTSTAT and RSTSTAT_STICKY share this layout).
Status bits in RSTSTAT are read-only; the matching bits in RSTSTAT_STICKY are write-1-to-clear.
Values:
-
enumerator kRESETCON_SrcPorVbat#
VBAT power-on reset.
-
enumerator kRESETCON_SrcPmuPor#
PMU internal supply POR.
-
enumerator kRESETCON_SrcPinPor#
POR_b pin reset.
-
enumerator kRESETCON_SrcPmuCold#
PMU cold reset.
-
enumerator kRESETCON_SrcWuVbat#
VBAT (DPD) wakeup reset.
-
enumerator kRESETCON_SrcSecCold#
Security cold reset.
-
enumerator kRESETCON_SrcWarmEsca#
Warm reset escalated to cold.
-
enumerator kRESETCON_SrcRstErr#
RESETCON error reset.
-
enumerator kRESETCON_SrcPinReset#
RESET_b pin reset.
-
enumerator kRESETCON_SrcResetSw#
Software-initiated warm reset.
-
enumerator kRESETCON_SrcDap#
DAP / MDM-AP JTAG software reset.
-
enumerator kRESETCON_SrcJtag#
JTAG reset.
-
enumerator kRESETCON_SrcCpu0Sw#
CPU0 software warm reset.
-
enumerator kRESETCON_SrcCpu0Err#
CPU0 lock-up reset.
-
enumerator kRESETCON_SrcSwt0#
SWT_0 reset.
-
enumerator kRESETCON_SrcSwt1#
SWT_1 reset.
-
enumerator kRESETCON_SrcSecvio#
Security violation reset.
-
enumerator kRESETCON_SrcTamper#
Tamper pin reset.
-
enumerator kRESETCON_SrcPmuWarm#
PMU warm reset.
-
enumerator kRESETCON_SrcWuPd#
Power-down wakeup reset.
-
enumerator kRESETCON_SrcAll#
All defined source bits.
-
enumerator kRESETCON_SrcPorVbat#
-
enum _resetcon_warm_reset_flags#
Warm-reset source flags shared by ESCAEN, RSTIE, RSTIS, RMSK and RTM.
These are the warm-reset sources that can be escalated, masked, or routed to an interrupt. Bit 1 (RESET_SW) is only valid in ESCAEN; it is reserved in RSTIE/RSTIS.
Values:
-
enumerator kRESETCON_WarmPinReset#
RESET_b pin (bit 0).
-
enumerator kRESETCON_WarmResetSw#
Software warm reset (bit 1, ESCAEN only).
-
enumerator kRESETCON_WarmDap#
DAP reset (bit 2).
-
enumerator kRESETCON_WarmJtag#
JTAG reset (bit 3).
-
enumerator kRESETCON_WarmCpu0Sw#
CPU0 software (bit 4).
-
enumerator kRESETCON_WarmCpu0Err#
CPU0 error (bit 5).
-
enumerator kRESETCON_WarmSwt0#
SWT_0 (bit 6).
-
enumerator kRESETCON_WarmSwt1#
SWT_1 (bit 7).
-
enumerator kRESETCON_WarmSecvio#
Security violation (bit 8).
-
enumerator kRESETCON_WarmTamper#
Tamper pin (bit 9).
-
enumerator kRESETCON_WarmPmuWarm#
PMU warm reset (bit 10).
-
enumerator kRESETCON_WarmAll#
All warm-source bits.
-
enumerator kRESETCON_WarmPinReset#
-
enum _resetcon_pd_reset_flags#
Power-domain reset flags (PD_RSTSTAT and PD_RSTSTAT_STICKY share this layout).
Values:
-
enumerator kRESETCON_PdWake#
Wake power domain.
-
enumerator kRESETCON_PdMain#
Main power domain.
-
enumerator kRESETCON_PdCpu#
Cortex-M85 power domain.
-
enumerator kRESETCON_PdNpu#
NPU power domain.
-
enumerator kRESETCON_PdMedia#
Media power domain.
-
enumerator kRESETCON_PdComm#
Communication power domain.
-
enumerator kRESETCON_PdAll#
All defined power domains.
-
enumerator kRESETCON_PdWake#
-
enum _resetcon_pd_reset_ctrl#
Software-controllable power-domain reset triggers (PD_RSTCTRL bits 5..3).
These are the only domains that can be reset by software via PD_RSTCTRL.
Values:
-
enumerator kRESETCON_PdCtrlNpu#
Reset NPU power domain.
-
enumerator kRESETCON_PdCtrlMedia#
Reset Media power domain.
-
enumerator kRESETCON_PdCtrlComm#
Reset Communication power domain.
-
enumerator kRESETCON_PdCtrlNpu#
-
enum _resetcon_boot_mode#
Boot-mode codes captured/forced by MODESTAT.MS / MODECTRL.MC.
Values:
-
enumerator kRESETCON_BootMode0#
Boot mode 00.
-
enumerator kRESETCON_BootMode1#
Boot mode 01.
-
enumerator kRESETCON_BootMode2#
Boot mode 10.
-
enumerator kRESETCON_BootMode3#
Boot mode 11.
-
enumerator kRESETCON_BootMode0#
-
enum _resetcon_trigger_mode#
Trigger-mode selection for warm reset sources (RTM).
Values:
-
enumerator kRESETCON_TriggerLevel#
Level trigger.
-
enumerator kRESETCON_TriggerEdge#
Edge trigger.
-
enumerator kRESETCON_TriggerLevel#
-
typedef enum _resetcon_boot_mode resetcon_boot_mode_t#
Boot-mode codes captured/forced by MODESTAT.MS / MODECTRL.MC.
-
typedef enum _resetcon_trigger_mode resetcon_trigger_mode_t#
Trigger-mode selection for warm reset sources (RTM).
-
typedef struct _resetcon_access_config resetcon_access_config_t#
Access-control configuration for ACCCTRL.
-
struct _resetcon_access_config#
- #include <fsl_resetcon.h>
Access-control configuration for ACCCTRL.
PMU: Power Management Unit Driver#
S3MU: Sentinel#
-
FSL_S3MU_DRIVER_VERSION#
Defines S3MU driver version 2.0.2.
Change log:
Version 2.0.2
Fix macro BIT redefined warning when compiling with Zephyr.
Version 2.0.1
Update kStatusGroup_SNT to kStatusGroup_ELEMU
Version 2.0.0
initial version
Values:
-
enumerator kStatus_S3MU_AgumentOutOfRange#
S3MU status for out of range access.
-
enumerator kStatus_S3MU_InvalidArgument#
S3MU status for invalid argument check.
-
enumerator kStatus_S3MU_RequestTimeout#
S3MU status for timeout.
-
enumerator kStatus_S3MU_Busy#
S3MU status for reservation by other core.
-
enumerator kStatus_S3MU_AgumentOutOfRange#
-
status_t S3MU_SendMessage(S3MU_Type *mu, void *buf, size_t wordCount)#
Send message to MU.
This function writes messgae into MU regsters and send message to EdgeLock Enclave.
- Parameters:
base – MU peripheral base address
buf – buffer to store read data
wordCount – size of data in words
- Returns:
Status kStatus_Success if success, kStatus_Fail if fail Possible errors: kStatus_S3MU_InvalidArgument, kStatus_S3MU_AgumentOutOfRange
-
status_t S3MU_GetResponse(S3MU_Type *mu, void *buf)#
Get response from MU.
This function reads response data from EdgeLock Enclave if available.
Note: number of read response word is obtained by header, so user need to prepare buffer with enough space for expected response
- Parameters:
base – MU peripheral base address
buf – buffer to store read data
- Returns:
Status kStatus_Success if success, kStatus_Fail if fail Possible errors: kStatus_S3MU_InvalidArgument, kStatus_S3MU_AgumentOutOfRange
-
status_t S3MU_WaitForData(S3MU_Type *mu, uint32_t *buf, size_t wordCount, uint32_t wait)#
Wait and Read data from MU.
This function waits limited time (ticks) and tests if data are ready to be read. When data are ready, reads them into buffer, timeout otherwise.
- Parameters:
base – MU peripheral base address
buf – buffer to store read data
wordCount – size of data in words
wait – number of iterations to wait
- Returns:
Status kStatus_Success if success, kStatus_S3MU_RequestTimeout if timeout Possible errors: kStatus_S3MU_InvalidArgument, kStatus_S3MU_AgumentOutOfRange
-
status_t S3MU_ReadMessage(S3MU_Type *mu, uint32_t *buf, size_t *size, uint8_t read_header)#
Read message from MU.
This function reads message date from EdgeLock Enclave if available.
- Parameters:
base – MU peripheral base address
buf – buffer to store read data
size – lenght of data in words. If read_header equal MU_READ_HEADER, size is read from response header.
read_header – specifies if size is obtained by response header or provided in parameter.
- Returns:
Status kStatus_Success if success, kStatus_Fail if fail Possible errors: kStatus_S3MU_InvalidArgument, kStatus_S3MU_AgumentOutOfRange
-
void S3MU_Init(S3MU_Type *mu)#
Init MU.
This function does nothing. MU is initialized after leaving ROM.
- Parameters:
base – MU peripheral base address
-
uint32_t S3MU_ComputeMsgCrc(uint32_t *msg, uint32_t msg_len)#
Computes CRC.
This function computes CRC of input message.
- Parameters:
msg – pointer to message
msg_len – size of message in words
- Returns:
CRC32 checksum value
-
MU_MSG_HEADER_SIZE#
-
MESSAGING_TAG_COMMAND#
-
MESSAGING_TAG_REPLY#
-
struct mu_hdr_t#
-
union __unnamed92__#
-
struct hdr_byte
SAI: Serial Audio Interface#
SAI Driver#
-
void SAI_Init(I2S_Type *base)#
Initializes the SAI peripheral.
This API gates the SAI clock. The SAI module can’t operate unless SAI_Init is called to enable the clock.
- Parameters:
base – SAI base pointer.
-
void SAI_Deinit(I2S_Type *base)#
De-initializes the SAI peripheral.
This API gates the SAI clock. The SAI module can’t operate unless SAI_TxInit or SAI_RxInit is called to enable the clock.
- Parameters:
base – SAI base pointer.
-
void SAI_TxReset(I2S_Type *base)#
Resets the SAI Tx.
This function enables the software reset and FIFO reset of SAI Tx. After reset, clear the reset bit.
- Parameters:
base – SAI base pointer
-
void SAI_RxReset(I2S_Type *base)#
Resets the SAI Rx.
This function enables the software reset and FIFO reset of SAI Rx. After reset, clear the reset bit.
- Parameters:
base – SAI base pointer
-
void SAI_TxEnable(I2S_Type *base, bool enable)#
Enables/disables the SAI Tx.
- Parameters:
base – SAI base pointer.
enable – True means enable SAI Tx, false means disable.
-
void SAI_RxEnable(I2S_Type *base, bool enable)#
Enables/disables the SAI Rx.
- Parameters:
base – SAI base pointer.
enable – True means enable SAI Rx, false means disable.
-
static inline void SAI_TxSetBitClockDirection(I2S_Type *base, sai_master_slave_t masterSlave)#
Set Rx bit clock direction.
Select bit clock direction, master or slave.
- Parameters:
base – SAI base pointer.
masterSlave – reference sai_master_slave_t.
-
static inline void SAI_RxSetBitClockDirection(I2S_Type *base, sai_master_slave_t masterSlave)#
Set Rx bit clock direction.
Select bit clock direction, master or slave.
- Parameters:
base – SAI base pointer.
masterSlave – reference sai_master_slave_t.
-
static inline void SAI_RxSetFrameSyncDirection(I2S_Type *base, sai_master_slave_t masterSlave)#
Set Rx frame sync direction.
Select frame sync direction, master or slave.
- Parameters:
base – SAI base pointer.
masterSlave – reference sai_master_slave_t.
-
static inline void SAI_TxSetFrameSyncDirection(I2S_Type *base, sai_master_slave_t masterSlave)#
Set Tx frame sync direction.
Select frame sync direction, master or slave.
- Parameters:
base – SAI base pointer.
masterSlave – reference sai_master_slave_t.
-
void SAI_TxSetBitClockRate(I2S_Type *base, uint32_t sourceClockHz, uint32_t sampleRate, uint32_t bitWidth, uint32_t channelNumbers)#
Transmitter bit clock rate configurations.
- Parameters:
base – SAI base pointer.
sourceClockHz – Bit clock source frequency.
sampleRate – Audio data sample rate.
bitWidth – Audio data bitWidth.
channelNumbers – Audio channel numbers.
-
void SAI_RxSetBitClockRate(I2S_Type *base, uint32_t sourceClockHz, uint32_t sampleRate, uint32_t bitWidth, uint32_t channelNumbers)#
Receiver bit clock rate configurations.
- Parameters:
base – SAI base pointer.
sourceClockHz – Bit clock source frequency.
sampleRate – Audio data sample rate.
bitWidth – Audio data bitWidth.
channelNumbers – Audio channel numbers.
-
void SAI_TxSetBitclockConfig(I2S_Type *base, sai_master_slave_t masterSlave, sai_bit_clock_t *config)#
Transmitter Bit clock configurations.
- Parameters:
base – SAI base pointer.
masterSlave – master or slave.
config – bit clock other configurations, can be NULL in slave mode.
-
void SAI_RxSetBitclockConfig(I2S_Type *base, sai_master_slave_t masterSlave, sai_bit_clock_t *config)#
Receiver Bit clock configurations.
- Parameters:
base – SAI base pointer.
masterSlave – master or slave.
config – bit clock other configurations, can be NULL in slave mode.
-
void SAI_SetMasterClockConfig(I2S_Type *base, sai_master_clock_t *config)#
Master clock configurations.
- Parameters:
base – SAI base pointer.
config – master clock configurations.
-
void SAI_TxSetFifoConfig(I2S_Type *base, sai_fifo_t *config)#
SAI transmitter fifo configurations.
- Parameters:
base – SAI base pointer.
config – fifo configurations.
-
void SAI_RxSetFifoConfig(I2S_Type *base, sai_fifo_t *config)#
SAI receiver fifo configurations.
- Parameters:
base – SAI base pointer.
config – fifo configurations.
-
void SAI_TxSetFrameSyncConfig(I2S_Type *base, sai_master_slave_t masterSlave, sai_frame_sync_t *config)#
SAI transmitter Frame sync configurations.
- Parameters:
base – SAI base pointer.
masterSlave – master or slave.
config – frame sync configurations, can be NULL in slave mode.
-
void SAI_RxSetFrameSyncConfig(I2S_Type *base, sai_master_slave_t masterSlave, sai_frame_sync_t *config)#
SAI receiver Frame sync configurations.
- Parameters:
base – SAI base pointer.
masterSlave – master or slave.
config – frame sync configurations, can be NULL in slave mode.
-
void SAI_TxSetSerialDataConfig(I2S_Type *base, sai_serial_data_t *config)#
SAI transmitter Serial data configurations.
- Parameters:
base – SAI base pointer.
config – serial data configurations.
-
void SAI_RxSetSerialDataConfig(I2S_Type *base, sai_serial_data_t *config)#
SAI receiver Serial data configurations.
- Parameters:
base – SAI base pointer.
config – serial data configurations.
-
void SAI_TxSetConfig(I2S_Type *base, sai_transceiver_t *config)#
SAI transmitter configurations.
- Parameters:
base – SAI base pointer.
config – transmitter configurations.
-
void SAI_RxSetConfig(I2S_Type *base, sai_transceiver_t *config)#
SAI receiver configurations.
- Parameters:
base – SAI base pointer.
config – receiver configurations.
-
void SAI_GetClassicI2SConfig(sai_transceiver_t *config, sai_word_width_t bitWidth, sai_mono_stereo_t mode, uint32_t saiChannelMask)#
Get classic I2S mode configurations.
- Parameters:
config – transceiver configurations.
bitWidth – audio data bitWidth.
mode – audio data channel.
saiChannelMask – mask value of the channel to be enable.
-
void SAI_GetLeftJustifiedConfig(sai_transceiver_t *config, sai_word_width_t bitWidth, sai_mono_stereo_t mode, uint32_t saiChannelMask)#
Get left justified mode configurations.
- Parameters:
config – transceiver configurations.
bitWidth – audio data bitWidth.
mode – audio data channel.
saiChannelMask – mask value of the channel to be enable.
-
void SAI_GetRightJustifiedConfig(sai_transceiver_t *config, sai_word_width_t bitWidth, sai_mono_stereo_t mode, uint32_t saiChannelMask)#
Get right justified mode configurations.
- Parameters:
config – transceiver configurations.
bitWidth – audio data bitWidth.
mode – audio data channel.
saiChannelMask – mask value of the channel to be enable.
-
void SAI_GetTDMConfig(sai_transceiver_t *config, sai_frame_sync_len_t frameSyncWidth, sai_word_width_t bitWidth, uint32_t dataWordNum, uint32_t saiChannelMask)#
Get TDM mode configurations.
- Parameters:
config – transceiver configurations.
frameSyncWidth – length of frame sync.
bitWidth – audio data word width.
dataWordNum – word number in one frame.
saiChannelMask – mask value of the channel to be enable.
-
void SAI_GetDSPConfig(sai_transceiver_t *config, sai_frame_sync_len_t frameSyncWidth, sai_word_width_t bitWidth, sai_mono_stereo_t mode, uint32_t saiChannelMask)#
Get DSP mode configurations.
DSP/PCM MODE B configuration flow for TX. RX is similiar but uses SAI_RxSetConfig instead of SAI_TxSetConfig:
SAI_GetDSPConfig(config, kSAI_FrameSyncLenOneBitClk, bitWidth, kSAI_Stereo, channelMask) SAI_TxSetConfig(base, config)
Note
DSP mode is also called PCM mode which support MODE A and MODE B, DSP/PCM MODE A configuration flow. RX is similiar but uses SAI_RxSetConfig instead of SAI_TxSetConfig:
SAI_GetDSPConfig(config, kSAI_FrameSyncLenOneBitClk, bitWidth, kSAI_Stereo, channelMask) config->frameSync.frameSyncEarly = true; SAI_TxSetConfig(base, config)
- Parameters:
config – transceiver configurations.
frameSyncWidth – length of frame sync.
bitWidth – audio data bitWidth.
mode – audio data channel.
saiChannelMask – mask value of the channel to enable.
-
static inline uint32_t SAI_TxGetStatusFlag(I2S_Type *base)#
Gets the SAI Tx status flag state.
- Parameters:
base – SAI base pointer
- Returns:
SAI Tx status flag value. Use the Status Mask to get the status value needed.
-
static inline void SAI_TxClearStatusFlags(I2S_Type *base, uint32_t mask)#
Clears the SAI Tx status flag state.
- Parameters:
base – SAI base pointer
mask – State mask. It can be a combination of the following source if defined:
kSAI_WordStartFlag
kSAI_SyncErrorFlag
kSAI_FIFOErrorFlag
-
static inline uint32_t SAI_RxGetStatusFlag(I2S_Type *base)#
Gets the SAI Tx status flag state.
- Parameters:
base – SAI base pointer
- Returns:
SAI Rx status flag value. Use the Status Mask to get the status value needed.
-
static inline void SAI_RxClearStatusFlags(I2S_Type *base, uint32_t mask)#
Clears the SAI Rx status flag state.
- Parameters:
base – SAI base pointer
mask – State mask. It can be a combination of the following sources if defined.
kSAI_WordStartFlag
kSAI_SyncErrorFlag
kSAI_FIFOErrorFlag
-
void SAI_TxSoftwareReset(I2S_Type *base, sai_reset_type_t resetType)#
Do software reset or FIFO reset .
FIFO reset means clear all the data in the FIFO, and make the FIFO pointer both to 0. Software reset means clear the Tx internal logic, including the bit clock, frame count etc. But software reset will not clear any configuration registers like TCR1~TCR5. This function will also clear all the error flags such as FIFO error, sync error etc.
- Parameters:
base – SAI base pointer
resetType – Reset type, FIFO reset or software reset
-
void SAI_RxSoftwareReset(I2S_Type *base, sai_reset_type_t resetType)#
Do software reset or FIFO reset .
FIFO reset means clear all the data in the FIFO, and make the FIFO pointer both to 0. Software reset means clear the Rx internal logic, including the bit clock, frame count etc. But software reset will not clear any configuration registers like RCR1~RCR5. This function will also clear all the error flags such as FIFO error, sync error etc.
- Parameters:
base – SAI base pointer
resetType – Reset type, FIFO reset or software reset
-
void SAI_TxSetChannelFIFOMask(I2S_Type *base, uint8_t mask)#
Set the Tx channel FIFO enable mask.
- Parameters:
base – SAI base pointer
mask – Channel enable mask, 0 means all channel FIFO disabled, 1 means channel 0 enabled, 3 means both channel 0 and channel 1 enabled.
-
void SAI_RxSetChannelFIFOMask(I2S_Type *base, uint8_t mask)#
Set the Rx channel FIFO enable mask.
- Parameters:
base – SAI base pointer
mask – Channel enable mask, 0 means all channel FIFO disabled, 1 means channel 0 enabled, 3 means both channel 0 and channel 1 enabled.
-
void SAI_TxSetDataOrder(I2S_Type *base, sai_data_order_t order)#
Set the Tx data order.
- Parameters:
base – SAI base pointer
order – Data order MSB or LSB
-
void SAI_RxSetDataOrder(I2S_Type *base, sai_data_order_t order)#
Set the Rx data order.
- Parameters:
base – SAI base pointer
order – Data order MSB or LSB
-
void SAI_TxSetBitClockPolarity(I2S_Type *base, sai_clock_polarity_t polarity)#
Set the Tx data order.
- Parameters:
base – SAI base pointer
polarity –
-
void SAI_RxSetBitClockPolarity(I2S_Type *base, sai_clock_polarity_t polarity)#
Set the Rx data order.
- Parameters:
base – SAI base pointer
polarity –
-
void SAI_TxSetFrameSyncPolarity(I2S_Type *base, sai_clock_polarity_t polarity)#
Set the Tx data order.
- Parameters:
base – SAI base pointer
polarity –
-
void SAI_RxSetFrameSyncPolarity(I2S_Type *base, sai_clock_polarity_t polarity)#
Set the Rx data order.
- Parameters:
base – SAI base pointer
polarity –
-
void SAI_TxSetFIFOPacking(I2S_Type *base, sai_fifo_packing_t pack)#
Set Tx FIFO packing feature.
- Parameters:
base – SAI base pointer.
pack – FIFO pack type. It is element of sai_fifo_packing_t.
-
void SAI_RxSetFIFOPacking(I2S_Type *base, sai_fifo_packing_t pack)#
Set Rx FIFO packing feature.
- Parameters:
base – SAI base pointer.
pack – FIFO pack type. It is element of sai_fifo_packing_t.
-
static inline void SAI_TxSetFIFOErrorContinue(I2S_Type *base, bool isEnabled)#
Set Tx FIFO error continue.
FIFO error continue mode means SAI will keep running while FIFO error occurred. If this feature not enabled, SAI will hang and users need to clear FEF flag in TCSR register.
- Parameters:
base – SAI base pointer.
isEnabled – Is FIFO error continue enabled, true means enable, false means disable.
-
static inline void SAI_RxSetFIFOErrorContinue(I2S_Type *base, bool isEnabled)#
Set Rx FIFO error continue.
FIFO error continue mode means SAI will keep running while FIFO error occurred. If this feature not enabled, SAI will hang and users need to clear FEF flag in RCSR register.
- Parameters:
base – SAI base pointer.
isEnabled – Is FIFO error continue enabled, true means enable, false means disable.
-
static inline void SAI_TxEnableInterrupts(I2S_Type *base, uint32_t mask)#
Enables the SAI Tx interrupt requests.
- Parameters:
base – SAI base pointer
mask – interrupt source The parameter can be a combination of the following sources if defined.
kSAI_WordStartInterruptEnable
kSAI_SyncErrorInterruptEnable
kSAI_FIFOWarningInterruptEnable
kSAI_FIFORequestInterruptEnable
kSAI_FIFOErrorInterruptEnable
-
static inline void SAI_RxEnableInterrupts(I2S_Type *base, uint32_t mask)#
Enables the SAI Rx interrupt requests.
- Parameters:
base – SAI base pointer
mask – interrupt source The parameter can be a combination of the following sources if defined.
kSAI_WordStartInterruptEnable
kSAI_SyncErrorInterruptEnable
kSAI_FIFOWarningInterruptEnable
kSAI_FIFORequestInterruptEnable
kSAI_FIFOErrorInterruptEnable
-
static inline void SAI_TxDisableInterrupts(I2S_Type *base, uint32_t mask)#
Disables the SAI Tx interrupt requests.
- Parameters:
base – SAI base pointer
mask – interrupt source The parameter can be a combination of the following sources if defined.
kSAI_WordStartInterruptEnable
kSAI_SyncErrorInterruptEnable
kSAI_FIFOWarningInterruptEnable
kSAI_FIFORequestInterruptEnable
kSAI_FIFOErrorInterruptEnable
-
static inline void SAI_RxDisableInterrupts(I2S_Type *base, uint32_t mask)#
Disables the SAI Rx interrupt requests.
- Parameters:
base – SAI base pointer
mask – interrupt source The parameter can be a combination of the following sources if defined.
kSAI_WordStartInterruptEnable
kSAI_SyncErrorInterruptEnable
kSAI_FIFOWarningInterruptEnable
kSAI_FIFORequestInterruptEnable
kSAI_FIFOErrorInterruptEnable
-
static inline void SAI_TxEnableDMA(I2S_Type *base, uint32_t mask, bool enable)#
Enables/disables the SAI Tx DMA requests.
- Parameters:
base – SAI base pointer
mask – DMA source The parameter can be combination of the following sources if defined.
kSAI_FIFOWarningDMAEnable
kSAI_FIFORequestDMAEnable
enable – True means enable DMA, false means disable DMA.
-
static inline void SAI_RxEnableDMA(I2S_Type *base, uint32_t mask, bool enable)#
Enables/disables the SAI Rx DMA requests.
- Parameters:
base – SAI base pointer
mask – DMA source The parameter can be a combination of the following sources if defined.
kSAI_FIFOWarningDMAEnable
kSAI_FIFORequestDMAEnable
enable – True means enable DMA, false means disable DMA.
-
static inline uintptr_t SAI_TxGetDataRegisterAddress(I2S_Type *base, uint32_t channel)#
Gets the SAI Tx data register address.
This API is used to provide a transfer address for the SAI DMA transfer configuration.
- Parameters:
base – SAI base pointer.
channel – Which data channel used.
- Returns:
data register address.
-
static inline uintptr_t SAI_RxGetDataRegisterAddress(I2S_Type *base, uint32_t channel)#
Gets the SAI Rx data register address.
This API is used to provide a transfer address for the SAI DMA transfer configuration.
- Parameters:
base – SAI base pointer.
channel – Which data channel used.
- Returns:
data register address.
-
void SAI_WriteBlocking(I2S_Type *base, uint32_t channel, uint32_t bitWidth, uint8_t *buffer, uint32_t size)#
Sends data using a blocking method.
Note
This function blocks by polling until data is ready to be sent.
- Parameters:
base – SAI base pointer.
channel – Data channel used.
bitWidth – How many bits in an audio word; usually 8/16/24/32 bits.
buffer – Pointer to the data to be written.
size – Bytes to be written.
-
void SAI_WriteMultiChannelBlocking(I2S_Type *base, uint32_t channel, uint32_t channelMask, uint32_t bitWidth, uint8_t *buffer, uint32_t size)#
Sends data to multi channel using a blocking method.
Note
This function blocks by polling until data is ready to be sent.
- Parameters:
base – SAI base pointer.
channel – Data channel used.
channelMask – channel mask.
bitWidth – How many bits in an audio word; usually 8/16/24/32 bits.
buffer – Pointer to the data to be written.
size – Bytes to be written.
-
static inline void SAI_WriteData(I2S_Type *base, uint32_t channel, uint32_t data)#
Writes data into SAI FIFO.
- Parameters:
base – SAI base pointer.
channel – Data channel used.
data – Data needs to be written.
-
void SAI_ReadBlocking(I2S_Type *base, uint32_t channel, uint32_t bitWidth, uint8_t *buffer, uint32_t size)#
Receives data using a blocking method.
Note
This function blocks by polling until data is ready to be sent.
- Parameters:
base – SAI base pointer.
channel – Data channel used.
bitWidth – How many bits in an audio word; usually 8/16/24/32 bits.
buffer – Pointer to the data to be read.
size – Bytes to be read.
-
void SAI_ReadMultiChannelBlocking(I2S_Type *base, uint32_t channel, uint32_t channelMask, uint32_t bitWidth, uint8_t *buffer, uint32_t size)#
Receives multi channel data using a blocking method.
Note
This function blocks by polling until data is ready to be sent.
- Parameters:
base – SAI base pointer.
channel – Data channel used.
channelMask – channel mask.
bitWidth – How many bits in an audio word; usually 8/16/24/32 bits.
buffer – Pointer to the data to be read.
size – Bytes to be read.
-
static inline uint32_t SAI_ReadData(I2S_Type *base, uint32_t channel)#
Reads data from the SAI FIFO.
- Parameters:
base – SAI base pointer.
channel – Data channel used.
- Returns:
Data in SAI FIFO.
-
void SAI_TransferTxCreateHandle(I2S_Type *base, sai_handle_t *handle, sai_transfer_callback_t callback, void *userData)#
Initializes the SAI Tx handle.
This function initializes the Tx handle for the SAI Tx transactional APIs. Call this function once to get the handle initialized.
- Parameters:
base – SAI base pointer
handle – SAI handle pointer.
callback – Pointer to the user callback function.
userData – User parameter passed to the callback function
-
void SAI_TransferRxCreateHandle(I2S_Type *base, sai_handle_t *handle, sai_transfer_callback_t callback, void *userData)#
Initializes the SAI Rx handle.
This function initializes the Rx handle for the SAI Rx transactional APIs. Call this function once to get the handle initialized.
- Parameters:
base – SAI base pointer.
handle – SAI handle pointer.
callback – Pointer to the user callback function.
userData – User parameter passed to the callback function.
-
void SAI_TransferTxSetConfig(I2S_Type *base, sai_handle_t *handle, sai_transceiver_t *config)#
SAI transmitter transfer configurations.
This function initializes the Tx, include bit clock, frame sync, master clock, serial data and fifo configurations.
- Parameters:
base – SAI base pointer.
handle – SAI handle pointer.
config – tranmitter configurations.
-
void SAI_TransferRxSetConfig(I2S_Type *base, sai_handle_t *handle, sai_transceiver_t *config)#
SAI receiver transfer configurations.
This function initializes the Rx, include bit clock, frame sync, master clock, serial data and fifo configurations.
- Parameters:
base – SAI base pointer.
handle – SAI handle pointer.
config – receiver configurations.
-
status_t SAI_TransferSendNonBlocking(I2S_Type *base, sai_handle_t *handle, sai_transfer_t *xfer)#
Performs an interrupt non-blocking send transfer on SAI.
Note
This API returns immediately after the transfer initiates. Call the SAI_TxGetTransferStatusIRQ to poll the transfer status and check whether the transfer is finished. If the return status is not kStatus_SAI_Busy, the transfer is finished.
- Parameters:
base – SAI base pointer.
handle – Pointer to the sai_handle_t structure which stores the transfer state.
xfer – Pointer to the sai_transfer_t structure.
- Return values:
kStatus_Success – Successfully started the data receive.
kStatus_SAI_TxBusy – Previous receive still not finished.
kStatus_InvalidArgument – The input parameter is invalid.
-
status_t SAI_TransferReceiveNonBlocking(I2S_Type *base, sai_handle_t *handle, sai_transfer_t *xfer)#
Performs an interrupt non-blocking receive transfer on SAI.
Note
This API returns immediately after the transfer initiates. Call the SAI_RxGetTransferStatusIRQ to poll the transfer status and check whether the transfer is finished. If the return status is not kStatus_SAI_Busy, the transfer is finished.
- Parameters:
base – SAI base pointer
handle – Pointer to the sai_handle_t structure which stores the transfer state.
xfer – Pointer to the sai_transfer_t structure.
- Return values:
kStatus_Success – Successfully started the data receive.
kStatus_SAI_RxBusy – Previous receive still not finished.
kStatus_InvalidArgument – The input parameter is invalid.
-
status_t SAI_TransferGetSendCount(I2S_Type *base, sai_handle_t *handle, size_t *count)#
Gets a set byte count.
- Parameters:
base – SAI base pointer.
handle – Pointer to the sai_handle_t structure which stores the transfer state.
count – Bytes count sent.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
status_t SAI_TransferGetReceiveCount(I2S_Type *base, sai_handle_t *handle, size_t *count)#
Gets a received byte count.
- Parameters:
base – SAI base pointer.
handle – Pointer to the sai_handle_t structure which stores the transfer state.
count – Bytes count received.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
void SAI_TransferAbortSend(I2S_Type *base, sai_handle_t *handle)#
Aborts the current send.
Note
This API can be called any time when an interrupt non-blocking transfer initiates to abort the transfer early.
- Parameters:
base – SAI base pointer.
handle – Pointer to the sai_handle_t structure which stores the transfer state.
-
void SAI_TransferAbortReceive(I2S_Type *base, sai_handle_t *handle)#
Aborts the current IRQ receive.
Note
This API can be called when an interrupt non-blocking transfer initiates to abort the transfer early.
- Parameters:
base – SAI base pointer
handle – Pointer to the sai_handle_t structure which stores the transfer state.
-
void SAI_TransferTerminateSend(I2S_Type *base, sai_handle_t *handle)#
Terminate all SAI send.
This function will clear all transfer slots buffered in the sai queue. If users only want to abort the current transfer slot, please call SAI_TransferAbortSend.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
-
void SAI_TransferTerminateReceive(I2S_Type *base, sai_handle_t *handle)#
Terminate all SAI receive.
This function will clear all transfer slots buffered in the sai queue. If users only want to abort the current transfer slot, please call SAI_TransferAbortReceive.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
-
void SAI_TransferTxHandleIRQ(I2S_Type *base, sai_handle_t *handle)#
Tx interrupt handler.
- Parameters:
base – SAI base pointer.
handle – Pointer to the sai_handle_t structure.
-
void SAI_TransferRxHandleIRQ(I2S_Type *base, sai_handle_t *handle)#
Tx interrupt handler.
- Parameters:
base – SAI base pointer.
handle – Pointer to the sai_handle_t structure.
-
void SAI_DriverIRQHandler(uint32_t instance)#
SAI driver IRQ handler common entry.
This function provides the common IRQ request entry for SAI.
- Parameters:
instance – SAI instance.
-
FSL_SAI_DRIVER_VERSION#
Version 2.4.12
_sai_status_t, SAI return status.
Values:
-
enumerator kStatus_SAI_TxBusy#
SAI Tx is busy.
-
enumerator kStatus_SAI_RxBusy#
SAI Rx is busy.
-
enumerator kStatus_SAI_TxError#
SAI Tx FIFO error.
-
enumerator kStatus_SAI_RxError#
SAI Rx FIFO error.
-
enumerator kStatus_SAI_QueueFull#
SAI transfer queue is full.
-
enumerator kStatus_SAI_TxIdle#
SAI Tx is idle
-
enumerator kStatus_SAI_RxIdle#
SAI Rx is idle
-
enumerator kStatus_SAI_TxBusy#
_sai_channel_mask,.sai channel mask value, actual channel numbers is depend soc specific
Values:
-
enumerator kSAI_Channel0Mask#
channel 0 mask value
-
enumerator kSAI_Channel1Mask#
channel 1 mask value
-
enumerator kSAI_Channel2Mask#
channel 2 mask value
-
enumerator kSAI_Channel3Mask#
channel 3 mask value
-
enumerator kSAI_Channel4Mask#
channel 4 mask value
-
enumerator kSAI_Channel5Mask#
channel 5 mask value
-
enumerator kSAI_Channel6Mask#
channel 6 mask value
-
enumerator kSAI_Channel7Mask#
channel 7 mask value
-
enumerator kSAI_Channel0Mask#
-
enum _sai_protocol#
Define the SAI bus type.
Values:
-
enumerator kSAI_BusLeftJustified#
Uses left justified format.
-
enumerator kSAI_BusRightJustified#
Uses right justified format.
-
enumerator kSAI_BusI2S#
Uses I2S format.
-
enumerator kSAI_BusPCMA#
Uses I2S PCM A format.
-
enumerator kSAI_BusPCMB#
Uses I2S PCM B format.
-
enumerator kSAI_BusLeftJustified#
-
enum _sai_master_slave#
Master or slave mode.
Values:
-
enumerator kSAI_Master#
Master mode include bclk and frame sync
-
enumerator kSAI_Slave#
Slave mode include bclk and frame sync
-
enumerator kSAI_Bclk_Master_FrameSync_Slave#
bclk in master mode, frame sync in slave mode
-
enumerator kSAI_Bclk_Slave_FrameSync_Master#
bclk in slave mode, frame sync in master mode
-
enumerator kSAI_Master#
-
enum _sai_mono_stereo#
Mono or stereo audio format.
Values:
-
enumerator kSAI_Stereo#
Stereo sound.
-
enumerator kSAI_MonoRight#
Only Right channel have sound.
-
enumerator kSAI_MonoLeft#
Only left channel have sound.
-
enumerator kSAI_Stereo#
-
enum _sai_data_order#
SAI data order, MSB or LSB.
Values:
-
enumerator kSAI_DataLSB#
LSB bit transferred first
-
enumerator kSAI_DataMSB#
MSB bit transferred first
-
enumerator kSAI_DataLSB#
-
enum _sai_clock_polarity#
SAI clock polarity, active high or low.
Values:
-
enumerator kSAI_PolarityActiveHigh#
Drive outputs on rising edge
-
enumerator kSAI_PolarityActiveLow#
Drive outputs on falling edge
-
enumerator kSAI_SampleOnFallingEdge#
Sample inputs on falling edge
-
enumerator kSAI_SampleOnRisingEdge#
Sample inputs on rising edge
-
enumerator kSAI_PolarityActiveHigh#
-
enum _sai_sync_mode#
Synchronous or asynchronous mode.
Values:
-
enumerator kSAI_ModeAsync#
Asynchronous mode
-
enumerator kSAI_ModeSync#
Synchronous mode (with receiver or transmit)
-
enumerator kSAI_ModeSyncWithOtherTx#
Synchronous with another SAI transmit
-
enumerator kSAI_ModeSyncWithOtherRx#
Synchronous with another SAI receiver
-
enumerator kSAI_ModeAsync#
-
enum _sai_bclk_source#
Bit clock source.
Values:
-
enumerator kSAI_BclkSourceBusclk#
Bit clock using bus clock
-
enumerator kSAI_BclkSourceMclkOption1#
Bit clock MCLK option 1
-
enumerator kSAI_BclkSourceMclkOption2#
Bit clock MCLK option2
-
enumerator kSAI_BclkSourceMclkOption3#
Bit clock MCLK option3
-
enumerator kSAI_BclkSourceMclkDiv#
Bit clock using master clock divider
-
enumerator kSAI_BclkSourceOtherSai0#
Bit clock from other SAI device
-
enumerator kSAI_BclkSourceOtherSai1#
Bit clock from other SAI device
-
enumerator kSAI_BclkSourceBusclk#
_sai_interrupt_enable_t, The SAI interrupt enable flag
Values:
-
enumerator kSAI_WordStartInterruptEnable#
Word start flag, means the first word in a frame detected
-
enumerator kSAI_SyncErrorInterruptEnable#
Sync error flag, means the sync error is detected
-
enumerator kSAI_FIFOWarningInterruptEnable#
FIFO warning flag, means the FIFO is empty
-
enumerator kSAI_FIFOErrorInterruptEnable#
FIFO error flag
-
enumerator kSAI_FIFORequestInterruptEnable#
FIFO request, means reached watermark
-
enumerator kSAI_WordStartInterruptEnable#
_sai_dma_enable_t, The DMA request sources
Values:
-
enumerator kSAI_FIFOWarningDMAEnable#
FIFO warning caused by the DMA request
-
enumerator kSAI_FIFORequestDMAEnable#
FIFO request caused by the DMA request
-
enumerator kSAI_FIFOWarningDMAEnable#
_sai_flags, The SAI status flag
Values:
-
enumerator kSAI_WordStartFlag#
Word start flag, means the first word in a frame detected
-
enumerator kSAI_SyncErrorFlag#
Sync error flag, means the sync error is detected
-
enumerator kSAI_FIFOErrorFlag#
FIFO error flag
-
enumerator kSAI_FIFORequestFlag#
FIFO request flag.
-
enumerator kSAI_FIFOWarningFlag#
FIFO warning flag
-
enumerator kSAI_WordStartFlag#
-
enum _sai_reset_type#
The reset type.
Values:
-
enumerator kSAI_ResetTypeSoftware#
Software reset, reset the logic state
-
enumerator kSAI_ResetTypeFIFO#
FIFO reset, reset the FIFO read and write pointer
-
enumerator kSAI_ResetAll#
All reset.
-
enumerator kSAI_ResetTypeSoftware#
-
enum _sai_fifo_packing#
The SAI packing mode The mode includes 8 bit and 16 bit packing.
Values:
-
enumerator kSAI_FifoPackingDisabled#
Packing disabled
-
enumerator kSAI_FifoPacking8bit#
8 bit packing enabled
-
enumerator kSAI_FifoPacking16bit#
16bit packing enabled
-
enumerator kSAI_FifoPackingDisabled#
-
enum _sai_sample_rate#
Audio sample rate.
Values:
-
enumerator kSAI_SampleRate8KHz#
Sample rate 8000 Hz
-
enumerator kSAI_SampleRate11025Hz#
Sample rate 11025 Hz
-
enumerator kSAI_SampleRate12KHz#
Sample rate 12000 Hz
-
enumerator kSAI_SampleRate16KHz#
Sample rate 16000 Hz
-
enumerator kSAI_SampleRate22050Hz#
Sample rate 22050 Hz
-
enumerator kSAI_SampleRate24KHz#
Sample rate 24000 Hz
-
enumerator kSAI_SampleRate32KHz#
Sample rate 32000 Hz
-
enumerator kSAI_SampleRate44100Hz#
Sample rate 44100 Hz
-
enumerator kSAI_SampleRate48KHz#
Sample rate 48000 Hz
-
enumerator kSAI_SampleRate96KHz#
Sample rate 96000 Hz
-
enumerator kSAI_SampleRate192KHz#
Sample rate 192000 Hz
-
enumerator kSAI_SampleRate384KHz#
Sample rate 384000 Hz
-
enumerator kSAI_SampleRate8KHz#
-
enum _sai_word_width#
Audio word width.
Values:
-
enumerator kSAI_WordWidth8bits#
Audio data width 8 bits
-
enumerator kSAI_WordWidth16bits#
Audio data width 16 bits
-
enumerator kSAI_WordWidth24bits#
Audio data width 24 bits
-
enumerator kSAI_WordWidth32bits#
Audio data width 32 bits
-
enumerator kSAI_WordWidth8bits#
-
enum _sai_data_pin_state#
sai data pin state definition
Values:
-
enumerator kSAI_DataPinStateTriState#
transmit data pins are tri-stated when slots are masked or channels are disabled
-
enumerator kSAI_DataPinStateOutputZero#
transmit data pins are never tri-stated and will output zero when slots are masked or channel disabled
-
enumerator kSAI_DataPinStateTriState#
-
enum _sai_fifo_combine#
sai fifo combine mode definition
Values:
-
enumerator kSAI_FifoCombineDisabled#
sai TX/RX fifo combine mode disabled
-
enumerator kSAI_FifoCombineModeEnabledOnRead#
sai TX fifo combine mode enabled on FIFO reads
-
enumerator kSAI_FifoCombineModeEnabledOnWrite#
sai TX fifo combine mode enabled on FIFO write
-
enumerator kSAI_RxFifoCombineModeEnabledOnWrite#
sai RX fifo combine mode enabled on FIFO write
-
enumerator kSAI_RXFifoCombineModeEnabledOnRead#
sai RX fifo combine mode enabled on FIFO reads
-
enumerator kSAI_FifoCombineModeEnabledOnReadWrite#
sai TX/RX fifo combined mode enabled on FIFO read/writes
-
enumerator kSAI_FifoCombineDisabled#
-
enum _sai_transceiver_type#
sai transceiver type
Values:
-
enumerator kSAI_Transmitter#
sai transmitter
-
enumerator kSAI_Receiver#
sai receiver
-
enumerator kSAI_Transmitter#
-
enum _sai_frame_sync_len#
sai frame sync len
Values:
-
enumerator kSAI_FrameSyncLenOneBitClk#
1 bit clock frame sync len for DSP mode
-
enumerator kSAI_FrameSyncLenPerWordWidth#
Frame sync length decided by word width
-
enumerator kSAI_FrameSyncLenOneBitClk#
-
typedef enum _sai_protocol sai_protocol_t#
Define the SAI bus type.
-
typedef enum _sai_master_slave sai_master_slave_t#
Master or slave mode.
-
typedef enum _sai_mono_stereo sai_mono_stereo_t#
Mono or stereo audio format.
-
typedef enum _sai_data_order sai_data_order_t#
SAI data order, MSB or LSB.
-
typedef enum _sai_clock_polarity sai_clock_polarity_t#
SAI clock polarity, active high or low.
-
typedef enum _sai_sync_mode sai_sync_mode_t#
Synchronous or asynchronous mode.
-
typedef enum _sai_bclk_source sai_bclk_source_t#
Bit clock source.
-
typedef enum _sai_reset_type sai_reset_type_t#
The reset type.
-
typedef enum _sai_fifo_packing sai_fifo_packing_t#
The SAI packing mode The mode includes 8 bit and 16 bit packing.
-
typedef struct _sai_config sai_config_t#
SAI user configuration structure.
-
typedef enum _sai_sample_rate sai_sample_rate_t#
Audio sample rate.
-
typedef enum _sai_word_width sai_word_width_t#
Audio word width.
-
typedef enum _sai_data_pin_state sai_data_pin_state_t#
sai data pin state definition
-
typedef enum _sai_fifo_combine sai_fifo_combine_t#
sai fifo combine mode definition
-
typedef enum _sai_transceiver_type sai_transceiver_type_t#
sai transceiver type
-
typedef enum _sai_frame_sync_len sai_frame_sync_len_t#
sai frame sync len
-
typedef struct _sai_transfer_format sai_transfer_format_t#
sai transfer format
-
typedef struct _sai_master_clock sai_master_clock_t#
master clock configurations
-
typedef struct _sai_bit_clock sai_bit_clock_t#
sai bit clock configurations
-
typedef struct _sai_frame_sync sai_frame_sync_t#
sai frame sync configurations
-
typedef struct _sai_serial_data sai_serial_data_t#
sai serial data configurations
-
typedef struct _sai_transceiver sai_transceiver_t#
sai transceiver configurations
-
typedef struct _sai_transfer sai_transfer_t#
SAI transfer structure.
-
typedef struct _sai_handle sai_handle_t#
-
typedef void (*sai_transfer_callback_t)(I2S_Type *base, sai_handle_t *handle, status_t status, void *userData)#
SAI transfer callback prototype.
-
MCUX_SDK_SAI_ALLOW_NULL_FIFO_WATERMARK#
Used to control whether SAI_RxSetFifoConfig()/SAI_TxSetFifoConfig() allows a NULL FIFO watermark.
If this macro is set to 0 then SAI_RxSetFifoConfig()/SAI_TxSetFifoConfig() will set the watermark to half of the FIFO’s depth if passed a NULL watermark.
-
MCUX_SDK_SAI_DISABLE_IMPLICIT_CHAN_CONFIG#
Disable implicit channel data configuration within SAI_TxSetConfig()/SAI_RxSetConfig().
Use this macro to control whether SAI_RxSetConfig()/SAI_TxSetConfig() will attempt to implicitly configure the channel data. By channel data we mean the startChannel, channelMask, endChannel, and channelNums fields from the sai_transciever_t structure. By default, SAI_TxSetConfig()/SAI_RxSetConfig() will attempt to compute these fields, which may not be desired in cases where the user wants to set them before the call to said functions.
-
SAI_XFER_QUEUE_SIZE#
SAI transfer queue size, user can refine it according to use case.
-
FSL_SAI_HAS_FIFO_EXTEND_FEATURE#
sai fifo feature
-
struct _sai_config#
- #include <fsl_sai.h>
SAI user configuration structure.
Public Members
-
sai_protocol_t protocol#
Audio bus protocol in SAI
-
sai_sync_mode_t syncMode#
SAI sync mode, control Tx/Rx clock sync
-
bool mclkOutputEnable#
Master clock output enable, true means master clock divider enabled
-
sai_bclk_source_t bclkSource#
Bit Clock source
-
sai_master_slave_t masterSlave#
Master or slave
-
sai_protocol_t protocol#
-
struct _sai_transfer_format#
- #include <fsl_sai.h>
sai transfer format
Public Members
-
uint32_t sampleRate_Hz#
Sample rate of audio data
-
uint32_t bitWidth#
Data length of audio data, usually 8/16/24/32 bits
-
sai_mono_stereo_t stereo#
Mono or stereo
-
uint32_t masterClockHz#
Master clock frequency in Hz
-
uint8_t watermark#
Watermark value
-
uint8_t channel#
Transfer start channel
-
uint8_t channelMask#
enabled channel mask value, reference _sai_channel_mask
-
uint8_t endChannel#
end channel number
-
uint8_t channelNums#
Total enabled channel numbers
-
sai_protocol_t protocol#
Which audio protocol used
-
bool isFrameSyncCompact#
True means Frame sync length is configurable according to bitWidth, false means frame sync length is 64 times of bit clock.
-
uint32_t sampleRate_Hz#
-
struct _sai_master_clock#
- #include <fsl_sai.h>
master clock configurations
-
struct _sai_fifo#
- #include <fsl_sai.h>
sai fifo configurations
Public Members
-
bool fifoContinueOneError#
fifo continues when error occur
-
sai_fifo_combine_t fifoCombine#
fifo combine mode
-
sai_fifo_packing_t fifoPacking#
fifo packing mode
-
uint8_t fifoWatermark#
fifo watermark
-
bool fifoContinueOneError#
-
struct _sai_bit_clock#
- #include <fsl_sai.h>
sai bit clock configurations
Public Members
-
bool bclkSrcSwap#
bit clock source swap
-
bool bclkInputDelay#
bit clock actually used by the transmitter is delayed by the pad output delay, this has effect of decreasing the data input setup time, but increasing the data output valid time .
-
sai_clock_polarity_t bclkPolarity#
bit clock polarity
-
sai_bclk_source_t bclkSource#
bit Clock source
-
bool bclkSrcSwap#
-
struct _sai_frame_sync#
- #include <fsl_sai.h>
sai frame sync configurations
Public Members
-
uint8_t frameSyncWidth#
frame sync width in number of bit clocks
-
bool frameSyncEarly#
TRUE is frame sync assert one bit before the first bit of frame FALSE is frame sync assert with the first bit of the frame
-
bool frameSyncGenerateOnDemand#
internal frame sync is generated when FIFO waring flag is clear
-
sai_clock_polarity_t frameSyncPolarity#
frame sync polarity
-
uint8_t frameSyncWidth#
-
struct _sai_serial_data#
- #include <fsl_sai.h>
sai serial data configurations
Public Members
-
sai_data_pin_state_t dataMode#
sai data pin state when slots masked or channel disabled
-
sai_data_order_t dataOrder#
configure whether the LSB or MSB is transmitted first
-
uint8_t dataWord0Length#
configure the number of bits in the first word in each frame
-
uint8_t dataWordNLength#
configure the number of bits in the each word in each frame, except the first word
-
uint8_t dataWordLength#
used to record the data length for dma transfer
-
uint8_t dataFirstBitShifted#
Configure the bit index for the first bit transmitted for each word in the frame
-
uint8_t dataWordNum#
configure the number of words in each frame
-
uint32_t dataMaskedWord#
configure whether the transmit word is masked
-
sai_data_pin_state_t dataMode#
-
struct _sai_transceiver#
- #include <fsl_sai.h>
sai transceiver configurations
Public Members
-
sai_serial_data_t serialData#
serial data configurations
-
sai_frame_sync_t frameSync#
ws configurations
-
sai_bit_clock_t bitClock#
bit clock configurations
-
sai_fifo_t fifo#
fifo configurations
-
sai_master_slave_t masterSlave#
transceiver is master or slave
-
sai_sync_mode_t syncMode#
transceiver sync mode
-
uint8_t startChannel#
Transfer start channel
-
uint8_t channelMask#
enabled channel mask value, reference _sai_channel_mask
-
uint8_t endChannel#
end channel number
-
uint8_t channelNums#
Total enabled channel numbers
-
sai_serial_data_t serialData#
-
struct _sai_transfer#
- #include <fsl_sai.h>
SAI transfer structure.
-
struct _sai_handle#
- #include <fsl_sai.h>
SAI handle structure.
Public Members
-
I2S_Type *base#
base address
-
uint32_t state#
Transfer status
-
sai_transfer_callback_t callback#
Callback function called at transfer event
-
void *userData#
Callback parameter passed to callback function
-
uint8_t bitWidth#
Bit width for transfer, 8/16/24/32 bits
-
uint8_t channel#
Transfer start channel
-
uint8_t channelMask#
enabled channel mask value, refernece _sai_channel_mask
-
uint8_t endChannel#
end channel number
-
uint8_t channelNums#
Total enabled channel numbers
-
sai_transfer_t saiQueue[(4U)]#
Transfer queue storing queued transfer
-
size_t transferSize[(4U)]#
Data bytes need to transfer
-
volatile uint8_t queueUser#
Index for user to queue transfer
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
uint8_t watermark#
Watermark value
-
I2S_Type *base#
SAI EDMA Driver#
-
void SAI_TransferTxCreateHandleEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *txDmaHandle)#
Initializes the SAI eDMA handle.
This function initializes the SAI master DMA handle, which can be used for other SAI master transactional APIs. Usually, for a specified SAI instance, call this API once to get the initialized handle.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
callback – Pointer to user callback function.
userData – User parameter passed to the callback function.
txDmaHandle – eDMA handle pointer, this handle shall be static allocated by users.
-
void SAI_TransferRxCreateHandleEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *rxDmaHandle)#
Initializes the SAI Rx eDMA handle.
This function initializes the SAI slave DMA handle, which can be used for other SAI master transactional APIs. Usually, for a specified SAI instance, call this API once to get the initialized handle.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
callback – Pointer to user callback function.
userData – User parameter passed to the callback function.
rxDmaHandle – eDMA handle pointer, this handle shall be static allocated by users.
-
void SAI_TransferSetInterleaveType(sai_edma_handle_t *handle, sai_edma_interleave_t interleaveType)#
Initializes the SAI interleave type.
This function initializes the SAI DMA handle member interleaveType, it shall be called only when application would like to use type kSAI_EDMAInterleavePerChannelBlock, since the default interleaveType is kSAI_EDMAInterleavePerChannelSample always
- Parameters:
handle – SAI eDMA handle pointer.
interleaveType – Multi channel interleave type.
-
void SAI_TransferTxSetConfigEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)#
Configures the SAI Tx.
Note
SAI eDMA supports data transfer in a multiple SAI channels if the FIFO Combine feature is supported. To activate the multi-channel transfer enable SAI channels by filling the channelMask of sai_transceiver_t with the corresponding values of _sai_channel_mask enum, enable the FIFO Combine mode by assigning kSAI_FifoCombineModeEnabledOnWrite to the fifoCombine member of sai_fifo_combine_t which is a member of sai_transceiver_t. This is an example of multi-channel data transfer configuration step.
sai_transceiver_t config; SAI_GetClassicI2SConfig(&config, kSAI_WordWidth16bits, kSAI_Stereo, kSAI_Channel0Mask|kSAI_Channel1Mask); config.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnWrite; SAI_TransferTxSetConfigEDMA(I2S0, &edmaHandle, &config);
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
saiConfig – sai configurations.
-
void SAI_TransferRxSetConfigEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)#
Configures the SAI Rx.
Note
SAI eDMA supports data transfer in a multiple SAI channels if the FIFO Combine feature is supported. To activate the multi-channel transfer enable SAI channels by filling the channelMask of sai_transceiver_t with the corresponding values of _sai_channel_mask enum, enable the FIFO Combine mode by assigning kSAI_RXFifoCombineModeEnabledOnRead to the fifoCombine member of sai_fifo_combine_t which is a member of sai_transceiver_t. This is an example of multi-channel data transfer configuration step.
sai_transceiver_t config; SAI_GetClassicI2SConfig(&config, kSAI_WordWidth16bits, kSAI_Stereo, kSAI_Channel0Mask|kSAI_Channel1Mask); config.fifo.fifoCombine = kSAI_RXFifoCombineModeEnabledOnRead; SAI_TransferRxSetConfigEDMA(I2S0, &edmaHandle, &config);
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
saiConfig – sai configurations.
-
status_t SAI_TransferSendEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)#
Performs a non-blocking SAI transfer using DMA.
This function support multi channel transfer,
for the sai IP support fifo combine mode, application should enable the fifo combine mode, no limitation on channel numbers
for the sai IP not support fifo combine mode, sai edma provide another solution which using EDMA modulo feature, but support 2 or 4 channels only.
Note
This interface returns immediately after the transfer initiates. Call SAI_GetTransferStatus to poll the transfer status and check whether the SAI transfer is finished.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
xfer – Pointer to the DMA transfer structure.
- Return values:
kStatus_Success – Start a SAI eDMA send successfully.
kStatus_InvalidArgument – The input argument is invalid.
kStatus_TxBusy – SAI is busy sending data.
-
status_t SAI_TransferReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)#
Performs a non-blocking SAI receive using eDMA.
This function support multi channel transfer,
for the sai IP support fifo combine mode, application should enable the fifo combine mode, no limitation on channel numbers
for the sai IP not support fifo combine mode, sai edma provide another solution which using EDMA modulo feature, but support 2 or 4 channels only.
Note
This interface returns immediately after the transfer initiates. Call the SAI_GetReceiveRemainingBytes to poll the transfer status and check whether the SAI transfer is finished.
- Parameters:
base – SAI base pointer
handle – SAI eDMA handle pointer.
xfer – Pointer to DMA transfer structure.
- Return values:
kStatus_Success – Start a SAI eDMA receive successfully.
kStatus_InvalidArgument – The input argument is invalid.
kStatus_RxBusy – SAI is busy receiving data.
-
status_t SAI_TransferSendLoopEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer, uint32_t loopTransferCount)#
Performs a non-blocking SAI loop transfer using eDMA.
Once the loop transfer start, application can use function SAI_TransferAbortSendEDMA to stop the loop transfer.
Note
This function support loop transfer only,such as A->B->…->A, application must be aware of that the more counts of the loop transfer, then more tcd memory required, as the function use the tcd pool in sai_edma_handle_t, so application could redefine the SAI_XFER_QUEUE_SIZE to determine the proper TCD pool size. This function support one sai channel only.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
xfer – Pointer to the DMA transfer structure, should be a array with elements counts >=1(loopTransferCount).
loopTransferCount – the counts of xfer array.
- Return values:
kStatus_Success – Start a SAI eDMA send successfully.
kStatus_InvalidArgument – The input argument is invalid.
-
status_t SAI_TransferReceiveLoopEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer, uint32_t loopTransferCount)#
Performs a non-blocking SAI loop transfer using eDMA.
Once the loop transfer start, application can use function SAI_TransferAbortReceiveEDMA to stop the loop transfer.
Note
This function support loop transfer only,such as A->B->…->A, application must be aware of that the more counts of the loop transfer, then more tcd memory required, as the function use the tcd pool in sai_edma_handle_t, so application could redefine the SAI_XFER_QUEUE_SIZE to determine the proper TCD pool size. This function support one sai channel only.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
xfer – Pointer to the DMA transfer structure, should be a array with elements counts >=1(loopTransferCount).
loopTransferCount – the counts of xfer array.
- Return values:
kStatus_Success – Start a SAI eDMA receive successfully.
kStatus_InvalidArgument – The input argument is invalid.
-
void SAI_TransferTerminateSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)#
Terminate all SAI send.
This function will clear all transfer slots buffered in the sai queue. If users only want to abort the current transfer slot, please call SAI_TransferAbortSendEDMA.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
-
void SAI_TransferTerminateReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle)#
Terminate all SAI receive.
This function will clear all transfer slots buffered in the sai queue. If users only want to abort the current transfer slot, please call SAI_TransferAbortReceiveEDMA.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
-
void SAI_TransferAbortSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)#
Aborts a SAI transfer using eDMA.
This function only aborts the current transfer slots, the other transfer slots’ information still kept in the handler. If users want to terminate all transfer slots, just call SAI_TransferTerminateSendEDMA.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
-
void SAI_TransferAbortReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle)#
Aborts a SAI receive using eDMA.
This function only aborts the current transfer slots, the other transfer slots’ information still kept in the handler. If users want to terminate all transfer slots, just call SAI_TransferTerminateReceiveEDMA.
- Parameters:
base – SAI base pointer
handle – SAI eDMA handle pointer.
-
status_t SAI_TransferGetSendCountEDMA(I2S_Type *base, sai_edma_handle_t *handle, size_t *count)#
Gets byte count sent by SAI.
- Parameters:
base – SAI base pointer.
handle – SAI eDMA handle pointer.
count – Bytes count sent by SAI.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is no non-blocking transaction in progress.
-
status_t SAI_TransferGetReceiveCountEDMA(I2S_Type *base, sai_edma_handle_t *handle, size_t *count)#
Gets byte count received by SAI.
- Parameters:
base – SAI base pointer
handle – SAI eDMA handle pointer.
count – Bytes count received by SAI.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is no non-blocking transaction in progress.
-
uint32_t SAI_TransferGetValidTransferSlotsEDMA(I2S_Type *base, sai_edma_handle_t *handle)#
Gets valid transfer slot.
This function can be used to query the valid transfer request slot that the application can submit. It should be called in the critical section, that means the application could call it in the corresponding callback function or disable IRQ before calling it in the application, otherwise, the returned value may not correct.
- Parameters:
base – SAI base pointer
handle – SAI eDMA handle pointer.
- Return values:
valid – slot count that application submit.
-
FSL_SAI_EDMA_DRIVER_VERSION#
Version 2.7.6
-
enum _sai_edma_interleave#
sai interleave type
Values:
-
enumerator kSAI_EDMAInterleavePerChannelSample#
-
enumerator kSAI_EDMAInterleavePerChannelBlock#
-
enumerator kSAI_EDMAInterleavePerChannelSample#
-
typedef struct sai_edma_handle sai_edma_handle_t#
-
typedef void (*sai_edma_callback_t)(I2S_Type *base, sai_edma_handle_t *handle, status_t status, void *userData)#
SAI eDMA transfer callback function for finish and error.
-
typedef enum _sai_edma_interleave sai_edma_interleave_t#
sai interleave type
-
MCUX_SDK_SAI_EDMA_RX_ENABLE_INTERNAL#
the SAI enable position When calling SAI_TransferReceiveEDMA
-
MCUX_SDK_SAI_EDMA_TX_ENABLE_INTERNAL#
the SAI enable position When calling SAI_TransferSendEDMA
-
struct sai_edma_handle#
- #include <fsl_sai_edma.h>
SAI DMA transfer handle, users should not touch the content of the handle.
Public Members
-
edma_handle_t *dmaHandle#
DMA handler for SAI send
-
uint8_t nbytes#
eDMA minor byte transfer count initially configured.
-
uint8_t bytesPerFrame#
Bytes in a frame
-
uint8_t channelMask#
Enabled channel mask value, reference _sai_channel_mask
-
uint8_t channelNums#
total enabled channel nums
-
uint8_t channel#
Which data channel
-
uint8_t count#
The transfer data count in a DMA request
-
uint32_t state#
Internal state for SAI eDMA transfer
-
sai_edma_callback_t callback#
Callback for users while transfer finish or error occurs
-
void *userData#
User callback parameter
-
uint8_t tcd[((4U) + 1U) * sizeof(edma_tcd_t)]#
TCD pool for eDMA transfer.
-
sai_transfer_t saiQueue[(4U)]#
Transfer queue storing queued transfer.
-
size_t transferSize[(4U)]#
Data bytes need to transfer
-
sai_edma_interleave_t interleaveType#
Transfer interleave type
-
volatile uint8_t queueUser#
Index for user to queue transfer.
-
volatile uint8_t queueDriver#
Index for driver to get the transfer data and size
-
edma_handle_t *dmaHandle#
SINC: SINC Filter#
-
void SINC_Init(SINC_Type *base, const sinc_config_t *config)#
Initialize selected SINC instance, including clock options and channel options.
- Parameters:
base – SINC peripheral base address.
config – The pointer to sinc_config_t structure.
-
void SINC_Deinit(SINC_Type *base)#
De-initialize selected SINC instance.
- Parameters:
base – SINC peripheral base address.
-
void SINC_GetDefaultConfig(sinc_config_t *config)#
Get default configuration.
config->clockPreDivider = kSINC_ClkPrescale1; config->modClkDivider = 2UL; config->disableModClk0Output = false; config->disableModClk1Output = false; config->disableModClk2Output = false; config->channelsConfigArray[4] = {NULL, NULL, NULL, NULL}; config->disableDozeMode = false; config->enableMaster = false;
- Parameters:
config – The pointer to sinc_config_t structure, must not be NULL.
-
static inline void SINC_EnableMaster(SINC_Type *base, bool enable)#
Enable/disable all function blocks enabled in their respective registers.
- Parameters:
base – SINC peripheral base address.
enable – Used to enable/disable all function blocks:
true Enable all function blocks, please note that clock must be configured previously;
false Disable all function blocks.
-
static inline void SINC_DoSoftwareReset(SINC_Type *base)#
Reset all function blocks(except for the clock blocks), interrupt statuses.
- Parameters:
base – SINC peripheral base address.
-
static inline void SINC_DisableDozeMode(SINC_Type *base, bool disable)#
Disable/enable SINC module when the chip enters Doze or Stop mode.
- Parameters:
base – SINC peripheral base address.
disable – Used to control if module functional when the chip enters Doze and Stop mode:
true Disable SINC when the chip enters Doze or Stop mode;
false Enable SINC when the chip enters Doze or stop mode.
-
static inline bool SINC_CheckModulatorClockReady(SINC_Type *base, uint32_t modClkMasks)#
Check whether selected modulator clocks are ready.
Note
The result of this APIs means all selected modulator clocks are (not) ready.
- Parameters:
base – SINC peripheral base address.
modClkMasks – The mask of modulator clocks, please refer to _sinc_modulator_clock.
- Return values:
true – The input mask of modulator clocks are ready.
false – The input mask of modulator clocks are not ready.
-
static inline void SINC_DisableModulatorClockOutput(SINC_Type *base, uint32_t modClkMasks, bool disable)#
Disable/enable modulator clocks’ output.
Note
By default, modulator clock’s output is enabled.
- Parameters:
base – SINC peripheral base address.
modClkMasks – The mask of modulator clocks, please refer to _sinc_modulator_clock.
disable – Used to enable/disable clock output:
true Disable modulator clocks’ output;
false Enable modulator clocks’ output.
-
static inline void SINC_SetClkPrescale(SINC_Type *base, sinc_clock_prescale_t clkPrescale)#
Set the clock divider ratio for the modulator clock.
- Parameters:
base – SINC peripheral base address.
clkPrescale – Clock prescale value, please refer to sinc_clock_prescale_t.
-
static inline void SINC_SetModulatorClockDivider(SINC_Type *base, uint32_t modClkDivider)#
Set modulator clock divider value.
Note
IMCLK0 = PRE_CLK / modClkDivider, the minimum clock divider ration is 2.
- Parameters:
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)#
Set channel configurations, including input options, conversion options and protection options.
- Parameters:
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)#
Set channel input options, including input bit format, input bit source, input bit delay, input clock source, input clock edge.
- Parameters:
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)#
Set channel conversion options, including conversion mode, trigger source, and primary filter settings.
- Parameters:
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)#
Set channel protection options, including limit check, short-circuit detector, clock-absence detector, and zero-crossing detector.
- Parameters:
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.
-
static inline uint32_t SINC_ReadChannelResultData(SINC_Type *base, sinc_channel_id_t chId)#
Read selected channel’s result data.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
- Returns:
Result data of the selected channel, 24 bits width.
-
static inline void SINC_EnableChannelFIFO(SINC_Type *base, sinc_channel_id_t chId, bool enable)#
Enable/disable FIFO transfers for the primary filter.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
enable – Used to enable/disable channl FIFO:
true Enable channel FIFO.
false Disable channle FIFO.
-
static inline void SINC_SetChannelFifoWatermark(SINC_Type *base, sinc_channel_id_t chId, uint8_t fifoWaterMark)#
Set the FIFO watermark.
- Parameters:
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.
-
static inline void SINC_EnableChannel(SINC_Type *base, sinc_channel_id_t chId, bool enable)#
Enable/disable selected channel.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
enable – Used to enable/disable selected channel:
true Enable selected channel;
false Disable selected channel.
-
static inline 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.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
enable – Used to enable/disable primary DMA :
true Enable primary DMA;
false Disable primary DMA.
-
static inline void SINC_SetChannelAltDmaSource(SINC_Type *base, sinc_channel_id_t chId, sinc_alternate_dma_source_t altDmaSource)#
Set selected channel’s alternate DMA source selection.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
altDmaSource – Specify the trigger source for alternate DMA, please refer to sinc_alternate_dma_source_t.
-
static inline void SINC_SetChannelResultDataFormat(SINC_Type *base, sinc_channel_id_t chId, sinc_result_data_format_t dataFormat)#
Set selected channel’s result data format.
- Parameters:
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.
-
static inline uint8_t SINC_GetChannelFifoCount(SINC_Type *base, sinc_channel_id_t chId)#
Get the number of remaining data entries in the FIFO.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
- Returns:
The number of remaining data entries in the FIFO.
-
static inline 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.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, refer to sinc_channel_id_t for details.
- Return values:
true – Data in selected channel’s result data regiter is stable.
false – Data in selected channel’s result data register is not stable.
-
static inline bool SINC_CheckChannelFifoEmpty(SINC_Type *base, sinc_channel_id_t chId)#
Check whether selected channel’s FIFO is empty.
- Parameters:
base – SINC peripheral base address.
chId – The id of sinc channel to check.
- Return values:
true – Selected channel’s FIFO is empty.
false – Selected channel’s FIFO is not empty.
-
static inline void SINC_AffirmChannelSoftwareTrigger(SINC_Type *base, uint32_t chMask)#
Trigger selected channel’s conversion.
- Parameters:
base – SINC peripheral base address.
chMask – The mask of channels to trigger.
-
static inline void SINC_NegateChannelSoftwareTrigger(SINC_Type *base, uint32_t chMask)#
Negate the trigger of selected channel.
- Parameters:
base – SINC peripheral base address.
chMask – The mask of channels.
-
static inline void SINC_SetChannelConversionMode(SINC_Type *base, sinc_channel_id_t chId, sinc_conv_mode_t mode)#
Set selected channel’s conversion mode.
- Parameters:
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.
-
static inline void SINC_SetChannelTriggerSource(SINC_Type *base, sinc_channel_id_t chId, sinc_conv_trigger_source_t triggerSource)#
Set selected channel’s trigger source.
- Parameters:
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.
-
static inline void SINC_SetChannelMultipurposeData(SINC_Type *base, sinc_channel_id_t chId, uint32_t data)#
Set multipurpose data to selected channel.
Note
If input bit format is set as ManchesterCode, multipurpose data indicates the Manchester decoder threshold value and is 11 bits width; if input bit format is set as parallel, multipurpose data indicates the parallel 16-bit data and is 16 bits width; if input bit format is set as serial, multipurpose data indicates the serial data and is 32 bits width.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
data – Multipurpose data to set.
-
static inline void SINC_SetChannelPfOrder(SINC_Type *base, sinc_channel_id_t chId, sinc_primary_filter_order_t pfOrder)#
Set selected channel’s PF order.
- Parameters:
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
-
static inline void SINC_SetChannelPfOsr(SINC_Type *base, sinc_channel_id_t chId, uint16_t pfOsr)#
Set selected channel’s PF over sample rate.
Note
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.
- Parameters:
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.
-
static inline 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.
- Parameters:
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.
-
static inline 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.
- Parameters:
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.
-
static inline 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.
- Parameters:
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.
-
static inline void SINC_EnableChannelPrimaryFilter(SINC_Type *base, sinc_channel_id_t chId, bool enable)#
Enable/disable selected channel’s primary filter.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
enable – Used to enable primary filter:
true Enable channel’s PF;
false Disable channel’s PF.
-
static inline 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.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, refer to sinc_channel_id_t for details.
- Return values:
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.
-
static inline bool SINC_CheckChannelPrimaryCICSaturation(SINC_Type *base, sinc_channel_id_t chId)#
Check whether primary CIC filter saturation occurred.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, refer to sinc_channel_id_t for details.
- Return values:
true – Selected channel’s primary CIC filter saturation occurred.
false – Selected channel’s primary CIC filter saturation did not occurred.
-
static inline bool SINC_CheckChannelHPFSaturation(SINC_Type *base, sinc_channel_id_t chId)#
Check whether HPF saturation occurred.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, refer to sinc_channel_id_t for details.
- Return values:
true – Selected channel’s HPF saturation occurred.
false – Selected channel’s HPF saturation did not occurred.
-
static inline bool SINC_CheckChannelShiftSaturation(SINC_Type *base, sinc_channel_id_t chId)#
Check whether Shift saturation occurred.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, refer to sinc_channel_id_t for details.
- Return values:
true – Selected channel’s shift saturation occurred.
false – Selected channel’s shift saturation did not occurred.
-
static inline bool SINC_CheckChannelBiasSaturation(SINC_Type *base, sinc_channel_id_t chId)#
Check whether bias saturation occurred.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, refer to sinc_channel_id_t for details.
- Return values:
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)#
Get selected channel’s number of conversions.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, refer to sinc_channel_id_t for details.
- Returns:
uint8_t Selected channel’s number of conversions.
-
static inline bool SINC_CheckChannelConvProgress(SINC_Type *base, sinc_channel_id_t chId)#
Check whether the selected channel is in conversion.
- Parameters:
base – SINC peripheral base address.
chId – The id of sinc channel to check.
- Return values:
false – Selected channel conversion not in progress.
true – Selected channel conversion in progress.
-
static inline bool SINC_CheckChannelReadyForConv(SINC_Type *base, sinc_channel_id_t chId)#
Check whether the selected channel is ready for conversion.
- Parameters:
base – SINC peripheral base address.
chId – The id of sinc channel to check.
- Return values:
true – Selected channel is ready for conversion.
false – Selected channel is not ready for conversion.
-
static inline void SINC_SetChannelLowLimitThreshold(SINC_Type *base, sinc_channel_id_t chId, uint32_t lowLimitThreshold)#
Set selected channel’s low-limit threshold value.
Note
When the data exceeds the low-limit threshold value, a low-limit event occurs, and the limit threshold format is determines by channel’s result data format sinc_result_data_format_t.
Note
Low limit value must lower than high limit value, otherwise the low-limit threshold does not work.
- Parameters:
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.
-
static inline void SINC_SetChannelHighLimitThreshold(SINC_Type *base, sinc_channel_id_t chId, uint32_t highLimitThreshold)#
Set selected channel’s high-limit threshold value.
Note
When the data exceeds the high-limit threshold value, a high-limit event occurs, and the limit threshold format is determines by channel’s result data format sinc_result_data_format_t.
- Parameters:
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.
-
static inline void SINC_SetChannelLimitDetectorMode(SINC_Type *base, sinc_channel_id_t chId, sinc_limit_detector_mode_t mode)#
Set selected channel’s limit detector mode.
- Parameters:
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.
-
static inline void SINC_EnableChannelHighLimitBreakSignal(SINC_Type *base, sinc_channel_id_t chId, bool enable)#
Enable/disable selected channel’s high limit break signal.
- Parameters:
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:
true Enable the automatic assertion of the BREAK_HIGH signal when SINC detects a high-limit event on the selected channel.
false Disable high limit break signal.
-
static inline void SINC_EnableChannelWindowLimitBreakSignal(SINC_Type *base, sinc_channel_id_t chId, bool enable)#
Enable/disable selected channel’s window limit break signal.
- Parameters:
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:
true Enable the automatic assertion of the BREAK_WIN signal when SINC detects a window-limit event on the selected channel.
false Disable window limit break signal.
-
static inline void SINC_EnableChannelLowLimitBreakSignal(SINC_Type *base, sinc_channel_id_t chId, bool enable)#
Enable/disable selected channel’s low limit break signal.
- Parameters:
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:
true Enable the automatic assertion of the BREAK_LOW signal when SINC detects a low-limit event on the selected channel.
false Disable low limit break signal.
-
static inline 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.
- Parameters:
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.
-
static inline void SINC_SetChannelScdLimitThreshold(SINC_Type *base, sinc_channel_id_t chId, uint8_t u8ScdLimitThreshold)#
Set selected channel’s Scd limit threshold.
Note
The SCD counter tracks the number of received bits with the same repeating value(always 0 or always 1, set by
SINC_SetChannelScdOption()), if that number exceeds the scdLimitThreshold, an SCD event occurs on the associated channel.
- Parameters:
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.
-
static inline void SINC_SetChannelScdOption(SINC_Type *base, sinc_channel_id_t chId, sinc_scd_option_t option)#
Set selected channel’s SDC option.
- Parameters:
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.
-
static inline 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.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
enable – Used to enable/disable SCD break signal:
true Enable SCD break signal.
false Disable SCD break signal.
-
static inline void SINC_SetChannelCadLimitThreshold(SINC_Type *base, sinc_channel_id_t chId, sinc_cad_threshold_t cadLimitThreshold)#
Set the threshold value for the CAD counter.
Note
The CAD counter tracks the number of clock cycles during which SINC does not detect a clock, if that number exceeds the threshold value, a CAD event occurs on the selected channel.
- Parameters:
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.
-
static inline 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.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
enable – Used to enable/disble CAD break signal:
true Enable selected channel’s CAD break signal;
false Disable selected channel’s CAD break signal.
-
static inline 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.
- Parameters:
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.
-
static inline void SINC_SetChannelDebugOutput(SINC_Type *base, sinc_channel_id_t chId, sinc_debug_output_t debugOutput)#
Set selected channel’s debug output.
- Parameters:
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.
-
static inline void SINC_LatchChannelDebugProceduce(SINC_Type *base, sinc_channel_id_t chId)#
Start selected channel’s debug data latch proceduce.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
-
static inline bool SINC_CheckChannelDebugDataValid(SINC_Type *base, sinc_channel_id_t chId)#
Check if the selected channel’s debug data is valid.
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
- Return values:
true – Data is valid.
false – Data is invalid.
-
static inline uint32_t SINC_GetChannelDebugData(SINC_Type *base, sinc_channel_id_t chId)#
Return selected channel’s the debug data that requested by SINC_SetChannelDebugOutput().
- Parameters:
base – SINC peripheral base address.
chId – Selected channel id, please refer to sinc_channel_id_t.
- Returns:
Selected channel’s debug data.
-
static inline 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.
- Parameters:
base – SINC peripheral base address.
interruptMasks – Mask of interrupts to enable, should be the OR’ed value of sinc_interrupt_enable_t.
-
static inline 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.
- Parameters:
base – SINC peripheral base address.
interruptMasks – Mask of interrupts to disable, should be the OR’ed value of sinc_interrupt_enable_t.
-
static inline uint64_t SINC_GetInterruptStatus(SINC_Type *base)#
Get interrupt status flags.
- Parameters:
base – SINC peripheral base address.
- Returns:
SINC module’s interrupt status flags, the OR’ed value of sinc_interrupt_status_t.
-
static inline void SINC_ClearInterruptStatus(SINC_Type *base, uint64_t statusMasks)#
Clear selected mask of interrupt status flags.
- Parameters:
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.
-
FSL_SINC_DRIVER_VERSION#
lower_component_name driver version 2.2.0.
-
enum _sinc_interrupt_enable#
The enumeration of SINC module’s interrupts. .
Values:
-
enumerator kSINC_CH0ConvCompleteIntEnable#
-
enumerator kSINC_CH1ConvCompleteIntEnable#
-
enumerator kSINC_CH2ConvCompleteIntEnable#
-
enumerator kSINC_CH3ConvCompleteIntEnable#
-
enumerator kSINC_CH0DataReadyIntEnable#
-
enumerator kSINC_CH1DataReadyIntEnable#
-
enumerator kSINC_CH2DataReadyIntEnable#
-
enumerator kSINC_CH3DataReadyIntEnable#
-
enumerator kSINC_CH0ZeroCrossDetectedIntEnable#
-
enumerator kSINC_CH1ZeroCrossDetectedIntEnable#
-
enumerator kSINC_CH2ZeroCrossDetectedIntEnable#
-
enumerator kSINC_CH3ZeroCrossDetectedIntEnable#
-
enumerator kSINC_CH0SCDIntEnable#
-
enumerator kSINC_CH1SCDIntEnable#
-
enumerator kSINC_CH2SCDIntEnable#
-
enumerator kSINC_CH3SCDIntEnable#
-
enumerator kSINC_CH0WindowLimitIntEnable#
-
enumerator kSINC_CH1WindowLimitIntEnable#
-
enumerator kSINC_CH2WindowLimitIntEnable#
-
enumerator kSINC_CH3WindowLimitIntEnable#
-
enumerator kSINC_CH0LowLimitIntEnable#
-
enumerator kSINC_CH1LowLimitIntEnable#
-
enumerator kSINC_CH2LowLimitIntEnable#
-
enumerator kSINC_CH3LowLimitIntEnable#
-
enumerator kSINC_CH0HighLimitIntEnable#
-
enumerator kSINC_CH1HighLimitIntEnable#
-
enumerator kSINC_CH2HighLimitIntEnable#
-
enumerator kSINC_CH3HighLimitIntEnable#
-
enumerator kSINC_CH0FifoUnderflowIntEnable#
-
enumerator kSINC_CH1FifoUnderflowIntEnable#
-
enumerator kSINC_CH2FifoUnderflowIntEnable#
-
enumerator kSINC_CH3FifoUnderflowIntEnable#
-
enumerator kSINC_CH0FifoOverflowIntEnable#
-
enumerator kSINC_CH1FifoOverflowIntEnable#
-
enumerator kSINC_CH2FifoOverflowIntEnable#
-
enumerator kSINC_CH3FifoOverflowIntEnable#
-
enumerator kSINC_CH0CADIntEnable#
-
enumerator kSINC_CH1CADIntEnable#
-
enumerator kSINC_CH2CADIntEnable#
-
enumerator kSINC_CH3CADIntEnable#
-
enumerator kSINC_CH0SaturationIntEnable#
-
enumerator kSINC_CH1SaturationIntEnable#
-
enumerator kSINC_CH2SaturationIntEnable#
-
enumerator kSINC_CH3SaturationIntEnable#
-
enumerator kSINC_CH0ConvCompleteIntEnable#
-
enum _sinc_interrupt_status#
The enumeration of SINC interrupt status flags. .
Values:
-
enumerator kSINC_CH0ConvCompleteIntStatus#
-
enumerator kSINC_CH1ConvCompleteIntStatus#
-
enumerator kSINC_CH2ConvCompleteIntStatus#
-
enumerator kSINC_CH3ConvCompleteIntStatus#
-
enumerator kSINC_CH0DataReadyIntStatus#
-
enumerator kSINC_CH1DataReadyIntStatus#
-
enumerator kSINC_CH2DataReadyIntStatus#
-
enumerator kSINC_CH3DataReadyIntStatus#
-
enumerator kSINC_CH0ZeroCrossDetectedIntStatus#
-
enumerator kSINC_CH1ZeroCrossDetectedIntStatus#
-
enumerator kSINC_CH2ZeroCrossDetectedIntStatus#
-
enumerator kSINC_CH3ZeroCrossDetectedIntStatus#
-
enumerator kSINC_CH0SCDIntStatus#
-
enumerator kSINC_CH1SCDIntStatus#
-
enumerator kSINC_CH2SCDIntStatus#
-
enumerator kSINC_CH3SCDIntStatus#
-
enumerator kSINC_CH0WindowLimitIntStatus#
-
enumerator kSINC_CH1WindowLimitIntStatus#
-
enumerator kSINC_CH2WindowLimitIntStatus#
-
enumerator kSINC_CH3WindowLimitIntStatus#
-
enumerator kSINC_CH0LowLimitIntStatus#
-
enumerator kSINC_CH1LowLimitIntStatus#
-
enumerator kSINC_CH2LowLimitIntStatus#
-
enumerator kSINC_CH3LowLimitIntStatus#
-
enumerator kSINC_CH0HighLimitIntStatus#
-
enumerator kSINC_CH1HighLimitIntStatus#
-
enumerator kSINC_CH2HighLimitIntStatus#
-
enumerator kSINC_CH3HighLimitIntStatus#
-
enumerator kSINC_CH0FifoUnderflowIntStatus#
-
enumerator kSINC_CH1FifoUnderflowIntStatus#
-
enumerator kSINC_CH2FifoUnderflowIntStatus#
-
enumerator kSINC_CH3FifoUnderflowIntStatus#
-
enumerator kSINC_CH0FifoOverflowIntStatus#
-
enumerator kSINC_CH1FifoOverflowIntStatus#
-
enumerator kSINC_CH2FifoOverflowIntStatus#
-
enumerator kSINC_CH3FifoOverflowIntStatus#
-
enumerator kSINC_CH0CADIntStatus#
-
enumerator kSINC_CH1CADIntStatus#
-
enumerator kSINC_CH2CADIntStatus#
-
enumerator kSINC_CH3CADIntStatus#
-
enumerator kSINC_CH0SaturationIntStatus#
-
enumerator kSINC_CH1SaturationIntStatus#
-
enumerator kSINC_CH2SaturationIntStatus#
-
enumerator kSINC_CH3SaturationIntStatus#
-
enumerator kSINC_CH0ConvCompleteIntStatus#
-
enum _sinc_channel_id#
The enumeration of channel id, the sinc module contains 4 channels.
Values:
-
enumerator kSINC_Channel0#
Channel 0.
-
enumerator kSINC_Channel1#
Channel 1.
-
enumerator kSINC_Channel2#
Channel 2.
-
enumerator kSINC_Channel3#
Channel 3.
-
enumerator kSINC_Channel0#
-
enum _sinc_modulator_clock#
The enumeration of modulator clock name. .
Values:
-
enumerator kSINC_ModClk0#
Modulator Clock 0 output.
-
enumerator kSINC_ModClk1#
Modulator Clock 1 output.
-
enumerator kSINC_ModClk2#
Modulator Clock 2 output.
-
enumerator kSINC_ModClk0#
-
enum _sinc_inputClk_source#
The enumeration of input clock.
Values:
-
enumerator kSINC_InputClk_SourceMclkOut0#
MCLK_OUT0 with internal routeback.
-
enumerator kSINC_InputClk_SourceMclkOut1#
MCLK_OUT1 with internal routeback.
-
enumerator kSINC_InputClk_SourceMclkOut2#
MCLK_OUT2 with internal routeback.
-
enumerator kSINC_InputClk_SourceExternalModulatorClk#
External modulator clock dedicated to the selected channel.
-
enumerator kSINC_InputClk_SourceAdjacentChannelClk#
Grouped clock shared with an adjacent channel.
-
enumerator kSINC_InputClk_SourceMclkOut0#
-
enum _sinc_inputClk_edge#
The enumeration of clock edge.
Values:
-
enumerator kSINC_InputClk_EdgePositive#
Positive edge.
-
enumerator kSINC_InputClk_EdgeNegative#
Negative edge.
-
enumerator kSINC_InputClk_EdgeBoth#
Both edges.
-
enumerator kSINC_InputClk_EdgeOddPositive#
Every other odd positive edge.
-
enumerator kSINC_InputClk_EdgeEvenPositive#
Every other even positive edge.
-
enumerator kSINC_InputClk_EdgeOddNegative#
Every other odd negative edge.
-
enumerator kSINC_InputClk_EdgeEvenNegative#
Every other even negative edge.
-
enumerator kSINC_InputClk_EdgePositive#
-
enum _sinc_inputBit_format#
The enumeration of input bit format.
Values:
-
enumerator kSINC_InputBit_FormatExternalBitstream#
External bitstream from the MBIT[n] signal.
-
enumerator kSINC_InputBit_FormatExternalManchesterCode#
External Manchester code.
-
enumerator kSINC_InputBit_FormatInternal16bitParallelData#
Internal 16-bit parallel data from MPDATA register.
-
enumerator kSINC_InputBit_FormatInternal32bitSerialData#
Internal 32-bit serial data from MPDATA.
-
enumerator kSINC_InputBit_FormatExternalBitstream#
-
enum _sinc_inputBit_source#
The enumeration of input bit source.
Values:
-
enumerator kSINC_InputBit_SourceExternalBitstream#
External bitstream from the MBIT[n] signal.
-
enumerator kSINC_InputBit_SourceInternalBitstream#
Alternate internal bitstream from the INP[n] signal.
-
enumerator kSINC_InputBit_SourceAdjacentChannel#
Grouped bitstream shared with an adjacent chanel.
-
enumerator kSINC_InputBit_SourceExternalBitstream#
-
enum _sinc_conv_trigger_source#
The enumeration of trigger source.
Values:
-
enumerator kSINC_ConvTrig_SoftPosEdge#
Positive edge software trigger.
-
enumerator kSINC_ConvTrig_SoftHighLevel#
High level software trigger.
-
enumerator kSINC_ConvTrig_HardPosEdge#
Positive edge hardware trigger.
-
enumerator kSINC_ConvTrig_HardHighLevel#
High level hardware trigger.
-
enumerator kSINC_ConvTrig_AdjacentChannel#
Grouped hardware trigger shared with an adjacent channel.
-
enumerator kSINC_ConvTrig_SoftPosEdge#
-
enum _sinc_conv_mode#
The enumeration of conversion mode.
Values:
-
enumerator kSINC_ConvMode_Single#
One conversion that follows an edge or level trigger event.
-
enumerator kSINC_ConvMode_Continuous#
Multiple conversions that follow a triggering event, a new triggering event cancels and restarts conversion.
-
enumerator kSINC_ConvMode_Always#
Multiple conversions that follow the first triggering event, SINC ignores the next triggering event.
-
enumerator kSINC_ConvMode_FixedNumber#
Fixed number conversions that follow the first triggering event, a new triggering event cancels and restarts conversion.
-
enumerator kSINC_ConvMode_Single#
-
enum _sinc_pulse_trigger_mux#
The enumeration of pulse trigger mux.
Values:
-
enumerator kSINC_PulseTrigger_Disabled#
Disable pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxHighLimitLevelSignal#
Select high limit level signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxLowLimitLevelSignal#
Select low limit level signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxHighLowLimitLevelSignal#
Select low or high limit level signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxWindowLimitLevelSignal#
Select window limit level signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxZeroCrossRisingLevelSignal#
Select zero cross rising level signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxZeroCrossFallingLevelSignal#
Select zero cross falling level signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxRsLimHighLevelSignal#
Select level signal that indicates a high level from an RS flip-flop or a schmitt trigger for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxRsLimLowLevelSignal#
Select level signal that indicates a low level from an RS flip-flop or a schmitt trigger for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxChannelRawInputModBitStream#
Select channel raw input modulator bitstream for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxChannelRawInputModClock#
Select channel raw input modulator clock for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxChannelRecoveredModBitStream#
Select channel output recovered modulator bitstream for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxChannelRecoveredModClock#
Select channel output recovered modulator clock for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxHighLimitPulseSignal#
Select high limit pulse signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxLowLimitPulseSignal#
Select low limit pulse signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxLimitPulseSignal#
Select the pulse signal that indicates a high/low/window limit for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxWindowLimitPulseSignal#
Select window limit pulse signal for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxHighLowLimitPulseSignal#
Select the pulse signal that indicates a high or low limit for pulse trigger output.
-
enumerator kSINC_PulseTrigger_MuxZeroCrossRisePulseSignal#
Select zero cross rise pulse signal for trigger output.
-
enumerator kSINC_PulseTrigger_MuxZeroCrossFallPulseSignal#
Select zero cross fall pulse signal for trigger output.
-
enumerator kSINC_PulseTrigger_MuxZeroCrossRiseFallPulseSignal#
Select zero cross rise/fall pulse signal for trigger output.
-
enumerator kSINC_PulseTrigger_MuxFifoWatermarkOkPulseSignal#
Select FIFO watermark OK pulse signal for trigger output.
-
enumerator kSINC_PulseTrigger_MuxFifoOverflowPulseSignal#
Select FIFO overflow pulse signal.
-
enumerator kSINC_PulseTrigger_MuxFifoUnderflowPulseSignal#
Select FIFO underflow pulse signal.
-
enumerator kSINC_PulseTrigger_MuxFifoEmptyPulseSignal#
Select FIFO empty pulse signal.
-
enumerator kSINC_PulseTrigger_MuxClockMonitorAssertPulseSignal#
Select clock monitor assert pulse signal.
-
enumerator kSINC_PulseTrigger_MuxShortCircuitAssertPulseSignal#
Select short circuit assert pulse signal.
-
enumerator kSINC_PulseTrigger_MuxSaturationPulseSignal#
Select saturation pulse signal.
-
enumerator kSINC_PulseTrigger_MuxConversionCompletePulseSignal#
Select conversion complete pulse signal.
-
enumerator kSINC_PulseTrigger_Disabled#
-
enum _sinc_zero_cross_operate_mode#
The enumeration of zero cross detector operate mode.
Values:
-
enumerator kSINC_ZCD_BothRiseAndFall#
Zero cross detector operate on both rise and fall.
-
enumerator kSINC_ZCD_OnlyFall#
Zero cross detector operate on fall edge.
-
enumerator kSINC_ZCD_OnlyRise#
Zero cross detector operate on rise edge.
-
enumerator kSINC_ZCD_Disabled#
Zero cross detector disabled.
-
enumerator kSINC_ZCD_BothRiseAndFall#
-
enum _sinc_primary_filter_order#
The enumeration of primary filter order.
Values:
-
enumerator kSINC_PF_FastSinc#
Fast sinc filter, ORD is 4.
-
enumerator kSINC_PF_FirstOrder#
First order filter, ORD is 1.
-
enumerator kSINC_PF_SecondOrder#
Second order filter, ORD is 2.
-
enumerator kSINC_PF_ThirdOrder#
Third order filter, ORD is 3.
-
enumerator kSINC_PF_FastSinc#
-
enum _sinc_clock_prescale#
The enumeration of clock prescale that specify the clock divider ratio for the modulator clock.
Values:
-
enumerator kSINC_ClkPrescale1#
No prescale.
-
enumerator kSINC_ClkPrescale2#
Modulator clock divider ratio is 2.
-
enumerator kSINC_ClkPrescale4#
Modulator clock divider ratio is 4.
-
enumerator kSINC_ClkPrescale8#
Modulator clock divider ratio is 8.
-
enumerator kSINC_ClkPrescale1#
-
enum _sinc_primary_filter_shift_direction#
The enumeration of primary filter shift direction.
Values:
-
enumerator kSINC_PF_ShiftRight#
Right shift the raw data.
-
enumerator kSINC_PF_ShiftLeft#
Left shift the raw data.
-
enumerator kSINC_PF_ShiftRight#
-
enum _sinc_primary_filter_bias_sign#
The enumeration of primary filer bias sign.
Values:
-
enumerator kSINC_PF_BiasPositive#
The bias sign is positive.
-
enumerator kSINC_PF_BiasNegative#
The bias sign is negative.
-
enumerator kSINC_PF_BiasPositive#
-
enum _sinc_primary_filter_hpf_alpha_coeff#
The enumeration of HPF DC remover Alpha coefficient.
Values:
-
enumerator kSINC_PF_HPFAlphaCoeff0#
Disabled HPF.
-
enumerator kSINC_PF_HPFAlphaCoeff1#
Alpha coefficient = 1 - (2^-5)
-
enumerator kSINC_PF_HPFAlphaCoeff2#
Alpha coefficient = 1 - (2^-6)
-
enumerator kSINC_PF_HPFAlphaCoeff3#
Alpha coefficient = 1 - (2^-7)
-
enumerator kSINC_PF_HPFAlphaCoeff4#
Alpha coefficient = 1 - (2^-8)
-
enumerator kSINC_PF_HPFAlphaCoeff5#
Alpha coefficient = 1 - (2^-9)
-
enumerator kSINC_PF_HPFAlphaCoeff6#
Alpha coefficient = 1 - (2^-10)
-
enumerator kSINC_PF_HPFAlphaCoeff7#
Alpha coefficient = 1 - (2^-11)
-
enumerator kSINC_PF_HPFAlphaCoeff8#
Alpha coefficient = 1 - (2^-12)
-
enumerator kSINC_PF_HPFAlphaCoeff9#
Alpha coefficient = 1 - (2^-13)
-
enumerator kSINC_PF_HPFAlphaCoeff10#
Alpha coefficient = 1 - (2^-14)
-
enumerator kSINC_PF_HPFAlphaCoeff11#
Alpha coefficient = 1 - (2^-15)
-
enumerator kSINC_PF_HPFAlphaCoeff12#
Alpha coefficient = 1 - (2^-16)
-
enumerator kSINC_PF_HPFAlphaCoeff13#
Alpha coefficient = 1 - (2^-17)
-
enumerator kSINC_PF_HPFAlphaCoeff14#
Alpha coefficient = 1 - (2^-18)
-
enumerator kSINC_PF_HPFAlphaCoeff15#
Alpha coefficient = 1 - (2^-19)
-
enumerator kSINC_PF_HPFAlphaCoeff0#
-
enum _sinc_inputBit_delay#
The enumeration of input bit delay.
Values:
-
enumerator kSINC_InputBit_DelayDisabled#
Input modulator bitstream delay disabled.
-
enumerator kSINC_InputBit_Delay1ClkCycle#
Input modulator bitstream delay 1 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay2ClkCycle#
Input modulator bitstream delay 2 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay3ClkCycle#
Input modulator bitstream delay 3 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay4ClkCycle#
Input modulator bitstream delay 4 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay5ClkCycle#
Input modulator bitstream delay 5 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay6ClkCycle#
Input modulator bitstream delay 6 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay7ClkCycle#
Input modulator bitstream delay 7 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay8ClkCycle#
Input modulator bitstream delay 8 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay9ClkCycle#
Input modulator bitstream delay 9 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay10ClkCycle#
Input modulator bitstream delay 10 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay11ClkCycle#
Input modulator bitstream delay 11 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay12ClkCycle#
Input modulator bitstream delay 12 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay13ClkCycle#
Input modulator bitstream delay 13 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay14ClkCycle#
Input modulator bitstream delay 14 PRE_CLK cycle.
-
enumerator kSINC_InputBit_Delay15ClkCycle#
Input modulator bitstream delay 15 PRE_CLK cycle.
-
enumerator kSINC_InputBit_DelayDisabled#
-
enum _sinc_scd_operate_mode#
The enumeration of short-circuit detector operate mode.
Values:
-
enumerator kSINC_Scd_OperateAtChannelEnabled#
SCD operates when the channel is enabled.
-
enumerator kSINC_Scd_OperateAtConversion#
SCD operates when the PF is performing a conversion.
-
enumerator kSINC_Scd_OperateDisabled#
Short circuit detect is disabled.
-
enumerator kSINC_Scd_OperateAtChannelEnabled#
-
enum _sinc_scd_option#
The enumeration of short-circuit detector option.
Values:
-
enumerator kSINC_Scd_DetectRepeating0And1#
Both repeating 0 and 1 increment the SCD counter.
-
enumerator kSINC_Scd_DetectRepeatingOnly1#
Only repeating 1 increment the SCD counter.
-
enumerator kSINC_Scd_DetectRepeatingOnly0#
Only repeating 1 increment the SCD counter.
-
enumerator kSINC_Scd_DetectRepeating0And1#
-
enum _sinc_limit_detector_mode#
The mode of limit detector.
Note
The value of each limit detector contains lot of information: bit[1:0]: limit detection options, bit[2]: low limit break signal. bit[3]: window limit break signal. bit[4]: High limit break signal. bit[7]: Enable/disable limit detector.
Values:
-
enumerator kSINC_Lmt_BothHighAndLowLimit#
Limit detector is enabled, and compare the filter sample value to high and low limit, if the value larger than high limit will trigger interrupt or break, and if the value lower than low limit will trigger interrupt or break.
-
enumerator kSINC_Lmt_OnlyHighLimit#
Limit detector is enabled, and compare the filter sample value to high limit, if the value larger than high limit will trigger interrupt or break.
-
enumerator kSINC_Lmt_OnlyLowLimit#
Limit detector is enabled, and compare the filter sample value to low limit, if the value lower than low limit will trigger interrupt or break.
-
enumerator kSINC_Lmt_WindowedValue#
Limit detector is enabled, and compare the filter sample value to high and low limit, if the value higher than low limit and lower than high limit will trigger interrupt or break.
-
enumerator kSINC_Lmt_Disabled#
Limit detector is disabled.
-
enumerator kSINC_Lmt_BothHighAndLowLimit#
-
enum _sinc_cad_threshold#
The enumeration of clock-absence threshold.
Values:
-
enumerator kSINC_Cad_Disabled#
Clock absence detector is disabled.
-
enumerator kSINC_Cad_Count1ClkCycle#
Clock absence detector threshold is 1 clock cycle.
-
enumerator kSINC_Cad_Count2ClkCycle#
Clock absence detector threshold is 2 clock cycle.
-
enumerator kSINC_Cad_Count3ClkCycle#
Clock absence detector threshold is 3 clock cycle.
-
enumerator kSINC_Cad_Count4ClkCycle#
Clock absence detector threshold is 4 clock cycle.
-
enumerator kSINC_Cad_Count5ClkCycle#
Clock absence detector threshold is 5 clock cycle.
-
enumerator kSINC_Cad_Count6ClkCycle#
Clock absence detector threshold is 6 clock cycle.
-
enumerator kSINC_Cad_Count7ClkCycle#
Clock absence detector threshold is 7 clock cycle.
-
enumerator kSINC_Cad_Count8ClkCycle#
Clock absence detector threshold is 8 clock cycle.
-
enumerator kSINC_Cad_Count9ClkCycle#
Clock absence detector threshold is 9 clock cycle.
-
enumerator kSINC_Cad_Count10ClkCycle#
Clock absence detector threshold is 10 clock cycle.
-
enumerator kSINC_Cad_Count11ClkCycle#
Clock absence detector threshold is 11 clock cycle.
-
enumerator kSINC_Cad_Count12ClkCycle#
Clock absence detector threshold is 12 clock cycle.
-
enumerator kSINC_Cad_Count13ClkCycle#
Clock absence detector threshold is 13 clock cycle.
-
enumerator kSINC_Cad_Count14ClkCycle#
Clock absence detector threshold is 14 clock cycle.
-
enumerator kSINC_Cad_Count15ClkCycle#
Clock absence detector threshold is 15 clock cycle.
-
enumerator kSINC_Cad_Disabled#
-
enum _sinc_alternate_dma_source#
The enumeration of alternate DMA source.
Values:
-
enumerator kSINC_AltDma_Disabled#
Alternate DMA disabled.
-
enumerator kSINC_AltDma_PfConvComplete#
Select PF conversion complete for alternate DMA.
-
enumerator kSINC_AltDma_PfDataOutputReady#
Select PF data output ready for alternate DMA.
-
enumerator kSINC_AltDma_ZeroCrossDetected#
Select zero crossing detected for alternate DMA.
-
enumerator kSINC_AltDma_ShortCircuitDetected#
Select short circuit detected for alternate DMA.
-
enumerator kSINC_AltDma_WindowLimitDetected#
Select window limit detected for alternate DMA.
-
enumerator kSINC_AltDma_LowLimitDetected#
Select low limit detected for alternate DMA.
-
enumerator kSINC_AltDma_HighLimitDetected#
Select high limit detected for alternate DMA.
-
enumerator kSINC_AltDma_FifoUnderflow#
Select FIFO underflow detected for alternate DMA.
-
enumerator kSINC_AltDma_FifoOverflow#
Select FIFO overflow detected for alternate DMA.
-
enumerator kSINC_AltDma_ClockAbsence#
Select clock absence detected for alternate DMA.
-
enumerator kSINC_AltDma_Saturation#
Select channel saturation for alternate DMA.
-
enumerator kSINC_AltDma_Disabled#
-
enum _sinc_result_data_format#
The enumeration of result data format.
Values:
-
enumerator kSINC_LeftJustifiedSigned#
Left justified, signed.
-
enumerator kSINC_LeftJustifiedUnsigned#
Left justified, unsigned.
-
enumerator kSINC_LeftJustifiedSigned#
-
enum _sinc_debug_output#
The enumeration of debug output.
Values:
-
enumerator kSINC_Debug_PfFinalData#
Final data from PF(24 bits).
-
enumerator kSINC_Debug_OffsetData#
Offset data(24 bits).
-
enumerator kSINC_Debug_PfShiftedData#
Shifted data from the PF(24 bits).
-
enumerator kSINC_Debug_HpfData#
DC remover(HPF) data(32 bits).
-
enumerator kSINC_Debug_CicRawData#
Raw data from the PF’s CIC filter.
-
enumerator kSINC_Debug_ScdHistoricalData#
Historical data from SCD.
-
enumerator kSINC_Debug_ManchesterDecoderData#
Data from the Manchester decoder.
-
enumerator kSINC_Debug_CadData#
Data from CAD.
-
enumerator kSINC_Debug_FifoEntriesNum#
Number of available entries in the FIFO.
-
enumerator kSINC_Debug_ParallelSerialConverterStatus#
Status of the parallel or serial data converter.
-
enumerator kSINC_Debug_PfFinalData#
-
typedef enum _sinc_channel_id sinc_channel_id_t#
The enumeration of channel id, the sinc module contains 4 channels.
-
typedef enum _sinc_inputClk_source sinc_inputClk_source_t#
The enumeration of input clock.
-
typedef enum _sinc_inputClk_edge sinc_inputClk_edge_t#
The enumeration of clock edge.
-
typedef enum _sinc_inputBit_format sinc_inputBit_format_t#
The enumeration of input bit format.
-
typedef enum _sinc_inputBit_source sinc_inputBit_source_t#
The enumeration of input bit source.
-
typedef enum _sinc_conv_trigger_source sinc_conv_trigger_source_t#
The enumeration of trigger source.
-
typedef enum _sinc_conv_mode sinc_conv_mode_t#
The enumeration of conversion mode.
-
typedef enum _sinc_pulse_trigger_mux sinc_pulse_trigger_mux_t#
The enumeration of pulse trigger mux.
-
typedef enum _sinc_zero_cross_operate_mode sinc_zero_cross_operate_mode_t#
The enumeration of zero cross detector operate mode.
-
typedef enum _sinc_primary_filter_order sinc_primary_filter_order_t#
The enumeration of primary filter order.
-
typedef enum _sinc_clock_prescale sinc_clock_prescale_t#
The enumeration of clock prescale that specify the clock divider ratio for the modulator clock.
-
typedef enum _sinc_primary_filter_shift_direction sinc_primary_filter_shift_direction_t#
The enumeration of primary filter shift direction.
-
typedef enum _sinc_primary_filter_bias_sign sinc_primary_filter_bias_sign_t#
The enumeration of primary filer bias sign.
-
typedef enum _sinc_primary_filter_hpf_alpha_coeff sin_primary_filter_hpf_alpha_coeff_t#
The enumeration of HPF DC remover Alpha coefficient.
-
typedef enum _sinc_inputBit_delay sinc_inputBit_delay_t#
The enumeration of input bit delay.
-
typedef enum _sinc_scd_operate_mode sinc_scd_operate_mode_t#
The enumeration of short-circuit detector operate mode.
-
typedef enum _sinc_scd_option sinc_scd_option_t#
The enumeration of short-circuit detector option.
-
typedef enum _sinc_limit_detector_mode sinc_limit_detector_mode_t#
The mode of limit detector.
Note
The value of each limit detector contains lot of information: bit[1:0]: limit detection options, bit[2]: low limit break signal. bit[3]: window limit break signal. bit[4]: High limit break signal. bit[7]: Enable/disable limit detector.
-
typedef enum _sinc_cad_threshold sinc_cad_threshold_t#
The enumeration of clock-absence threshold.
-
typedef enum _sinc_alternate_dma_source sinc_alternate_dma_source_t#
The enumeration of alternate DMA source.
-
typedef enum _sinc_result_data_format sinc_result_data_format_t#
The enumeration of result data format.
-
typedef enum _sinc_debug_output sinc_debug_output_t#
The enumeration of debug output.
-
typedef struct _sinc_channel_input_option sinc_channel_input_option_t#
The structure of channel input options, including input bit settings and input clock settings.
-
typedef struct _sinc_channel_conv_option sinc_channel_conv_option_t#
The structure of channel conversion options, including CIC filter settings, HPF settings, shift settings, bias settings and so on.
-
typedef struct _sinc_channel_protection_option 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.
-
typedef struct _sinc_channel_config sinc_channel_config_t#
The structure of channel configurations, including channel input option, channel conversion options, channel protection options, and so on.
-
typedef struct _sinc_config sinc_config_t#
The structure of sinc configurations, including clock settings anc channels’ settings.
-
SINC_CHANNEL_COUNT#
-
SINC_NORMAL_INT_REG_ID#
-
SINC_NORMAL_INT_NAME_COCIE#
-
SINC_NORMAL_INT_NAME_CHFIE#
-
SINC_NORMAL_INT_NAME_ZCDIE#
-
SINC_ERROR_INT_REG_ID#
-
SINC_ERROR_INT_NAME_SCDIE#
-
SINC_ERROR_INT_NAME_WLMTIE#
-
SINC_ERROR_INT_NAME_LLMTIE#
-
SINC_ERROR_INT_NAME_HLMTIE#
-
SINC_FIFO_CAD_INT_REG_ID#
-
SINC_FIFO_CAD_INT_FUNFIE#
-
SINC_FIFO_CAD_INT_FOVFIE#
-
SINC_FIFO_CAD_INT_CADIE#
-
SINC_FIFO_CAD_INT_SATIE#
-
SINC_ENCODE_INTERRUPT(regId, name, channelId)#
-
SINC_DECODE_INTERRUPT(interruptMask)#
-
SINC_FIND_INT_FIELD_VALUE(mask, name)#
-
SINC_FIND_STATUS_FIELD_VALUE(statusValue, name)#
-
struct _sinc_channel_input_option#
- #include <fsl_sinc.h>
The structure of channel input options, including input bit settings and input clock settings.
Public Members
-
sinc_inputBit_format_t inputBitFormat#
Specify input bit format, please refer to sinc_inputBit_format_t.
-
sinc_inputBit_source_t inputBitSource#
Specify input bit source, please refer to sinc_inputBit_source_t.
-
sinc_inputBit_delay_t inputBitDelay#
Specify input bit delay, please refer to sinc_inputBit_delay_t.
-
sinc_inputClk_source_t inputClkSource#
Specify input clock source, please refer to sinc_inputClk_source_t.
-
sinc_inputClk_edge_t inputClkEdge#
Specify input clock edge, please refer to sinc_inputClk_edge_t.
-
sinc_inputBit_format_t inputBitFormat#
-
struct _sinc_channel_conv_option#
- #include <fsl_sinc.h>
The structure of channel conversion options, including CIC filter settings, HPF settings, shift settings, bias settings and so on.
Public Members
-
sinc_conv_mode_t convMode#
Specify conversion mode, please refer to sinc_conv_mode_t.
-
sinc_conv_trigger_source_t convTriggerSource#
Specify conversion trigger source, please refer to sinc_conv_trigger_source_t.
-
bool enableChPrimaryFilter#
Enable/disable channel’s primary filter.
-
sinc_primary_filter_order_t pfOrder#
Specify the order of primary filter, please refer to sinc_primary_filter_order_t.
-
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. Please note that the OSR for equation is u16pfOverSampleRatio + 1
-
sin_primary_filter_hpf_alpha_coeff_t pfHpfAlphaCoeff#
Specify HPF’s alpha coeff, please refer to sin_primary_filter_hpf_alpha_coeff_t.
-
sinc_primary_filter_shift_direction_t pfShiftDirection#
Select shift direction, right or left.
-
uint8_t u8pfShiftBitsNum#
Specify the number of bits to shift the data, ranges from 0 to 15.
-
sinc_primary_filter_bias_sign_t pfBiasSign#
Select bias sign, please refer to sinc_primary_filter_bias_sign_t.
-
uint32_t u32pfBiasValue#
Range from 0 to 0x7FFFFFUL.
-
sinc_conv_mode_t convMode#
-
struct _sinc_channel_protection_option#
- #include <fsl_sinc.h>
The structure of channel protection options, including limit check settings, short-circuit settings, clock-absence settings, and zero-crossing settings.
Public Members
-
sinc_limit_detector_mode_t limitDetectorMode#
Specify limit detector mode, please refer to sinc_limit_detector_mode_t.
-
bool bEnableLmtBreakSignal#
Enable/disable limit break signal, the details of break signal is depended on detector mode.
-
uint32_t u32LowLimitThreshold#
Specify the low-limit threshold value, range from 0 to 0xFFFFFFUL.
-
uint32_t u32HighLimitThreshold#
Specify the high-limit threshold value, range from 0 to 0xFFFFFFUL.
-
sinc_scd_operate_mode_t scdOperateMode#
Enable/disable scd, and set SCD operate timming.
-
uint8_t u8ScdLimitThreshold#
Range from 2 to 255, 0 and 1 are prohibited.
-
sinc_scd_option_t scdOption#
Specify SCD options, please refer to sinc_scd_option_t.
-
bool bEnableScdBreakSignal#
Enable/disable SCD break signal.
-
sinc_cad_threshold_t cadLimitThreshold#
Specify the threshold value for the CAD counter.
-
bool bEnableCadBreakSignal#
Enable/disable CAD break signal.
-
sinc_zero_cross_operate_mode_t zcdOperateMode#
Specify zero cross detector operate mode.
-
sinc_limit_detector_mode_t limitDetectorMode#
-
struct _sinc_channel_config#
- #include <fsl_sinc.h>
The structure of channel configurations, including channel input option, channel conversion options, channel protection options, and so on.
Public Members
-
bool bEnableChannel#
Enable/disable channel.
-
bool bEnableFifo#
Enable/disable channel’s FIFO.
-
uint8_t u8FifoWaterMark#
Specify the fifo watermark, range from 0 to 15.
-
bool bEnablePrimaryDma#
Used to enable/disable primary DMA.
-
sinc_alternate_dma_source_t altDmaSource#
Set channel’s alternate DMA source, please refer to sinc_alternate_dma_source_t.
-
sinc_result_data_format_t dataFormat#
Set channel’s result data format, please refer to sinc_result_data_format_t.
-
sinc_channel_input_option_t *chInputOption#
The pointer to sinc_channel_input_option_t that contains channel input options.
-
sinc_channel_conv_option_t *chConvOption#
The pointer to sinc_channel_conv_option_t that contains channel conversion options.
-
sinc_channel_protection_option_t *chProtectionOption#
The pointer to sinc_channel_protection_option_t that contains channel protection options.
-
bool bEnableChannel#
-
struct _sinc_config#
- #include <fsl_sinc.h>
The structure of sinc configurations, including clock settings anc channels’ settings.
Public Members
-
sinc_clock_prescale_t clockPreDivider#
Specify modulator clock pre divider, please refer to sinc_clock_prescale_t.
-
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.
-
bool disableModClk1Output#
Disable/enable modulator clock1 output.
-
bool disableModClk2Output#
Disable/enable modulator clock2 output.
-
sinc_channel_config_t *channelsConfigArray[(1)]#
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.
-
bool disableDozeMode#
Disable/enable SINC module when the chip enters Doze or stop mode.
-
bool enableMaster#
Enable/disable all function blocks of SINC module.
-
sinc_clock_prescale_t clockPreDivider#
Soc_mipi_dsi#
-
FSL_SOC_MIPI_DSI_DRIVER_VERSION#
Driver version 2.0.0.
-
DSI_DPHY_PLL_VCO_MAX#
-
DSI_DPHY_PLL_VCO_MIN#
-
FSL_COMPONENT_ID
Spdif#
-
status_t SPDIF_Init(SPDIF_Type *base, const spdif_config_t *config)#
Initializes the SPDIF peripheral.
- Parameters:
base – SPDIF base pointer
config – SPDIF configuration structure.
- Return values:
kStatus_Success – Initialization successful
kStatus_InvalidArgument – Invalid argument passed
-
void SPDIF_Deinit(SPDIF_Type *base)#
De-initializes the SPDIF peripheral.
- Parameters:
base – SPDIF base pointer
-
void SPDIF_GetDefaultConfig(spdif_config_t *config)#
Sets the SPDIF configuration structure to default values.
- Parameters:
config – pointer to configuration structure
-
static inline uint32_t SPDIF_GetStatusFlags(SPDIF_Type *base)#
Gets the SPDIF status flag state.
- Parameters:
base – SPDIF base pointer
- Returns:
The status flag, can be a single flag or several flags in _spdif_status_flag.
-
static inline void SPDIF_ClearStatusFlags(SPDIF_Type *base, uint32_t mask)#
Clears the SPDIF status flags.
- Parameters:
base – SPDIF base pointer
mask – The status flags to clear, can be a single flag or several flags in _spdif_status_flag.
-
static inline void SPDIF_EnableInterrupts(SPDIF_Type *base, uint32_t mask)#
Enables SPDIF interrupts according to the provided mask.
- Parameters:
base – SPDIF base pointer
mask – The interrupts to enable, can be a single interrupt or several interrupts in _spdif_interrupt_enable.
-
static inline void SPDIF_DisableInterrupts(SPDIF_Type *base, uint32_t mask)#
Disables SPDIF interrupts according to the provided mask.
- Parameters:
base – SPDIF base pointer
mask – The interrupts to disable, can be a single interrupt or several interrupts in _spdif_interrupt_enable.
-
uint32_t SPDIF_GetTxFifoAddress(SPDIF_Type *base)#
Gets the SPDIF TX FIFO address for DMA transfer.
- Parameters:
base – SPDIF base pointer
- Returns:
TX FIFO address
-
uint32_t SPDIF_GetRxFifoAddress(SPDIF_Type *base)#
Gets the SPDIF RX FIFO address for DMA transfer.
- Parameters:
base – SPDIF base pointer
- Returns:
RX FIFO address
-
void SPDIF_TxEnable(SPDIF_Type *base, bool enable)#
Enables/disables the SPDIF Tx.
- Parameters:
base – SPDIF base pointer
enable – True means enable SPDIF Tx, false means disable.
-
void SPDIF_RxEnable(SPDIF_Type *base, bool enable)#
Enables/disables the SPDIF Rx.
- Parameters:
base – SPDIF base pointer
enable – True means enable SPDIF Rx, false means disable.
-
status_t SPDIF_TxSetSampleRate(SPDIF_Type *base, uint32_t sampleRate_Hz, uint32_t sourceClockFreq_Hz)#
Configures the SPDIF Tx sample rate.
- Parameters:
base – SPDIF base pointer.
sampleRate_Hz – SPDIF sample rate frequency in Hz.
sourceClockFreq_Hz – SPDIF tx clock source frequency in Hz.
- Return values:
kStatus_Success – Sample rate set successfully
kStatus_InvalidArgument – Invalid sample rate or clock frequency
-
uint32_t SPDIF_GetRxSampleRate(SPDIF_Type *base, uint32_t clockSourceFreq_Hz)#
Gets the SPDIF Rx sample rate.
- Parameters:
base – SPDIF base pointer.
clockSourceFreq_Hz – SPDIF system clock frequency in hz.
- Returns:
Sample rate in Hz.
-
status_t SPDIF_WriteBlocking(SPDIF_Type *base, const uint8_t *buffer, uint32_t size)#
Sends data using a blocking method.
- Parameters:
base – SPDIF base pointer.
buffer – Pointer to the data to be written.
size – Bytes to be written.
- Return values:
kStatus_Success – Data sent successfully
kStatus_InvalidArgument – Invalid buffer or size
-
status_t SPDIF_ReadBlocking(SPDIF_Type *base, uint8_t *buffer, uint32_t size)#
Receives data using a blocking method.
- Parameters:
base – SPDIF base pointer.
buffer – Pointer to the data to be read.
size – Bytes to be read.
- Return values:
kStatus_Success – Data received successfully
kStatus_InvalidArgument – Invalid buffer or size
-
void SPDIF_CopyRxChannelStatusToTx(SPDIF_Type *base)#
Copies received channel-status words into the transmit channel-status registers.
- Parameters:
base – SPDIF base pointer.
-
void SPDIF_TransferTxCreateHandle(SPDIF_Type *base, spdif_handle_t *handle, spdif_transfer_callback_t callback, void *userData)#
Initializes the SPDIF Tx handle.
- Parameters:
base – SPDIF base pointer
handle – SPDIF handle pointer.
callback – Pointer to the user callback function.
userData – User parameter passed to the callback function
-
void SPDIF_TransferRxCreateHandle(SPDIF_Type *base, spdif_handle_t *handle, spdif_transfer_callback_t callback, void *userData)#
Initializes the SPDIF Rx handle.
- Parameters:
base – SPDIF base pointer.
handle – SPDIF handle pointer.
callback – Pointer to the user callback function.
userData – User parameter passed to the callback function.
-
status_t SPDIF_TransferSendNonBlocking(SPDIF_Type *base, spdif_handle_t *handle, const spdif_transfer_t *xfer)#
Performs an interrupt non-blocking send transfer on SPDIF.
- Parameters:
base – SPDIF base pointer.
handle – Pointer to the spdif_handle_t structure which stores the transfer state.
xfer – Pointer to the spdif_transfer_t structure.
- Return values:
kStatus_Success – Successfully started the data receive.
kStatus_SPDIF_TxBusy – Previous receive still not finished.
kStatus_InvalidArgument – The input parameter is invalid.
-
status_t SPDIF_TransferReceiveNonBlocking(SPDIF_Type *base, spdif_handle_t *handle, const spdif_transfer_t *xfer)#
Performs an interrupt non-blocking receive transfer on SPDIF.
- Parameters:
base – SPDIF base pointer
handle – Pointer to the spdif_handle_t structure which stores the transfer state.
xfer – Pointer to the spdif_transfer_t structure.
- Return values:
kStatus_Success – Successfully started the data receive.
kStatus_SPDIF_RxBusy – Previous receive still not finished.
kStatus_InvalidArgument – The input parameter is invalid.
-
void SPDIF_TransferAbortSend(SPDIF_Type *base, spdif_handle_t *handle)#
Aborts the current send.
- Parameters:
base – SPDIF base pointer.
handle – Pointer to the spdif_handle_t structure which stores the transfer state.
-
void SPDIF_TransferAbortReceive(SPDIF_Type *base, spdif_handle_t *handle)#
Aborts the current receive.
- Parameters:
base – SPDIF base pointer
handle – Pointer to the spdif_handle_t structure which stores the transfer state.
-
status_t SPDIF_TransferGetSendCount(SPDIF_Type *base, spdif_handle_t *handle, size_t *count)#
Gets a set byte count.
- Parameters:
base – SPDIF base pointer.
handle – Pointer to the spdif_handle_t structure which stores the transfer state.
count – Bytes count sent.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
status_t SPDIF_TransferGetReceiveCount(SPDIF_Type *base, spdif_handle_t *handle, size_t *count)#
Gets a received byte count.
- Parameters:
base – SPDIF base pointer.
handle – Pointer to the spdif_handle_t structure which stores the transfer state.
count – Bytes count received.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
void SPDIF_TransferTxHandleIRQ(SPDIF_Type *base, spdif_handle_t *handle)#
Tx interrupt handler.
- Parameters:
base – SPDIF base pointer.
handle – Pointer to the spdif_handle_t structure.
-
void SPDIF_TransferRxHandleIRQ(SPDIF_Type *base, spdif_handle_t *handle)#
Rx interrupt handler.
- Parameters:
base – SPDIF base pointer.
handle – Pointer to the spdif_handle_t structure.
-
FSL_SPDIF_DRIVER_VERSION#
SPDIF driver version.
-
enum _spdif_interrupt_enable#
SPDIF interrupt enable flags.
These flags are used to enable specific interrupts in the SPDIF transceiver. Multiple flags can be combined using bitwise OR operations.
Values:
-
enumerator kSPDIF_NewChannelStatusInterrupt#
New channel status received interrupt
-
enumerator kSPDIF_UserDataInterrupt#
User data received interrupt
-
enumerator kSPDIF_MuteDetectInterrupt#
Mute condition detected interrupt
-
enumerator kSPDIF_PreambleMismatchInterrupt#
Preamble mismatch detected interrupt
-
enumerator kSPDIF_FifoOverflowUnderflowInterrupt#
FIFO overflow or underflow error interrupt
-
enumerator kSPDIF_RxNoDataInterrupt#
No data received on RX interrupt
-
enumerator kSPDIF_DmaReadRequestInterrupt#
DMA read request interrupt
-
enumerator kSPDIF_DmaWriteRequestInterrupt#
DMA write request interrupt
-
enumerator kSPDIF_RxBmeErrorInterrupt#
RX data BME (Bi-phase Mark Encoding) error interrupt
-
enumerator kSPDIF_PreambleMatchInterrupt#
Preamble match detected interrupt
-
enumerator kSPDIF_MWPreambleMismatchInterrupt#
M/W preamble mismatch interrupt
-
enumerator kSPDIF_BPreambleMismatchInterrupt#
B preamble mismatch interrupt
-
enumerator kSPDIF_UnexpectedPreambleInterrupt#
Unexpected preamble received interrupt
-
enumerator kSPDIF_ChannelStatusOverflowInterrupt#
Channel status or user data overflow interrupt
-
enumerator kSPDIF_NewBlockReceivedInterrupt#
New block received interrupt
-
enumerator kSPDIF_WakeupInterrupt#
SPDIF wakeup interrupt
-
enumerator kSPDIF_AllInterrupt#
All interrupts combined mask
-
enumerator kSPDIF_NewChannelStatusInterrupt#
-
enum _spdif_status_flag#
SPDIF status flags.
These flags indicate the current status of various SPDIF transceiver conditions. They can be read to determine the state of the hardware and are typically cleared after being processed.
Values:
-
enumerator kSPDIF_RxNewChannelStatus#
New channel status received flag
-
enumerator kSPDIF_RxUserData#
User data received flag
-
enumerator kSPDIF_MuteDetected#
Mute condition detected flag
-
enumerator kSPDIF_PreambleMismatch#
Preamble mismatch detected flag
-
enumerator kSPDIF_FifoOverflowUnderflow#
FIFO overflow or underflow error flag
-
enumerator kSPDIF_RxNoDataReceived#
No data received on RX flag
-
enumerator kSPDIF_DmaReadRequest#
DMA read request flag
-
enumerator kSPDIF_DmaWriteRequest#
DMA write request flag
-
enumerator kSPDIF_RxBmeError#
RX BME (Bi-phase Mark Encoding) bit error flag
-
enumerator kSPDIF_PreambleMatch#
Preamble match detected flag
-
enumerator kSPDIF_MWPreambleMismatch#
M/W preamble mismatch flag
-
enumerator kSPDIF_BPreambleMismatch#
B preamble mismatch flag
-
enumerator kSPDIF_UnexpectedPreamble#
Unexpected preamble received flag
-
enumerator kSPDIF_ChannelStatusOverflow#
Channel status or user data overflow flag
-
enumerator kSPDIF_NewBlockReceived#
New block received flag
-
enumerator kSPDIF_WakeupReceived#
SPDIF wakeup received flag
-
enumerator kSPDIF_RxNewChannelStatus#
-
enum _spdif_status#
SPDIF status return codes.
Values:
-
enumerator kStatus_SPDIF_RxIdle#
SPDIF RX is idle
-
enumerator kStatus_SPDIF_TxIdle#
SPDIF TX is idle
-
enumerator kStatus_SPDIF_RxBusy#
SPDIF RX is busy
-
enumerator kStatus_SPDIF_TxBusy#
SPDIF TX is busy
-
enumerator kStatus_SPDIF_QueueFull#
SPDIF queue is full
-
enumerator kStatus_SPDIF_RxError#
SPDIF RX error
-
enumerator kStatus_SPDIF_RxFIFOError#
SPDIF RX FIFO error
-
enumerator kStatus_SPDIF_RxCnew#
SPDIF RX channel status new
-
enumerator kStatus_SPDIF_RxUserData#
SPDIF RX user data
-
enumerator kStatus_SPDIF_RxParityError#
SPDIF RX parity error
-
enumerator kStatus_SPDIF_RxIllegalSymbol#
SPDIF RX illegal symbol
-
enumerator kStatus_SPDIF_RxDPLLLocked#
SPDIF RX DPLL locked
-
enumerator kStatus_SPDIF_RxIdle#
-
enum _spdif_data_format#
SPDIF data format.
Values:
-
enumerator kSPDIF_DataFormat_SubFrame#
Raw sub-frame format
-
enumerator kSPDIF_DataFormat_24Bit#
24-bit audio data
-
enumerator kSPDIF_DataFormat_20Bit#
20-bit audio data
-
enumerator kSPDIF_DataFormat_16Bit#
16-bit audio data
-
enumerator kSPDIF_DataFormat_SubFrame#
-
enum _spdif_fsm_mode#
SPDIF frame synchronization mode.
Values:
-
enumerator kSPDIF_FSM_SyncToB#
Sync to B preamble
-
enumerator kSPDIF_FSM_SyncToM#
Sync to M preamble
-
enumerator kSPDIF_FSM_SyncToMW#
Sync to M/W preambles
-
enumerator kSPDIF_FSM_Reserved#
Reserved
-
enumerator kSPDIF_FSM_SyncToB#
-
enum _spdif_tx_format#
SPDIF transmit format.
Values:
-
enumerator kSPDIF_TxFormat_SubFrame#
Complete sub-frame format
-
enumerator kSPDIF_TxFormat_24Bit#
24-bit raw data
-
enumerator kSPDIF_TxFormat_20Bit#
20-bit raw data
-
enumerator kSPDIF_TxFormat_16Bit#
16-bit raw data
-
enumerator kSPDIF_TxFormat_SubFrame#
-
enum _spdif_wakeup_toggle_count#
SPDIF wakeup toggle count.
Values:
-
enumerator kSPDIF_WakeupToggle_1#
1 toggle
-
enumerator kSPDIF_WakeupToggle_2#
2 toggles
-
enumerator kSPDIF_WakeupToggle_3#
3 toggles
-
enumerator kSPDIF_WakeupToggle_4#
4 toggles
-
enumerator kSPDIF_WakeupToggle_5#
5 toggles
-
enumerator kSPDIF_WakeupToggle_6#
6 toggles
-
enumerator kSPDIF_WakeupToggle_7#
7 toggles
-
enumerator kSPDIF_WakeupToggle_8#
8 toggles
-
enumerator kSPDIF_WakeupToggle_1#
-
typedef enum _spdif_data_format spdif_data_format_t#
SPDIF data format.
-
typedef enum _spdif_fsm_mode spdif_fsm_mode_t#
SPDIF frame synchronization mode.
-
typedef enum _spdif_tx_format spdif_tx_format_t#
SPDIF transmit format.
-
typedef enum _spdif_wakeup_toggle_count spdif_wakeup_toggle_count_t#
SPDIF wakeup toggle count.
-
typedef struct _spdif_config spdif_config_t#
SPDIF configuration structure.
-
typedef struct _spdif_transfer spdif_transfer_t#
SPDIF transfer structure.
-
typedef struct _spdif_handle spdif_handle_t#
SPDIF handle typedef.
-
typedef void (*spdif_transfer_callback_t)(SPDIF_Type *base, spdif_handle_t *handle, status_t status, void *userData)#
SPDIF transfer callback typedef.
-
AUDIO_XCVR_XFER_QUEUE_SIZE#
SPDIF transfer queue size, user can refine it according to use case.
-
AUDIO_XCVR_FIFO_SIZE#
SPDIF FIFO depth.
-
AUDIO_XCVR_MAX_SAMPLE_RATE#
SPDIF maximum sample rate.
-
AUDIO_XCVR_MIN_SAMPLE_RATE#
SPDIF minimum sample rate.
-
AUDIO_XCVR_MAX_CLOCK_DIVIDER#
SPDIF maximum clock divider.
-
AUDIO_XCVR_MAX_FIFO_WATERMARK#
SPDIF maximum FIFO watermark.
-
struct _spdif_config#
- #include <fsl_spdif.h>
SPDIF configuration structure.
Public Members
-
bool enableRx#
Enable receiver
-
spdif_data_format_t rxDataFormat#
Receiver data format
-
spdif_fsm_mode_t rxFsmMode#
Frame synchronization mode
-
bool rxStoreFormatReverse#
Store format in reverse bit order
-
bool enableRxParityCheck#
Enable parity check
-
bool rxMuteHwControl#
Hardware mute control
-
uint8_t rxFifoWatermark#
RX FIFO watermark level
-
bool enableTx#
Enable transmitter
-
spdif_tx_format_t txFormat#
Transmitter data format
-
bool txFrameFormatReverse#
Frame format in reverse bit order
-
bool enableTxPreamble#
Enable preamble insertion
-
bool enableTxParity#
Enable parity insertion
-
bool enableTxChannelStatus#
Enable channel status insertion
-
bool enableTxUserData#
Enable user data insertion
-
bool enableTxValidBit#
Enable valid bit insertion
-
bool txValidBitValue#
Valid bit value
-
uint8_t txFifoWatermark#
TX FIFO watermark level
-
uint32_t clockDivider#
Clock divider value
-
bool enableWakeup#
Enable wakeup functionality
-
spdif_wakeup_toggle_count_t wakeupToggleCount#
Wakeup toggle count
-
bool enableRx#
-
struct _spdif_transfer#
- #include <fsl_spdif.h>
SPDIF transfer structure.
-
struct _spdif_handle#
- #include <fsl_spdif.h>
SPDIF handle structure.
Public Members
-
spdif_transfer_t spdifQueue[(4U)]#
Transfer queue
-
size_t transferSize[(4U)]#
Transfer size
-
volatile uint8_t queueUser#
Queue user index
-
volatile uint8_t queueDriver#
Queue driver index
-
spdif_transfer_callback_t callback#
Callback function
-
void *userData#
User data
-
uint8_t watermark#
Watermark level
-
volatile uint32_t state#
Transfer state
-
spdif_transfer_t spdifQueue[(4U)]#
SRAMC: SRAMC Driver#
-
void SRAMC_GetDefaultConfig(sramc_config_t *config)#
Gets the default configuration for the SRAMC.
This function initializes the sramc_config_t structure with default values. The default value are:
config->chipSelect = kSRAMC_ChipSelect0 | kSRAMC_ChipSelect1; config->funcClkAlwaysOn = true; config->busTimeoutCounter = 0U; config->busTimeoutEnable = false; config->advPolarity = kSRAMC_AdvActiveLow; config->addressMode = kSRAMC_AddressDataMux; config->portSize = kSRAMC_PortSize16Bit; config->prescaler = kSRAMC_Prescaler_4; config->turnaroundTime = 1U; config->addressHoldTime = 1U; config->addressSetupTime = 4U; config->ceHoldTime = 1U; config->ceSetupTime = 1U; config->readEnableHighTime = 9U; config->readEnableLowTime = 0x10U; config->writeEnableHighTime = 0xAU; config->writeEnableLowTime = 0x1FU; config->waitModeEnable = true; config->waitPolarity = kSRAMC_WaitActiveLow; config->waitPinMux = kSRAMC_WaitPinMux_0; config->waitMode = kSRAMC_WaitMode_Edge;
- Parameters:
config – Pointer to the sramc_config_t structure to be initialized.
-
void SRAMC_Init(AHB_SRAMC_Type *base, const sramc_config_t *config)#
Initializes the SRAMC peripheral.
This function configures the SRAMC controller based on the provided configuration.
- Parameters:
base – Pointer to the AHB SRMAC module instance structure.
config – Pointer to the SRAMC configuration structure (sramc_config_t).
-
void SRAMC_Deinit(AHB_SRAMC_Type *base)#
De-initializes the SRAMC peripheral.
This function resets the SRAMC configuration registers to their reset values.
- Parameters:
base – Pointer to the AHB SRMAC module instance structure.
-
static inline void SRAMC_LockRegisters(AHB_SRAMC_Type *base, bool locked)#
Lock SRAMC registers.
- Parameters:
base – AHB SRMAC module instance structure.
locked – If true, all the SRAMC registers are not allowed to write except Lock register. If false, all the SRAMC registers are allowed to write.
-
status_t SRAMC_CalculateTimingValue(uint32_t hclkFreqHz, uint32_t time_ns, uint32_t prescalerValue, bool addOneCycle, uint8_t fieldWidth, uint32_t *result)#
Calculates the SRAMC register timing field value from nanoseconds.
This helper function converts a time duration specified in nanoseconds (
time_ns) into the corresponding register field value based on the SRAMC functional clock frequency (hclkFreqHz) and the selected prescaler (prescalerValue, corresponding to SRAMCR1[PRE] setting 0-3). It accounts for the ‘+1’ logic required by some timing fields (e.g., REL, REH, WEL, WEH, AH, TA) as specified in the reference manual. It also checks if the calculated value fits within the specified bit-width of the target register field.- Parameters:
hclkFreqHz – Frequency of the hclk clock source for SRAMC in Hz.
time_ns – Desired time duration in nanoseconds.
prescalerValue – The value written to the SRAMCR1[PRE] field (0=1 cycle, 1=2 cycles, 2=3 cycles, 3=4 cycles granularity).
addOneCycle – Set to
trueif the register field represents (N+1) * granularity (e.g., for REL, REH, etc.),falseotherwise (e.g., for CES, CEH).fieldWidth – The number of bits available for the target register field (e.g., 6 for WEL, 4 for CEH).
result – Pointer to store the calculated register field value.
- Returns:
kStatus_Success: Calculation successful.kStatus_InvalidArgument: IfhclkFreqHzis 0, or if the calculated value exceeds the capacity of thefieldWidth.
-
FSL_SRAMC_DRIVER_VERSION#
Defines SRAMC driver version.
-
enum _sramc_address_mode#
SRAMC address mode.
Values:
-
enumerator kSRAMC_AddressDataMux#
Address/Data MUX mode (ADMUX)
-
enumerator kSRAMC_AddressDataNonMux#
Address/Data non-MUX mode (Non-ADMUX)
-
enumerator kSRAMC_AddressDataMux#
-
enum _sramc_port_size#
SRAMC port size.
Values:
-
enumerator kSRAMC_PortSize8Bit#
8-bit data port size
-
enumerator kSRAMC_PortSize16Bit#
16-bit data port size
-
enumerator kSRAMC_PortSize8Bit#
-
enum _sramc_adv_polarity#
SRAMC ADV# polarity.
Values:
-
enumerator kSRAMC_AdvActiveLow#
ADV# signal is active low
-
enumerator kSRAMC_AdvActiveHigh#
ADV# signal is active high
-
enumerator kSRAMC_AdvActiveLow#
-
enum _sramc_prescaler#
SRAMC prescaler.
Values:
-
enumerator kSRAMC_Prescaler_1#
Time granularity is 1 hclk cycle
-
enumerator kSRAMC_Prescaler_2#
Time granularity is 2 hclk cycles
-
enumerator kSRAMC_Prescaler_3#
Time granularity is 3 hclk cycles
-
enumerator kSRAMC_Prescaler_4#
Time granularity is 4 hclk cycles
-
enumerator kSRAMC_Prescaler_1#
-
enum _sramc_wait_polarity#
SRAMC wait polarity.
Values:
-
enumerator kSRAMC_WaitActiveLow#
Wait signal is active low
-
enumerator kSRAMC_WaitActiveHigh#
Wait signal is active high
-
enumerator kSRAMC_WaitActiveLow#
-
enum _sramc_wait_pin_mux#
SRAMC wait pin mux.
Values:
-
enumerator kSRAMC_WaitPinMux_0#
Wait pin 0 is muxed
-
enumerator kSRAMC_WaitPinMux_1#
Wait pin 1 is muxed
-
enumerator kSRAMC_WaitPinMux_2#
Wait pin 2 is muxed
-
enumerator kSRAMC_WaitPinMux_3#
Wait pin 3 is muxed
-
enumerator kSRAMC_WaitPinMux_0#
-
enum _sramc_wait_mode#
SRAMC wait mode.
Values:
-
enumerator kSRAMC_WaitMode_Level#
Wait signal is determined by level of wait pin.
-
enumerator kSRAMC_WaitMode_LevelAndCounter#
Wait signal is determined by both conditions of wait pin level and internal wait counter
-
enumerator kSRAMC_WaitMode_LevelOrCounter#
Wait signal is determined by any condition of wait pin level and internal wait counter
-
enumerator kSRAMC_WaitMode_Edge#
Wait signal is determined by edge of wait pin
-
enumerator kSRAMC_WaitMode_EdgeAndCounter#
Wait signal is determined by both conditions of wait pin edge and internal wait counter
-
enumerator kSRAMC_WaitMode_EdgeOrCounter#
Wait signal is determined by any condition of wait pin edge and internal wait counter.
-
enumerator kSRAMC_WaitMode_Level#
-
enum _sramc_chip_select#
SRAMC chip select.
Values:
-
enumerator kSRAMC_ChipSelect0#
Chip Select 0
-
enumerator kSRAMC_ChipSelect1#
Chip Select 1
-
enumerator kSRAMC_ChipSelect0#
-
typedef enum _sramc_address_mode sramc_address_mode_t#
SRAMC address mode.
-
typedef enum _sramc_port_size sramc_port_size_t#
SRAMC port size.
-
typedef enum _sramc_adv_polarity sramc_adv_polarity_t#
SRAMC ADV# polarity.
-
typedef enum _sramc_prescaler sramc_prescaler_t#
SRAMC prescaler.
-
typedef enum _sramc_wait_polarity sramc_wait_polarity_t#
SRAMC wait polarity.
-
typedef enum _sramc_wait_pin_mux sramc_wait_pin_mux_t#
SRAMC wait pin mux.
-
typedef enum _sramc_wait_mode sramc_wait_mode_t#
SRAMC wait mode.
-
typedef enum _sramc_chip_select sramc_chip_select_t#
SRAMC chip select.
-
typedef struct _sramc_config sramc_config_t#
SRAMC configuration structure.
-
struct _sramc_config#
- #include <fsl_sramc.h>
SRAMC configuration structure.
Public Members
-
sramc_chip_select_t chipSelect#
Chip select to configure. Use bitwise OR to combine multiple chip selects.
-
bool funcClkAlwaysOn#
If true, functional clock is always enabled, otherwise the clock is off when no access.
-
uint8_t busTimeoutCounter#
AHB Bus Timeout Wait Cycle (BTO). Timeout = BTO * 1024 hclk cycles. Range: 0-255.
-
bool busTimeoutEnable#
AHB Bus Timeout Enable (BTOEN).
-
sramc_adv_polarity_t advPolarity#
ADV# polarity (ADVP).
-
sramc_address_mode_t addressMode#
Address mode (AM). ADMUX or Non-ADMUX.
-
sramc_port_size_t portSize#
Port Size (PS). 8-bit or 16-bit.
-
sramc_prescaler_t prescaler#
Prescaler timer (PRE). Sets time granularity for timing parameters.
-
uint8_t turnaroundTime#
Turnaround time (TA). Actual time is (TA+1) * granularity. Range: 0-15.
-
uint8_t addressHoldTime#
Address hold time (AH). Actual time is (AH+1) * granularity. Range: 0-15.
-
uint8_t addressSetupTime#
Address setup time (AS). Actual time is AS * granularity (min 1 cycle in ADMUX). Range: 0-15.
-
uint8_t ceHoldTime#
Chip Enable hold time (CEH). Actual time is CEH * granularity. Range: 0-15.
-
uint8_t ceSetupTime#
Chip Enable setup time (CES). Actual time is CES * granularity. Range: 0-15.
-
uint8_t readEnableHighTime#
Read Enable high time (REH). Actual time is (REH+1) * granularity. Range: 0-15.
-
uint8_t readEnableLowTime#
Read Enable low time (REL). Actual time is (REL+1) * granularity. Range: 0-63.
-
uint8_t writeEnableHighTime#
Write Enable high time (WEH). Actual time is (WEH+1) * granularity. Range: 0-15.
-
uint8_t writeEnableLowTime#
Write Enable low time (WEL). Actual time is (WEL+1) * granularity. Range: 0-63.
-
bool waitModeEnable#
Wait mode enable (WM_EN). If true, SRAM access need to monitor wait pin.
-
sramc_wait_polarity_t waitPolarity#
Wait pin polarity selection. (WP_POL).
-
sramc_wait_pin_mux_t waitPinMux#
Wait pin mux selection. (WP_MUX).
-
sramc_wait_mode_t waitMode#
Wait mode selection (WM_SEL).
-
sramc_chip_select_t chipSelect#
Sramctl#
-
FSL_SRAMCTL_DRIVER_VERSION#
SRAMCTL driver version.
-
enum sramctl_address_type_t#
Determines whether RAMIAS/RAMIAE are system or local addresses.
Values:
-
enumerator kSRAMCTL_AddressTypeLocal#
Local address.
-
enumerator kSRAMCTL_AddressTypeSystem#
System address.
-
enumerator kSRAMCTL_AddressTypeLocal#
-
enum sramctl_initialization_wait_states_t#
Specifies the number of wait cycles between memory writes during initialization.
Values:
-
enumerator kSRAMCTL_ZeroWaitCycle#
0 wait cycles.
-
enumerator kSRAMCTL_OneWaitCycle#
1 wait cycle.
-
enumerator kSRAMCTL_TwoWaitCycles#
2 wait cycles.
-
enumerator kSRAMCTL_ThreeWaitCycles#
3 wait cycles.
-
enumerator kSRAMCTL_ZeroWaitCycle#
-
enum sramctl_status_flags_t#
SRAMCTL status flags (RAMSR bits).
Values:
-
enumerator kSRAMCTL_InitializationDone#
IDONE (W1C).
-
enumerator kSRAMCTL_BusError#
BUSERR (W1C).
-
enumerator kSRAMCTL_InitializationPending#
IPEND (RO).
-
enumerator kSRAMCTL_AddressValid#
AVALID (W1C).
-
enumerator kSRAMCTL_EccAddressError#
AERR (W1C).
-
enumerator kSRAMCTL_EccMultiBitError#
MLTERR (W1C).
-
enumerator kSRAMCTL_EccSingleBitError#
SGLERR (W1C, captures latest).
-
enumerator kSRAMCTL_SecureRegion#
SEC (RO).
-
enumerator kSRAMCTL_AllW1CFlags#
All W1C bits that software is allowed to clear.
-
enumerator kSRAMCTL_AllFlags#
All RAMSR bits (including RO bits).
-
enumerator kSRAMCTL_InitializationDone#
-
status_t SRAMCTL_Init(SRAMCTL_Type *base, sramctl_config_t const *config)#
Initialize SRAM for the configured address range.
- Parameters:
base – SRAMCTL peripheral base address.
config – Pointer to the configuration structure.
- Return values:
kStatus_Success – Initialization completed.
kStatus_InvalidArgument – Invalid argument.
-
void SRAMCTL_SetRamMaximumAddress(SRAMCTL_Type *base, uint32_t address)#
Set the maximum valid address for SRAM access.
- Parameters:
base – SRAMCTL peripheral base address.
address – Maximum address value.
-
void SRAMCTL_EnableExclusiveMonitor(SRAMCTL_Type *base, bool enable)#
Enable or disable the exclusive monitor.
- Parameters:
base – SRAMCTL peripheral base address.
enable – true to enable exclusive monitor; false to disable it.
-
static inline uint32_t SRAMCTL_GetStatusFlags(SRAMCTL_Type *base)#
Get SRAMCTL status flags.
- Parameters:
base – SRAMCTL peripheral base address.
- Returns:
Status flags. This is a logical OR of sramctl_status_flags_t.
-
status_t SRAMCTL_ClearStatusFlags(SRAMCTL_Type *base, uint32_t mask)#
Clear SRAMCTL status flags.
This function clears W1C flags in RAMSR.
- Parameters:
base – SRAMCTL peripheral base address.
mask – Mask of flags to clear. This is a logical OR of sramctl_status_flags_t. Only W1C flags are allowed; RO flags (such as IPEND/SEC) are rejected.
- Return values:
kStatus_Success – Clear completed.
kStatus_InvalidArgument – Mask contains RO flags.
-
void SRAMCTL_GetErrorInfo(SRAMCTL_Type *base, sramctl_error_info_t *info)#
Get SRAMCTL error information.
- Parameters:
base – SRAMCTL peripheral base address.
info – Pointer to the error information structure.
-
void SRAMCTL_ConfigErrorInjectionAddress(SRAMCTL_Type *base, const sramctl_error_injection_address_t *config)#
Configure address filtering for error injection.
- Parameters:
base – SRAMCTL peripheral base address.
config – Pointer to address injection configuration.
-
void SRAMCTL_ConfigErrorInjectionData(SRAMCTL_Type *base, const sramctl_error_injection_data_t *config)#
Configure data masks for error injection.
- Parameters:
base – SRAMCTL peripheral base address.
config – Pointer to data injection configuration.
-
void SRAMCTL_EnableErrorInjectionForSafetyAlarm(SRAMCTL_Type *base, bool enable)#
Enable or disable error injection into the pipeline to cause a safety alarm.
- Parameters:
base – SRAMCTL peripheral base address.
enable – true to enable; false to disable.
-
void SRAMCTL_InitMem(SRAMCTL_Type *base, uint32_t start_addr, uint32_t end_addr)#
Initialize memory range by instance index.
- Deprecated:
Prefer SRAMCTL_Init.
- Parameters:
base – SRAMCTL peripheral base address.
start_addr – Start address.
end_addr – End address.
-
struct sramctl_config_t#
- #include <fsl_sramctl.h>
SRAMCTL configuration structure.
Public Members
-
sramctl_address_type_t addressType#
Address type for RAMIAS/RAMIAE. See sramctl_address_type_t.
-
sramctl_initialization_wait_states_t initializationWaitStates#
Initialization wait states.
-
uint32_t addressStart#
RAM Initialization Address Start (RAMIAS).
-
uint32_t addressEnd#
RAM Initialization Address End (RAMIAE).
-
sramctl_address_type_t addressType#
-
struct sramctl_error_info_t#
- #include <fsl_sramctl.h>
SRAMCTL error information structure.
Public Members
-
uint8_t eccSyndromeValue#
Syndrome value (RAMSR[SYND]).
-
uint8_t ramStatusEventInfo#
Event info (RAMSR[EINFO]).
-
uint8_t ramCorrectableErrorCount#
Correctable error count (RAMECCNT[ECCNT]).
-
uint16_t ramEccAddressBankId#
Bank ID (RAMMEMA[BANK]).
-
uint32_t ramEccAddressBankAddress#
Bank address (RAMMEMA[MEMA]).
-
uint32_t ramSystemAddress#
System address (RAMSYSA).
-
uint8_t eccSyndromeValue#
-
struct sramctl_error_injection_address_t#
- #include <fsl_sramctl.h>
SRAMCTL error injection address configuration structure.
-
struct sramctl_error_injection_data_t#
- #include <fsl_sramctl.h>
SRAMCTL error injection data configuration structure.
STM: STM Driver#
-
void STM_GetDefaultConfig(stm_config_t *config)#
Initializes STM configure structure.
This function initializes the STM configure structure to default value. The default value are:
config->enableRunInDebug = true; config->enableIRQ = true; config->prescale = 0U;
See also
- Parameters:
config – Pointer to STM config structure.
-
void STM_Init(STM_Type *base, const stm_config_t *config)#
Initializes the STM.
This function configures the peripheral for basic operation.
- Parameters:
base – STM peripheral base address
config – The configuration of STM
-
void STM_Deinit(STM_Type *base)#
Shuts down the STM.
This function shuts down the STM.
- Parameters:
base – STM peripheral base address
-
static inline void STM_ClearStatusFlags(STM_Type *base, stm_channel_t channel)#
Clear STM flag.
This function clears STM channel interrupt flag which is set due to a match on the channel.
See also
- Parameters:
base – STM peripheral base address
channel – The compare channel that corresponds to the flag that needs to be cleared.
-
static inline uint32_t STM_GetStatusFlags(STM_Type *base, stm_channel_t channel)#
Gets channel interrupt flag of the STM.
See also
- Parameters:
base – STM peripheral base address
channel – The channel number.
- Returns:
The channel Interrupt flag.
-
void STM_SetCompare(STM_Type *base, stm_channel_t channel, uint32_t value)#
Set compare value for specific channel of the STM module and enable the channel.
See also
- Parameters:
base – STM peripheral base address
channel – The compare channel to be configured.
value – Compare value, range from 0 to 0xFFFFFFFF
-
static inline void STM_EnableCompareChannel(STM_Type *base, stm_channel_t channel)#
Enable STM compare channel.
See also
- Parameters:
base – STM peripheral base address
channel – The channel number.
-
static inline void STM_DisableCompareChannel(STM_Type *base, stm_channel_t channel)#
Disable STM compare channel.
See also
- Parameters:
base – STM peripheral base address
channel – The channel number.
-
FSL_STM_DRIVER_VERSION#
Defines STM driver version.
-
enum _stm_channel#
List of STM channels.
Values:
-
enumerator kSTM_Channel_0#
STM channel 0
-
enumerator kSTM_Channel_1#
STM channel 1
-
enumerator kSTM_Channel_2#
STM channel 2
-
enumerator kSTM_Channel_3#
STM channel 3
-
enumerator kSTM_Channel_0#
-
enum _stm_channel_match#
List of STM compare match mask to indicate channel interrupt in stm_callback_t function flags parameters.
Values:
-
enumerator kSTM_Channel_Match_Msk_0#
STM channel compare register 0
-
enumerator kSTM_Channel_Match_Msk_1#
STM channel compare register 1
-
enumerator kSTM_Channel_Match_Msk_2#
STM channel compare register 2
-
enumerator kSTM_Channel_Match_Msk_3#
STM channel compare register 3
-
enumerator kSTM_Channel_Match_Msk_0#
-
typedef enum _stm_channel stm_channel_t#
List of STM channels.
-
typedef enum _stm_channel_match stm_channel_match_t#
List of STM compare match mask to indicate channel interrupt in stm_callback_t function flags parameters.
-
typedef struct _stm_config stm_config_t#
Describes STM configuration structure.
-
typedef void (*stm_callback_t)(uint32_t flags)#
Define STM interrupt callback function pointer.
-
void STM_DriverIRQHandler(uint32_t index)#
-
static inline void STM_StartTimer(STM_Type *base)#
Start the STM module.
This function write value into STM_CR register to enable the STM
- Parameters:
base – STM peripheral base address
-
static inline void STM_StopTimer(STM_Type *base)#
Stop the STM module.
This function write value into STM_CR register to disable the STM.
- Parameters:
base – STM peripheral base address
-
struct _stm_config#
- #include <fsl_stm.h>
Describes STM configuration structure.
SWT: Software Watchdog Timer#
-
void SWT_Init(SWT_Type *base, const swt_config_t *config)#
Initializes the SWT module with configuration.
This function initializes the SWT. When called, the SWT runs according to the configuration. This is an example.
swt_config_t config; SWT_GetDefaultConfig(&config); config.timeoutValue = 32000U; SWT_Init(swt_base, &config);
- Parameters:
base – SWT peripheral base address
config – Pointer to the SWT configuration structure.
-
void SWT_Deinit(SWT_Type *base)#
De-initializes the SWT module.
This function de-initializes the SWT.
- Parameters:
base – SWT peripheral base address
-
void SWT_GetDefaultConfig(swt_config_t *config)#
Gets the default configuration for SWT.
This function initializes the SWT configuration structure to a default value. The default values are as follows.
config->enableSwt = true; config->enableRunInDebug = false; config->enableRunInStop = true; config->interruptThenReset = false; config->enableWindowMode = false; config->resetOnInvalidAccess = true; config->serviceMode = kSWT_FixedServiceSequence; config->timeoutValue = 0xFFFFU; config->windowValue = 0U; config->serviceKey = 0U;
- Parameters:
config – Pointer to the configuration structure.
-
static inline void SWT_Enable(SWT_Type *base)#
Enable SWT module.
- Parameters:
base – SWT peripheral base address
-
static inline void SWT_Disable(SWT_Type *base)#
Disable SWT module.
- Parameters:
base – SWT peripheral base address
-
static inline void SWT_HardLock(SWT_Type *base)#
Enable the hard lock.
This function will hard lock the SWT registers. Hard lock is disabled only by a reset.
- Parameters:
base – SWT peripheral base address
-
static inline void SWT_SoftLock(SWT_Type *base)#
Enable the soft lock.
This function will soft lock the SWT registers. Soft lock is disabled by a reset or by writing the unlock sequence.
- Parameters:
base – SWT peripheral base address
-
void SWT_SoftUnlock(SWT_Type *base)#
Unlock the soft lock.
This function will unlock the SWT registers locked by SWT_SoftLock.
- Parameters:
base – SWT peripheral base address
-
void SWT_RefreshWithFixedServiceSequence(SWT_Type *base)#
SWT Refresh with Fixed Service Sequence.
This function will execute a fixed service sequence to refresh the SWT. SWT shall work in fixed service sequence mode swt_service_mode_t.
- Parameters:
base – SWT peripheral base address
-
static inline void SWT_SetServiceKey(SWT_Type *base, uint16_t serviceKey)#
Set the service key.
This function will set the initial service key for the keyed service sequence.
- Parameters:
base – SWT peripheral base address
serviceKey – The service key
-
void SWT_RefreshWithKeyedServiceSequence(SWT_Type *base)#
SWT Refresh with Keyed Service Sequence.
This function will excute a keyed service sequence to refresh the SWT. SWT shall work in keyed service sequence mode swt_service_mode_t.
- Parameters:
base – SWT peripheral base address
-
void SWT_Refresh(SWT_Type *base)#
SWT Refresh with automatic service sequence.
This function will automatically select the service sequence to refresh the SWT.
- Parameters:
base – SWT peripheral base address
-
void SWT_SetTimeoutValue(SWT_Type *base, uint32_t timeoutValue)#
Set the timeout value.
This function will set the SWT timeout period in clock cycles.
- Parameters:
base – SWT peripheral base address
timeoutValue – The timeout value
-
static inline void SWT_SetWindowValue(SWT_Type *base, uint32_t windowValue)#
Set the window start value.
This function will set the window start value for SWT window mode. Software can write the service sequence only when the internal timer is less than this value.
- Parameters:
base – SWT peripheral base address
windowValue – The window start value
-
static inline uint32_t SWT_GetCounterValue(SWT_Type *base)#
Get the counter value.
This function will get the internal counter value when SWT is disabled. It is usually used to determine whether the internal countdown timer is working properly.
This is an example:
SWT_Enable(SWT_BASE); Delay(the_delay_time_shall_less_than_timeout_value); SWT_Disable(SWT_BASE); uint32_t counter_value = SWT_GetCounterValue(SWT_BASE);
- Parameters:
base – SWT peripheral base address
- Returns:
The counter value
-
static inline bool SWT_GetTimeoutInterruptFlag(SWT_Type *base)#
Get the timeout interrupt flag.
This function will get the timeout interrupt flag.
- Parameters:
base – SWT peripheral base address
- Returns:
The timeout interrupt flag. true: Interrupt request due to an initial timeout false: No interrupt request
-
static inline void SWT_ClearTimeoutInterruptFlag(SWT_Type *base)#
Clear the timeout interrupt flag.
This function clears the timeout interrupt flag and waits until the W1C operation takes effect.
- Parameters:
base – SWT peripheral base address
-
static inline bool SWT_GetTimeoutResetFlag(SWT_Type *base)#
Get the timeout reset flag.
This funcion can get the SWT reset request flag.
- Parameters:
base – SWT peripheral base address
- Returns:
The reset request flag. true: Any reset request initiated false: No reset request
-
static inline void SWT_ClearTimeoutResetFlag(SWT_Type *base)#
Clear the timeout reset flag.
This funcion can only reset the SWT module instead of the whole system. See the chip-specific information for the specific event associated with this flag.
- Parameters:
base – SWT peripheral base address
-
FSL_SWT_DRIVER_VERSION#
SWT Driver Version 2.1.2.
-
SWT_FIRST_WORD_OF_SOFT_UNLOCK#
First word of soft unlock sequence
-
SWT_SECOND_WORD_OF_SOFT_UNLOCK#
Second word of soft unlock sequence
-
SWT_FIRST_WORD_OF_FIXED_SERVICE#
First word of fixed service sequence
-
SWT_SECOND_WORD_OF_FIXED_SERVICE#
Second word of fixed service sequence
-
enum _swt_service_mode_t#
SWT service mode.
Values:
-
enumerator kSWT_FixedServiceSequence#
Write the fixed sequence
-
enumerator kSWT_KeyedServiceSequence#
write two pseudorandom key values
-
enumerator kSWT_FixedServiceSequence#
-
typedef enum _swt_service_mode_t swt_service_mode_t#
SWT service mode.
-
typedef struct _swt_config swt_config_t#
SWT configuration structure.
This structure holds the configuration settings for the SWT peripheral. To initialize this structure to reasonable defaults, call the SWT_GetDefaultConfig() function and pass a pointer to your config structure instance.
-
struct _swt_config#
- #include <fsl_swt.h>
SWT configuration structure.
This structure holds the configuration settings for the SWT peripheral. To initialize this structure to reasonable defaults, call the SWT_GetDefaultConfig() function and pass a pointer to your config structure instance.
Public Members
-
bool enableSwt#
Enables SWT
-
bool enableRunInDebug#
Enable timers continues in debug mode
-
bool enableRunInStop#
Enable timers continues in stop/standby mode
-
bool interruptThenReset#
true: Generate an interrupt and load the countdown timer on an inital timeout, then generate a reset request on a subsequent timeout. false: Generate an immediate reset request on any timeout.
-
bool enableWindowMode#
Enable timers run in window mode
-
bool resetOnInvalidAccess#
true: Generate a bus error and reset request; false: Generate a bus error
-
swt_service_mode_t serviceMode#
Service mode, swt_service_mode_t
-
uint32_t timeoutValue#
Watchdog timeout period in clock cycles
-
uint32_t windowValue#
Window start value
-
uint16_t serviceKey#
Service key
-
bool enableSwt#
TDET#
-
status_t TDET_Init(DIGTMP_Type *base)#
Initialize TDET.
This function initializes TDET.
- Parameters:
base – TDET peripheral base address
- Returns:
Status of the init operation
-
void TDET_Deinit(DIGTMP_Type *base)#
Deinitialize TDET.
This function disables glitch filters and active tampers This function disables the TDET clock and prescaler in TDET Control Register.
- Parameters:
base – TDET peripheral base address
-
void TDET_GetDefaultConfig(DIGTMP_Type *base, tdet_config_t *defaultConfig)#
Gets default values for the TDET Control Register.
This function fills the given structure with default values for the TDET Control Register. The default values are:
defaultConfig->innerClockAndPrescalerEnable = true defaultConfig->tamperForceSystemResetEnable = false defaultConfig->updateMode = kTDET_StatusLockWithTamper defaultConfig->clockSourceActiveTamper0 = kTDET_ClockType1Hz defaultConfig->clockSourceActiveTamper1 = kTDET_ClockType1Hz defaultConfig->prescaler = 0
- Parameters:
base – TDET peripheral base address
defaultConfig – [out] Pointer to structure to be filled with default parameters
-
status_t TDET_SetConfig(DIGTMP_Type *base, const tdet_config_t *config)#
Writes to the TDET Control Register.
This function writes the given structure to the TDET Control Register.
- Parameters:
base – TDET peripheral base address
config – Pointer to structure with TDET peripheral configuration parameters
- Returns:
kStatus_Fail when writing to TDET Control Register is not allowed
- Returns:
kStatus_Success when operation completes successfully
-
status_t TDET_SoftwareReset(DIGTMP_Type *base)#
Software reset.
This function resets all TDET registers. The CR[SWR] itself is not affected; it is reset by VBAT POR only.
- Parameters:
base – TDET peripheral base address
- Returns:
kStatus_Fail when writing to TDET Control Register is not allowed
- Returns:
kStatus_Success when operation completes successfully
-
void TDET_PinGetDefaultConfig(DIGTMP_Type *base, tdet_pin_config_t *pinConfig)#
Gets default values for tamper pin configuration.
This function fills the give structure with default values for the tamper pin and glitch filter configuration. The default values are: code pinConfig->pinPolarity = kTDET_TamperPinPolarityExpectNormal; pinConfig->pinDirection = kTDET_TamperPinDirectionIn; pinConfig->tamperPullEnable = false; pinConfig->tamperPinSampleFrequency = kTDET_GlitchFilterSamplingEveryCycle8; pinConfig->tamperPinSampleWidth = kTDET_GlitchFilterSampleDisable; pinConfig->glitchFilterEnable = false; pinConfig->glitchFilterPrescaler = kTDET_GlitchFilterClock512Hz; pinConfig->glitchFilterWidth = 0; pinConfig->tamperPinExpected = kTDET_GlitchFilterExpectedLogicZero; pinConfig->tamperPullSelect = kTDET_GlitchFilterPullTypeAssert; endcode
- Parameters:
base – TDET peripheral base address
pinConfig – [out] Pointer to structure to be filled with tamper pins default parameters
-
status_t TDET_PinSetConfig(DIGTMP_Type *base, const tdet_pin_config_t *pinConfig, uint32_t pinSelect)#
Writes the tamper pin configuration.
This function writes per pin parameters to tamper pin and glitch filter configuration registers.
- Parameters:
base – TDET peripheral base address
pinConfig – Pointer to structure with tamper pin and glitch filter configuration parameters
pinSelect – Bit mask for tamper pins to be configured. The passed value is combination of enum _tdet_tamper_pin (tdet_tamper_pin_t) values (OR’ed).
- Returns:
kStatus_Fail when writing to TDET Pin Direction, Pin Polarity or Glitch Filter Register(s) is not allowed
- Returns:
kStatus_Success when operation completes successfully
-
status_t TDET_GetStatusFlags(DIGTMP_Type *base, uint32_t *result)#
Reads the Status Register.
This function reads flag bits from TDET Status Register.
- Parameters:
base – TDET peripheral base address
result – [out] Pointer to uint32_t where to write Status Register read value. Use tdet_status_flag_t to decode individual flags.
- Returns:
kStatus_Fail when Status Register reading is not allowed
- Returns:
kStatus_Success when result is written with the Status Register read value
-
status_t TDET_ClearStatusFlags(DIGTMP_Type *base, uint32_t mask)#
Writes to the Status Register.
This function clears specified flag bits in TDET Status Register.
- Parameters:
base – TDET peripheral base address
mask – Bit mask for the flag bits to be cleared. Use tdet_status_flag_t to encode flags.
- Returns:
kStatus_Fail when Status Register writing is not allowed
- Returns:
kStatus_Success when mask is written to the Status Register
-
status_t TDET_EnableInterrupts(DIGTMP_Type *base, uint32_t mask)#
Writes to the Interrupt Enable Register.
This function sets specified interrupt enable bits in TDET Interrupt Enable Register.
- Parameters:
base – TDET peripheral base address
mask – Bit mask for the interrupt enable bits to be set.
- Returns:
kStatus_Fail when Interrupt Enable Register writing is not allowed
- Returns:
kStatus_Success when mask is written to the Interrupt Enable Register
-
status_t TDET_DisableInterrupts(DIGTMP_Type *base, uint32_t mask)#
Writes to the Interrupt Enable Register.
This function clears specified interrupt enable bits in TDET Interrupt Enable Register.
- Parameters:
base – TDET peripheral base address
mask – Bit mask for the interrupt enable bits to be cleared.
- Returns:
kStatus_Fail when Interrupt Enable Register writing is not allowed
- Returns:
kStatus_Success when specified bits are cleared in the Interrupt Enable Register
-
status_t TDET_EnableTampers(DIGTMP_Type *base, uint32_t mask)#
Writes to the Tamper Enable Register.
This function sets specified tamper enable bits in TDET Tamper Enable Register.
- Parameters:
base – TDET peripheral base address
mask – Bit mask for the tamper enable bits to be set.
- Returns:
kStatus_Fail when Tamper Enable Register writing is not allowed
- Returns:
kStatus_Success when mask is written to the Tamper Enable Register
-
status_t TDET_DisableTampers(DIGTMP_Type *base, uint32_t mask)#
Writes to the Tamper Enable Register.
This function clears specified tamper enable bits in TDET Tamper Enable Register.
- Parameters:
base – TDET peripheral base address
mask – Bit mask for the tamper enable bits to be cleared.
- Returns:
kStatus_Fail when Tamper Enable Register writing is not allowed
- Returns:
kStatus_Success when specified bits are cleared in the Tamper Enable Register
-
status_t TDET_ForceTamper(DIGTMP_Type *base)#
Writes to the Tamper Seconds Register.
This function writes to TDET Tamper Seconds Register. This causes Status Register DTF flag to be set (TDET tampering detected).
- Parameters:
base – TDET peripheral base address
- Returns:
kStatus_Fail when Tamper Seconds Register writing is not allowed
- Returns:
kStatus_Success when Tamper Seconds Register is written
-
status_t TDET_GetTamperTimeSeconds(DIGTMP_Type *base, uint32_t *tamperTimeSeconds)#
Reads the Tamper Seconds Register.
This function reads TDET Tamper Seconds Register. The read value returns the time in seconds at which the Status Register DTF flag was set.
- Parameters:
base – TDET peripheral base address
tamperTimeSeconds – Time in seconds at which the tamper detection SR[DTF] flag was set.
- Returns:
kStatus_Fail when Tamper Seconds Register reading is not allowed
- Returns:
kStatus_Success when Tamper Seconds Register is read
-
void TDET_LockRegisters(DIGTMP_Type *base, uint32_t mask)#
Writes to the TDET Lock Register.
This function clears specified lock bits in the TDET Lock Register. When a lock bit is clear, a write to corresponding TDET Register is ignored. Once cleared, these bits can only be set by VBAT POR or software reset.
- Parameters:
base – TDET peripheral base address
mask – Bit mask for the lock bits to be cleared. Use tdet_register_t values to encode (OR’ed) which TDET Registers shall be locked.
-
FSL_TDET_DRIVER_VERSION#
Defines TDET driver version 2.4.0.
Change log:
Version 2.4.0
Added support for MIMXRT2663.
Version 2.3.3
Fix MISRA and CERT-C findings.
Version 2.3.2
Added common IRQ handler entry TDET_DriverIRQHandler.
Version 2.3.1
Added support for KW43 device.
Version 2.3.0
Added enum for TIF10.
Version 2.2.0
Added support for chips without active tamper pins.
Version 2.1.1
Added clearing SR_TAF and SR_DTF into TDET_Init().
Fix typo in kTDET_ClockType64Hz comment
Version 2.1.0
Added setting of disabling prescaler on tamper event into TDET_SetConfig() and TDET_GetDefaultConfig functions.
Version 2.0.0
Initial version
-
enum _tdet_update_mode#
TDET Update Mode.
These constants allow TDET interrupts to be cleared if no tampering has been detected, while still preventing the TDET Tamper Flag (SR[DTF]) from being cleared once it is set.
Values:
-
enumerator kTDET_StatusLockNormal#
TDET Status Register cannot be written when the Status Register Lock bit within the Lock Register (LR[SRL]) is clear
-
enumerator kTDET_StatusLockWithTamper#
TDET Status Register cannot be written when the Status Register Lock bit within the Lock Register (LR[SRL]) is clear and TDET Tamper Flag (SR[DTF]) is set
-
enumerator kTDET_StatusLockNormal#
-
enum _tdet_active_tamper_clock#
TDET Active Tamper Clock Source.
These constants define the clock source for Active Tamper Shift Register to configure in a TDET base.
Values:
-
enumerator kTDET_ClockType1Hz#
clocked by 1 Hz prescaler clock
-
enumerator kTDET_ClockType64Hz#
clocked by 64 Hz prescaler clock
-
enumerator kTDET_ClockType1Hz#
-
enum _tdet_pin_polarity#
TDET Tamper Pin Polarity.
These constants define tamper pin polarity to configure in a TDET base.
Values:
-
enumerator kTDET_TamperPinPolarityExpectNormal#
Tamper pin expected value is not inverted
-
enumerator kTDET_TamperPinPolarityExpectInverted#
Tamper pin expected value is inverted
-
enumerator kTDET_TamperPinPolarityExpectNormal#
-
enum _tdet_pin_direction#
TDET Tamper Pin Direction.
These constants define tamper pin direction to configure in a TDET base.
Values:
-
enumerator kTDET_TamperPinDirectionIn#
Tamper pins configured as input
-
enumerator kTDET_TamperPinDirectionOut#
Tamper pins configured as output, drives inverse of expected value
-
enumerator kTDET_TamperPinDirectionIn#
-
enum _tdet_glitch_filter_sample_freq#
TDET Glitch Filter Tamper Pin Sample Frequency.
These constants define tamper pin glitch filter sample frequency to configure in a TDET base.
Values:
-
enumerator kTDET_GlitchFilterSamplingEveryCycle8#
Sample once every 8 cycles
-
enumerator kTDET_GlitchFilterSamplingEveryCycle32#
Sample once every 32 cycles
-
enumerator kTDET_GlitchFilterSamplingEveryCycle128#
Sample once every 128 cycles
-
enumerator kTDET_GlitchFilterSamplingEveryCycle512#
Sample once every 512 cycles
-
enumerator kTDET_GlitchFilterSamplingEveryCycle8#
-
enum _tdet_glitch_filter_sample_width#
TDET Glitch Filter Tamper Pin Sample Width.
These constants define tamper pin glitch filter sample width to configure in a TDET base.
Values:
-
enumerator kTDET_GlitchFilterSampleDisable#
Sampling disabled
-
enumerator kTDET_GlitchFilterSampleCycle2#
Sample width pull enable/input buffer enable=2 cycles/1 cycle
-
enumerator kTDET_GlitchFilterSampleCycle4#
Sample width pull enable/input buffer enable=4 cycles/2 cycles
-
enumerator kTDET_GlitchFilterSampleCycle8#
Sample width pull enable/input buffer enable=8 cycles/4 cycles
-
enumerator kTDET_GlitchFilterSampleDisable#
-
enum _tdet_glitch_filter_prescaler#
TDET Glitch Filter Tamper Pin Clock Source.
These constants define tamper pin glitch filter clock source to configure in a TDET base.
Values:
-
enumerator kTDET_GlitchFilterClock512Hz#
Glitch Filter on tamper pin is clocked by the 512 Hz prescaler clock
-
enumerator kTDET_GlitchFilterClock32768Hz#
Glitch Filter on tamper pin is clocked by the 32768 Hz prescaler clock
-
enumerator kTDET_GlitchFilterClock512Hz#
-
enum _tdet_glitch_filter_expected#
TDET Glitch Filter Tamper Pin Expected Value.
These constants define tamper pin glitch filter expected value to configure in a TDET base.
Values:
-
enumerator kTDET_GlitchFilterExpectedLogicZero#
Expected value is logic zero
-
enumerator kTDET_GlitchFilterExpectedActTamperOut0#
Expected value is active tamper 0 output
-
enumerator kTDET_GlitchFilterExpectedActTamperOut1#
Expected value is active tamper 1 output
-
enumerator kTDET_GlitchFilterExpectedActTamperOutXOR#
Expected value is active tamper 0 output XORed with active tamper 1 output
-
enumerator kTDET_GlitchFilterExpectedLogicZero#
-
enum _tdet_glitch_filter_pull#
TDET Glitch Filter Tamper Pull Select.
These constants define tamper pin glitch filter pull direction to configure in a TDET base.
Values:
-
enumerator kTDET_GlitchFilterPullTypeAssert#
Tamper pin pull direction always asserts the tamper pin.
-
enumerator kTDET_GlitchFilterPullTypeNegate#
Tamper pin pull direction always negates the tamper pin.
-
enumerator kTDET_GlitchFilterPullTypeAssert#
-
enum _tdet_external_tamper_pin#
List of TDET external tampers.
Values:
-
enumerator kTDET_ExternalTamper0#
-
enumerator kTDET_ExternalTamper1#
-
enumerator kTDET_ExternalTamper2#
-
enumerator kTDET_ExternalTamper3#
-
enumerator kTDET_ExternalTamper4#
-
enumerator kTDET_ExternalTamper5#
-
enumerator kTDET_ExternalTamper6#
-
enumerator kTDET_ExternalTamper7#
-
enumerator kTDET_ExternalTamper0#
-
enum _tdet_active_tamper_register#
TDET Active Tamper Register Select.
These constants are used to define activeTamperRegisterSelect argument to be used with TDET_ActiveTamperConfigure().
Values:
-
enumerator kTDET_ActiveTamperRegister0#
-
enumerator kTDET_ActiveTamperRegister1#
-
enumerator kTDET_ActiveTamperRegister0#
-
enum _tdet_status_flag#
TDET Status Register flags.
This provides constants for the TDET Status Register.
Values:
-
enumerator kTDET_StatusTamperFlag#
TDET Digital Tamper Flag
-
enumerator kTDET_StatusTamperAcknowledgeFlag#
TDET Tamper Acknowledge Flag
-
enumerator kTDET_TIF0#
TDET Tamper input 0
-
enumerator kTDET_StatusTamperPinTamper0#
TDET Tamper Pin 0 Tamper detected
-
enumerator kTDET_StatusTamperPinTamper1#
TDET Tamper Pin 1 Tamper detected
-
enumerator kTDET_StatusAll#
Mask for all of the TDET Status Register bits
-
enumerator kTDET_StatusTamperFlag#
-
enum _tdet_interrupt#
TDET Interrupt Enable Register.
This provides constants for the TDET Interrupt Enable Register.
Values:
-
enumerator kTDET_InterruptTamper#
TDET Digital Tamper Interrupt
-
enumerator kTDET_InterruptTIF0#
TDET TIF0 Interrupt
-
enumerator kTDET_InterruptTamperPinTamper0#
TDET Tamper Pin Tamper 0 Interrupt
-
enumerator kTDET_InterruptTamperPinTamper1#
TDET Tamper Pin Tamper 1 Interrupt
-
enumerator kTDET_InterruptTamperPinTamper_All#
TDET All Tamper Pins Interrupt
-
enumerator kTDET_InterruptAll#
Mask to select all TDET Interrupt Enable Register bits
-
enumerator kTDET_InterruptTamper#
-
enum _tdet_tamper#
TDET Tamper Enable Register.
This provides constants for the TDET Tamper Enable Register.
Values:
-
enumerator kTDET_TamperTIF0#
TIF0 Tamper Enable
-
enumerator kTDET_TamperTamperPin0#
Tamper Pin 0 Tamper Enable
-
enumerator kTDET_TamperTamperPin1#
Tamper Pin 1 Tamper Enable
-
enumerator kTDET_TamperTamperPinAll#
All Tamper Pin Tamper Enable
-
enumerator kTDET_TamperAll#
Mask to select all Tamper Enable Register bits
-
enumerator kTDET_TamperTIF0#
-
enum _tdet_register#
TDET Registers.
This provides constants to encode a mask for the TDET Registers.
Values:
-
enumerator kTDET_NoRegister#
No Register
-
enumerator kTDET_Control#
Control Register
-
enumerator kTDET_Status#
Status Register
-
enumerator kTDET_Lock#
Lock Register
-
enumerator kTDET_InterruptEnable#
Interrupt Enable Register
-
enumerator kTDET_TamperSeconds#
Tamper Seconds Register
-
enumerator kTDET_TamperEnable#
Tamper Enable Register
-
enumerator kTDET_PinPolarity#
Pin Polarity Register
-
enumerator kTDET_GlitchFilter0#
Glitch Filter Register 0
-
enumerator kTDET_GlitchFilter1#
Glitch Filter Register 1
-
enumerator kTDET_PinConfigurationRegisters#
Mask to select all TDET Pin Configuration Registers
-
enumerator kTDET_AllRegisters#
Mask to select all TDET Registers
-
enumerator kTDET_NoRegister#
-
typedef enum _tdet_update_mode tdet_update_mode_t#
TDET Update Mode.
These constants allow TDET interrupts to be cleared if no tampering has been detected, while still preventing the TDET Tamper Flag (SR[DTF]) from being cleared once it is set.
-
typedef enum _tdet_active_tamper_clock tdet_active_tamper_clock_t#
TDET Active Tamper Clock Source.
These constants define the clock source for Active Tamper Shift Register to configure in a TDET base.
-
typedef struct _tdet_config tdet_config_t#
TDET Control Register.
This structure defines values for TDET Control Register.
-
typedef enum _tdet_pin_polarity tdet_pin_polarity_t#
TDET Tamper Pin Polarity.
These constants define tamper pin polarity to configure in a TDET base.
-
typedef enum _tdet_pin_direction tdet_pin_direction_t#
TDET Tamper Pin Direction.
These constants define tamper pin direction to configure in a TDET base.
-
typedef enum _tdet_glitch_filter_sample_freq tdet_glitch_filter_sample_freq_t#
TDET Glitch Filter Tamper Pin Sample Frequency.
These constants define tamper pin glitch filter sample frequency to configure in a TDET base.
-
typedef enum _tdet_glitch_filter_sample_width tdet_glitch_filter_sample_width_t#
TDET Glitch Filter Tamper Pin Sample Width.
These constants define tamper pin glitch filter sample width to configure in a TDET base.
-
typedef enum _tdet_glitch_filter_prescaler tdet_glitch_filter_prescaler_t#
TDET Glitch Filter Tamper Pin Clock Source.
These constants define tamper pin glitch filter clock source to configure in a TDET base.
-
typedef enum _tdet_glitch_filter_expected tdet_glitch_filter_expected_t#
TDET Glitch Filter Tamper Pin Expected Value.
These constants define tamper pin glitch filter expected value to configure in a TDET base.
-
typedef enum _tdet_glitch_filter_pull tdet_glitch_filter_pull_t#
TDET Glitch Filter Tamper Pull Select.
These constants define tamper pin glitch filter pull direction to configure in a TDET base.
-
typedef struct _tdet_pin_config tdet_pin_config_t#
TDET Tamper Pin configuration registers.
This structure defines values for TDET Pin Direction, Pin Polarity, and Glitch Filter registers.
-
typedef enum _tdet_external_tamper_pin tdet_external_tamper_pin_t#
List of TDET external tampers.
-
typedef enum _tdet_active_tamper_register tdet_active_tamper_register_t#
TDET Active Tamper Register Select.
These constants are used to define activeTamperRegisterSelect argument to be used with TDET_ActiveTamperConfigure().
-
typedef struct _tdet_active_tamper_config tdet_active_tamper_config_t#
TDET Active Tamper registers.
This structure defines values for TDET Active Tamper Registers.
-
typedef enum _tdet_status_flag tdet_status_flag_t#
TDET Status Register flags.
This provides constants for the TDET Status Register.
-
typedef enum _tdet_interrupt tdet_interrupt_t#
TDET Interrupt Enable Register.
This provides constants for the TDET Interrupt Enable Register.
-
typedef enum _tdet_tamper tdet_tamper_t#
TDET Tamper Enable Register.
This provides constants for the TDET Tamper Enable Register.
-
typedef enum _tdet_register tdet_register_t#
TDET Registers.
This provides constants to encode a mask for the TDET Registers.
-
void VBAT0_DriverIRQHandler(void)#
-
struct _tdet_config#
- #include <fsl_tdet.h>
TDET Control Register.
This structure defines values for TDET Control Register.
Public Members
-
bool innerClockAndPrescalerEnable#
Enable/disable 32768 Hz clock within TDET and the TDET prescaler that generates 512 Hz, 64Hz and 1 Hz prescaler clocks
-
bool tamperForceSystemResetEnable#
Enable/disable assertion of chip reset when tampering is detected
-
enum _tdet_update_mode updateMode#
Selects update mode for TDET Status Register
-
enum _tdet_active_tamper_clock clockSourceActiveTamper0#
Selects clock source for Active Tamper Shift Register 0
-
enum _tdet_active_tamper_clock clockSourceActiveTamper1#
Selects clock source for Active Tamper Shift Register 1
-
bool disablePrescalerAfterTamper#
Allows the 32-KHz clock and prescaler to be automatically disabled after tamper detection and until the system acknowledges the tamper. Disabling the prescaler after detecting a tamper event conserves power and freezes the state of the active tamper outputs and glitch filters. To ensure a clean transition, the prescaler is disabled at the end of a 1 Hz period.
-
uint32_t prescaler#
Initial value for the TDET prescaler 15-bit value.
-
bool innerClockAndPrescalerEnable#
-
struct _tdet_pin_config#
- #include <fsl_tdet.h>
TDET Tamper Pin configuration registers.
This structure defines values for TDET Pin Direction, Pin Polarity, and Glitch Filter registers.
Public Members
-
enum _tdet_pin_polarity pinPolarity#
Selects tamper pin expected value
-
enum _tdet_pin_direction pinDirection#
Selects tamper pin direction
-
bool tamperPullEnable#
Enable/disable pull resistor on the tamper pin
-
enum _tdet_glitch_filter_sample_freq tamperPinSampleFrequency#
Selects tamper pin sample frequency
-
enum _tdet_glitch_filter_sample_width tamperPinSampleWidth#
Selects tamper pin sample width
-
bool glitchFilterEnable#
Enable/disable glitch filter on the tamper pin
-
enum _tdet_glitch_filter_prescaler glitchFilterPrescaler#
Selects the prescaler for the glitch filter on tamper pin
-
uint8_t glitchFilterWidth#
6-bit value to configure number of clock edges the input must remain stable for to be passed through the glitch filter for the tamper pin
-
enum _tdet_glitch_filter_expected tamperPinExpected#
Selects tamper pin expected value
-
enum _tdet_glitch_filter_pull tamperPullSelect#
Selects the direction of the tamper pin pull resistor
-
enum _tdet_pin_polarity pinPolarity#
-
struct _tdet_active_tamper_config#
- #include <fsl_tdet.h>
TDET Active Tamper registers.
This structure defines values for TDET Active Tamper Registers.
Digital Tamper#
TENBASET_PHY: 10BASE-T1S Digital PHY Driver#
-
enum _tenbaset_phy_mode#
TENBASET_PHY operating modes.
Values:
-
enumerator kTENBASET_PHY_ModeNone#
No mode command
-
enumerator kTENBASET_PHY_ModeLinkDown#
Link down mode
-
enumerator kTENBASET_PHY_ModeLinkUp#
Link up mode
-
enumerator kTENBASET_PHY_ModeTxcCfg#
Transceiver configuration mode
-
enumerator kTENBASET_PHY_ModeLowPower#
Low power mode
-
enumerator kTENBASET_PHY_ModeTxcBist#
Transceiver BIST mode
-
enumerator kTENBASET_PHY_ModeNone#
-
enum _tenbaset_phy_mode_status#
TENBASET_PHY mode status.
Values:
-
enumerator kTENBASET_PHY_StatusPorst#
Power-on reset state
-
enumerator kTENBASET_PHY_StatusWaitInit#
Wait for initialization
-
enumerator kTENBASET_PHY_StatusLinkDown#
Link down state
-
enumerator kTENBASET_PHY_StatusLinkUp#
Link up state
-
enumerator kTENBASET_PHY_StatusWaitCmdLp#
Wait for low power command
-
enumerator kTENBASET_PHY_StatusLowPower#
Low power state
-
enumerator kTENBASET_PHY_StatusWaitCmdCfg#
Wait for configuration command
-
enumerator kTENBASET_PHY_StatusTxcCfg#
Transceiver configuration state
-
enumerator kTENBASET_PHY_StatusTxcBist#
Transceiver BIST state
-
enumerator kTENBASET_PHY_StatusWaitSilentLp#
Wait silent for low power
-
enumerator kTENBASET_PHY_StatusWaitSilentCfg#
Wait silent for configuration
-
enumerator kTENBASET_PHY_StatusPorst#
-
enum _tenbaset_phy_plca_diag_flags#
TENBASET_PHY PLCA diagnostic flags.
Values:
-
enumerator kTENBASET_PHY_RxInTo#
Reception occurred within local transmit opportunity
-
enumerator kTENBASET_PHY_UnexpectedBeacon#
Reception of unexpected BEACON by coordinator
-
enumerator kTENBASET_PHY_BeaconBeforeTo#
4 consecutive BEACONs received before TO reached
-
enumerator kTENBASET_PHY_UndefinedState#
PLCA state-machines in undefined state
-
enumerator kTENBASET_PHY_NoRxBeacon#
No beacon received by coordinator while transmitted
-
enumerator kTENBASET_PHY_LateBeacon#
Reception of late BEACON by follower node
-
enumerator kTENBASET_PHY_EarlyBeacon#
Reception of early BEACON by follower node
-
enumerator kTENBASET_PHY_RxInTo#
-
enum _tenbaset_phy_wup_error_code#
TENBASET_PHY WUP error codes.
Values:
-
enumerator kTENBASET_PHY_WupErrorNone#
WUP transmission successful
-
enumerator kTENBASET_PHY_WupErrorSwAbort#
WUP sequencer aborted by software
-
enumerator kTENBASET_PHY_WupErrorModeChg#
WUP sequencer aborted by invalid mode
-
enumerator kTENBASET_PHY_WupErrorToWm#
WUP sequencer aborted by time-out in WAITMODE state
-
enumerator kTENBASET_PHY_WupErrorToPd#
WUP sequencer aborted by time-out in PENDING state
-
enumerator kTENBASET_PHY_WupErrorToWp#
WUP sequencer aborted by time-out in PENDING state
-
enumerator kTENBASET_PHY_WupErrorToWa#
WUP sequencer aborted by time-out in PENDING state
-
enumerator kTENBASET_PHY_WupErrorCore#
WUP sequencer aborted by core
-
enumerator kTENBASET_PHY_WupErrorNone#
-
enum _tenbaset_phy_wup_status#
TENBASET_PHY WUP sequencer status.
Values:
-
enumerator kTENBASET_PHY_WupStatusIdle#
WUP sequencer is idle
-
enumerator kTENBASET_PHY_WupStatusWaitLink#
WUP sequencer is waiting for LINKUP mode
-
enumerator kTENBASET_PHY_WupStatusPending#
WUP sequencer is waiting for transmission slot
-
enumerator kTENBASET_PHY_WupStatusIdle#
-
enum _tenbaset_phy_txc_diag_flags#
TENBASET_PHY transceiver diagnostic flags.
Values:
-
enumerator kTENBASET_PHY_LowPowerFail#
Failure of ED/RX pin in LOWPOWER mode
-
enumerator kTENBASET_PHY_EdHighFail#
Stuck HIGH of the ED pin
-
enumerator kTENBASET_PHY_EdLowFail#
Stuck LOW of the ED pin
-
enumerator kTENBASET_PHY_RxHighFail#
Stuck HIGH of the RX pin
-
enumerator kTENBASET_PHY_RxLowFail#
Stuck LOW of the RX pin
-
enumerator kTENBASET_PHY_LowPowerFail#
-
enum _tenbaset_phy_interrupt_flags#
TENBASET_PHY interrupt flags.
Values:
-
enumerator kTENBASET_PHY_PhysicalCollisionFlag#
Physical collision interrupt
-
enumerator kTENBASET_PHY_PLCARecoveryFlag#
PLCA recovery interrupt
-
enumerator kTENBASET_PHY_PLCAStatusFlag#
PLCA status interrupt
-
enumerator kTENBASET_PHY_ModeStatusFlag#
Mode status interrupt
-
enumerator kTENBASET_PHY_InvalidAPBFlag#
Invalid APB interrupt
-
enumerator kTENBASET_PHY_LocalJabberFlag#
Local jabber interrupt
-
enumerator kTENBASET_PHY_RemoteJabberFlag#
Remote jabber interrupt
-
enumerator kTENBASET_PHY_PinFaultFlag#
Pin fault interrupt
-
enumerator kTENBASET_PHY_PLCADiagFlag#
PLCA diagnostics interrupt
-
enumerator kTENBASET_PHY_SMIAccessFlag#
SMI access interrupt
-
enumerator kTENBASET_PHY_LocalWakeFlag#
Local wake interrupt
-
enumerator kTENBASET_PHY_SuspendDetectFlag#
Suspend detect interrupt
-
enumerator kTENBASET_PHY_WUTDetectFlag#
WUT detect interrupt
-
enumerator kTENBASET_PHY_WUPDoneFlag#
WUP done interrupt
-
enumerator kTENBASET_PHY_APBParityFlag#
APB parity interrupt
-
enumerator kTENBASET_PHY_PhysicalCollisionFlag#
-
enum _tenbaset_phy_smi_operation#
SMI operation types.
Values:
-
enumerator kTENBASET_PHY_SMIWriteWithCompError#
Write frame with C22 compliance error
-
enumerator kTENBASET_PHY_SMIWrite#
Standard write frame operation
-
enumerator kTENBASET_PHY_SMIRead#
Standard read frame operation
-
enumerator kTENBASET_PHY_SMIReadWithCompError#
Read frame with C22 compliance error
-
enumerator kTENBASET_PHY_SMIWriteWithCompError#
-
enum _tenbaset_phy_smi_hold_time#
SMI MDIO hold time options.
Values:
-
enumerator kTENBASET_PHY_SMIHold1Cycle#
1 PCLK cycle
-
enumerator kTENBASET_PHY_SMIHold2Cycles#
2 PCLK cycles
-
enumerator kTENBASET_PHY_SMIHold3Cycles#
3 PCLK cycles
-
enumerator kTENBASET_PHY_SMIHold4Cycles#
4 PCLK cycles
-
enumerator kTENBASET_PHY_SMIHold5Cycles#
5 PCLK cycles
-
enumerator kTENBASET_PHY_SMIHold6Cycles#
6 PCLK cycles
-
enumerator kTENBASET_PHY_SMIHold7Cycles#
7 PCLK cycles
-
enumerator kTENBASET_PHY_SMIHold8Cycles#
8 PCLK cycles
-
enumerator kTENBASET_PHY_SMIHold1Cycle#
-
enum _tenbaset_phy_smi_error_code#
SMI error codes.
Values:
-
enumerator kTENBASET_PHY_SMIErrorNone#
SMI access successful
-
enumerator kTENBASET_PHY_SMIErrorNonTC14#
Non-compliancy with TC14 detected
-
enumerator kTENBASET_PHY_SMIErrorDisabled#
SMI access triggered while disabled
-
enumerator kTENBASET_PHY_SMIErrorAborted#
SMI access got aborted
-
enumerator kTENBASET_PHY_SMIErrorInProgress#
SMI access triggered while in progress
-
enumerator kTENBASET_PHY_SMIErrorNone#
-
typedef enum _tenbaset_phy_mode tenbaset_phy_mode_t#
TENBASET_PHY operating modes.
-
typedef enum _tenbaset_phy_mode_status tenbaset_phy_mode_status_t#
TENBASET_PHY mode status.
-
typedef struct _tenbaset_phy_plca_config tenbaset_phy_plca_config_t#
TENBASET_PHY PLCA configuration structure.
-
typedef struct _tenbaset_phy_pma_config tenbaset_phy_pma_config_t#
PMA configuration structure.
-
typedef struct _tenbaset_phy_pcs_config tenbaset_phy_pcs_config_t#
PCS configuration structure.
-
typedef struct _tenbaset_phy_wake_config tenbaset_phy_wake_config_t#
TENBASET_PHY wake configuration structure.
-
typedef enum _tenbaset_phy_wup_error_code tenbaset_phy_wup_error_code_t#
TENBASET_PHY WUP error codes.
-
typedef enum _tenbaset_phy_wup_status tenbaset_phy_wup_status_t#
TENBASET_PHY WUP sequencer status.
-
typedef struct _tenbaset_phy_wup_status_info tenbaset_phy_wup_status_info_t#
TENBASET_PHY WUP status structure.
-
typedef struct _tenbaset_phy_version_info tenbaset_phy_version_info_t#
TENBASET_PHY version information structure.
-
typedef enum _tenbaset_phy_smi_operation tenbaset_phy_smi_operation_t#
SMI operation types.
-
typedef enum _tenbaset_phy_smi_hold_time tenbaset_phy_smi_hold_time_t#
SMI MDIO hold time options.
-
typedef struct _tenbaset_phy_smi_config tenbaset_phy_smi_config_t#
SMI configuration structure.
-
typedef enum _tenbaset_phy_smi_error_code tenbaset_phy_smi_error_code_t#
SMI error codes.
-
typedef void (*tenbaset_phy_callback_t)(TENBASET_PHY_Type *base, uint16_t flags, void *userData)#
TENBASET_PHY callback function type.
-
typedef struct _tenbaset_phy_config tenbaset_phy_config_t#
TENBASET_PHY configuration structure.
-
typedef struct _tenbaset_phy_handle tenbaset_phy_handle_t#
TENBASET_PHY handle structure.
-
FSL_TENBASET_PHY_DRIVER_VERSION#
TENBASET_PHY driver version.
-
TENBASET_PHY_PLCADIAG1_FLAG(flag)#
-
TENBASET_PHY_PLCADIAG2_FLAG(flag)#
-
TENBASET_PHY_PLCADIAG1_FLAG_TO_REG(flag)#
-
TENBASET_PHY_PLCADIAG2_FLAG_TO_REG(flag)#
-
void TENBASET_PHY_GetDefaultConfig(tenbaset_phy_config_t *config)#
Gets the default configuration structure.
This function initializes the TENBASET_PHY configuration structure to default values. The default values are:
config->plcaConfig.nodeId = 0xFFU; config->plcaConfig.nodeCount = 0x08U; config->plcaConfig.toTimer = 0x20U; config->plcaConfig.burstTimer = 0x80U; config->plcaConfig.maxBurstCount = 0U; config->plcaConfig.enable = false; config->wakeConfig.suspendWakeEnable = true; config->wakeConfig.remoteWakeEnable = true; config->wakeConfig.localWakeEnable = true; config->wakeConfig.remoteWakeForwardEnable = true; config->wakeConfig.localWakeWupEnable = true; config->wakeConfig.wupTimeout = 0xFFU; config->interruptMask = 0U;
- Parameters:
config – Pointer to the TENBASET_PHY configuration structure.
-
void TENBASET_PHY_CreateHandle(TENBASET_PHY_Type *base, tenbaset_phy_handle_t *handle, tenbaset_phy_callback_t callback, void *userData)#
Initializes driver handle for TENBASET_PHY instance.
This function initializes the handle with the provided data.
- Parameters:
base – TENBASET_PHY peripheral base address.
handle – Pointer to the TENBASET_PHY handle structure.
callback – Pointer to the callback function called from ISR.
userData – Pointer to the user data (passed to the callback).
-
status_t TENBASET_PHY_Init(TENBASET_PHY_Type *base, const tenbaset_phy_config_t *config, tenbaset_phy_handle_t *handle)#
Initializes the TENBASET_PHY peripheral.
This function initializes the TENBASET_PHY peripheral with the provided configuration.
- Parameters:
base – TENBASET_PHY peripheral base address.
config – Pointer to the TENBASET_PHY configuration structure.
handle – Pointer to the TENBASET_PHY handle structure.
- Return values:
kStatus_Success – Initialization successful.
kStatus_Timeout – Initialization timeout.
kStatus_Fail – PLCA configuration error.
-
void TENBASET_PHY_Deinit(TENBASET_PHY_Type *base, tenbaset_phy_handle_t *handle)#
Deinitializes the TENBASET_PHY peripheral.
- Parameters:
base – TENBASET_PHY peripheral base address.
handle – Pointer to the TENBASET_PHY handle structure.
-
status_t TENBASET_PHY_SetMode(TENBASET_PHY_Type *base, tenbaset_phy_mode_t mode)#
Sets the TENBASET_PHY operating mode.
- Parameters:
base – TENBASET_PHY peripheral base address.
mode – Target operating mode.
- Return values:
kStatus_Success – Mode set successfully.
kStatus_Timeout – Mode transition timeout.
kStatus_InvalidArgument – Invalid mode transition.
-
tenbaset_phy_mode_status_t TENBASET_PHY_GetModeStatus(TENBASET_PHY_Type *base)#
Gets the current TENBASET_PHY mode status.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
Current mode status.
-
bool TENBASET_PHY_IsLinkUp(TENBASET_PHY_Type *base)#
Checks if the link is up.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
true if link is up, false otherwise.
-
void TENBASET_PHY_GetPLCAConfig(TENBASET_PHY_Type *base, tenbaset_phy_plca_config_t *config)#
Retrieves the current Physical Layer Collision Avoidance (PLCA) configuration.
This function reads the current PLCA settings from the registers, including node ID, node count, timers, and PLCA enable status.
- Parameters:
base – TENBASET_PHY peripheral base address
config – Pointer to store the current PLCA configuration
-
status_t TENBASET_PHY_SetPLCAConfig(TENBASET_PHY_Type *base, const tenbaset_phy_plca_config_t *config)#
Configures PLCA settings.
- Parameters:
base – TENBASET_PHY peripheral base address.
config – Pointer to PLCA configuration structure.
- Return values:
kStatus_Success – PLCA configured successfully.
kStatus_Fail – PLCA configuration error.
-
bool TENBASET_PHY_GetPLCAStatus(TENBASET_PHY_Type *base)#
Gets PLCA status.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
PLCA node status.
-
uint32_t TENBASET_PHY_GetPLCADiagnosticFlags(TENBASET_PHY_Type *base)#
Gets PLCA diagnostic flags.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
diagnostic flags (combination of _tenbaset_phy_plca_diag_flags).
-
void TENBASET_PHY_ClearPLCADiagnosticFlags(TENBASET_PHY_Type *base, uint32_t diagFlags)#
Clears PLCA diagnostic flags.
- Parameters:
base – TENBASET_PHY peripheral base address.
diagFlags – Flags to clear (combination of _tenbaset_phy_plca_diag_flags).
-
uint16_t TENBASET_PHY_GetBeaconCounter(TENBASET_PHY_Type *base)#
Gets PLCA beacon counter.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
RX beacon counter value.
-
void TENBASET_PHY_ClearBeaconCounter(TENBASET_PHY_Type *base)#
Clears PLCA beacon counter.
- Parameters:
base – TENBASET_PHY peripheral base address.
-
uint16_t TENBASET_PHY_GetTransmitOpportunityCounter(TENBASET_PHY_Type *base)#
Gets PLCA transmit opportunity counter.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
Transmit opportunity counter value.
-
void TENBASET_PHY_ClearTransmitOpportunityCounter(TENBASET_PHY_Type *base)#
Clears PLCA transmit opportunity counter.
- Parameters:
base – TENBASET_PHY peripheral base address.
-
void TENBASET_PHY_GetPMAConfig(TENBASET_PHY_Type *base, tenbaset_phy_pma_config_t *config)#
Retrieves the current PMA configuration.
Reads the PMA control register and populates the configuration structure.
- Parameters:
base – TENBASET_PHY peripheral base address
config – Pointer to store PMA configuration
-
void TENBASET_PHY_SetPMAConfig(TENBASET_PHY_Type *base, const tenbaset_phy_pma_config_t *config)#
Configures the PMA operation.
Writes to the PMA control register to set reset, transmission, and loopback modes.
- Parameters:
base – TENBASET_PHY peripheral base address
config – Pointer to PMA configuration
-
void TENBASET_PHY_GetPCSConfig(TENBASET_PHY_Type *base, tenbaset_phy_pcs_config_t *config)#
Retrieves the current PCS configuration.
Reads the PCS control register and populates the configuration structure.
- Parameters:
base – TENBASET_PHY peripheral base address
config – Pointer to store PCS configuration
-
void TENBASET_PHY_SetPCSConfig(TENBASET_PHY_Type *base, const tenbaset_phy_pcs_config_t *config)#
Configures the PCS operation.
Writes to the PCS control register to set reset and loopback modes.
- Parameters:
base – TENBASET_PHY peripheral base address
config – Pointer to PCS configuration
-
uint16_t TENBASET_PHY_GetRemoteJabberCounter(TENBASET_PHY_Type *base)#
Gets PCS remote jabber counter.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
Remote jabber counter value.
-
uint16_t TENBASET_PHY_GetCollisionCounter(TENBASET_PHY_Type *base)#
Gets PCS physical collision counter.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
Physical collision counter value.
-
void TENBASET_PHY_SetWakeConfig(TENBASET_PHY_Type *base, const tenbaset_phy_wake_config_t *config)#
Configures wake settings.
- Parameters:
base – TENBASET_PHY peripheral base address.
config – Pointer to wake configuration structure.
-
void TENBASET_PHY_TriggerWakeForward(TENBASET_PHY_Type *base)#
Triggers a wake-forward pulse.
This function commands the TENBASET_PHY PHY to generate a wake-forward pulse.
- Parameters:
base – TENBASET_PHY peripheral base address.
-
void TENBASET_PHY_TriggerWakeUp(TENBASET_PHY_Type *base)#
Triggers WUP sequencer transmission.
- Parameters:
base – TENBASET_PHY peripheral base address.
-
void TENBASET_PHY_AbortWakeUp(TENBASET_PHY_Type *base)#
Aborts WUP sequencer when pending.
- Parameters:
base – TENBASET_PHY peripheral base address.
-
void TENBASET_PHY_GetWakeUpStatus(TENBASET_PHY_Type *base, tenbaset_phy_wup_status_info_t *statusInfo)#
Gets WUP status information.
- Parameters:
base – TENBASET_PHY peripheral base address.
statusInfo – Pointer to structure to store WUP status information.
-
void TENBASET_PHY_EnableInterrupts(TENBASET_PHY_Type *base, uint16_t mask)#
Enables TENBASET_PHY interrupts of functional events to the MCU.
- Parameters:
base – TENBASET_PHY peripheral base address.
mask – Interrupt mask (combination of _tenbaset_phy_interrupt_flags).
-
void TENBASET_PHY_DisableInterrupts(TENBASET_PHY_Type *base, uint16_t mask)#
Disables TENBASET_PHY interrupts of functional events to the MCU.
- Parameters:
base – TENBASET_PHY peripheral base address.
mask – Interrupt mask (combination of _tenbaset_phy_interrupt_flags).
-
uint16_t TENBASET_PHY_GetInterruptStatus(TENBASET_PHY_Type *base)#
Gets interrupt status flags of functional events to the MCU.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
Interrupt status flags.
-
void TENBASET_PHY_ClearInterruptStatus(TENBASET_PHY_Type *base, uint16_t mask)#
Clears interrupt status flags of functional events to the MCU.
- Parameters:
base – TENBASET_PHY peripheral base address.
mask – Interrupt flags to clear.
-
void TENBASET_PHY_EnableInterrupts2(TENBASET_PHY_Type *base, uint16_t mask)#
Enables TENBASET_PHY interrupts of safety related events to the Fault Collection and Control Unit (FCCU).
- Parameters:
base – TENBASET_PHY peripheral base address.
mask – Interrupt mask (combination of _tenbaset_phy_interrupt_flags).
-
void TENBASET_PHY_DisableInterrupts2(TENBASET_PHY_Type *base, uint16_t mask)#
Disables TENBASET_PHY interrupts of safety related events to the Fault Collection and Control Unit (FCCU).
- Parameters:
base – TENBASET_PHY peripheral base address.
mask – Interrupt mask (combination of _tenbaset_phy_interrupt_flags).
-
uint16_t TENBASET_PHY_GetInterruptStatus2(TENBASET_PHY_Type *base)#
Gets interrupt status flags of safety related events to the Fault Collection and Control Unit (FCCU).
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
Interrupt status flags.
-
void TENBASET_PHY_ClearInterruptStatus2(TENBASET_PHY_Type *base, uint16_t mask)#
Clears interrupt status flags of safety related events to the Fault Collection and Control Unit (FCCU).
- Parameters:
base – TENBASET_PHY peripheral base address.
mask – Interrupt flags to clear.
-
uint32_t TENBASET_PHY_GetPhyId(TENBASET_PHY_Type *base)#
Gets PHY identifier.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
OUI part of the 32-bit PHY identifier.
-
void TENBASET_PHY_GetVersionInfo(TENBASET_PHY_Type *base, tenbaset_phy_version_info_t *versionInfo)#
Gets version information.
- Parameters:
base – TENBASET_PHY peripheral base address.
versionInfo – Pointer to structure to store version information.
-
uint16_t TENBASET_PHY_GetTransceiverDiagnosticFlags(TENBASET_PHY_Type *base)#
Gets transceiver diagnostic flags.
- Parameters:
base – TENBASET_PHY peripheral base address.
- Returns:
Diagnostic flags (combination of _tenbaset_phy_txc_diag_flags).
-
void TENBASET_PHY_ClearTransceiverDiagnosticFlags(TENBASET_PHY_Type *base, uint16_t diagFlags)#
Clears transceiver diagnostic flags.
- Parameters:
base – TENBASET_PHY peripheral base address.
diagFlags – Flags to clear (combination of _tenbaset_phy_txc_diag_flags).
-
status_t TENBASET_PHY_SetSMIConfig(TENBASET_PHY_Type *base, const tenbaset_phy_smi_config_t *config)#
Configures the SMI (Serial Management Interface) parameters.
This function sets up the SMI interface configuration, including:
MDIO hold time
Preamble generation
MDC clock frequency
- Parameters:
base – TENBASET_PHY peripheral base address
config – Pointer to SMI configuration structure
- Returns:
status_t Operation status
kStatus_Success: Configuration successful
kStatus_InvalidArgument: Invalid speed parameter
-
bool TENBASET_PHY_GetSMIStatus(TENBASET_PHY_Type *base, tenbaset_phy_smi_error_code_t *errorCode)#
Retrieves the current SMI status.
Checks if the SMI is ready and optionally retrieves the current error code.
- Parameters:
base – TENBASET_PHY peripheral base address
errorCode – Pointer to store error code (can be NULL if error code not needed)
- Returns:
bool
true: SMI is ready
false: SMI is not ready
-
status_t TENBASET_PHY_SMIRead(TENBASET_PHY_Type *base, uint8_t phyAddr, uint8_t regAddr, uint16_t *data)#
Reads a register from an external PMD transceiver via SMI.
Performs an SMI read operation with timeout handling.
- Parameters:
base – TENBASET_PHY peripheral base address
phyAddr – PHY address of PMD transceiver
regAddr – Register address to read
data – Pointer to store the read register value
- Returns:
status_t Operation status
kStatus_Success: Read successful
kStatus_Timeout: SMI not ready within timeout period
-
status_t TENBASET_PHY_SMIWrite(TENBASET_PHY_Type *base, uint8_t phyAddr, uint8_t regAddr, uint16_t data)#
Writes a register to an external PMD transceiver via SMI.
Performs an SMI write operation with timeout handling.
- Parameters:
base – TENBASET_PHY peripheral base address
phyAddr – PHY address of PMD transceiver
regAddr – Register address to write
data – Value to write to the register
- Returns:
status_t Operation status
kStatus_Success: Write successful
kStatus_Timeout: SMI not ready within timeout period
-
struct _tenbaset_phy_plca_config#
- #include <fsl_tenbaset_phy.h>
TENBASET_PHY PLCA configuration structure.
-
struct _tenbaset_phy_pma_config#
- #include <fsl_tenbaset_phy.h>
PMA configuration structure.
-
struct _tenbaset_phy_pcs_config#
- #include <fsl_tenbaset_phy.h>
PCS configuration structure.
-
struct _tenbaset_phy_wake_config#
- #include <fsl_tenbaset_phy.h>
TENBASET_PHY wake configuration structure.
Public Members
-
bool suspendWakeEnable#
Enable wake-up to WAITINIT mode by SUSPEND detection
-
bool remoteWakeEnable#
Enable wake-up to WAITINIT mode by remote-wake-event
-
bool localWakeEnable#
Enable wake-up to WAITINIT mode by local-wake-event
-
bool remoteWakeForwardEnable#
Enable wake forwarding of a remote-wake-event
-
bool localWakeWupEnable#
Enable WUP transmission by local-wake-event
-
uint8_t wupTimeout#
WUP timeout value (WUP time-out = (WUPTIMEOUT + 1) * 10ms)
-
bool suspendWakeEnable#
-
struct _tenbaset_phy_wup_status_info#
- #include <fsl_tenbaset_phy.h>
TENBASET_PHY WUP status structure.
Public Members
-
tenbaset_phy_wup_status_t status#
WUP sequencer status
-
tenbaset_phy_wup_error_code_t errorCode#
Error code of previous WUP sequence
-
tenbaset_phy_wup_status_t status#
-
struct _tenbaset_phy_version_info#
- #include <fsl_tenbaset_phy.h>
TENBASET_PHY version information structure.
-
struct _tenbaset_phy_smi_config#
- #include <fsl_tenbaset_phy.h>
SMI configuration structure.
Public Members
-
tenbaset_phy_smi_hold_time_t holdTime#
MDIO hold time
-
bool preambleEnable#
Enable SMI preamble generation
-
uint8_t speed#
MDC clock frequency divisor (0-63)
-
tenbaset_phy_smi_hold_time_t holdTime#
-
struct _tenbaset_phy_config#
- #include <fsl_tenbaset_phy.h>
TENBASET_PHY configuration structure.
Public Members
-
tenbaset_phy_plca_config_t plcaConfig#
PLCA configuration
-
tenbaset_phy_wake_config_t wakeConfig#
Wake configuration
-
uint16_t interruptMask#
Mask of enabled interrupts
-
tenbaset_phy_plca_config_t plcaConfig#
-
struct _tenbaset_phy_handle#
- #include <fsl_tenbaset_phy.h>
TENBASET_PHY handle structure.
Public Members
-
tenbaset_phy_callback_t callback#
Callback function
-
void *userData#
User data for callback
-
bool initialized#
Initialization status
-
tenbaset_phy_callback_t callback#
TPM: Timer PWM Module#
-
uint32_t TPM_GetInstance(TPM_Type *base)#
Gets the instance from the base address.
- Parameters:
base – TPM peripheral base address
- Returns:
The TPM instance
-
void TPM_Init(TPM_Type *base, const tpm_config_t *config)#
Ungates the TPM clock and configures the peripheral for basic operation.
Note
This API should be called at the beginning of the application using the TPM driver.
- Parameters:
base – TPM peripheral base address
config – Pointer to user’s TPM config structure.
-
void TPM_Deinit(TPM_Type *base)#
Stops the counter and gates the TPM clock.
- Parameters:
base – TPM peripheral base address
-
void TPM_GetDefaultConfig(tpm_config_t *config)#
Fill in the TPM config struct with the default settings.
The default values are:
config->prescale = kTPM_Prescale_Divide_1; config->useGlobalTimeBase = false; config->syncGlobalTimeBase = false; config->dozeEnable = false; config->dbgMode = false; config->enableReloadOnTrigger = false; config->enableStopOnOverflow = false; config->enableStartOnTrigger = false; #if FSL_FEATURE_TPM_HAS_PAUSE_COUNTER_ON_TRIGGER config->enablePauseOnTrigger = false; #endif config->triggerSelect = kTPM_Trigger_Select_0; #if FSL_FEATURE_TPM_HAS_EXTERNAL_TRIGGER_SELECTION config->triggerSource = kTPM_TriggerSource_External; config->extTriggerPolarity = kTPM_ExtTrigger_Active_High; #endif #if defined(FSL_FEATURE_TPM_HAS_POL) && FSL_FEATURE_TPM_HAS_POL config->chnlPolarity = 0U; #endif
- Parameters:
config – Pointer to user’s TPM config structure.
-
tpm_clock_prescale_t TPM_CalculateCounterClkDiv(TPM_Type *base, uint32_t counterPeriod_Hz, uint32_t srcClock_Hz)#
Calculates the counter clock prescaler.
This function calculates the values for SC[PS].
return Calculated clock prescaler value.
- Parameters:
base – TPM peripheral base address
counterPeriod_Hz – The desired frequency in Hz which corresponding to the time when the counter reaches the mod value
srcClock_Hz – TPM counter clock in Hz
-
static inline void TPM_Reset(TPM_Type *base)#
Performs a software reset on the TPM module.
Reset all internal logic and registers, except the Global Register. Remains set until cleared by software.
Note
TPM software reset is available on certain SoC’s only
- Parameters:
base – TPM peripheral base address
-
status_t TPM_SetupPwm(TPM_Type *base, const tpm_chnl_pwm_signal_param_t *chnlParams, uint8_t numOfChnls, tpm_pwm_mode_t mode, uint32_t pwmFreq_Hz, uint32_t srcClock_Hz)#
Configures the PWM signal parameters.
User calls this function to configure the PWM signals period, mode, dutycycle and edge. Use this function to configure all the TPM channels that will be used to output a PWM signal
- Parameters:
base – TPM peripheral base address
chnlParams – Array of PWM channel parameters to configure the channel(s)
numOfChnls – Number of channels to configure, this should be the size of the array passed in
mode – PWM operation mode, options available in enumeration tpm_pwm_mode_t
pwmFreq_Hz – PWM signal frequency in Hz
srcClock_Hz – TPM counter clock in Hz
- Returns:
kStatus_Success PWM setup successful kStatus_Error PWM setup failed kStatus_Timeout PWM setup timeout when write register CnV or MOD
-
status_t TPM_UpdatePwmDutycycle(TPM_Type *base, tpm_chnl_t chnlNumber, tpm_pwm_mode_t currentPwmMode, uint8_t dutyCyclePercent)#
Update the duty cycle of an active PWM signal.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number. In combined mode, this represents the channel pair number
currentPwmMode – The current PWM mode set during PWM setup
dutyCyclePercent – New PWM pulse width, value should be between 0 to 100 0=inactive signal(0% duty cycle)… 100=active signal (100% duty cycle)
- Returns:
kStatus_Success if the PWM setup was successful, kStatus_Error on failure
-
void TPM_UpdateChnlEdgeLevelSelect(TPM_Type *base, tpm_chnl_t chnlNumber, uint8_t level)#
Update the edge level selection for a channel.
Note
When the TPM has PWM pause level select feature (FSL_FEATURE_TPM_HAS_PAUSE_LEVEL_SELECT = 1), the PWM output cannot be turned off by selecting the output level. In this case, must use TPM_DisableChannel API to close the PWM output.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
level – The level to be set to the ELSnB:ELSnA field; valid values are 00, 01, 10, 11. See the appropriate SoC reference manual for details about this field.
-
static inline uint8_t TPM_GetChannelContorlBits(TPM_Type *base, tpm_chnl_t chnlNumber)#
Get the channel control bits value (mode, edge and level bit fields).
- Deprecated:
Please use TPM_GetChannelControlBits() instead.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
- Returns:
The contorl bits value. This is the logical OR of members of the enumeration tpm_chnl_control_bit_mask_t.
-
static inline uint8_t TPM_GetChannelControlBits(TPM_Type *base, tpm_chnl_t chnlNumber)#
Get the channel control bits value (mode, edge and level bit fields).
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
- Returns:
The control bits value. This is the logical OR of members of the enumeration tpm_chnl_control_bit_mask_t.
-
static inline status_t TPM_DisableChannel(TPM_Type *base, tpm_chnl_t chnlNumber)#
Dsiable the channel.
This function disable the channel by clear all mode and level control bits.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
- Returns:
kStatus_Success PWM setup successful kStatus_Timeout PWM setup timeout when write register CnSC
-
static inline status_t TPM_EnableChannel(TPM_Type *base, tpm_chnl_t chnlNumber, uint8_t control)#
Enable the channel according to mode and level configs.
This function enable the channel output according to input mode/level config parameters.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
control – The contorl bits value. This is the logical OR of members of the enumeration tpm_chnl_control_bit_mask_t.
- Returns:
kStatus_Success PWM setup successful kStatus_Timeout PWM setup timeout when write register CnSC
-
void TPM_SetupInputCapture(TPM_Type *base, tpm_chnl_t chnlNumber, tpm_input_capture_edge_t captureMode)#
Enables capturing an input signal on the channel using the function parameters.
When the edge specified in the captureMode argument occurs on the channel, the TPM counter is captured into the CnV register. The user has to read the CnV register separately to get this value.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
captureMode – Specifies which edge to capture
-
status_t TPM_SetupOutputCompare(TPM_Type *base, tpm_chnl_t chnlNumber, tpm_output_compare_mode_t compareMode, uint32_t compareValue)#
Configures the TPM to generate timed pulses.
When the TPM counter matches the value of compareVal argument (this is written into CnV reg), the channel output is changed based on what is specified in the compareMode argument.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
compareMode – Action to take on the channel output when the compare condition is met
compareValue – Value to be programmed in the CnV register.
- Returns:
kStatus_Success PWM setup successful kStatus_Timeout PWM setup timeout when write register CnV
-
void TPM_SetupDualEdgeCapture(TPM_Type *base, tpm_chnl_t chnlPairNumber, const tpm_dual_edge_capture_param_t *edgeParam, uint32_t filterValue)#
Configures the dual edge capture mode of the TPM.
This function allows to measure a pulse width of the signal on the input of channel of a channel pair. The filter function is disabled if the filterVal argument passed is zero.
- Parameters:
base – TPM peripheral base address
chnlPairNumber – The TPM channel pair number; options are 0, 1, 2, 3
edgeParam – Sets up the dual edge capture function
filterValue – Filter value, specify 0 to disable filter.
-
void TPM_SetupQuadDecode(TPM_Type *base, const tpm_phase_params_t *phaseAParams, const tpm_phase_params_t *phaseBParams, tpm_quad_decode_mode_t quadMode)#
Configures the parameters and activates the quadrature decode mode.
- Parameters:
base – TPM peripheral base address
phaseAParams – Phase A configuration parameters
phaseBParams – Phase B configuration parameters
quadMode – Selects encoding mode used in quadrature decoder mode
-
static inline void TPM_SetChannelPolarity(TPM_Type *base, tpm_chnl_t chnlNumber, bool enable)#
Set the input and output polarity of each of the channels.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
enable – true: Set the channel polarity to active high; false: Set the channel polarity to active low;
-
static inline void TPM_EnableChannelExtTrigger(TPM_Type *base, tpm_chnl_t chnlNumber, bool enable)#
Enable external trigger input to be used by channel.
In input capture mode, configures the trigger input that is used by the channel to capture the counter value. In output compare or PWM mode, configures the trigger input used to modulate the channel output. When modulating the output, the output is forced to the channel initial value whenever the trigger is not asserted.
Note
No matter how many external trigger sources there are, only input trigger 0 and 1 are used. The even numbered channels share the input trigger 0 and the odd numbered channels share the second input trigger 1.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
enable – true: Configures trigger input 0 or 1 to be used by channel; false: Trigger input has no effect on the channel
-
void TPM_EnableInterrupts(TPM_Type *base, uint32_t mask)#
Enables the selected TPM interrupts.
- Parameters:
base – TPM peripheral base address
mask – The interrupts to enable. This is a logical OR of members of the enumeration tpm_interrupt_enable_t
-
void TPM_DisableInterrupts(TPM_Type *base, uint32_t mask)#
Disables the selected TPM interrupts.
- Parameters:
base – TPM peripheral base address
mask – The interrupts to disable. This is a logical OR of members of the enumeration tpm_interrupt_enable_t
-
uint32_t TPM_GetEnabledInterrupts(TPM_Type *base)#
Gets the enabled TPM interrupts.
- Parameters:
base – TPM peripheral base address
- Returns:
The enabled interrupts. This is the logical OR of members of the enumeration tpm_interrupt_enable_t
-
void TPM_RegisterCallBack(TPM_Type *base, tpm_callback_t callback)#
Register callback.
If channel or overflow interrupt is enabled by the user, then a callback can be registered which will be invoked when the interrupt is triggered.
- Parameters:
base – TPM peripheral base address
callback – Callback function
-
void TPM_DriverIRQHandler(uint32_t instance)#
TPM driver IRQ handler common entry.
This function provides the common IRQ request entry for TPM.
- Parameters:
instance – TPM instance.
-
static inline uint32_t TPM_GetChannelValue(TPM_Type *base, tpm_chnl_t chnlNumber)#
Gets the TPM channel value.
Note
The TPM channel value contain the captured TPM counter value for the input modes or the match value for the output modes.
- Parameters:
base – TPM peripheral base address
chnlNumber – The channel number
- Returns:
The channle CnV regisyer value.
-
static inline uint32_t TPM_GetStatusFlags(TPM_Type *base)#
Gets the TPM status flags.
- Parameters:
base – TPM peripheral base address
- Returns:
The status flags. This is the logical OR of members of the enumeration tpm_status_flags_t
-
static inline void TPM_ClearStatusFlags(TPM_Type *base, uint32_t mask)#
Clears the TPM status flags.
- Parameters:
base – TPM peripheral base address
mask – The status flags to clear. This is a logical OR of members of the enumeration tpm_status_flags_t
-
static inline status_t TPM_SetTimerPeriod(TPM_Type *base, uint32_t ticks)#
Sets the timer period in units of ticks.
Timers counts from 0 until it equals the count value set here. The count value is written to the MOD register.
Note
This API allows the user to use the TPM module as a timer. Do not mix usage of this API with TPM’s PWM setup API’s.
Call the utility macros provided in the fsl_common.h to convert usec or msec to ticks.
- Parameters:
base – TPM peripheral base address
ticks – A timer period in units of ticks, which should be equal or greater than 1.
- Returns:
kStatus_Success PWM setup successful kStatus_Timeout PWM setup timeout when write register CnSC
-
static inline uint32_t TPM_GetCurrentTimerCount(TPM_Type *base)#
Reads the current timer counting value.
This function returns the real-time timer counting value in a range from 0 to a timer period.
Note
Call the utility macros provided in the fsl_common.h to convert ticks to usec or msec.
- Parameters:
base – TPM peripheral base address
- Returns:
The current counter value in ticks
-
static inline void TPM_StartTimer(TPM_Type *base, tpm_clock_source_t clockSource)#
Starts the TPM counter.
- Parameters:
base – TPM peripheral base address
clockSource – TPM clock source; once clock source is set the counter will start running
-
static inline status_t TPM_StopTimer(TPM_Type *base)#
Stops the TPM counter.
- Parameters:
base – TPM peripheral base address
- Returns:
kStatus_Success PWM setup successful kStatus_Timeout PWM setup timeout when write register CnSC
-
FSL_TPM_DRIVER_VERSION#
TPM driver version 2.5.0.
-
enum _tpm_chnl#
List of TPM channels.
Note
Actual number of available channels is SoC dependent
Values:
-
enumerator kTPM_Chnl_0#
TPM channel number 0
-
enumerator kTPM_Chnl_1#
TPM channel number 1
-
enumerator kTPM_Chnl_2#
TPM channel number 2
-
enumerator kTPM_Chnl_3#
TPM channel number 3
-
enumerator kTPM_Chnl_4#
TPM channel number 4
-
enumerator kTPM_Chnl_5#
TPM channel number 5
-
enumerator kTPM_Chnl_6#
TPM channel number 6
-
enumerator kTPM_Chnl_7#
TPM channel number 7
-
enumerator kTPM_Chnl_0#
-
enum _tpm_pwm_mode#
TPM PWM operation modes.
Values:
-
enumerator kTPM_EdgeAlignedPwm#
Edge aligned PWM
-
enumerator kTPM_CombinedPwm#
Combined PWM (Edge-aligned, center-aligned, or asymmetrical PWMs can be obtained in combined mode using different software configurations)
-
enumerator kTPM_EdgeAlignedPwm#
-
enum _tpm_pwm_level_select#
TPM PWM output pulse mode: high-true, low-true or no output.
Note
When the TPM has PWM pause level select feature, the PWM output cannot be turned off by selecting the output level. In this case, the channel must be closed to close the PWM output.
Values:
-
enumerator kTPM_HighTrue#
High true pulses
-
enumerator kTPM_LowTrue#
Low true pulses
-
enumerator kTPM_HighTrue#
-
enum _tpm_pwm_pause_level_select#
TPM PWM output when first enabled or paused: set or clear.
Values:
-
enumerator kTPM_ClearOnPause#
Clear Output when counter first enabled or paused.
-
enumerator kTPM_SetOnPause#
Set Output when counter first enabled or paused.
-
enumerator kTPM_ClearOnPause#
-
enum _tpm_chnl_control_bit_mask#
List of TPM channel modes and level control bit mask.
Values:
-
enumerator kTPM_ChnlELSnAMask#
Channel ELSA bit mask.
-
enumerator kTPM_ChnlELSnBMask#
Channel ELSB bit mask.
-
enumerator kTPM_ChnlMSAMask#
Channel MSA bit mask.
-
enumerator kTPM_ChnlMSBMask#
Channel MSB bit mask.
-
enumerator kTPM_ChnlELSnAMask#
-
enum _tpm_trigger_select#
Trigger sources available.
This is used for both internal & external trigger sources (external trigger sources available in certain SoC’s)
Note
The actual trigger sources available is SoC-specific.
Values:
-
enumerator kTPM_Trigger_Select_0#
-
enumerator kTPM_Trigger_Select_1#
-
enumerator kTPM_Trigger_Select_2#
-
enumerator kTPM_Trigger_Select_3#
-
enumerator kTPM_Trigger_Select_4#
-
enumerator kTPM_Trigger_Select_5#
-
enumerator kTPM_Trigger_Select_6#
-
enumerator kTPM_Trigger_Select_7#
-
enumerator kTPM_Trigger_Select_8#
-
enumerator kTPM_Trigger_Select_9#
-
enumerator kTPM_Trigger_Select_10#
-
enumerator kTPM_Trigger_Select_11#
-
enumerator kTPM_Trigger_Select_12#
-
enumerator kTPM_Trigger_Select_13#
-
enumerator kTPM_Trigger_Select_14#
-
enumerator kTPM_Trigger_Select_15#
-
enumerator kTPM_Trigger_Select_0#
-
enum _tpm_trigger_source#
Trigger source options available.
Note
This selection is available only on some SoC’s. For SoC’s without this selection, the only trigger source available is internal triger.
Values:
-
enumerator kTPM_TriggerSource_External#
Use external trigger input
-
enumerator kTPM_TriggerSource_Internal#
Use internal trigger (channel pin input capture)
-
enumerator kTPM_TriggerSource_External#
-
enum _tpm_ext_trigger_polarity#
External trigger source polarity.
Note
Selects the polarity of the external trigger source.
Values:
-
enumerator kTPM_ExtTrigger_Active_High#
External trigger input is active high
-
enumerator kTPM_ExtTrigger_Active_Low#
External trigger input is active low
-
enumerator kTPM_ExtTrigger_Active_High#
-
enum _tpm_output_compare_mode#
TPM output compare modes.
Values:
-
enumerator kTPM_NoOutputSignal#
No channel output when counter reaches CnV
-
enumerator kTPM_ToggleOnMatch#
Toggle output
-
enumerator kTPM_ClearOnMatch#
Clear output
-
enumerator kTPM_SetOnMatch#
Set output
-
enumerator kTPM_HighPulseOutput#
Pulse output high
-
enumerator kTPM_LowPulseOutput#
Pulse output low
-
enumerator kTPM_NoOutputSignal#
-
enum _tpm_input_capture_edge#
TPM input capture edge.
Values:
-
enumerator kTPM_RisingEdge#
Capture on rising edge only
-
enumerator kTPM_FallingEdge#
Capture on falling edge only
-
enumerator kTPM_RiseAndFallEdge#
Capture on rising or falling edge
-
enumerator kTPM_RisingEdge#
-
enum _tpm_quad_decode_mode#
TPM quadrature decode modes.
Note
This mode is available only on some SoC’s.
Values:
-
enumerator kTPM_QuadPhaseEncode#
Phase A and Phase B encoding mode
-
enumerator kTPM_QuadCountAndDir#
Count and direction encoding mode
-
enumerator kTPM_QuadPhaseEncode#
-
enum _tpm_phase_polarity#
TPM quadrature phase polarities.
Values:
-
enumerator kTPM_QuadPhaseNormal#
Phase input signal is not inverted
-
enumerator kTPM_QuadPhaseInvert#
Phase input signal is inverted
-
enumerator kTPM_QuadPhaseNormal#
-
enum _tpm_clock_source#
TPM clock source selection.
Values:
-
enumerator kTPM_SystemClock#
System clock
-
enumerator kTPM_ExternalClock#
External TPM_EXTCLK pin clock
-
enumerator kTPM_ExternalInputTriggerClock#
Selected external input trigger clock
-
enumerator kTPM_SystemClock#
-
enum _tpm_clock_prescale#
TPM prescale value selection for the clock source.
Values:
-
enumerator kTPM_Prescale_Divide_1#
Divide by 1
-
enumerator kTPM_Prescale_Divide_2#
Divide by 2
-
enumerator kTPM_Prescale_Divide_4#
Divide by 4
-
enumerator kTPM_Prescale_Divide_8#
Divide by 8
-
enumerator kTPM_Prescale_Divide_16#
Divide by 16
-
enumerator kTPM_Prescale_Divide_32#
Divide by 32
-
enumerator kTPM_Prescale_Divide_64#
Divide by 64
-
enumerator kTPM_Prescale_Divide_128#
Divide by 128
-
enumerator kTPM_Prescale_Divide_1#
-
enum _tpm_interrupt_enable#
List of TPM interrupts.
Values:
-
enumerator kTPM_Chnl0InterruptEnable#
Channel 0 interrupt.
-
enumerator kTPM_Chnl1InterruptEnable#
Channel 1 interrupt.
-
enumerator kTPM_Chnl2InterruptEnable#
Channel 2 interrupt.
-
enumerator kTPM_Chnl3InterruptEnable#
Channel 3 interrupt.
-
enumerator kTPM_Chnl4InterruptEnable#
Channel 4 interrupt.
-
enumerator kTPM_Chnl5InterruptEnable#
Channel 5 interrupt.
-
enumerator kTPM_Chnl6InterruptEnable#
Channel 6 interrupt.
-
enumerator kTPM_Chnl7InterruptEnable#
Channel 7 interrupt.
-
enumerator kTPM_TimeOverflowInterruptEnable#
Time overflow interrupt.
-
enumerator kTPM_Chnl0InterruptEnable#
-
enum _tpm_status_flags#
List of TPM flags.
Values:
-
enumerator kTPM_Chnl0Flag#
Channel 0 flag
-
enumerator kTPM_Chnl1Flag#
Channel 1 flag
-
enumerator kTPM_Chnl2Flag#
Channel 2 flag
-
enumerator kTPM_Chnl3Flag#
Channel 3 flag
-
enumerator kTPM_Chnl4Flag#
Channel 4 flag
-
enumerator kTPM_Chnl5Flag#
Channel 5 flag
-
enumerator kTPM_Chnl6Flag#
Channel 6 flag
-
enumerator kTPM_Chnl7Flag#
Channel 7 flag
-
enumerator kTPM_TimeOverflowFlag#
Time overflow flag
-
enumerator kTPM_Chnl0Flag#
-
typedef enum _tpm_chnl tpm_chnl_t#
List of TPM channels.
Note
Actual number of available channels is SoC dependent
-
typedef enum _tpm_pwm_mode tpm_pwm_mode_t#
TPM PWM operation modes.
-
typedef enum _tpm_pwm_level_select tpm_pwm_level_select_t#
TPM PWM output pulse mode: high-true, low-true or no output.
Note
When the TPM has PWM pause level select feature, the PWM output cannot be turned off by selecting the output level. In this case, the channel must be closed to close the PWM output.
-
typedef enum _tpm_pwm_pause_level_select tpm_pwm_pause_level_select_t#
TPM PWM output when first enabled or paused: set or clear.
-
typedef enum _tpm_chnl_control_bit_mask tpm_chnl_control_bit_mask_t#
List of TPM channel modes and level control bit mask.
-
typedef struct _tpm_chnl_pwm_signal_param tpm_chnl_pwm_signal_param_t#
Options to configure a TPM channel’s PWM signal.
-
typedef enum _tpm_trigger_select tpm_trigger_select_t#
Trigger sources available.
This is used for both internal & external trigger sources (external trigger sources available in certain SoC’s)
Note
The actual trigger sources available is SoC-specific.
-
typedef enum _tpm_trigger_source tpm_trigger_source_t#
Trigger source options available.
Note
This selection is available only on some SoC’s. For SoC’s without this selection, the only trigger source available is internal triger.
-
typedef enum _tpm_ext_trigger_polarity tpm_ext_trigger_polarity_t#
External trigger source polarity.
Note
Selects the polarity of the external trigger source.
-
typedef enum _tpm_output_compare_mode tpm_output_compare_mode_t#
TPM output compare modes.
-
typedef enum _tpm_input_capture_edge tpm_input_capture_edge_t#
TPM input capture edge.
-
typedef struct _tpm_dual_edge_capture_param tpm_dual_edge_capture_param_t#
TPM dual edge capture parameters.
Note
This mode is available only on some SoC’s.
-
typedef enum _tpm_quad_decode_mode tpm_quad_decode_mode_t#
TPM quadrature decode modes.
Note
This mode is available only on some SoC’s.
-
typedef enum _tpm_phase_polarity tpm_phase_polarity_t#
TPM quadrature phase polarities.
-
typedef struct _tpm_phase_param tpm_phase_params_t#
TPM quadrature decode phase parameters.
-
typedef enum _tpm_clock_source tpm_clock_source_t#
TPM clock source selection.
-
typedef enum _tpm_clock_prescale tpm_clock_prescale_t#
TPM prescale value selection for the clock source.
-
typedef struct _tpm_config tpm_config_t#
TPM config structure.
This structure holds the configuration settings for the TPM peripheral. To initialize this structure to reasonable defaults, call the TPM_GetDefaultConfig() function and pass a pointer to your config structure instance.
The config struct can be made const so it resides in flash
-
typedef enum _tpm_interrupt_enable tpm_interrupt_enable_t#
List of TPM interrupts.
-
typedef enum _tpm_status_flags tpm_status_flags_t#
List of TPM flags.
-
typedef void (*tpm_callback_t)(TPM_Type *base)#
TPM callback function pointer.
- Param base:
TPM peripheral base address.
-
TPM_TIMEOUT#
Max loops to wait for writing register.
When writing MOD CnV CnSC and SC register, driver will wait until register is updated. This parameter defines how many loops to check completion before return timeout. If defined as 0, driver will wait forever until completion.
-
TPM_MAX_COUNTER_VALUE(x)#
Help macro to get the max counter value.
-
struct _tpm_chnl_pwm_signal_param#
- #include <fsl_tpm.h>
Options to configure a TPM channel’s PWM signal.
Public Members
-
tpm_chnl_t chnlNumber#
TPM channel to configure. In combined mode (available in some SoC’s), this represents the channel pair number
-
tpm_pwm_pause_level_select_t pauseLevel#
PWM output level when counter first enabled or paused
-
tpm_pwm_level_select_t level#
PWM output active level select
-
uint8_t dutyCyclePercent#
PWM pulse width, value should be between 0 to 100 0=inactive signal(0% duty cycle)… 100=always active signal (100% duty cycle)
-
uint8_t firstEdgeDelayPercent#
Used only in combined PWM mode to generate asymmetrical PWM. Specifies the delay to the first edge in a PWM period. If unsure, leave as 0. Should be specified as percentage of the PWM period, (dutyCyclePercent + firstEdgeDelayPercent) value should be not greate than 100.
-
bool enableComplementary#
Used only in combined PWM mode. true: The combined channels output complementary signals; false: The combined channels output same signals;
-
tpm_pwm_pause_level_select_t secPauseLevel#
Used only in combined PWM mode. Define the second channel output level when counter first enabled or paused
-
uint8_t deadTimeValue[2]#
The dead time value for channel n and n+1 in combined complementary PWM mode. Deadtime insertion is disabled when this value is zero, otherwise deadtime insertion for channel n/n+1 is configured as (deadTimeValue * 4) clock cycles. deadTimeValue’s available range is 0 ~ 15.
-
tpm_chnl_t chnlNumber#
-
struct _tpm_dual_edge_capture_param#
- #include <fsl_tpm.h>
TPM dual edge capture parameters.
Note
This mode is available only on some SoC’s.
Public Members
-
bool enableSwap#
true: Use channel n+1 input, channel n input is ignored; false: Use channel n input, channel n+1 input is ignored
-
tpm_input_capture_edge_t currChanEdgeMode#
Input capture edge select for channel n
-
tpm_input_capture_edge_t nextChanEdgeMode#
Input capture edge select for channel n+1
-
bool enableSwap#
-
struct _tpm_phase_param#
- #include <fsl_tpm.h>
TPM quadrature decode phase parameters.
Public Members
-
uint32_t phaseFilterVal#
Filter value, filter is disabled when the value is zero
-
tpm_phase_polarity_t phasePolarity#
Phase polarity
-
uint32_t phaseFilterVal#
-
struct _tpm_config#
- #include <fsl_tpm.h>
TPM config structure.
This structure holds the configuration settings for the TPM peripheral. To initialize this structure to reasonable defaults, call the TPM_GetDefaultConfig() function and pass a pointer to your config structure instance.
The config struct can be made const so it resides in flash
Public Members
-
tpm_clock_prescale_t prescale#
Select TPM clock prescale value
-
bool useGlobalTimeBase#
true: The TPM channels use an external global time base (the local counter still use for generate overflow interrupt and DMA request); false: All TPM channels use the local counter as their timebase
-
bool syncGlobalTimeBase#
true: The TPM counter is synchronized to the global time base; false: disabled
-
tpm_trigger_select_t triggerSelect#
Input trigger to use for controlling the counter operation
-
tpm_trigger_source_t triggerSource#
Decides if we use external or internal trigger.
-
tpm_ext_trigger_polarity_t extTriggerPolarity#
when using external trigger source, need selects the polarity of it.
-
bool enableDoze#
true: TPM counter is paused in doze mode; false: TPM counter continues in doze mode
-
bool enableDebugMode#
true: TPM counter continues in debug mode; false: TPM counter is paused in debug mode
-
bool enableReloadOnTrigger#
true: TPM counter is reloaded on trigger; false: TPM counter not reloaded
-
bool enableStopOnOverflow#
true: TPM counter stops after overflow; false: TPM counter continues running after overflow
-
bool enableStartOnTrigger#
true: TPM counter only starts when a trigger is detected; false: TPM counter starts immediately
-
bool enablePauseOnTrigger#
true: TPM counter will pause while trigger remains asserted; false: TPM counter continues running
-
uint8_t chnlPolarity#
Defines the input/output polarity of the channels in POL register
-
tpm_clock_prescale_t prescale#
TRDC: Trusted Resource Domain Controller#
-
void TRDC_Init(TRDC_Type *base)#
Initializes the TRDC module.
This function enables the TRDC clock.
- Parameters:
base – TRDC peripheral base address.
-
void TRDC_Deinit(TRDC_Type *base)#
De-initializes the TRDC module.
This function disables the TRDC clock.
- Parameters:
base – TRDC peripheral base address.
-
static inline uint8_t TRDC_GetCurrentMasterDomainId(TRDC_Type *base)#
Gets the domain ID of the current bus master.
- Parameters:
base – TRDC peripheral base address.
- Returns:
Domain ID of current bus master.
-
void TRDC_GetHardwareConfig(TRDC_Type *base, trdc_hardware_config_t *config)#
Gets the TRDC hardware configuration.
This function gets the TRDC hardware configurations, including number of bus masters, number of domains, number of MRCs and number of PACs.
- Parameters:
base – TRDC peripheral base address.
config – Pointer to the structure to get the configuration.
-
static inline void TRDC_SetDacGlobalValid(TRDC_Type *base)#
Sets the TRDC DAC(Domain Assignment Controllers) global valid.
Once enabled, it will remain enabled until next reset.
- Parameters:
base – TRDC peripheral base address.
-
static inline void TRDC_LockMasterDomainAssignment(TRDC_Type *base, uint8_t master, uint8_t regNum)#
Locks the bus master domain assignment register.
This function locks the master domain assignment. After it is locked, the register can’t be changed until next reset.
- Parameters:
base – TRDC peripheral base address.
master – Which master to configure, refer to trdcx_master_t in processor header file, x is trdc instance.
regNum – Which register to configure, processor master can have more than one register for the MDAC configuration.
assignIndex – Which assignment register to lock.
-
static inline void TRDC_SetMasterDomainAssignmentValid(TRDC_Type *base, uint8_t master, uint8_t regNum, bool valid)#
Sets the master domain assignment as valid or invalid.
This function sets the master domain assignment as valid or invalid.
- Parameters:
base – TRDC peripheral base address.
master – Which master to configure.
regNum – Which register to configure, processor master can have more than one register for the MDAC configuration.
assignIndex – Index for the domain assignment register.
valid – True to set valid, false to set invalid.
-
void TRDC_GetDefaultProcessorDomainAssignment(trdc_processor_domain_assignment_t *domainAssignment)#
Gets the default master domain assignment for the processor bus master.
This function gets the default master domain assignment for the processor bus master. It should only be used for the processor bus masters, such as CORE0. This function sets the assignment as follows:
assignment->domainId = 0U; assignment->domainIdSelect = kTRDC_DidMda; assignment->lock = 0U;
- Parameters:
domainAssignment – Pointer to the assignment structure.
-
void TRDC_GetDefaultNonProcessorDomainAssignment(trdc_non_processor_domain_assignment_t *domainAssignment)#
Gets the default master domain assignment for non-processor bus master.
This function gets the default master domain assignment for non-processor bus master. It should only be used for the non-processor bus masters, such as DMA. This function sets the assignment as follows:
assignment->domainId = 0U; assignment->privilegeAttr = kTRDC_ForceUser; assignment->secureAttr = kTRDC_ForceSecure; assignment->bypassDomainId = 0U; assignment->lock = 0U;
- Parameters:
domainAssignment – Pointer to the assignment structure.
-
void TRDC_SetProcessorDomainAssignment(TRDC_Type *base, uint8_t master, uint8_t regNum, const trdc_processor_domain_assignment_t *domainAssignment)#
Sets the processor bus master domain assignment.
This function sets the processor master domain assignment as valid. One bus master might have multiple domain assignment registers. The parameter
assignIndexspecifies which assignment register to set.Example: Set domain assignment for core 0.
trdc_processor_domain_assignment_t processorAssignment; TRDC_GetDefaultProcessorDomainAssignment(&processorAssignment); processorAssignment.domainId = 0; processorAssignment.xxx = xxx; TRDC_SetMasterDomainAssignment(TRDC, &processorAssignment);
- Parameters:
base – TRDC peripheral base address.
master – Which master to configure, refer to trdc_master_t in processor header file.
regNum – Which register to configure, processor master can have more than one register for the MDAC configuration.
domainAssignment – Pointer to the assignment structure.
-
void TRDC_SetNonProcessorDomainAssignment(TRDC_Type *base, uint8_t master, const trdc_non_processor_domain_assignment_t *domainAssignment)#
Sets the non-processor bus master domain assignment.
This function sets the non-processor master domain assignment as valid. One bus master might have multiple domain assignment registers. The parameter
assignIndexspecifies which assignment register to set.Example: Set domain assignment for DMA0.
trdc_non_processor_domain_assignment_t nonProcessorAssignment; TRDC_GetDefaultNonProcessorDomainAssignment(&nonProcessorAssignment); nonProcessorAssignment.domainId = 1; nonProcessorAssignment.xxx = xxx; TRDC_SetMasterDomainAssignment(TRDC, kTrdcMasterDma0, 0U, &nonProcessorAssignment);
- Parameters:
base – TRDC peripheral base address.
master – Which master to configure, refer to trdc_master_t in processor header file.
domainAssignment – Pointer to the assignment structure.
-
static inline uint64_t TRDC_GetActiveMasterPidMap(TRDC_Type *base)#
Gets the bit map of the bus master(s) that is(are) sourcing a PID register.
This function sets the non-processor master domain assignment as valid.
- Parameters:
base – TRDC peripheral base address.
- Returns:
the bit map of the master(s). Bit 1 sets indicates bus master 1.
-
void TRDC_SetPid(TRDC_Type *base, uint8_t master, const trdc_pid_config_t *pidConfig)#
Sets the current Process identifier(PID) for processor core.
Each processor has a corresponding process identifier (PID) which can be used to group tasks into different domains. Secure privileged software saves and restores the PID as part of any context switch. This data structure defines an array of 32-bit values, one per MDA module, that define the PID. Since this register resource is only applicable to processor cores, the data structure is typically sparsely populated. The HWCFG[2-3] registers provide a bitmap of the implemented PIDn registers. This data structure is indexed using the corresponding MDA instance number. Depending on the operating clock domain of each DAC instance, there may be optional information stored in the corresponding PIDm register to properly implement the LK2 = 2 functionality.
- Parameters:
base – TRDC peripheral base address.
master – Which processor master to configure, refer to trdc_master_t in processor header file.
pidConfig – Pointer to the configuration structure.
-
void TRDC_GetDefaultIDAUConfig(trdc_idau_config_t *idauConfiguration)#
Gets the default IDAU(Implementation-Defined Attribution Unit) configuration.
config->lockSecureVTOR = false; config->lockNonsecureVTOR = false; config->lockSecureMPU = false; config->lockNonsecureMPU = false; config->lockSAU = false;
- Parameters:
domainAssignment – Pointer to the configuration structure.
-
void TRDC_SetIDAU(TRDC_Type *base, const trdc_idau_config_t *idauConfiguration)#
Sets the IDAU(Implementation-Defined Attribution Unit) control configuration.
Example: Lock the secure and non-secure MPU registers.
trdc_idau_config_t idauConfiguration; TRDC_GetDefaultIDAUConfig(&idauConfiguration); idauConfiguration.lockSecureMPU = true; idauConfiguration.lockNonsecureMPU = true; TRDC_SetIDAU(TRDC, &idauConfiguration);
- Parameters:
base – TRDC peripheral base address.
domainAssignment – Pointer to the configuration structure.
-
static inline void TRDC_EnableFlashLogicalWindow(TRDC_Type *base, bool enable)#
Enables/disables the FLW(flash logical window) function.
- Parameters:
base – TRDC peripheral base address.
enable – True to enable, false to disable.
-
static inline void TRDC_LockFlashLogicalWindow(TRDC_Type *base)#
Locks FLW registers. Once locked the registers can noy be updated until next reset.
- Parameters:
base – TRDC peripheral base address.
-
static inline uint32_t TRDC_GetFlashLogicalWindowPbase(TRDC_Type *base)#
Gets the FLW physical base address.
- Parameters:
base – TRDC peripheral base address.
- Returns:
Physical address of the FLW function.
-
static inline void TRDC_GetSetFlashLogicalWindowSize(TRDC_Type *base, uint16_t size)#
Sets the FLW size.
- Parameters:
base – TRDC peripheral base address.
size – Size of the FLW in unit of 32k bytes.
-
void TRDC_GetDefaultFlashLogicalWindowConfig(trdc_flw_config_t *flwConfiguration)#
Gets the default FLW(Flsh Logical Window) configuration.
config->blockCount = false; config->arrayBaseAddr = false; config->lock = false; config->enable = false;
- Parameters:
flwConfiguration – Pointer to the configuration structure.
-
void TRDC_SetFlashLogicalWindow(TRDC_Type *base, const trdc_flw_config_t *flwConfiguration)#
Sets the FLW function’s configuration.
trdc_flw_config_t flwConfiguration; TRDC_GetDefaultIDAUConfig(&flwConfiguration); flwConfiguration.blockCount = 32U; flwConfiguration.arrayBaseAddr = 0xXXXXXXXX; TRDC_SetIDAU(TRDC, &flwConfiguration);
- Parameters:
base – TRDC peripheral base address.
flwConfiguration – Pointer to the configuration structure.
-
status_t TRDC_GetAndClearFirstDomainError(TRDC_Type *base, trdc_domain_error_t *error)#
Gets and clears the first domain error of the current domain.
This function gets the first access violation information for the current domain and clears the pending flag. There might be multiple access violations pending for the current domain. This function only processes the first error.
- Parameters:
base – TRDC peripheral base address.
error – Pointer to the error information.
- Returns:
If the access violation is captured, this function returns the kStatus_Success. The error information can be obtained from the parameter error. If no access violation is captured, this function returns the kStatus_NoData.
-
status_t TRDC_GetAndClearFirstSpecificDomainError(TRDC_Type *base, trdc_domain_error_t *error, uint8_t domainId)#
Gets and clears the first domain error of the specific domain.
This function gets the first access violation information for the specific domain and clears the pending flag. There might be multiple access violations pending for the current domain. This function only processes the first error.
- Parameters:
base – TRDC peripheral base address.
error – Pointer to the error information.
domainId – The error of which domain to get and clear.
- Returns:
If the access violation is captured, this function returns the kStatus_Success. The error information can be obtained from the parameter error. If no access violation is captured, this function returns the kStatus_NoData.
-
static inline void TRDC_SetMrcGlobalValid(TRDC_Type *base)#
Sets the TRDC MRC(Memory Region Checkers) global valid.
Once enabled, it will remain enabled until next reset.
- Parameters:
base – TRDC peripheral base address.
-
static inline uint8_t TRDC_GetMrcRegionNumber(TRDC_Type *base, uint8_t mrcIdx)#
Gets the TRDC MRC(Memory Region Checkers) region number valid.
- Parameters:
base – TRDC peripheral base address.
- Returns:
the region number of the given MRC instance
-
void TRDC_MrcSetMemoryAccessConfig(TRDC_Type *base, const trdc_memory_access_control_config_t *config, uint8_t mrcIdx, uint8_t regIdx)#
Sets the memory access configuration for one of the access control register of one MRC.
Example: Enable the secure operations and lock the configuration for MRC0 region 1.
trdc_memory_access_control_config_t config; config.securePrivX = true; config.securePrivW = true; config.securePrivR = true; config.lock = true; TRDC_SetMrcMemoryAccess(TRDC, &config, 0, 1);
- Parameters:
base – TRDC peripheral base address.
config – Pointer to the configuration structure.
mrcIdx – MRC index.
regIdx – Register number.
-
void TRDC_MrcEnableDomainNseUpdate(TRDC_Type *base, uint8_t mrcIdx, uint16_t domianMask, bool enable)#
Enables the update of the selected domians.
After the domians’ update are enabled, their regions’ NSE bits can be set or clear.
- Parameters:
base – TRDC peripheral base address.
mrcIdx – MRC index.
domianMask – Bit mask of the domains to be enabled.
enable – True to enable, false to disable.
-
void TRDC_MrcRegionNseSet(TRDC_Type *base, uint8_t mrcIdx, uint16_t regionMask)#
Sets the NSE bits of the selected regions for domains.
This function sets the NSE bits for the selected regions for the domains whose update are enabled.
- Parameters:
base – TRDC peripheral base address.
mrcIdx – MRC index.
regionMask – Bit mask of the regions whose NSE bits to set.
-
void TRDC_MrcRegionNseClear(TRDC_Type *base, uint8_t mrcIdx, uint16_t regionMask)#
Clears the NSE bits of the selected regions for domains.
This function clears the NSE bits for the selected regions for the domains whose update are enabled.
- Parameters:
base – TRDC peripheral base address.
mrcIdx – MRC index.
regionMask – Bit mask of the regions whose NSE bits to clear.
-
void TRDC_MrcDomainNseClear(TRDC_Type *base, uint8_t mrcIdx, uint16_t domainMask)#
Clears the NSE bits for all the regions of the selected domains.
This function clears the NSE bits for all regions of selected domains whose update are enabled.
- Parameters:
base – TRDC peripheral base address.
mrcIdx – MRC index.
domainMask – Bit mask of the domians whose NSE bits to clear.
-
void TRDC_MrcSetRegionDescriptorConfig(TRDC_Type *base, const trdc_mrc_region_descriptor_config_t *config)#
Sets the configuration for one of the region descriptor per domain per MRC instnce.
This function sets the configuration for one of the region descriptor, including the start and end address of the region, memory access control policy and valid.
- Parameters:
base – TRDC peripheral base address.
config – Pointer to region descriptor configuration structure.
-
static inline void TRDC_SetMbcGlobalValid(TRDC_Type *base)#
Sets the TRDC MBC(Memory Block Checkers) global valid.
Once enabled, it will remain enabled until next reset.
- Parameters:
base – TRDC peripheral base address.
-
void TRDC_GetMbcHardwareConfig(TRDC_Type *base, trdc_slave_memory_hardware_config_t *config, uint8_t mbcIdx, uint8_t slvIdx)#
Gets the hardware configuration of the one of two slave memories within each MBC(memory block checker).
- Parameters:
base – TRDC peripheral base address.
config – Pointer to the structure to get the configuration.
mbcIdx – MBC number.
slvIdx – Slave number.
-
void TRDC_MbcSetNseUpdateConfig(TRDC_Type *base, const trdc_mbc_nse_update_config_t *config, uint8_t mbcIdx)#
Sets the NSR update configuration for one of the MBC instance.
After set the NSE configuration, the configured memory area can be updateby NSE set/clear.
- Parameters:
base – TRDC peripheral base address.
config – Pointer to NSE update configuration structure.
mbcIdx – MBC index.
-
void TRDC_MbcWordNseSet(TRDC_Type *base, uint8_t mbcIdx, uint32_t bitMask)#
Sets the NSE bits of the selected configuration words according to NSE update configuration.
This function sets the NSE bits of the word for the configured regio, memory.
- Parameters:
base – TRDC peripheral base address.
mbcIdx – MBC index.
bitMask – Mask of the bits whose NSE bits to set.
-
void TRDC_MbcWordNseClear(TRDC_Type *base, uint8_t mbcIdx, uint32_t bitMask)#
Clears the NSE bits of the selected configuration words according to NSE update configuration.
This function sets the NSE bits of the word for the configured regio, memory.
- Parameters:
base – TRDC peripheral base address.
mbcIdx – MBC index.
bitMask – Mask of the bits whose NSE bits to clear.
-
void TRDC_MbcNseClearAll(TRDC_Type *base, uint8_t mbcIdx, uint16_t domainMask, uint8_t slave)#
Clears all configuration words’ NSE bits of the selected domain and memory.
- Parameters:
base – TRDC peripheral base address.
mbcIdx – MBC index.
domainMask – Mask of the domains whose NSE bits to clear, 0b110 means clear domain 1&2.
slaveMask – Mask of the slaves whose NSE bits to clear, 0x11 means clear all slave 0&1’s NSE bits.
-
void TRDC_MbcSetMemoryAccessConfig(TRDC_Type *base, const trdc_memory_access_control_config_t *config, uint8_t mbcIdx, uint8_t rgdIdx)#
Sets the memory access configuration for one of the region descriptor of one MBC.
Example: Enable the secure operations and lock the configuration for MRC0 region 1.
trdc_memory_access_control_config_t config; config.securePrivX = true; config.securePrivW = true; config.securePrivR = true; config.lock = true; TRDC_SetMbcMemoryAccess(TRDC, &config, 0, 1);
- Parameters:
base – TRDC peripheral base address.
config – Pointer to the configuration structure.
mbcIdx – MBC index.
rgdIdx – Region descriptor number.
-
void TRDC_MbcSetMemoryBlockConfig(TRDC_Type *base, const trdc_mbc_memory_block_config_t *config)#
Sets the configuration for one of the memory block per domain per MBC instnce.
This function sets the configuration for one of the memory block, including the memory access control policy and nse enable.
- Parameters:
base – TRDC peripheral base address.
config – Pointer to memory block configuration structure.
-
enum _trdc_did_sel#
TRDC domain ID select method, the register bit TRDC_MDA_W0_0_DFMT0[DIDS], used for domain hit evaluation.
Values:
-
enumerator kTRDC_DidMda#
Use MDAn[2:0] as DID.
-
enumerator kTRDC_DidInput#
Use the input DID (DID_in) as DID.
-
enumerator kTRDC_DidMdaAndInput#
Use MDAn[2] concatenated with DID_in[1:0] as DID.
-
enumerator kTRDC_DidReserved#
Reserved.
-
enumerator kTRDC_DidMda#
-
enum _trdc_secure_attr#
TRDC secure attribute, the register bit TRDC_MDA_W0_0_DFMT0[SA], used for bus master domain assignment.
Values:
-
enumerator kTRDC_ForceSecure#
Force the bus attribute for this master to secure.
-
enumerator kTRDC_ForceNonSecure#
Force the bus attribute for this master to non-secure.
-
enumerator kTRDC_MasterSecure#
Use the bus master’s secure/nonsecure attribute directly.
-
enumerator kTRDC_MasterSecure1#
Use the bus master’s secure/nonsecure attribute directly.
-
enumerator kTRDC_ForceSecure#
-
enum _trdc_pid_domain_hit_config#
The configuration of domain hit evaluation of PID.
Values:
-
enumerator kTRDC_pidDomainHitNone0#
No PID is included in the domain hit evaluation.
-
enumerator kTRDC_pidDomainHitNone1#
No PID is included in the domain hit evaluation.
-
enumerator kTRDC_pidDomainHitInclusive#
The PID is included in the domain hit evaluation when (PID & ~PIDM).
-
enumerator kTRDC_pidDomainHitExclusive#
The PID is included in the domain hit evaluation when ~(PID & ~PIDM).
-
enumerator kTRDC_pidDomainHitNone0#
-
enum _trdc_privilege_attr#
TRDC privileged attribute, the register bit TRDC_MDA_W0_x_DFMT1[PA], used for non-processor bus master domain assignment.
Values:
-
enumerator kTRDC_ForceUser#
Force the bus attribute for this master to user.
-
enumerator kTRDC_ForcePrivilege#
Force the bus attribute for this master to privileged.
-
enumerator kTRDC_MasterPrivilege#
Use the bus master’s attribute directly.
-
enumerator kTRDC_MasterPrivilege1#
Use the bus master’s attribute directly.
-
enumerator kTRDC_ForceUser#
-
enum _trdc_pid_lock#
PID lock configuration.
Values:
-
enumerator kTRDC_PidUnlocked0#
The PID value can be updated by any secure priviledged write.
-
enumerator kTRDC_PidUnlocked1#
The PID value can be updated by any secure priviledged write.
-
enumerator kTRDC_PidUnlocked2#
The PID value can be updated by any secure priviledged write from the bus master that first configured this register.
-
enumerator kTRDC_PidLocked#
The PID value is locked until next reset.
-
enumerator kTRDC_PidUnlocked0#
-
enum _trdc_controller#
TRDC controller definition for domain error check. Each TRDC instance may have different MRC or MBC count, call TRDC_GetHardwareConfig to get the actual count.
Values:
-
enumerator kTRDC_MemBlockController0#
Memory block checker 0.
-
enumerator kTRDC_MemBlockController1#
Memory block checker 1.
-
enumerator kTRDC_MemBlockController2#
Memory block checker 2.
-
enumerator kTRDC_MemBlockController3#
Memory block checker 3.
-
enumerator kTRDC_MemRegionChecker0#
Memory region checker 0.
-
enumerator kTRDC_MemRegionChecker1#
Memory region checker 1.
-
enumerator kTRDC_MemRegionChecker2#
Memory region checker 2.
-
enumerator kTRDC_MemRegionChecker3#
Memory region checker 3.
-
enumerator kTRDC_MemRegionChecker4#
Memory region checker 4.
-
enumerator kTRDC_MemRegionChecker5#
Memory region checker 5.
-
enumerator kTRDC_MemRegionChecker6#
Memory region checker 6.
-
enumerator kTRDC_MemBlockController0#
-
enum _trdc_error_state#
TRDC domain error state definition TRDC_MBCn_DERR_W1[EST] or TRDC_MRCn_DERR_W1[EST].
Values:
-
enumerator kTRDC_ErrorStateNone#
No access violation detected.
-
enumerator kTRDC_ErrorStateNone1#
No access violation detected.
-
enumerator kTRDC_ErrorStateSingle#
Single access violation detected.
-
enumerator kTRDC_ErrorStateMulti#
Multiple access violation detected.
-
enumerator kTRDC_ErrorStateNone#
-
enum _trdc_error_attr#
TRDC domain error attribute definition TRDC_MBCn_DERR_W1[EATR] or TRDC_MRCn_DERR_W1[EATR].
Values:
-
enumerator kTRDC_ErrorSecureUserInst#
Secure user mode, instruction fetch access.
-
enumerator kTRDC_ErrorSecureUserData#
Secure user mode, data access.
-
enumerator kTRDC_ErrorSecurePrivilegeInst#
Secure privileged mode, instruction fetch access.
-
enumerator kTRDC_ErrorSecurePrivilegeData#
Secure privileged mode, data access.
-
enumerator kTRDC_ErrorNonSecureUserInst#
NonSecure user mode, instruction fetch access.
-
enumerator kTRDC_ErrorNonSecureUserData#
NonSecure user mode, data access.
-
enumerator kTRDC_ErrorNonSecurePrivilegeInst#
NonSecure privileged mode, instruction fetch access.
-
enumerator kTRDC_ErrorNonSecurePrivilegeData#
NonSecure privileged mode, data access.
-
enumerator kTRDC_ErrorSecureUserInst#
-
enum _trdc_error_type#
TRDC domain error access type definition TRDC_DERR_W1_n[ERW].
Values:
-
enumerator kTRDC_ErrorTypeRead#
Error occurs on read reference.
-
enumerator kTRDC_ErrorTypeWrite#
Error occurs on write reference.
-
enumerator kTRDC_ErrorTypeRead#
-
enum _trdc_region_descriptor#
The region descriptor enumeration, used to form a mask to set/clear the NSE bits for one or several regions.
Values:
-
enumerator kTRDC_RegionDescriptor0#
Region descriptor 0.
-
enumerator kTRDC_RegionDescriptor1#
Region descriptor 1.
-
enumerator kTRDC_RegionDescriptor2#
Region descriptor 2.
-
enumerator kTRDC_RegionDescriptor3#
Region descriptor 3.
-
enumerator kTRDC_RegionDescriptor4#
Region descriptor 4.
-
enumerator kTRDC_RegionDescriptor5#
Region descriptor 5.
-
enumerator kTRDC_RegionDescriptor6#
Region descriptor 6.
-
enumerator kTRDC_RegionDescriptor7#
Region descriptor 7.
-
enumerator kTRDC_RegionDescriptor8#
Region descriptor 8.
-
enumerator kTRDC_RegionDescriptor9#
Region descriptor 9.
-
enumerator kTRDC_RegionDescriptor10#
Region descriptor 10.
-
enumerator kTRDC_RegionDescriptor11#
Region descriptor 11.
-
enumerator kTRDC_RegionDescriptor12#
Region descriptor 12.
-
enumerator kTRDC_RegionDescriptor13#
Region descriptor 13.
-
enumerator kTRDC_RegionDescriptor14#
Region descriptor 14.
-
enumerator kTRDC_RegionDescriptor15#
Region descriptor 15.
-
enumerator kTRDC_RegionDescriptor0#
-
enum _trdc_MRC_domain#
The MRC domain enumeration, used to form a mask to enable/disable the update or clear all NSE bits of one or several domains.
Values:
-
enumerator kTRDC_MrcDomain0#
Domain 0.
-
enumerator kTRDC_MrcDomain1#
Domain 1.
-
enumerator kTRDC_MrcDomain2#
Domain 2.
-
enumerator kTRDC_MrcDomain3#
Domain 3.
-
enumerator kTRDC_MrcDomain4#
Domain 4.
-
enumerator kTRDC_MrcDomain5#
Domain 5.
-
enumerator kTRDC_MrcDomain6#
Domain 6.
-
enumerator kTRDC_MrcDomain7#
Domain 7.
-
enumerator kTRDC_MrcDomain8#
Domain 8.
-
enumerator kTRDC_MrcDomain9#
Domain 9.
-
enumerator kTRDC_MrcDomain10#
Domain 10.
-
enumerator kTRDC_MrcDomain11#
Domain 11.
-
enumerator kTRDC_MrcDomain12#
Domain 12.
-
enumerator kTRDC_MrcDomain13#
Domain 13.
-
enumerator kTRDC_MrcDomain14#
Domain 14.
-
enumerator kTRDC_MrcDomain15#
Domain 15.
-
enumerator kTRDC_MrcDomain0#
-
enum _trdc_MBC_domain#
The MBC domain enumeration, used to form a mask to enable/disable the update or clear NSE bits of one or several domains.
Values:
-
enumerator kTRDC_MbcDomain0#
Domain 0.
-
enumerator kTRDC_MbcDomain1#
Domain 1.
-
enumerator kTRDC_MbcDomain2#
Domain 2.
-
enumerator kTRDC_MbcDomain3#
Domain 3.
-
enumerator kTRDC_MbcDomain4#
Domain 4.
-
enumerator kTRDC_MbcDomain5#
Domain 5.
-
enumerator kTRDC_MbcDomain6#
Domain 6.
-
enumerator kTRDC_MbcDomain7#
Domain 7.
-
enumerator kTRDC_MbcDomain0#
-
enum _trdc_MBC_memory#
The MBC slave memory enumeration, used to form a mask to enable/disable the update or clear NSE bits of one or several memory block.
Values:
-
enumerator kTRDC_MbcSlaveMemory0#
Memory 0.
-
enumerator kTRDC_MbcSlaveMemory1#
Memory 1.
-
enumerator kTRDC_MbcSlaveMemory2#
Memory 2.
-
enumerator kTRDC_MbcSlaveMemory3#
Memory 3.
-
enumerator kTRDC_MbcSlaveMemory0#
-
enum _trdc_MBC_bit#
The MBC bit enumeration, used to form a mask to set/clear configured words’ NSE.
Values:
-
enumerator kTRDC_MbcBit0#
Bit 0.
-
enumerator kTRDC_MbcBit1#
Bit 1.
-
enumerator kTRDC_MbcBit2#
Bit 2.
-
enumerator kTRDC_MbcBit3#
Bit 3.
-
enumerator kTRDC_MbcBit4#
Bit 4.
-
enumerator kTRDC_MbcBit5#
Bit 5.
-
enumerator kTRDC_MbcBit6#
Bit 6.
-
enumerator kTRDC_MbcBit7#
Bit 7.
-
enumerator kTRDC_MbcBit8#
Bit 8.
-
enumerator kTRDC_MbcBit9#
Bit 9.
-
enumerator kTRDC_MbcBit10#
Bit 10.
-
enumerator kTRDC_MbcBit11#
Bit 11.
-
enumerator kTRDC_MbcBit12#
Bit 12.
-
enumerator kTRDC_MbcBit13#
Bit 13.
-
enumerator kTRDC_MbcBit14#
Bit 14.
-
enumerator kTRDC_MbcBit15#
Bit 15.
-
enumerator kTRDC_MbcBit16#
Bit 16.
-
enumerator kTRDC_MbcBit17#
Bit 17.
-
enumerator kTRDC_MbcBit18#
Bit 18.
-
enumerator kTRDC_MbcBit19#
Bit 19.
-
enumerator kTRDC_MbcBit20#
Bit 20.
-
enumerator kTRDC_MbcBit21#
Bit 21.
-
enumerator kTRDC_MbcBit22#
Bit 22.
-
enumerator kTRDC_MbcBit23#
Bit 23.
-
enumerator kTRDC_MbcBit24#
Bit 24.
-
enumerator kTRDC_MbcBit25#
Bit 25.
-
enumerator kTRDC_MbcBit26#
Bit 26.
-
enumerator kTRDC_MbcBit27#
Bit 27.
-
enumerator kTRDC_MbcBit28#
Bit 28.
-
enumerator kTRDC_MbcBit29#
Bit 29.
-
enumerator kTRDC_MbcBit30#
Bit 30.
-
enumerator kTRDC_MbcBit31#
Bit 31.
-
enumerator kTRDC_MbcBit0#
-
typedef struct _trdc_hardware_config trdc_hardware_config_t#
TRDC hardware configuration.
-
typedef struct _trdc_slave_memory_hardware_config trdc_slave_memory_hardware_config_t#
Hardware configuration of the two slave memories within each MBC(memory block checker).
-
typedef enum _trdc_did_sel trdc_did_sel_t#
TRDC domain ID select method, the register bit TRDC_MDA_W0_0_DFMT0[DIDS], used for domain hit evaluation.
-
typedef enum _trdc_secure_attr trdc_secure_attr_t#
TRDC secure attribute, the register bit TRDC_MDA_W0_0_DFMT0[SA], used for bus master domain assignment.
-
typedef enum _trdc_pid_domain_hit_config trdc_pid_domain_hit_config_t#
The configuration of domain hit evaluation of PID.
-
typedef struct _trdc_processor_domain_assignment trdc_processor_domain_assignment_t#
Domain assignment for the processor bus master.
-
typedef enum _trdc_privilege_attr trdc_privilege_attr_t#
TRDC privileged attribute, the register bit TRDC_MDA_W0_x_DFMT1[PA], used for non-processor bus master domain assignment.
-
typedef struct _trdc_non_processor_domain_assignment trdc_non_processor_domain_assignment_t#
Domain assignment for the non-processor bus master.
-
typedef enum _trdc_pid_lock trdc_pid_lock_t#
PID lock configuration.
-
typedef struct _trdc_pid_config trdc_pid_config_t#
Process identifier(PID) configuration for processor cores.
-
typedef struct _trdc_idau_config trdc_idau_config_t#
IDAU(Implementation-Defined Attribution Unit) configuration for TZ-M function control.
-
typedef struct _trdc_flw_config trdc_flw_config_t#
FLW(Flash Logical Window) configuration.
-
typedef enum _trdc_controller trdc_controller_t#
TRDC controller definition for domain error check. Each TRDC instance may have different MRC or MBC count, call TRDC_GetHardwareConfig to get the actual count.
-
typedef enum _trdc_error_state trdc_error_state_t#
TRDC domain error state definition TRDC_MBCn_DERR_W1[EST] or TRDC_MRCn_DERR_W1[EST].
-
typedef enum _trdc_error_attr trdc_error_attr_t#
TRDC domain error attribute definition TRDC_MBCn_DERR_W1[EATR] or TRDC_MRCn_DERR_W1[EATR].
-
typedef enum _trdc_error_type trdc_error_type_t#
TRDC domain error access type definition TRDC_DERR_W1_n[ERW].
-
typedef struct _trdc_domain_error trdc_domain_error_t#
TRDC domain error definition.
-
typedef struct _trdc_memory_access_control_config trdc_memory_access_control_config_t#
Memory access control configuration for MBC/MRC.
-
typedef struct _trdc_mrc_region_descriptor_config trdc_mrc_region_descriptor_config_t#
The configuration of each region descriptor per domain per MRC instance.
-
typedef struct _trdc_mbc_nse_update_config trdc_mbc_nse_update_config_t#
The configuration of MBC NSE update.
-
typedef struct _trdc_mbc_memory_block_config trdc_mbc_memory_block_config_t#
The configuration of each memory block per domain per MBC instance.
-
FSL_TRDC_DRIVER_VERSION#
-
struct _trdc_hardware_config#
- #include <fsl_trdc.h>
TRDC hardware configuration.
-
struct _trdc_slave_memory_hardware_config#
- #include <fsl_trdc.h>
Hardware configuration of the two slave memories within each MBC(memory block checker).
-
struct _trdc_processor_domain_assignment#
- #include <fsl_trdc.h>
Domain assignment for the processor bus master.
Public Members
-
uint32_t domainId#
Domain ID.
-
uint32_t domainIdSelect#
Domain ID select method, see trdc_did_sel_t.
-
uint32_t pidDomainHitConfig#
The configuration of the domain hit evaluation for PID, see trdc_pid_domain_hit_config_t.
-
uint32_t pidMask#
The mask combined with PID, so multiple PID can be included as part of the domain hit determination. Set to 0 to disable.
-
uint32_t secureAttr#
Secure attribute, see trdc_secure_attr_t.
-
uint32_t pid#
The process identifier, combined with pidMask to form the domain hit determination.
-
uint32_t __pad0__#
Reserved.
-
uint32_t lock#
Lock the register.
-
uint32_t __pad1__#
Reserved.
-
uint32_t domainId#
-
struct _trdc_non_processor_domain_assignment#
- #include <fsl_trdc.h>
Domain assignment for the non-processor bus master.
Public Members
-
uint32_t domainId#
Domain ID.
-
uint32_t privilegeAttr#
Privileged attribute, see trdc_privilege_attr_t.
-
uint32_t secureAttr#
Secure attribute, see trdc_secure_attr_t.
-
uint32_t bypassDomainId#
Bypass domain ID.
-
uint32_t __pad0__#
Reserved.
-
uint32_t lock#
Lock the register.
-
uint32_t __pad1__#
Reserved.
-
uint32_t domainId#
-
struct _trdc_pid_config#
- #include <fsl_trdc.h>
Process identifier(PID) configuration for processor cores.
Public Members
-
uint32_t pid#
The process identifier of the executing task. The highest bit can be used to define secure/nonsecure attribute of the task.
-
uint32_t __pad0__#
Reserved.
-
uint32_t lock#
How to lock the register, see trdc_pid_lock_t.
-
uint32_t __pad1__#
Reserved.
-
uint32_t pid#
-
struct _trdc_idau_config#
- #include <fsl_trdc.h>
IDAU(Implementation-Defined Attribution Unit) configuration for TZ-M function control.
Public Members
-
uint32_t __pad0__#
Reserved.
-
uint32_t lockSecureVTOR#
Disable writes to secure VTOR(Vector Table Offset Register).
-
uint32_t lockNonsecureVTOR#
Disable writes to non-secure VTOR, Application interrupt and Reset Control Registers.
-
uint32_t lockSecureMPU#
Disable writes to secure MPU(Memory Protection Unit) from software or from a debug agent connected to the processor in Secure state.
-
uint32_t lockNonsecureMPU#
Disable writes to non-secure MPU(Memory Protection Unit) from software or from a debug agent connected to the processor.
-
uint32_t lockSAU#
Disable writes to SAU(Security Attribution Unit) registers.
-
uint32_t __pad1__#
Reserved.
-
uint32_t __pad0__#
-
struct _trdc_flw_config#
- #include <fsl_trdc.h>
FLW(Flash Logical Window) configuration.
-
struct _trdc_domain_error#
- #include <fsl_trdc.h>
TRDC domain error definition.
Public Members
-
trdc_controller_t controller#
Which controller captured access violation.
-
uint32_t address#
Access address that generated access violation.
-
trdc_error_state_t errorState#
Error state.
-
trdc_error_attr_t errorAttr#
Error attribute.
-
trdc_error_type_t errorType#
Error type.
-
uint8_t errorPort#
Error port.
-
uint8_t domainId#
Domain ID.
-
uint8_t slaveMemoryIdx#
The slave memory index. Only apply when violation in MBC.
-
trdc_controller_t controller#
-
struct _trdc_memory_access_control_config#
- #include <fsl_trdc.h>
Memory access control configuration for MBC/MRC.
Public Members
-
uint32_t nonsecureUsrX#
Allow nonsecure user execute access.
-
uint32_t nonsecureUsrW#
Allow nonsecure user write access.
-
uint32_t nonsecureUsrR#
Allow nonsecure user read access.
-
uint32_t __pad0__#
Reserved.
-
uint32_t nonsecurePrivX#
Allow nonsecure privilege execute access.
-
uint32_t nonsecurePrivW#
Allow nonsecure privilege write access.
-
uint32_t nonsecurePrivR#
Allow nonsecure privilege read access.
-
uint32_t __pad1__#
Reserved.
-
uint32_t secureUsrX#
Allow secure user execute access.
-
uint32_t secureUsrW#
Allow secure user write access.
-
uint32_t secureUsrR#
Allow secure user read access.
-
uint32_t __pad2__#
Reserved.
-
uint32_t securePrivX#
Allownsecure privilege execute access.
-
uint32_t securePrivW#
Allownsecure privilege write access.
-
uint32_t securePrivR#
Allownsecure privilege read access.
-
uint32_t __pad3__#
Reserved.
-
uint32_t lock#
Lock the configuration until next reset, only apply to access control register 0.
-
uint32_t nonsecureUsrX#
-
struct _trdc_mrc_region_descriptor_config#
- #include <fsl_trdc.h>
The configuration of each region descriptor per domain per MRC instance.
Public Members
-
uint8_t memoryAccessControlSelect#
Select one of the 8 access control policies for this region, for access cotrol policies see trdc_memory_access_control_config_t.
-
uint32_t startAddr#
Physical start address.
-
bool valid#
Lock the register.
-
bool nseEnable#
Enable non-secure accesses and disable secure accesses.
-
uint32_t endAddr#
Physical start address.
-
uint8_t mrcIdx#
The index of the MRC for this configuration to take effect.
-
uint8_t domainIdx#
The index of the domain for this configuration to take effect.
-
uint8_t regionIdx#
The index of the region for this configuration to take effect.
-
uint8_t memoryAccessControlSelect#
-
struct _trdc_mbc_nse_update_config#
- #include <fsl_trdc.h>
The configuration of MBC NSE update.
Public Members
-
uint32_t __pad0__#
Reserved.
-
uint32_t wordIdx#
MBC configuration word index to be updated.
-
uint32_t __pad1__#
Reserved.
-
uint32_t memorySelect#
Bit mask of the selected memory to be updated. _trdc_MBC_memory.
-
uint32_t __pad2__#
Reserved.
-
uint32_t domianSelect#
Bit mask of the selected domain to be updated. _trdc_MBC_domain.
-
uint32_t __pad3__#
Reserved.
-
uint32_t autoIncrement#
Whether to increment the word index after current word is updated using this configuration.
-
uint32_t __pad0__#
-
struct _trdc_mbc_memory_block_config#
- #include <fsl_trdc.h>
The configuration of each memory block per domain per MBC instance.
Public Members
-
uint32_t memoryAccessControlSelect#
Select one of the 8 access control policies for this memory block, for access cotrol policies see trdc_memory_access_control_config_t.
-
uint32_t nseEnable#
Enable non-secure accesses and disable secure accesses.
-
uint32_t mbcIdx#
The index of the MBC for this configuration to take effect.
-
uint32_t domainIdx#
The index of the domain for this configuration to take effect.
-
uint32_t slaveMemoryIdx#
The index of the slave memory for this configuration to take effect.
-
uint32_t memoryBlockIdx#
The index of the memory block for this configuration to take effect.
-
uint32_t memoryAccessControlSelect#
Trdc_core#
-
typedef struct _TRDC_General_Type TRDC_General_Type#
TRDC general configuration register definition.
-
typedef struct _TRDC_FLW_Type TRDC_FLW_Type#
TRDC flash logical control register definition.
-
typedef struct _TRDC_DomainError_Type TRDC_DomainError_Type#
TRDC domain error register definition.
-
typedef struct _TRDC_DomainAssignment_Type TRDC_DomainAssignment_Type#
TRDC master domain assignment register definition.
-
typedef struct _TRDC_MBC_Type TRDC_MBC_Type#
TRDC MBC control register definition.
-
typedef struct _TRDC_MRC_Type TRDC_MRC_Type#
TRDC MRC control register definition. MRC_DOM0_RGD_W[region][word].
-
TRDC_GENERAL_BASE(base)#
TRDC base address convert macro.
-
TRDC_FLW_BASE(base)#
-
TRDC_DOMAIN_ERROR_BASE(base)#
-
TRDC_DOMAIN_ASSIGNMENT_BASE(base)#
-
TRDC_MBC_BASE(base, instance)#
-
TRDC_MRC_BASE(base, instance)#
-
struct _TRDC_General_Type#
- #include <fsl_trdc_core.h>
TRDC general configuration register definition.
Public Members
- __IO uint32_t TRDC_CR
TRDC Register, offset: 0x0
- __I uint32_t TRDC_HWCFG0
TRDC Hardware Configuration Register 0, offset: 0xF0
- __I uint32_t TRDC_HWCFG1
TRDC Hardware Configuration Register 1, offset: 0xF4
- __I uint32_t TRDC_HWCFG2
TRDC Hardware Configuration Register 2, offset: 0xF8
- __I uint32_t TRDC_HWCFG3
TRDC Hardware Configuration Register 3, offset: 0xFC
- __I uint8_t DACFG [8]
Domain Assignment Configuration Register, array offset: 0x100, array step: 0x1
- __IO uint32_t TRDC_IDAU_CR
TRDC IDAU Control Register, offset: 0x1C0
-
struct _TRDC_FLW_Type#
- #include <fsl_trdc_core.h>
TRDC flash logical control register definition.
Public Members
- __IO uint32_t TRDC_FLW_CTL
TRDC FLW Control, offset: 0x1E0
- __I uint32_t TRDC_FLW_PBASE
TRDC FLW Physical Base, offset: 0x1E4
- __IO uint32_t TRDC_FLW_ABASE
TRDC FLW Array Base, offset: 0x1E8
- __IO uint32_t TRDC_FLW_BCNT
TRDC FLW Block Count, offset: 0x1EC
-
struct _TRDC_DomainError_Type#
- #include <fsl_trdc_core.h>
TRDC domain error register definition.
Public Members
- __IO uint32_t TRDC_FDID
TRDC Fault Domain ID, offset: 0x1FC
- __I uint32_t TRDC_DERRLOC [16]
TRDC Domain Error Location Register, array offset: 0x200, array step: 0x4
-
struct _TRDC_DomainAssignment_Type#
- #include <fsl_trdc_core.h>
TRDC master domain assignment register definition.
Public Members
- __IO uint32_t PID [8]
Process Identifier, array offset: 0x700, array step: 0x4
-
struct _TRDC_MBC_Type#
- #include <fsl_trdc_core.h>
TRDC MBC control register definition.
Public Members
- __I uint32_t MBC_MEM_GLBCFG [4]
MBC Global Configuration Register, array offset: 0x10000, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_NSE_BLK_INDEX
MBC NonSecure Enable Block Index, array offset: 0x10010, array step: 0x2000
- __O uint32_t MBC_NSE_BLK_SET
MBC NonSecure Enable Block Set, array offset: 0x10014, array step: 0x2000
- __O uint32_t MBC_NSE_BLK_CLR
MBC NonSecure Enable Block Clear, array offset: 0x10018, array step: 0x2000
- __O uint32_t MBC_NSE_BLK_CLR_ALL
MBC NonSecure Enable Block Clear All, array offset: 0x1001C, array step: 0x2000
- __IO uint32_t MBC_MEMN_GLBAC [8]
MBC Global Access Control, array offset: 0x10020, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM0_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x10040, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM0_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x10140, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM0_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10180, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM0_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x101A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM0_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x101A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM0_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x101C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM0_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x101D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM0_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x101F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM1_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x10240, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM1_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x10340, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM1_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10380, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM1_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x103A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM1_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x103A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM1_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x103C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM1_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x103D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM1_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x103F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM2_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x10440, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM2_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x10540, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM2_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10580, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM2_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x105A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM2_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x105A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM2_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x105C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM2_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x105D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM2_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x105F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM3_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x10640, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM3_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x10740, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM3_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10780, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM3_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x107A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM3_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x107A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM3_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x107C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM3_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x107D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM3_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x107F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM4_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x10840, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM4_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x10940, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM4_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10980, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM4_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x109A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM4_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x109A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM4_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x109C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM4_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x109D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM4_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x109F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM5_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x10A40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM5_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x10B40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM5_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10B80, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM5_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10BA0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM5_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10BA8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM5_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10BC8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM5_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10BD0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM5_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10BF0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM6_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x10C40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM6_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x10D40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM6_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10D80, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM6_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10DA0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM6_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10DA8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM6_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10DC8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM6_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10DD0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM6_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10DF0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM7_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x10E40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM7_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x10F40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM7_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10F80, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM7_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10FA0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM7_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10FA8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM7_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10FC8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM7_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x10FD0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM7_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x10FF0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM8_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x11040, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM8_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x11140, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM8_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11180, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM8_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x111A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM8_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x111A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM8_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x111C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM8_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x111D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM8_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x111F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM9_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x11240, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM9_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x11340, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM9_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11380, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM9_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x113A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM9_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x113A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM9_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x113C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM9_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x113D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM9_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x113F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM10_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x11440, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM10_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x11540, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM10_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11580, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM10_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x115A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM10_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x115A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM10_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x115C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM10_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x115D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM10_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x115F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM11_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x11640, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM11_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x11740, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM11_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11780, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM11_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x117A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM11_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x117A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM11_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x117C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM11_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x117D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM11_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x117F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM12_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x11840, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM12_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x11940, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM12_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11980, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM12_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x119A0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM12_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x119A8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM12_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x119C8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM12_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x119D0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM12_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x119F0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM13_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x11A40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM13_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x11B40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM13_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11B80, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM13_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11BA0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM13_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11BA8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM13_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11BC8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM13_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11BD0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM13_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11BF0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM14_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x11C40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM14_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x11D40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM14_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11D80, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM14_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11DA0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM14_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11DA8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM14_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11DC8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM14_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11DD0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM14_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11DF0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM15_MEM0_BLK_CFG_W [64]
MBC Memory Block Configuration Word, array offset: 0x11E40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM15_MEM0_BLK_NSE_W [16]
MBC Memory Block NonSecure Enable Word, array offset: 0x11F40, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM15_MEM1_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11F80, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM15_MEM1_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11FA0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM15_MEM2_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11FA8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM15_MEM2_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11FC8, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM15_MEM3_BLK_CFG_W [8]
MBC Memory Block Configuration Word, array offset: 0x11FD0, array step: index*0x2000, index2*0x4
- __IO uint32_t MBC_DOM15_MEM3_BLK_NSE_W [2]
MBC Memory Block NonSecure Enable Word, array offset: 0x11FF0, array step: index*0x2000, index2*0x4
-
struct _TRDC_MRC_Type#
- #include <fsl_trdc_core.h>
TRDC MRC control register definition. MRC_DOM0_RGD_W[region][word].
Public Members
- __I uint32_t MRC_GLBCFG
MRC Global Configuration Register, array offset: 0x14000, array step: 0x1000
- __IO uint32_t MRC_NSE_RGN_INDIRECT
MRC NonSecure Enable Region Indirect, array offset: 0x14010, array step: 0x1000
- __O uint32_t MRC_NSE_RGN_SET
MRC NonSecure Enable Region Set, array offset: 0x14014, array step: 0x1000
- __O uint32_t MRC_NSE_RGN_CLR
MRC NonSecure Enable Region Clear, array offset: 0x14018, array step: 0x1000
- __O uint32_t MRC_NSE_RGN_CLR_ALL
MRC NonSecure Enable Region Clear All, array offset: 0x1401C, array step: 0x1000
- __IO uint32_t MRC_GLBAC [8]
MRC Global Access Control, array offset: 0x14020, array step: index*0x1000, index2*0x4
- __IO uint32_t MRC_DOM0_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14040, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM0_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x140C0, array step: 0x1000
- __IO uint32_t MRC_DOM1_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14140, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM1_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x141C0, array step: 0x1000
- __IO uint32_t MRC_DOM2_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14240, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM2_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x142C0, array step: 0x1000
- __IO uint32_t MRC_DOM3_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14340, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM3_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x143C0, array step: 0x1000
- __IO uint32_t MRC_DOM4_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14440, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM4_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x144C0, array step: 0x1000
- __IO uint32_t MRC_DOM5_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14540, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM5_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x145C0, array step: 0x1000
- __IO uint32_t MRC_DOM6_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14640, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM6_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x146C0, array step: 0x1000
- __IO uint32_t MRC_DOM7_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14740, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM7_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x147C0, array step: 0x1000
- __IO uint32_t MRC_DOM8_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14840, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM8_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x148C0, array step: 0x1000
- __IO uint32_t MRC_DOM9_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14940, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM9_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x149C0, array step: 0x1000
- __IO uint32_t MRC_DOM10_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14A40, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM10_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x14AC0, array step: 0x1000
- __IO uint32_t MRC_DOM11_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14B40, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM11_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x14BC0, array step: 0x1000
- __IO uint32_t MRC_DOM12_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14C40, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM12_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x14CC0, array step: 0x1000
- __IO uint32_t MRC_DOM13_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14D40, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM13_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x14DC0, array step: 0x1000
- __IO uint32_t MRC_DOM14_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14E40, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM14_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x14EC0, array step: 0x1000
- __IO uint32_t MRC_DOM15_RGD_W [16][2]
MRC Region Descriptor Word 0..MRC Region Descriptor Word 1, array offset: 0x14F40, array step: index*0x1000, index2*0x8, index3*0x4
- __IO uint32_t MRC_DOM15_RGD_NSE
MRC Region Descriptor NonSecure Enable, array offset: 0x14FC0, array step: 0x1000
-
struct MBC_DERR#
Public Members
- __I uint32_t W0
MBC Domain Error Word0 Register, array offset: 0x400, array step: 0x10
- __I uint32_t W1
MBC Domain Error Word1 Register, array offset: 0x404, array step: 0x10
- __O uint32_t W3
MBC Domain Error Word3 Register, array offset: 0x40C, array step: 0x10
-
struct MRC_DERR#
Public Members
- __I uint32_t W0
MRC Domain Error Word0 Register, array offset: 0x480, array step: 0x10
- __I uint32_t W1
MRC Domain Error Word1 Register, array offset: 0x484, array step: 0x10
- __O uint32_t W3
MRC Domain Error Word3 Register, array offset: 0x48C, array step: 0x10
-
union __unnamed102__#
Public Members
-
struct _TRDC_DomainAssignment_Type MDA_DFMT0[8]#
-
struct _TRDC_DomainAssignment_Type MDA_DFMT1[8]#
-
struct _TRDC_DomainAssignment_Type MDA_DFMT0[8]#
-
struct MDA_DFMT0
Public Members
- __IO uint32_t MDA_W_DFMT0 [8]
DAC Master Domain Assignment Register, array offset: 0x800, array step: index*0x20, index2*0x4
-
struct MDA_DFMT1
Public Members
- __IO uint32_t MDA_W_DFMT1 [1]
DAC Master Domain Assignment Register, array offset: 0x800, array step: index*0x20, index2*0x4
TRDC SOC Driver#
-
enum _trdc_master#
Enumeration for TRDC master mapping.
Defines the enumeration for TRDC master resource collections.
Values:
-
enumerator kTRDC_MAIN_MasterEDMA5Ch0_1#
-
enumerator kTRDC_MAIN_MasterEDMA5Ch2_3#
-
enumerator kTRDC_MAIN_MasterEDMA5Ch4_5#
-
enumerator kTRDC_MAIN_MasterEDMA5Ch6_7#
-
enumerator kTRDC_MAIN_MasterEDMA5Ch8_9#
-
enumerator kTRDC_MAIN_MasterEDMA5Ch10_11#
-
enumerator kTRDC_MAIN_MasterEDMA5Ch12_13#
-
enumerator kTRDC_MAIN_MasterEDMA5Ch14_15#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch0_1#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch2_3#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch4_5#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch6_7#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch8_9#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch10_11#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch12_13#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch14_15#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch16_17#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch18_19#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch20_21#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch22_23#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch24_25#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch26_27#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch28_29#
-
enumerator kTRDC_MAIN_MasterMEDMA3Ch30_31#
-
enumerator kTRDC_MAIN_MasterReserved0#
-
enumerator kTRDC_MAIN_MasterReserved1#
-
enumerator kTRDC_MAIN_MasterDAP_AHBP#
-
enumerator kTRDC_MAIN_MasterETR#
-
enumerator kTRDC_MAIN_MasterReserved2#
-
enumerator kTRDC_MAIN_MasterReserved3#
-
enumerator kTRDC_MAIN_MasterWAKE_SS#
-
enumerator kTRDC_MAIN_MasterReserved4#
-
enumerator kTRDC_MAIN_MasterMTR#
-
enumerator kTRDC_MAIN_MasterTESTPORT#
-
enumerator kTRDC_CMPT_MasterCPU0_AXIM#
-
enumerator kTRDC_CMPT_MasterCPU0_AHBP#
-
enumerator kTRDC_CMPT_MasterReserved0#
-
enumerator kTRDC_CMPT_MasterReserved1#
-
enumerator kTRDC_CMPT_MasterLLC_RD#
-
enumerator kTRDC_CMPT_MasterLLC_WR#
-
enumerator kTRDC_CMPT_MasterNPU#
-
enumerator kTRDC_WAKE_MasterWEDMA3Ch0_1#
-
enumerator kTRDC_WAKE_MasterWEDMA3Ch0_2#
-
enumerator kTRDC_WAKE_MasterWEDMA3Ch0_3#
-
enumerator kTRDC_WAKE_MasterWEDMA3Ch0_4#
-
enumerator kTRDC_AUDIO_MasterAEDMA3Ch0_1#
-
enumerator kTRDC_AUDIO_MasterAEDMA3Ch0_2#
-
enumerator kTRDC_AUDIO_MasterAEDMA3Ch0_3#
-
enumerator kTRDC_AUDIO_MasterAEDMA3Ch0_4#
-
enumerator kTRDC_COMM_MasterSDHC0#
-
enumerator kTRDC_COMM_MasterSDHC1#
-
enumerator kTRDC_COMM_MasterUSB0#
-
enumerator kTRDC_COMM_MasterUSB1#
-
enumerator kTRDC_COMM_MasterENET0#
-
enumerator kTRDC_COMM_MasterENET1_M0R#
-
enumerator kTRDC_COMM_MasterENET1_M0T#
-
enumerator kTRDC_COMM_MasterXSPI_RESP#
-
enumerator kTRDC_MEDIA_MasterDCIFLayer0#
-
enumerator kTRDC_MEDIA_MasterDCIFLayer1#
-
enumerator kTRDC_MEDIA_MasterDCIFLayer2#
-
enumerator kTRDC_MEDIA_MasterDCIFLayer3#
-
enumerator kTRDC_MEDIA_MasterDCIFLayer4#
-
enumerator kTRDC_MEDIA_MasterDCIFLayer5#
-
enumerator kTRDC_MEDIA_MasterDCIFLayer6#
-
enumerator kTRDC_MEDIA_MasterDCIFLayer7#
-
enumerator kTRDC_MEDIA_MasterISI#
-
enumerator kTRDC_MEDIA_MasterISI_U#
-
enumerator kTRDC_MEDIA_MasterISI_V#
-
enumerator kTRDC_MEDIA_MasterCSI#
-
enumerator kTRDC_MEDIA_MasterGPU_DMA#
-
enumerator kTRDC_MEDIA_MasterGPU_CCD#
-
enumerator kTRDC_MEDIA_MasterJPEG#
-
enumerator kTRDC_MAIN_MasterEDMA5Ch0_1#
-
enum _trdc_mrc#
Enumeration for TRDC MRC mapping.
Defines the enumeration for TRDC MRC (Memory Region Controller) mapping.
Values:
-
enumerator kTRDC_MAIN_MrcXSPI0#
-
enumerator kTRDC_MAIN_MrcXSPI1#
-
enumerator kTRDC_MAIN_MrcSRAMC#
-
enumerator kTRDC_CMPT_MrcSRAM0_1_2#
-
enumerator kTRDC_CMPT_MrcCPU0_TCM#
-
enumerator kTRDC_CMPT_MrcROM#
-
enumerator kTRDC_CMPT_MrcNPU_TCM#
-
enumerator kTRDC_CMPT_MrcLLC#
-
enumerator kTRDC_MAIN_MrcXSPI0#
-
enum _trdc_mbc_block#
Enumeration for TRDC MBC mapping.
Defines the enumeration for TRDC MBC (Memory Blocker Checker) mapping. User Can use TRDC_MBC_GetTRDCInst, TRDC_MBC_GetMBCInst, TRDC_MBC_GetSlvIdx and TRDC_MBC_GetBlkIdx to get details about each block.
Values:
-
enumerator kTRDC_CMPT_MBC_MODCON#
CMPT_TRDC MBC0 Slave 0 Block Idx 0
-
enumerator kTRDC_CMPT_MBC_MTR#
CMPT_TRDC MBC0 Slave 0 Block Idx 2
-
enumerator kTRDC_CMPT_MBC_TCU#
CMPT_TRDC MBC0 Slave 0 Block Idx 3
-
enumerator kTRDC_CMPT_MBC_TRDC_MGR#
CMPT_TRDC MBC0 Slave 0 Block Idx 4
-
enumerator kTRDC_CMPT_MBC_TRDC_MC#
CMPT_TRDC MBC0 Slave 0 Block Idx 5
-
enumerator kTRDC_CMPT_MBC_CCM#
CMPT_TRDC MBC0 Slave 0 Block Idx 6
-
enumerator kTRDC_CMPT_MBC_SRAMCTL0#
CMPT_TRDC MBC0 Slave 0 Block Idx 8
-
enumerator kTRDC_CMPT_MBC_SRAMCTL1#
CMPT_TRDC MBC0 Slave 0 Block Idx 9
-
enumerator kTRDC_CMPT_MBC_SRAMCTL2#
CMPT_TRDC MBC0 Slave 0 Block Idx 10
-
enumerator kTRDC_CMPT_MBC_SRAMCTL3#
CMPT_TRDC MBC0 Slave 0 Block Idx 11
-
enumerator kTRDC_CMPT_MBC_SRAMCTL4#
CMPT_TRDC MBC0 Slave 0 Block Idx 12
-
enumerator kTRDC_CMPT_MBC_SRAMCTL5#
CMPT_TRDC MBC0 Slave 0 Block Idx 13
-
enumerator kTRDC_CMPT_MBC_SRAMCTL6#
CMPT_TRDC MBC0 Slave 0 Block Idx 14
-
enumerator kTRDC_CMPT_MBC_SRAMCTL7#
CMPT_TRDC MBC0 Slave 0 Block Idx 15
-
enumerator kTRDC_CMPT_MBC_SRAMCTL8#
CMPT_TRDC MBC0 Slave 0 Block Idx 16
-
enumerator kTRDC_CMPT_MBC_SRAMCTL9#
CMPT_TRDC MBC0 Slave 0 Block Idx 17
-
enumerator kTRDC_CMPT_MBC_SRAMCTL10#
CMPT_TRDC MBC0 Slave 0 Block Idx 18
-
enumerator kTRDC_CMPT_MBC_SRAMCTL11#
CMPT_TRDC MBC0 Slave 0 Block Idx 19
-
enumerator kTRDC_CMPT_MBC_SRAMCTL12#
CMPT_TRDC MBC0 Slave 0 Block Idx 20
-
enumerator kTRDC_CMPT_MBC_SRAMCTL13#
CMPT_TRDC MBC0 Slave 0 Block Idx 21
-
enumerator kTRDC_CMPT_MBC_SRAMCTL14#
CMPT_TRDC MBC0 Slave 0 Block Idx 22
-
enumerator kTRDC_CMPT_MBC_SRAMCTL15#
CMPT_TRDC MBC0 Slave 0 Block Idx 23
-
enumerator kTRDC_CMPT_MBC_LLC#
CMPT_TRDC MBC0 Slave 0 Block Idx 26
-
enumerator kTRDC_CMPT_MBC_ROMCP#
CMPT_TRDC MBC0 Slave 0 Block Idx 27
-
enumerator kTRDC_CMPT_MBC_NPU#
CMPT_TRDC MBC0 Slave 0 Block Idx 28
-
enumerator kTRDC_CMPT_MBC_FREQME#
CMPT_TRDC MBC0 Slave 0 Block Idx 29
-
enumerator kTRDC_CMPT_MBC_FREQME_MUX#
CMPT_TRDC MBC0 Slave 0 Block Idx 30
-
enumerator kTRDC_CMPT_MBC_NIC_GPV#
CMPT_TRDC MBC0 Slave 1 Block Idx 0
-
enumerator kTRDC_MAIN_MBC_MODCON#
MAIN_TRDC MBC0 Slave 0 Block Idx 0
-
enumerator kTRDC_MAIN_MBC_MTR#
MAIN_TRDC MBC0 Slave 0 Block Idx 2
-
enumerator kTRDC_MAIN_MBC_TCU#
MAIN_TRDC MBC0 Slave 0 Block Idx 3
-
enumerator kTRDC_MAIN_MBC_TRDC_MGR#
MAIN_TRDC MBC0 Slave 0 Block Idx 4
-
enumerator kTRDC_MAIN_MBC_TRDC_MC#
MAIN_TRDC MBC0 Slave 0 Block Idx 5
-
enumerator kTRDC_MAIN_MBC_CCM#
MAIN_TRDC MBC0 Slave 0 Block Idx 6
-
enumerator kTRDC_MAIN_MBC_AHB_SRAMC#
MAIN_TRDC MBC0 Slave 0 Block Idx 8
-
enumerator kTRDC_MAIN_MBC_AXBS#
MAIN_TRDC MBC0 Slave 0 Block Idx 9
-
enumerator kTRDC_MAIN_MBC_XBIC#
MAIN_TRDC MBC0 Slave 0 Block Idx 12
-
enumerator kTRDC_MAIN_MBC_XBIC_TDBG#
MAIN_TRDC MBC0 Slave 0 Block Idx 13
-
enumerator kTRDC_MAIN_MBC_EDMA3#
MAIN_TRDC MBC0 Slave 0 Block Idx 14
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD0#
MAIN_TRDC MBC0 Slave 0 Block Idx 15
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD1#
MAIN_TRDC MBC0 Slave 0 Block Idx 16
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD2#
MAIN_TRDC MBC0 Slave 0 Block Idx 17
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD3#
MAIN_TRDC MBC0 Slave 0 Block Idx 18
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD4#
MAIN_TRDC MBC0 Slave 0 Block Idx 19
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD5#
MAIN_TRDC MBC0 Slave 0 Block Idx 20
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD6#
MAIN_TRDC MBC0 Slave 0 Block Idx 21
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD7#
MAIN_TRDC MBC0 Slave 0 Block Idx 22
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD8#
MAIN_TRDC MBC0 Slave 0 Block Idx 23
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD9#
MAIN_TRDC MBC0 Slave 0 Block Idx 24
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD10#
MAIN_TRDC MBC0 Slave 0 Block Idx 25
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD11#
MAIN_TRDC MBC0 Slave 0 Block Idx 26
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD12#
MAIN_TRDC MBC0 Slave 0 Block Idx 27
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD13#
MAIN_TRDC MBC0 Slave 0 Block Idx 28
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD14#
MAIN_TRDC MBC0 Slave 0 Block Idx 29
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD15#
MAIN_TRDC MBC0 Slave 0 Block Idx 30
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD16#
MAIN_TRDC MBC0 Slave 0 Block Idx 31
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD17#
MAIN_TRDC MBC0 Slave 0 Block Idx 32
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD18#
MAIN_TRDC MBC0 Slave 0 Block Idx 33
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD19#
MAIN_TRDC MBC0 Slave 0 Block Idx 34
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD20#
MAIN_TRDC MBC0 Slave 0 Block Idx 35
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD21#
MAIN_TRDC MBC0 Slave 0 Block Idx 36
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD22#
MAIN_TRDC MBC0 Slave 0 Block Idx 37
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD23#
MAIN_TRDC MBC0 Slave 0 Block Idx 38
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD24#
MAIN_TRDC MBC0 Slave 0 Block Idx 39
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD25#
MAIN_TRDC MBC0 Slave 0 Block Idx 40
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD26#
MAIN_TRDC MBC0 Slave 0 Block Idx 41
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD27#
MAIN_TRDC MBC0 Slave 0 Block Idx 42
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD28#
MAIN_TRDC MBC0 Slave 0 Block Idx 43
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD29#
MAIN_TRDC MBC0 Slave 0 Block Idx 44
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD30#
MAIN_TRDC MBC0 Slave 0 Block Idx 45
-
enumerator kTRDC_MAIN_MBC_eDMA3_TCD31#
MAIN_TRDC MBC0 Slave 0 Block Idx 46
-
enumerator kTRDC_MAIN_MBC_EDMA5#
MAIN_TRDC MBC0 Slave 0 Block Idx 48
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD0#
MAIN_TRDC MBC0 Slave 0 Block Idx 49
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD1#
MAIN_TRDC MBC0 Slave 0 Block Idx 50
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD2#
MAIN_TRDC MBC0 Slave 0 Block Idx 51
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD3#
MAIN_TRDC MBC0 Slave 0 Block Idx 52
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD4#
MAIN_TRDC MBC0 Slave 0 Block Idx 53
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD5#
MAIN_TRDC MBC0 Slave 0 Block Idx 54
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD6#
MAIN_TRDC MBC0 Slave 0 Block Idx 55
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD7#
MAIN_TRDC MBC0 Slave 0 Block Idx 56
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD8#
MAIN_TRDC MBC0 Slave 0 Block Idx 57
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD9#
MAIN_TRDC MBC0 Slave 0 Block Idx 58
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD10#
MAIN_TRDC MBC0 Slave 0 Block Idx 59
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD11#
MAIN_TRDC MBC0 Slave 0 Block Idx 60
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD12#
MAIN_TRDC MBC0 Slave 0 Block Idx 61
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD13#
MAIN_TRDC MBC0 Slave 0 Block Idx 62
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD14#
MAIN_TRDC MBC0 Slave 0 Block Idx 63
-
enumerator kTRDC_MAIN_MBC_eDMA5_TCD15#
MAIN_TRDC MBC0 Slave 0 Block Idx 64
-
enumerator kTRDC_MAIN_MBC_FREQME#
MAIN_TRDC MBC0 Slave 0 Block Idx 65
-
enumerator kTRDC_MAIN_MBC_FREQME_MUX#
MAIN_TRDC MBC0 Slave 0 Block Idx 66
-
enumerator kTRDC_MAIN_MBC_XECC0#
MAIN_TRDC MBC0 Slave 0 Block Idx 67
-
enumerator kTRDC_MAIN_MBC_XECC1#
MAIN_TRDC MBC0 Slave 0 Block Idx 68
-
enumerator kTRDC_MAIN_MBC_XECC2#
MAIN_TRDC MBC0 Slave 0 Block Idx 69
-
enumerator kTRDC_MAIN_MBC_XSPI0#
MAIN_TRDC MBC0 Slave 0 Block Idx 70
-
enumerator kTRDC_MAIN_MBC_XSPI1#
MAIN_TRDC MBC0 Slave 0 Block Idx 71
-
enumerator kTRDC_MAIN_MBC_XSPI2#
MAIN_TRDC MBC0 Slave 0 Block Idx 72
-
enumerator kTRDC_MAIN_MBC_MMU0#
MAIN_TRDC MBC0 Slave 0 Block Idx 73
-
enumerator kTRDC_MAIN_MBC_CP#
MAIN_TRDC MBC0 Slave 0 Block Idx 75
-
enumerator kTRDC_MAIN_MBC_PVTM#
MAIN_TRDC MBC0 Slave 0 Block Idx 76
-
enumerator kTRDC_MAIN_MBC_MTR_MSTR#
MAIN_TRDC MBC0 Slave 0 Block Idx 77
-
enumerator kTRDC_MAIN_MBC_CGUANA#
MAIN_TRDC MBC0 Slave 0 Block Idx 80
-
enumerator kTRDC_MAIN_MBC_CGUDIG#
MAIN_TRDC MBC0 Slave 0 Block Idx 81
-
enumerator kTRDC_MAIN_MBC_PMU_CSR#
MAIN_TRDC MBC0 Slave 0 Block Idx 82
-
enumerator kTRDC_MAIN_MBC_SYSCON_RESETCON#
MAIN_TRDC MBC0 Slave 0 Block Idx 83
-
enumerator kTRDC_MAIN_MBC_SYSCON_POWERCON#
MAIN_TRDC MBC0 Slave 0 Block Idx 84
-
enumerator kTRDC_MAIN_MBC_SYSCON_PDCON#
MAIN_TRDC MBC0 Slave 0 Block Idx 85
-
enumerator kTRDC_MAIN_MBC_SYSCON_MEMCON#
MAIN_TRDC MBC0 Slave 0 Block Idx 86
-
enumerator kTRDC_MAIN_MBC_SYSCON_MTR#
MAIN_TRDC MBC0 Slave 0 Block Idx 87
-
enumerator kTRDC_MAIN_MBC_SYSCON_TCU#
MAIN_TRDC MBC0 Slave 0 Block Idx 88
-
enumerator kTRDC_MAIN_MBC_SYSCON_FREQME#
MAIN_TRDC MBC0 Slave 0 Block Idx 89
-
enumerator kTRDC_MAIN_MBC_SYSCON_FREQME_MUX#
MAIN_TRDC MBC0 Slave 0 Block Idx 90
-
enumerator kTRDC_MAIN_MBC_CSSI_FSB#
MAIN_TRDC MBC0 Slave 0 Block Idx 96
-
enumerator kTRDC_MAIN_MBC_CSSI_MU0A#
MAIN_TRDC MBC0 Slave 0 Block Idx 97
-
enumerator kTRDC_MAIN_MBC_CSSI_MU1A#
MAIN_TRDC MBC0 Slave 0 Block Idx 98
-
enumerator kTRDC_MAIN_MBC_CSSI_MU2A#
MAIN_TRDC MBC0 Slave 0 Block Idx 99
-
enumerator kTRDC_MAIN_MBC_NIC_GPV#
MAIN_TRDC MBC0 Slave 1 Block Idx 0
-
enumerator kTRDC_MAIN_MBC_DBGMB#
MAIN_TRDC MBC0 Slave 2 Block Idx 0
-
enumerator kTRDC_MAIN_MBC_CORESIGHT#
-
enumerator kTRDC_MAIN_MBC_HSP_EVTG0#
MAIN_TRDC MBC1 Slave 0 Block Idx 0
-
enumerator kTRDC_MAIN_MBC_HSP_EVTG1#
MAIN_TRDC MBC1 Slave 0 Block Idx 1
-
enumerator kTRDC_MAIN_MBC_HSP_MUA0#
MAIN_TRDC MBC1 Slave 0 Block Idx 2
-
enumerator kTRDC_MAIN_MBC_HSP_MUB0#
MAIN_TRDC MBC1 Slave 0 Block Idx 3
-
enumerator kTRDC_MAIN_MBC_HSP_SEMA42#
MAIN_TRDC MBC1 Slave 0 Block Idx 4
-
enumerator kTRDC_MAIN_MBC_HSP_ADC0#
MAIN_TRDC MBC1 Slave 0 Block Idx 5
-
enumerator kTRDC_MAIN_MBC_HSP_DAC#
MAIN_TRDC MBC1 Slave 0 Block Idx 6
-
enumerator kTRDC_MAIN_MBC_HSP_LPIT0#
MAIN_TRDC MBC1 Slave 0 Block Idx 7
-
enumerator kTRDC_MAIN_MBC_HSP_EFLEXPWM0#
MAIN_TRDC MBC1 Slave 0 Block Idx 8
-
enumerator kTRDC_MAIN_MBC_HSP_EFLEXPWM1#
MAIN_TRDC MBC1 Slave 0 Block Idx 9
-
enumerator kTRDC_MAIN_MBC_HSP_QUADTPM#
MAIN_TRDC MBC1 Slave 0 Block Idx 10
-
enumerator kTRDC_MAIN_MBC_HSP_QUADTPM1#
MAIN_TRDC MBC1 Slave 0 Block Idx 11
-
enumerator kTRDC_MAIN_MBC_HSP_QDEC0#
MAIN_TRDC MBC1 Slave 0 Block Idx 12
-
enumerator kTRDC_MAIN_MBC_HSP_QDEC1#
MAIN_TRDC MBC1 Slave 0 Block Idx 13
-
enumerator kTRDC_MAIN_MBC_HSP_SINC0#
MAIN_TRDC MBC1 Slave 0 Block Idx 14
-
enumerator kTRDC_MAIN_MBC_HSP_FLEXCAN0#
MAIN_TRDC MBC1 Slave 0 Block Idx 15
-
enumerator kTRDC_MAIN_MBC_HSP_FLEXCAN1#
MAIN_TRDC MBC1 Slave 0 Block Idx 16
-
enumerator kTRDC_MAIN_MBC_HSP_FlexIO0#
MAIN_TRDC MBC1 Slave 0 Block Idx 17
-
enumerator kTRDC_MAIN_MBC_HSP_FlexIO1#
MAIN_TRDC MBC1 Slave 0 Block Idx 18
-
enumerator kTRDC_MAIN_MBC_HSP_I3C#
MAIN_TRDC MBC1 Slave 0 Block Idx 19
-
enumerator kTRDC_MAIN_MBC_HSP_LPI2C0#
MAIN_TRDC MBC1 Slave 0 Block Idx 20
-
enumerator kTRDC_MAIN_MBC_WAKE_LPI2C2#
MAIN_TRDC MBC1 Slave 0 Block Idx 21
-
enumerator kTRDC_MAIN_MBC_HSP_LPSPI0#
MAIN_TRDC MBC1 Slave 0 Block Idx 22
-
enumerator kTRDC_MAIN_MBC_HSP_LPSPI1#
MAIN_TRDC MBC1 Slave 0 Block Idx 23
-
enumerator kTRDC_MAIN_MBC_HSP_LPSPI2#
MAIN_TRDC MBC1 Slave 0 Block Idx 24
-
enumerator kTRDC_MAIN_MBC_HSP_LPUART0#
MAIN_TRDC MBC1 Slave 0 Block Idx 25
-
enumerator kTRDC_MAIN_MBC_HSP_LPUART1#
MAIN_TRDC MBC1 Slave 0 Block Idx 26
-
enumerator kTRDC_MAIN_MBC_HSP_LPUART2#
MAIN_TRDC MBC1 Slave 0 Block Idx 27
-
enumerator kTRDC_MAIN_MBC_HSP_IOMUXC#
MAIN_TRDC MBC1 Slave 0 Block Idx 28
-
enumerator kTRDC_MAIN_MBC_HSP_QTIMER0#
MAIN_TRDC MBC1 Slave 0 Block Idx 30
-
enumerator kTRDC_MAIN_MBC_HSP_QTIMER1#
MAIN_TRDC MBC1 Slave 0 Block Idx 31
-
enumerator kTRDC_MAIN_MBC_HSP_EVTG2#
MAIN_TRDC MBC1 Slave 1 Block Idx 0
-
enumerator kTRDC_MAIN_MBC_HSP_EVTG3#
MAIN_TRDC MBC1 Slave 1 Block Idx 1
-
enumerator kTRDC_MAIN_MBC_HSP_XBAR0#
MAIN_TRDC MBC1 Slave 1 Block Idx 2
-
enumerator kTRDC_MAIN_MBC_HSP_XBAR1#
MAIN_TRDC MBC1 Slave 1 Block Idx 3
-
enumerator kTRDC_MAIN_MBC_HSP_XBAR2#
MAIN_TRDC MBC1 Slave 1 Block Idx 4
-
enumerator kTRDC_MAIN_MBC_HSP_ADC1#
MAIN_TRDC MBC1 Slave 1 Block Idx 5
-
enumerator kTRDC_MAIN_MBC_HSP_LPIT1#
MAIN_TRDC MBC1 Slave 1 Block Idx 6
-
enumerator kTRDC_MAIN_MBC_HSP_EFLEXPWM2#
MAIN_TRDC MBC1 Slave 1 Block Idx 7
-
enumerator kTRDC_MAIN_MBC_HSP_EFLEXPWM3#
MAIN_TRDC MBC1 Slave 1 Block Idx 8
-
enumerator kTRDC_MAIN_MBC_HSP_QUADTPM2#
MAIN_TRDC MBC1 Slave 1 Block Idx 9
-
enumerator kTRDC_MAIN_MBC_HSP_QUADTPM3#
MAIN_TRDC MBC1 Slave 1 Block Idx 10
-
enumerator kTRDC_MAIN_MBC_HSP_QUADTPM4#
MAIN_TRDC MBC1 Slave 1 Block Idx 11
-
enumerator kTRDC_MAIN_MBC_HSP_QDEC2#
MAIN_TRDC MBC1 Slave 1 Block Idx 12
-
enumerator kTRDC_MAIN_MBC_HSP_QDEC3#
MAIN_TRDC MBC1 Slave 1 Block Idx 13
-
enumerator kTRDC_MAIN_MBC_HSP_SINC1#
MAIN_TRDC MBC1 Slave 1 Block Idx 14
-
enumerator kTRDC_MAIN_MBC_HSP_FLEXCAN2#
MAIN_TRDC MBC1 Slave 1 Block Idx 15
-
enumerator kTRDC_MAIN_MBC_HSP_FlexIO2#
MAIN_TRDC MBC1 Slave 1 Block Idx 16
-
enumerator kTRDC_MAIN_MBC_HSP_LPI2C1#
MAIN_TRDC MBC1 Slave 1 Block Idx 17
-
enumerator kTRDC_MAIN_MBC_HSP_LPI2C3#
MAIN_TRDC MBC1 Slave 1 Block Idx 18
-
enumerator kTRDC_MAIN_MBC_HSP_LPSPI3#
MAIN_TRDC MBC1 Slave 1 Block Idx 19
-
enumerator kTRDC_MAIN_MBC_HSP_LPSPI4#
MAIN_TRDC MBC1 Slave 1 Block Idx 20
-
enumerator kTRDC_MAIN_MBC_HSP_LPUART3#
MAIN_TRDC MBC1 Slave 1 Block Idx 21
-
enumerator kTRDC_MAIN_MBC_HSP_LPUART4#
MAIN_TRDC MBC1 Slave 1 Block Idx 22
-
enumerator kTRDC_MAIN_MBC_HSP_LPUART5#
MAIN_TRDC MBC1 Slave 1 Block Idx 23
-
enumerator kTRDC_MAIN_MBC_HSP_CRC#
MAIN_TRDC MBC1 Slave 1 Block Idx 24
-
enumerator kTRDC_MAIN_MBC_HSP_TRGSYNC0#
MAIN_TRDC MBC1 Slave 1 Block Idx 25
-
enumerator kTRDC_MAIN_MBC_HSP_TRGSYNC1#
MAIN_TRDC MBC1 Slave 1 Block Idx 26
-
enumerator kTRDC_MAIN_MBC_HSP_STM#
MAIN_TRDC MBC1 Slave 1 Block Idx 27
-
enumerator kTRDC_MAIN_MBC_HSP_QTIMER2#
MAIN_TRDC MBC1 Slave 1 Block Idx 30
-
enumerator kTRDC_MAIN_MBC_HSP_QTIMER3#
MAIN_TRDC MBC1 Slave 1 Block Idx 31
-
enumerator kTRDC_MAIN_MBC_GPIO0#
MAIN_TRDC MBC1 Slave 2 Block Idx 0
-
enumerator kTRDC_MAIN_MBC_GPIO1#
MAIN_TRDC MBC1 Slave 2 Block Idx 1
-
enumerator kTRDC_MAIN_MBC_GPIO2#
MAIN_TRDC MBC1 Slave 2 Block Idx 2
-
enumerator kTRDC_MAIN_MBC_GPIO3#
MAIN_TRDC MBC1 Slave 2 Block Idx 3
-
enumerator kTRDC_MAIN_MBC_GPIO4#
MAIN_TRDC MBC1 Slave 2 Block Idx 4
-
enumerator kTRDC_COMM_MBC_MODCON#
COMM_TRDC MBC0 Slave 0 Block Idx 0
-
enumerator kTRDC_COMM_MBC_MTR#
COMM_TRDC MBC0 Slave 0 Block Idx 2
-
enumerator kTRDC_COMM_MBC_TCU#
COMM_TRDC MBC0 Slave 0 Block Idx 3
-
enumerator kTRDC_COMM_MBC_TRDC_MGR#
COMM_TRDC MBC0 Slave 0 Block Idx 4
-
enumerator kTRDC_COMM_MBC_TRDC_MC#
COMM_TRDC MBC0 Slave 0 Block Idx 5
-
enumerator kTRDC_COMM_MBC_CCM#
COMM_TRDC MBC0 Slave 0 Block Idx 6
-
enumerator kTRDC_COMM_MBC_uSDHC0#
COMM_TRDC MBC0 Slave 0 Block Idx 8
-
enumerator kTRDC_COMM_MBC_uSDHC1#
COMM_TRDC MBC0 Slave 0 Block Idx 9
-
enumerator kTRDC_COMM_MBC_HSUSB#
COMM_TRDC MBC0 Slave 0 Block Idx 10
-
enumerator kTRDC_COMM_MBC_FSUSB#
COMM_TRDC MBC0 Slave 0 Block Idx 11
-
enumerator kTRDC_COMM_MBC_ETH0#
COMM_TRDC MBC0 Slave 0 Block Idx 12
-
enumerator kTRDC_COMM_MBC_ETH1#
COMM_TRDC MBC0 Slave 0 Block Idx 13
-
enumerator kTRDC_COMM_MBC_xSPIR#
COMM_TRDC MBC0 Slave 0 Block Idx 14
-
enumerator kTRDC_COMM_MBC_USB_PHY#
COMM_TRDC MBC0 Slave 0 Block Idx 15
-
enumerator kTRDC_COMM_MBC_XENO_PHY0#
COMM_TRDC MBC0 Slave 0 Block Idx 16
-
enumerator kTRDC_COMM_MBC_XENO_PHY1#
COMM_TRDC MBC0 Slave 0 Block Idx 17
-
enumerator kTRDC_COMM_MBC_FREQME#
COMM_TRDC MBC0 Slave 0 Block Idx 18
-
enumerator kTRDC_COMM_MBC_FREQME_MUX#
COMM_TRDC MBC0 Slave 0 Block Idx 19
-
enumerator kTRDC_COMM_MBC_NIC_GPV#
COMM_TRDC MBC0 Slave 1 Block Idx 0
-
enumerator kTRDC_AUDIO_MBC_MODCON#
AUDIO_TRDC MBC0 Slave 0 Block Idx 0
-
enumerator kTRDC_AUDIO_MBC_MTR#
AUDIO_TRDC MBC0 Slave 0 Block Idx 2
-
enumerator kTRDC_AUDIO_MBC_TCU#
AUDIO_TRDC MBC0 Slave 0 Block Idx 3
-
enumerator kTRDC_AUDIO_MBC_TRDC_MGR#
AUDIO_TRDC MBC0 Slave 0 Block Idx 4
-
enumerator kTRDC_AUDIO_MBC_TRDC_MC#
AUDIO_TRDC MBC0 Slave 0 Block Idx 5
-
enumerator kTRDC_AUDIO_MBC_CCM#
AUDIO_TRDC MBC0 Slave 0 Block Idx 6
-
enumerator kTRDC_AUDIO_MBC_SLEEPCON#
AUDIO_TRDC MBC0 Slave 0 Block Idx 7
-
enumerator kTRDC_AUDIO_MBC_DMIC#
AUDIO_TRDC MBC0 Slave 0 Block Idx 8
-
enumerator kTRDC_AUDIO_MBC_FREQME#
AUDIO_TRDC MBC0 Slave 0 Block Idx 9
-
enumerator kTRDC_AUDIO_MBC_FREQME_MUX#
AUDIO_TRDC MBC0 Slave 0 Block Idx 10
-
enumerator kTRDC_AUDIO_MBC_LPIT#
AUDIO_TRDC MBC0 Slave 0 Block Idx 11
-
enumerator kTRDC_AUDIO_MBC_SAI0#
AUDIO_TRDC MBC0 Slave 0 Block Idx 12
-
enumerator kTRDC_AUDIO_MBC_SAI1#
AUDIO_TRDC MBC0 Slave 0 Block Idx 13
-
enumerator kTRDC_AUDIO_MBC_SAI2#
AUDIO_TRDC MBC0 Slave 0 Block Idx 14
-
enumerator kTRDC_AUDIO_MBC_SAI3#
AUDIO_TRDC MBC0 Slave 0 Block Idx 15
-
enumerator kTRDC_AUDIO_MBC_SAI4#
AUDIO_TRDC MBC0 Slave 0 Block Idx 16
-
enumerator kTRDC_AUDIO_MBC_SAI5#
AUDIO_TRDC MBC0 Slave 0 Block Idx 17
-
enumerator kTRDC_AUDIO_MBC_SAI6#
AUDIO_TRDC MBC0 Slave 0 Block Idx 18
-
enumerator kTRDC_AUDIO_MBC_SAI7#
AUDIO_TRDC MBC0 Slave 0 Block Idx 19
-
enumerator kTRDC_AUDIO_MBC_ASRC#
AUDIO_TRDC MBC0 Slave 0 Block Idx 20
-
enumerator kTRDC_AUDIO_MBC_XBAR#
AUDIO_TRDC MBC0 Slave 0 Block Idx 22
-
enumerator kTRDC_AUDIO_MBC_EDMA3#
AUDIO_TRDC MBC0 Slave 0 Block Idx 23
-
enumerator kTRDC_AUDIO_MBC_eDMA3_TCD0#
AUDIO_TRDC MBC0 Slave 0 Block Idx 24
-
enumerator kTRDC_AUDIO_MBC_eDMA3_TCD1#
AUDIO_TRDC MBC0 Slave 0 Block Idx 25
-
enumerator kTRDC_AUDIO_MBC_eDMA3_TCD2#
AUDIO_TRDC MBC0 Slave 0 Block Idx 26
-
enumerator kTRDC_AUDIO_MBC_eDMA3_TCD3#
AUDIO_TRDC MBC0 Slave 0 Block Idx 27
-
enumerator kTRDC_AUDIO_MBC_eDMA3_TCD4#
AUDIO_TRDC MBC0 Slave 0 Block Idx 28
-
enumerator kTRDC_AUDIO_MBC_eDMA3_TCD5#
AUDIO_TRDC MBC0 Slave 0 Block Idx 29
-
enumerator kTRDC_AUDIO_MBC_eDMA3_TCD6#
AUDIO_TRDC MBC0 Slave 0 Block Idx 30
-
enumerator kTRDC_AUDIO_MBC_eDMA3_TCD7#
AUDIO_TRDC MBC0 Slave 0 Block Idx 31
-
enumerator kTRDC_AUDIO_MBC_SPIDF#
AUDIO_TRDC MBC0 Slave 1 Block Idx 0
-
enumerator kTRDC_AUDIO_MBC_SRAM0#
AUDIO_TRDC MBC0 Slave 2 Block Idx 0
-
enumerator kTRDC_AUDIO_MBC_SRAM1#
AUDIO_TRDC MBC0 Slave 2 Block Idx 1
-
enumerator kTRDC_MEDIA_MBC_MODCON#
MEDIA_TRDC MBC0 Slave 0 Block Idx 0
-
enumerator kTRDC_MEDIA_MBC_MTR#
MEDIA_TRDC MBC0 Slave 0 Block Idx 2
-
enumerator kTRDC_MEDIA_MBC_TCU#
MEDIA_TRDC MBC0 Slave 0 Block Idx 3
-
enumerator kTRDC_MEDIA_MBC_TRDC_MGR#
MEDIA_TRDC MBC0 Slave 0 Block Idx 4
-
enumerator kTRDC_MEDIA_MBC_TRDC_MC#
MEDIA_TRDC MBC0 Slave 0 Block Idx 5
-
enumerator kTRDC_MEDIA_MBC_CCM#
MEDIA_TRDC MBC0 Slave 0 Block Idx 6
-
enumerator kTRDC_MEDIA_MBC_CSI#
MEDIA_TRDC MBC0 Slave 0 Block Idx 9
-
enumerator kTRDC_MEDIA_MBC_DSI_REG#
MEDIA_TRDC MBC0 Slave 0 Block Idx 10
-
enumerator kTRDC_MEDIA_MBC_CSI_REG#
MEDIA_TRDC MBC0 Slave 0 Block Idx 11
-
enumerator kTRDC_MEDIA_MBC_JPEGDEC#
MEDIA_TRDC MBC0 Slave 0 Block Idx 12
-
enumerator kTRDC_MEDIA_MBC_PNGDEC#
MEDIA_TRDC MBC0 Slave 0 Block Idx 13
-
enumerator kTRDC_MEDIA_MBC_TINGPU#
MEDIA_TRDC MBC0 Slave 0 Block Idx 14
-
enumerator kTRDC_MEDIA_MBC_VIDEOMUX#
MEDIA_TRDC MBC0 Slave 0 Block Idx 15
-
enumerator kTRDC_MEDIA_MBC_FREQME#
MEDIA_TRDC MBC0 Slave 0 Block Idx 16
-
enumerator kTRDC_MEDIA_MBC_FREQME_MUX#
MEDIA_TRDC MBC0 Slave 0 Block Idx 17
-
enumerator kTRDC_MEDIA_MBC_ISI0#
MEDIA_TRDC MBC0 Slave 0 Block Idx 18
-
enumerator kTRDC_MEDIA_MBC_ISI1#
MEDIA_TRDC MBC0 Slave 0 Block Idx 19
-
enumerator kTRDC_MEDIA_MBC_MIPI_DSI_PHY#
MEDIA_TRDC MBC0 Slave 0 Block Idx 22
-
enumerator kTRDC_MEDIA_MBC_DCIF0#
MEDIA_TRDC MBC0 Slave 0 Block Idx 32
-
enumerator kTRDC_MEDIA_MBC_DCIF1#
MEDIA_TRDC MBC0 Slave 0 Block Idx 33
-
enumerator kTRDC_MEDIA_MBC_DCIF2#
MEDIA_TRDC MBC0 Slave 0 Block Idx 34
-
enumerator kTRDC_MEDIA_MBC_DCIF3#
MEDIA_TRDC MBC0 Slave 0 Block Idx 35
-
enumerator kTRDC_MEDIA_MBC_DCIF4#
MEDIA_TRDC MBC0 Slave 0 Block Idx 36
-
enumerator kTRDC_MEDIA_MBC_DCIF5#
MEDIA_TRDC MBC0 Slave 0 Block Idx 37
-
enumerator kTRDC_MEDIA_MBC_DCIF6#
MEDIA_TRDC MBC0 Slave 0 Block Idx 38
-
enumerator kTRDC_MEDIA_MBC_DCIF7#
MEDIA_TRDC MBC0 Slave 0 Block Idx 39
-
enumerator kTRDC_MEDIA_MBC_DCIF8#
MEDIA_TRDC MBC0 Slave 0 Block Idx 40
-
enumerator kTRDC_MEDIA_MBC_NIC_GPV#
MEDIA_TRDC MBC0 Slave 1 Block Idx 0
-
enumerator kTRDC_MEDIA_MBC_GPU_AHB#
MEDIA_TRDC MBC0 Slave 2 Block Idx 0
-
enumerator kTRDC_WAKE_MBC_MODCON#
WAKE_TRDC MBC0 Slave 0 Block Idx 0
-
enumerator kTRDC_WAKE_MBC_MTR#
WAKE_TRDC MBC0 Slave 0 Block Idx 2
-
enumerator kTRDC_WAKE_MBC_TCU#
WAKE_TRDC MBC0 Slave 0 Block Idx 3
-
enumerator kTRDC_WAKE_MBC_TRDC_MGR#
WAKE_TRDC MBC0 Slave 0 Block Idx 4
-
enumerator kTRDC_WAKE_MBC_TRDC_MC#
WAKE_TRDC MBC0 Slave 0 Block Idx 5
-
enumerator kTRDC_WAKE_MBC_CCM#
WAKE_TRDC MBC0 Slave 0 Block Idx 6
-
enumerator kTRDC_WAKE_MBC_FREQME#
WAKE_TRDC MBC0 Slave 0 Block Idx 8
-
enumerator kTRDC_WAKE_MBC_FREQME_MUX#
WAKE_TRDC MBC0 Slave 0 Block Idx 9
-
enumerator kTRDC_WAKE_MBC_DMIC#
WAKE_TRDC MBC0 Slave 0 Block Idx 10
-
enumerator kTRDC_WAKE_MBC_XBAR#
WAKE_TRDC MBC0 Slave 0 Block Idx 11
-
enumerator kTRDC_WAKE_MBC_TRGSYNC#
WAKE_TRDC MBC0 Slave 0 Block Idx 12
-
enumerator kTRDC_WAKE_MBC_CMP0#
WAKE_TRDC MBC0 Slave 0 Block Idx 13
-
enumerator kTRDC_WAKE_MBC_CMP1#
WAKE_TRDC MBC0 Slave 0 Block Idx 14
-
enumerator kTRDC_WAKE_MBC_CMP2#
WAKE_TRDC MBC0 Slave 0 Block Idx 15
-
enumerator kTRDC_WAKE_MBC_CMP3#
WAKE_TRDC MBC0 Slave 0 Block Idx 16
-
enumerator kTRDC_WAKE_MBC_EWM#
WAKE_TRDC MBC0 Slave 0 Block Idx 17
-
enumerator kTRDC_WAKE_MBC_LPTMR0#
WAKE_TRDC MBC0 Slave 0 Block Idx 19
-
enumerator kTRDC_WAKE_MBC_LPTMR1#
WAKE_TRDC MBC0 Slave 0 Block Idx 20
-
enumerator kTRDC_WAKE_MBC_QUADTPM#
WAKE_TRDC MBC0 Slave 0 Block Idx 21
-
enumerator kTRDC_WAKE_MBC_SWT0#
WAKE_TRDC MBC0 Slave 0 Block Idx 22
-
enumerator kTRDC_WAKE_MBC_SWT1#
WAKE_TRDC MBC0 Slave 0 Block Idx 23
-
enumerator kTRDC_WAKE_MBC_SWT2#
WAKE_TRDC MBC0 Slave 0 Block Idx 24
-
enumerator kTRDC_WAKE_MBC_SWT3#
WAKE_TRDC MBC0 Slave 0 Block Idx 25
-
enumerator kTRDC_WAKE_MBC_SYS_CTR#
WAKE_TRDC MBC0 Slave 0 Block Idx 26
-
enumerator kTRDC_WAKE_MBC_I3C#
WAKE_TRDC MBC0 Slave 0 Block Idx 27
-
enumerator kTRDC_WAKE_MBC_LPI2C0#
WAKE_TRDC MBC0 Slave 0 Block Idx 28
-
enumerator kTRDC_WAKE_MBC_LPI2C1#
WAKE_TRDC MBC0 Slave 0 Block Idx 29
-
enumerator kTRDC_WAKE_MBC_LPSPI#
WAKE_TRDC MBC0 Slave 0 Block Idx 30
-
enumerator kTRDC_WAKE_MBC_LPUART0#
WAKE_TRDC MBC0 Slave 0 Block Idx 31
-
enumerator kTRDC_WAKE_MBC_LPUART1#
WAKE_TRDC MBC0 Slave 0 Block Idx 32
-
enumerator kTRDC_WAKE_MBC_RGPIO#
WAKE_TRDC MBC0 Slave 0 Block Idx 33
-
enumerator kTRDC_WAKE_MBC_IOMUXC#
WAKE_TRDC MBC0 Slave 0 Block Idx 34
-
enumerator kTRDC_WAKE_MBC_TSI#
WAKE_TRDC MBC0 Slave 0 Block Idx 35
-
enumerator kTRDC_WAKE_MBC_EDMA3#
WAKE_TRDC MBC0 Slave 0 Block Idx 39
-
enumerator kTRDC_WAKE_MBC_eDMA3_TCD0#
WAKE_TRDC MBC0 Slave 0 Block Idx 40
-
enumerator kTRDC_WAKE_MBC_eDMA3_TCD1#
WAKE_TRDC MBC0 Slave 0 Block Idx 41
-
enumerator kTRDC_WAKE_MBC_eDMA3_TCD2#
WAKE_TRDC MBC0 Slave 0 Block Idx 42
-
enumerator kTRDC_WAKE_MBC_eDMA3_TCD3#
WAKE_TRDC MBC0 Slave 0 Block Idx 43
-
enumerator kTRDC_WAKE_MBC_eDMA3_TCD4#
WAKE_TRDC MBC0 Slave 0 Block Idx 44
-
enumerator kTRDC_WAKE_MBC_eDMA3_TCD5#
WAKE_TRDC MBC0 Slave 0 Block Idx 45
-
enumerator kTRDC_WAKE_MBC_eDMA3_TCD6#
WAKE_TRDC MBC0 Slave 0 Block Idx 46
-
enumerator kTRDC_WAKE_MBC_eDMA3_TCD7#
WAKE_TRDC MBC0 Slave 0 Block Idx 47
-
enumerator kTRDC_WAKE_MBC_VBAT_SRAM#
WAKE_TRDC MBC0 Slave 0 Block Idx 48
-
enumerator kTRDC_WAKE_MBC_VBAT_MTR#
WAKE_TRDC MBC0 Slave 0 Block Idx 49
-
enumerator kTRDC_WAKE_MBC_VBAT_TDET#
WAKE_TRDC MBC0 Slave 0 Block Idx 50
-
enumerator kTRDC_WAKE_MBC_VBAT_LPTMR#
WAKE_TRDC MBC0 Slave 0 Block Idx 51
-
enumerator kTRDC_WAKE_MBC_VBAT_RTC#
WAKE_TRDC MBC0 Slave 0 Block Idx 52
-
enumerator kTRDC_WAKE_MBC_VBAT_RGPIO#
WAKE_TRDC MBC0 Slave 0 Block Idx 53
-
enumerator kTRDC_WAKE_MBC_VBAT_IOMUXC#
WAKE_TRDC MBC0 Slave 0 Block Idx 54
-
enumerator kTRDC_WAKE_MBC_VBAT_VBATCON#
WAKE_TRDC MBC0 Slave 0 Block Idx 55
-
enumerator kTRDC_WAKE_MBC_SRAM0#
WAKE_TRDC MBC0 Slave 1 Block Idx 0
-
enumerator kTRDC_WAKE_MBC_SRAM1#
WAKE_TRDC MBC0 Slave 1 Block Idx 1
-
enumerator kTRDC_CMPT_MBC_MODCON#
-
typedef enum _trdc_master trdc_master_t#
Enumeration for TRDC master mapping.
Defines the enumeration for TRDC master resource collections.
-
typedef enum _trdc_mrc trdc_mrc_t#
Enumeration for TRDC MRC mapping.
Defines the enumeration for TRDC MRC (Memory Region Controller) mapping.
-
typedef enum _trdc_mbc_block trdc_mbc_block_t#
Enumeration for TRDC MBC mapping.
Defines the enumeration for TRDC MBC (Memory Blocker Checker) mapping. User Can use TRDC_MBC_GetTRDCInst, TRDC_MBC_GetMBCInst, TRDC_MBC_GetSlvIdx and TRDC_MBC_GetBlkIdx to get details about each block.
-
FSL_TRDC_SOC_DRIVER_VERSION#
Driver version 2.0.0.
-
TRDC_MBC_BLK(trdcInst, mbcInst, slvIdx, blkIdx)#
-
TRDC_MBC_GetTRDCInst(mbcBlk)#
Gets which TRDC instance does this MBC block belongs to.
-
TRDC_MBC_GetMBCIdx(mbcBlk)#
Gets which MBC index does this MBC block belongs to.
-
TRDC_MBC_GetSlvIdx(mbcBlk)#
Gets which slave index does this MBC block belongs to.
-
TRDC_MBC_GetBlkIdx(mbcBlk)#
Gets which memory block index does this MBC block belongs to.
-
TRDC_GENERAL_OFFSET#
TRDC base address convert macro.
-
TRDC_FLW_OFFSET#
-
TRDC_DOMAIN_ERROR_OFFSET#
-
TRDC_DOMAIN_ASSIGNMENT_OFFSET#
-
TRDC_MBC_OFFSET(x)#
-
TRDC_MBC_ARRAY_STEP#
-
TRDC_MRC_OFFSET(x)#
-
TRDC_MRC_ARRAY_STEP#
-
TRDC_MDA_W_DFMT1_LK1(x)#
Some macros are only defined for TRDC_SOC.
-
TRDC_MDA_W_DFMT0_LK1_MASK#
-
TRDC_MDA_W_DFMT0_LK1_SHIFT#
-
TRDC_MDA_W_DFMT0_LK1(x)#
LK1 - 1-bit Lock 0b0..Register can be written by any secure privileged write. 0b1..Register is locked (read-only) until the next reset.
-
TRDC_MDA_W_DFMT0_VLD_MASK#
-
TRDC_MDA_W_DFMT0_VLD_SHIFT#
-
TRDC_MDA_W_DFMT0_VLD(x)#
VLD - Valid 0b0..The Wr domain assignment is invalid. 0b1..The Wr domain assignment is valid.
TRGSYNC: Trigger Synchronization Driver#
-
enum _trgsync_polarity#
TRGSYNC channel polarity selection.
Values:
-
enumerator kTRGSYNC_PolarityActiveHigh#
Active high polarity
-
enumerator kTRGSYNC_PolarityActiveLow#
Active low polarity
-
enumerator kTRGSYNC_PolarityActiveHigh#
-
enum _trgsync_stretch_width#
TRGSYNC stretch width configuration.
Values:
-
enumerator kTRGSYNC_StretchDisable#
Disable stretch
-
enumerator kTRGSYNC_Stretch2Cycles#
Stretch 2 cycles
-
enumerator kTRGSYNC_Stretch4Cycles#
Stretch 4 cycles
-
enumerator kTRGSYNC_Stretch8Cycles#
Stretch 8 cycles
-
enumerator kTRGSYNC_StretchDisable#
-
enum _trgsync_func_clock_source#
TRGSYNC functional clock source.
Values:
-
enumerator kTRGSYNC_FuncClockBus#
Bus clock
-
enumerator kTRGSYNC_FuncClock32KHz#
32KHz clock
-
enumerator kTRGSYNC_FuncClockExt#
External clock
-
enumerator kTRGSYNC_FuncClockReserved#
Reserved
-
enumerator kTRGSYNC_FuncClockBus#
-
typedef enum _trgsync_polarity trgsync_polarity_t#
TRGSYNC channel polarity selection.
-
typedef enum _trgsync_stretch_width trgsync_stretch_width_t#
TRGSYNC stretch width configuration.
-
typedef enum _trgsync_func_clock_source trgsync_func_clock_source_t#
TRGSYNC functional clock source.
-
typedef struct _trgsync_channel_config trgsync_channel_config_t#
TRGSYNC channel configuration structure.
-
FSL_TRGSYNC_DRIVER_VERSION#
TRGSYNC driver version 2.0.0.
-
void TRGSYNC_Init(TRGSYNC_Type *base)#
Initializes the TRGSYNC module.
This function initializes the TRGSYNC module with the user configuration.
- Parameters:
base – TRGSYNC peripheral base address.
-
void TRGSYNC_Deinit(TRGSYNC_Type *base)#
Deinitializes the TRGSYNC module.
This function disables all TRGSYNC channels and gates the module clock.
- Parameters:
base – TRGSYNC peripheral base address.
-
void TRGSYNC_GetDefaultConfig(trgsync_channel_config_t *config)#
Gets the default configuration.
This function fills the configuration structure with default settings. The default values are:
config->channelConfig.enableChannel = false; config->channelConfig.enableFunctionalClock = false; config->channelConfig.polarity = kTRGSYNC_PolarityActiveHigh; config->channelConfig.stretchWidth = kTRGSYNC_StretchDisable; config->channelConfig.funcClockSource = kTRGSYNC_FuncClockBus;
- Parameters:
config – Pointer to the configuration structure.
-
static inline void TRGSYNC_EnableChannel(TRGSYNC_Type *base, uint8_t channel, bool enable)#
Enables or disables a TRGSYNC channel.
- Parameters:
base – TRGSYNC peripheral base address.
channel – Channel number (0-7).
enable – true to enable, false to disable.
-
static inline void TRGSYNC_SetChannelPolarity(TRGSYNC_Type *base, uint8_t channel, trgsync_polarity_t polarity)#
Sets the polarity for a TRGSYNC channel.
- Parameters:
base – TRGSYNC peripheral base address.
channel – Channel number (0-7).
polarity – Polarity selection.
-
static inline void TRGSYNC_SetChannelStretchWidth(TRGSYNC_Type *base, uint8_t channel, trgsync_stretch_width_t width)#
Sets the stretch width for a TRGSYNC channel.
- Parameters:
base – TRGSYNC peripheral base address.
channel – Channel number (0-7).
width – Stretch width configuration.
-
static inline void TRGSYNC_EnableChannelFunctionalClock(TRGSYNC_Type *base, uint8_t channel, bool enable)#
Enables or disables functional clock for a TRGSYNC channel.
- Parameters:
base – TRGSYNC peripheral base address.
channel – Channel number (0-7).
enable – true to enable, false to disable.
-
static inline void TRGSYNC_SetChannelFunctionalClockSource(TRGSYNC_Type *base, uint8_t channel, trgsync_func_clock_source_t source)#
Sets the functional clock source for a TRGSYNC channel.
- Parameters:
base – TRGSYNC peripheral base address.
channel – Channel number (0-7).
source – Functional clock source.
-
void TRGSYNC_ConfigureChannel(TRGSYNC_Type *base, uint8_t channel, const trgsync_channel_config_t *config)#
Configures a single TRGSYNC channel.
- Parameters:
base – TRGSYNC peripheral base address.
channel – Channel number (0-7).
config – Pointer to the channel configuration structure.
-
bool enableChannel#
Enable channel
-
bool enableFunctionalClock#
Enable functional clock
-
trgsync_polarity_t polarity#
Polarity selection
-
trgsync_stretch_width_t stretchWidth#
Stretch width
-
trgsync_func_clock_source_t funcClockSource#
Functional clock source
-
struct _trgsync_channel_config#
- #include <fsl_trgsync.h>
TRGSYNC channel configuration structure.
TRGSYNC Driver#
USDHC: Ultra Secured Digital Host Controller Driver#
-
void USDHC_Init(USDHC_Type *base, const usdhc_config_t *config)#
USDHC module initialization function.
Configures the USDHC according to the user configuration.
Example:
usdhc_config_t config; config.cardDetectDat3 = false; config.endianMode = kUSDHC_EndianModeLittle; config.dmaMode = kUSDHC_DmaModeAdma2; config.readWatermarkLevel = 128U; config.writeWatermarkLevel = 128U; USDHC_Init(USDHC, &config);
- Parameters:
base – USDHC peripheral base address.
config – USDHC configuration information.
- Return values:
kStatus_Success – Operate successfully.
-
void USDHC_Deinit(USDHC_Type *base)#
Deinitializes the USDHC.
- Parameters:
base – USDHC peripheral base address.
-
bool USDHC_Reset(USDHC_Type *base, uint32_t mask, uint32_t timeout)#
Resets the USDHC.
- Parameters:
base – USDHC peripheral base address.
mask – The reset type mask(_usdhc_reset).
timeout – Timeout for reset.
- Return values:
true – Reset successfully.
false – Reset failed.
-
status_t USDHC_SetAdmaTableConfig(USDHC_Type *base, usdhc_adma_config_t *dmaConfig, usdhc_data_t *dataConfig, uint32_t flags)#
Sets the DMA descriptor table configuration. A high level DMA descriptor configuration function.
- Parameters:
base – USDHC peripheral base address.
dmaConfig – ADMA configuration
dataConfig – Data descriptor
flags – ADAM descriptor flag, used to indicate to create multiple or single descriptor, please refer to enum _usdhc_adma_flag.
- Return values:
kStatus_OutOfRange – ADMA descriptor table length isn’t enough to describe data.
kStatus_Success – Operate successfully.
-
status_t USDHC_SetInternalDmaConfig(USDHC_Type *base, usdhc_adma_config_t *dmaConfig, const uint32_t *dataAddr, bool enAutoCmd23)#
Internal DMA configuration. This function is used to config the USDHC DMA related registers.
- Parameters:
base – USDHC peripheral base address.
dmaConfig – ADMA configuration.
dataAddr – Transfer data address, a simple DMA parameter, if ADMA is used, leave it to NULL.
enAutoCmd23 – Flag to indicate Auto CMD23 is enable or not, a simple DMA parameter, if ADMA is used, leave it to false.
- Return values:
kStatus_OutOfRange – ADMA descriptor table length isn’t enough to describe data.
kStatus_Success – Operate successfully.
-
status_t USDHC_SetADMA2Descriptor(uint32_t *admaTable, uint32_t admaTableWords, const uint32_t *dataBufferAddr, uint32_t dataBytes, uint32_t flags)#
Sets the ADMA2 descriptor table configuration.
- Parameters:
admaTable – ADMA table address.
admaTableWords – ADMA table length.
dataBufferAddr – Data buffer address.
dataBytes – Data Data length.
flags – ADAM descriptor flag, used to indicate to create multiple or single descriptor, please refer to enum _usdhc_adma_flag.
- Return values:
kStatus_OutOfRange – ADMA descriptor table length isn’t enough to describe data.
kStatus_Success – Operate successfully.
-
status_t USDHC_SetADMA1Descriptor(uint32_t *admaTable, uint32_t admaTableWords, const uint32_t *dataBufferAddr, uint32_t dataBytes, uint32_t flags)#
Sets the ADMA1 descriptor table configuration.
- Parameters:
admaTable – ADMA table address.
admaTableWords – ADMA table length.
dataBufferAddr – Data buffer address.
dataBytes – Data length.
flags – ADAM descriptor flag, used to indicate to create multiple or single descriptor, please refer to enum _usdhc_adma_flag.
- Return values:
kStatus_OutOfRange – ADMA descriptor table length isn’t enough to describe data.
kStatus_Success – Operate successfully.
-
static inline void USDHC_EnableInternalDMA(USDHC_Type *base, bool enable)#
Enables internal DMA.
- Parameters:
base – USDHC peripheral base address.
enable – enable or disable flag
-
static inline void USDHC_EnableInterruptStatus(USDHC_Type *base, uint32_t mask)#
Enables the interrupt status.
- Parameters:
base – USDHC peripheral base address.
mask – Interrupt status flags mask(_usdhc_interrupt_status_flag).
-
static inline void USDHC_DisableInterruptStatus(USDHC_Type *base, uint32_t mask)#
Disables the interrupt status.
- Parameters:
base – USDHC peripheral base address.
mask – The interrupt status flags mask(_usdhc_interrupt_status_flag).
-
static inline void USDHC_EnableInterruptSignal(USDHC_Type *base, uint32_t mask)#
Enables the interrupt signal corresponding to the interrupt status flag.
- Parameters:
base – USDHC peripheral base address.
mask – The interrupt status flags mask(_usdhc_interrupt_status_flag).
-
static inline void USDHC_DisableInterruptSignal(USDHC_Type *base, uint32_t mask)#
Disables the interrupt signal corresponding to the interrupt status flag.
- Parameters:
base – USDHC peripheral base address.
mask – The interrupt status flags mask(_usdhc_interrupt_status_flag).
-
static inline uint32_t USDHC_GetEnabledInterruptStatusFlags(USDHC_Type *base)#
Gets the enabled interrupt status.
- Parameters:
base – USDHC peripheral base address.
- Returns:
Current interrupt status flags mask(_usdhc_interrupt_status_flag).
-
static inline uint32_t USDHC_GetInterruptStatusFlags(USDHC_Type *base)#
Gets the current interrupt status.
- Parameters:
base – USDHC peripheral base address.
- Returns:
Current interrupt status flags mask(_usdhc_interrupt_status_flag).
-
static inline void USDHC_ClearInterruptStatusFlags(USDHC_Type *base, uint32_t mask)#
Clears a specified interrupt status. write 1 clears.
- Parameters:
base – USDHC peripheral base address.
mask – The interrupt status flags mask(_usdhc_interrupt_status_flag).
-
static inline uint32_t USDHC_GetAutoCommand12ErrorStatusFlags(USDHC_Type *base)#
Gets the status of auto command 12 error.
- Parameters:
base – USDHC peripheral base address.
- Returns:
Auto command 12 error status flags mask(_usdhc_auto_command12_error_status_flag).
-
static inline uint32_t USDHC_GetAdmaErrorStatusFlags(USDHC_Type *base)#
Gets the status of the ADMA error.
- Parameters:
base – USDHC peripheral base address.
- Returns:
ADMA error status flags mask(_usdhc_adma_error_status_flag).
-
static inline uint32_t USDHC_GetPresentStatusFlags(USDHC_Type *base)#
Gets a present status.
This function gets the present USDHC’s status except for an interrupt status and an error status.
- Parameters:
base – USDHC peripheral base address.
- Returns:
Present USDHC’s status flags mask(_usdhc_present_status_flag).
-
void USDHC_GetCapability(USDHC_Type *base, usdhc_capability_t *capability)#
Gets the capability information.
- Parameters:
base – USDHC peripheral base address.
capability – Structure to save capability information.
-
static inline void USDHC_ForceClockOn(USDHC_Type *base, bool enable)#
Forces the card clock on.
- Parameters:
base – USDHC peripheral base address.
enable – enable/disable flag
-
uint32_t USDHC_SetSdClock(USDHC_Type *base, uint32_t srcClock_Hz, uint32_t busClock_Hz)#
Sets the SD bus clock frequency.
- Parameters:
base – USDHC peripheral base address.
srcClock_Hz – USDHC source clock frequency united in Hz.
busClock_Hz – SD bus clock frequency united in Hz.
- Returns:
The nearest frequency of busClock_Hz configured for SD bus.
-
bool USDHC_SetCardActive(USDHC_Type *base, uint32_t timeout)#
Sends 80 clocks to the card to set it to the active state.
This function must be called each time the card is inserted to ensure that the card can receive the command correctly.
- Parameters:
base – USDHC peripheral base address.
timeout – Timeout to initialize card.
- Return values:
true – Set card active successfully.
false – Set card active failed.
-
static inline void USDHC_AssertHardwareReset(USDHC_Type *base, bool high)#
Triggers a hardware reset.
- Parameters:
base – USDHC peripheral base address.
high – 1 or 0 level
-
static inline void USDHC_SetDataBusWidth(USDHC_Type *base, usdhc_data_bus_width_t width)#
Sets the data transfer width.
- Parameters:
base – USDHC peripheral base address.
width – Data transfer width.
-
static inline void USDHC_WriteData(USDHC_Type *base, uint32_t data)#
Fills the data port.
This function is used to implement the data transfer by Data Port instead of DMA.
- Parameters:
base – USDHC peripheral base address.
data – The data about to be sent.
-
static inline uint32_t USDHC_ReadData(USDHC_Type *base)#
Retrieves the data from the data port.
This function is used to implement the data transfer by Data Port instead of DMA.
- Parameters:
base – USDHC peripheral base address.
- Returns:
The data has been read.
-
void USDHC_SendCommand(USDHC_Type *base, usdhc_command_t *command)#
Sends command function.
- Parameters:
base – USDHC peripheral base address.
command – configuration
-
static inline void USDHC_EnableWakeupEvent(USDHC_Type *base, uint32_t mask, bool enable)#
Enables or disables a wakeup event in low-power mode.
- Parameters:
base – USDHC peripheral base address.
mask – Wakeup events mask(_usdhc_wakeup_event).
enable – True to enable, false to disable.
-
static inline void USDHC_CardDetectByData3(USDHC_Type *base, bool enable)#
Detects card insert status.
- Parameters:
base – USDHC peripheral base address.
enable – enable/disable flag
-
static inline bool USDHC_DetectCardInsert(USDHC_Type *base)#
Detects card insert status.
- Parameters:
base – USDHC peripheral base address.
-
static inline void USDHC_EnableSdioControl(USDHC_Type *base, uint32_t mask, bool enable)#
Enables or disables the SDIO card control.
- Parameters:
base – USDHC peripheral base address.
mask – SDIO card control flags mask(_usdhc_sdio_control_flag).
enable – True to enable, false to disable.
-
static inline void USDHC_SetContinueRequest(USDHC_Type *base)#
Restarts a transaction which has stopped at the block GAP for the SDIO card.
- Parameters:
base – USDHC peripheral base address.
-
static inline void USDHC_RequestStopAtBlockGap(USDHC_Type *base, bool enable)#
Request stop at block gap function.
- Parameters:
base – USDHC peripheral base address.
enable – True to stop at block gap, false to normal transfer.
-
void USDHC_SetMmcBootConfig(USDHC_Type *base, const usdhc_boot_config_t *config)#
Configures the MMC boot feature.
Example:
usdhc_boot_config_t config; config.ackTimeoutCount = 4; config.bootMode = kUSDHC_BootModeNormal; config.blockCount = 5; config.enableBootAck = true; config.enableBoot = true; config.enableAutoStopAtBlockGap = true; USDHC_SetMmcBootConfig(USDHC, &config);
- Parameters:
base – USDHC peripheral base address.
config – The MMC boot configuration information.
-
static inline void USDHC_EnableMmcBoot(USDHC_Type *base, bool enable)#
Enables or disables the mmc boot mode.
- Parameters:
base – USDHC peripheral base address.
enable – True to enable, false to disable.
-
static inline void USDHC_SetForceEvent(USDHC_Type *base, uint32_t mask)#
Forces generating events according to the given mask.
- Parameters:
base – USDHC peripheral base address.
mask – The force events bit posistion (_usdhc_force_event).
-
static inline bool USDHC_RequestTuningForSDR50(USDHC_Type *base)#
Checks the SDR50 mode request tuning bit. When this bit set, application shall perform tuning for SDR50 mode.
- Parameters:
base – USDHC peripheral base address.
-
static inline bool USDHC_RequestReTuning(USDHC_Type *base)#
Checks the request re-tuning bit. When this bit is set, user should do manual tuning or standard tuning function.
- Parameters:
base – USDHC peripheral base address.
-
static inline void USDHC_EnableAutoTuning(USDHC_Type *base, bool enable)#
The SDR104 mode auto tuning enable and disable. This function should be called after tuning function execute pass, auto tuning will handle by hardware.
- Parameters:
base – USDHC peripheral base address.
enable – enable/disable flag
-
void USDHC_EnableAutoTuningForCmdAndData(USDHC_Type *base)#
The auto tuning enbale for CMD/DATA line.
- Parameters:
base – USDHC peripheral base address.
-
void USDHC_EnableManualTuning(USDHC_Type *base, bool enable)#
Manual tuning trigger or abort. User should handle the tuning cmd and find the boundary of the delay then calucate a average value which will be configured to the CLK_TUNE_CTRL_STATUS This function should be called before function USDHC_AdjustDelayForManualTuning.
- Parameters:
base – USDHC peripheral base address.
enable – tuning enable flag
-
static inline uint32_t USDHC_GetTuningDelayStatus(USDHC_Type *base)#
Get the tuning delay cell setting.
- Parameters:
base – USDHC peripheral base address.
- Return values:
CLK – Tuning Control and Status register value.
-
status_t USDHC_SetTuningDelay(USDHC_Type *base, uint32_t preDelay, uint32_t outDelay, uint32_t postDelay)#
The tuning delay cell setting.
- Parameters:
base – USDHC peripheral base address.
preDelay – Set the number of delay cells on the feedback clock between the feedback clock and CLK_PRE.
outDelay – Set the number of delay cells on the feedback clock between CLK_PRE and CLK_OUT.
postDelay – Set the number of delay cells on the feedback clock between CLK_OUT and CLK_POST.
- Return values:
kStatus_Fail – config the delay setting fail
kStatus_Success – config the delay setting success
-
status_t USDHC_AdjustDelayForManualTuning(USDHC_Type *base, uint32_t delay)#
Adjusts delay for mannual tuning.
- Deprecated:
Do not use this function. It has been superceded by USDHC_SetTuingDelay
- Parameters:
base – USDHC peripheral base address.
delay – setting configuration
- Return values:
kStatus_Fail – config the delay setting fail
kStatus_Success – config the delay setting success
-
static inline void USDHC_SetStandardTuningCounter(USDHC_Type *base, uint8_t counter)#
set tuning counter tuning.
- Parameters:
base – USDHC peripheral base address.
counter – tuning counter
- Return values:
kStatus_Fail – config the delay setting fail
kStatus_Success – config the delay setting success
-
void USDHC_EnableStandardTuning(USDHC_Type *base, uint32_t tuningStartTap, uint32_t step, bool enable)#
The enable standard tuning function. The standard tuning window and tuning counter using the default config tuning cmd is sent by the software, user need to check whether the tuning result can be used for SDR50, SDR104, and HS200 mode tuning.
- Parameters:
base – USDHC peripheral base address.
tuningStartTap – start tap
step – tuning step
enable – enable/disable flag
-
static inline uint32_t USDHC_GetExecuteStdTuningStatus(USDHC_Type *base)#
Gets execute STD tuning status.
- Parameters:
base – USDHC peripheral base address.
-
static inline uint32_t USDHC_CheckStdTuningResult(USDHC_Type *base)#
Checks STD tuning result.
- Parameters:
base – USDHC peripheral base address.
-
static inline uint32_t USDHC_CheckTuningError(USDHC_Type *base)#
Checks tuning error.
- Parameters:
base – USDHC peripheral base address.
-
void USDHC_EnableDDRMode(USDHC_Type *base, bool enable, uint32_t nibblePos)#
The enable/disable DDR mode.
- Parameters:
base – USDHC peripheral base address.
enable – enable/disable flag
nibblePos – nibble position
-
static inline void USDHC_EnableHS400Mode(USDHC_Type *base, bool enable)#
The enable/disable HS400 mode.
- Parameters:
base – USDHC peripheral base address.
enable – enable/disable flag
-
static inline void USDHC_ResetStrobeDLL(USDHC_Type *base)#
Resets the strobe DLL.
- Parameters:
base – USDHC peripheral base address.
-
static inline void USDHC_EnableStrobeDLL(USDHC_Type *base, bool enable)#
Enables/disables the strobe DLL.
- Parameters:
base – USDHC peripheral base address.
enable – enable/disable flag
-
void USDHC_ConfigStrobeDLL(USDHC_Type *base, uint32_t delayTarget, uint32_t updateInterval)#
Configs the strobe DLL delay target and update interval.
- Parameters:
base – USDHC peripheral base address.
delayTarget – delay target
updateInterval – update interval
-
static inline void USDHC_SetStrobeDllOverride(USDHC_Type *base, uint32_t delayTaps)#
Enables manual override for slave delay chain using STROBE_SLV_OVERRIDE_VAL.
- Parameters:
base – USDHC peripheral base address.
delayTaps – Valid delay taps range from 1 - 128 taps. A value of 0 selects tap 1, and a value of 0x7F selects tap 128.
-
static inline uint32_t USDHC_GetStrobeDLLStatus(USDHC_Type *base)#
Gets the strobe DLL status.
- Parameters:
base – USDHC peripheral base address.
-
void USDHC_SetDataConfig(USDHC_Type *base, usdhc_transfer_direction_t dataDirection, uint32_t blockCount, uint32_t blockSize)#
USDHC data configuration.
- Parameters:
base – USDHC peripheral base address.
dataDirection – Data direction, tx or rx.
blockCount – Data block count.
blockSize – Data block size.
-
void USDHC_TransferCreateHandle(USDHC_Type *base, usdhc_handle_t *handle, const usdhc_transfer_callback_t *callback, void *userData)#
Creates the USDHC handle.
- Parameters:
base – USDHC peripheral base address.
handle – USDHC handle pointer.
callback – Structure pointer to contain all callback functions.
userData – Callback function parameter.
-
status_t USDHC_TransferNonBlocking(USDHC_Type *base, usdhc_handle_t *handle, usdhc_adma_config_t *dmaConfig, usdhc_transfer_t *transfer)#
Transfers the command/data using an interrupt and an asynchronous method.
This function sends a command and data and returns immediately. It doesn’t wait for the transfer to complete or to encounter an error. The application must not call this API in multiple threads at the same time. Because of that this API doesn’t support the re-entry mechanism.
Note
Call API USDHC_TransferCreateHandle when calling this API.
- Parameters:
base – USDHC peripheral base address.
handle – USDHC handle.
dmaConfig – ADMA configuration.
transfer – Transfer content.
- Return values:
kStatus_InvalidArgument – Argument is invalid.
kStatus_USDHC_BusyTransferring – Busy transferring.
kStatus_USDHC_PrepareAdmaDescriptorFailed – Prepare ADMA descriptor failed.
kStatus_Success – Operate successfully.
-
status_t USDHC_TransferBlocking(USDHC_Type *base, usdhc_adma_config_t *dmaConfig, usdhc_transfer_t *transfer)#
Transfers the command/data using a blocking method.
This function waits until the command response/data is received or the USDHC encounters an error by polling the status flag.
The application must not call this API in multiple threads at the same time. Because this API doesn’t support the re-entry mechanism.
Note
There is no need to call API USDHC_TransferCreateHandle when calling this API.
- Parameters:
base – USDHC peripheral base address.
dmaConfig – adma configuration
transfer – Transfer content.
- Return values:
kStatus_InvalidArgument – Argument is invalid.
kStatus_USDHC_PrepareAdmaDescriptorFailed – Prepare ADMA descriptor failed.
kStatus_USDHC_SendCommandFailed – Send command failed.
kStatus_USDHC_TransferDataFailed – Transfer data failed.
kStatus_Success – Operate successfully.
-
void USDHC_TransferHandleIRQ(USDHC_Type *base, usdhc_handle_t *handle)#
IRQ handler for the USDHC.
This function deals with the IRQs on the given host controller.
- Parameters:
base – USDHC peripheral base address.
handle – USDHC handle.
-
void USDHC_DriverIRQHandler(uint32_t instance)#
-
FSL_USDHC_DRIVER_VERSION#
Driver version.
Enum _usdhc_status. USDHC status.
Values:
-
enumerator kStatus_USDHC_BusyTransferring#
Transfer is on-going.
-
enumerator kStatus_USDHC_PrepareAdmaDescriptorFailed#
Set DMA descriptor failed.
-
enumerator kStatus_USDHC_SendCommandFailed#
Send command failed.
-
enumerator kStatus_USDHC_TransferDataFailed#
Transfer data failed.
-
enumerator kStatus_USDHC_DMADataAddrNotAlign#
Data address not aligned.
-
enumerator kStatus_USDHC_ReTuningRequest#
Re-tuning request.
-
enumerator kStatus_USDHC_TuningError#
Tuning error.
-
enumerator kStatus_USDHC_NotSupport#
Not support.
-
enumerator kStatus_USDHC_TransferDataComplete#
Transfer data complete.
-
enumerator kStatus_USDHC_SendCommandSuccess#
Transfer command complete.
-
enumerator kStatus_USDHC_TransferDMAComplete#
Transfer DMA complete.
-
enumerator kStatus_USDHC_BusyTransferring#
Enum _usdhc_capability_flag. Host controller capabilities flag mask. .
Values:
-
enumerator kUSDHC_SupportAdmaFlag#
Support ADMA.
-
enumerator kUSDHC_SupportHighSpeedFlag#
Support high-speed.
-
enumerator kUSDHC_SupportDmaFlag#
Support DMA.
-
enumerator kUSDHC_SupportSuspendResumeFlag#
Support suspend/resume.
-
enumerator kUSDHC_SupportV330Flag#
Support voltage 3.3V.
-
enumerator kUSDHC_SupportV300Flag#
Support voltage 3.0V.
-
enumerator kUSDHC_Support4BitFlag#
Flag in HTCAPBLT_MBL’s position, supporting 4-bit mode.
-
enumerator kUSDHC_Support8BitFlag#
Flag in HTCAPBLT_MBL’s position, supporting 8-bit mode.
-
enumerator kUSDHC_SupportDDR50Flag#
SD version 3.0 new feature, supporting DDR50 mode.
-
enumerator kUSDHC_SupportSDR104Flag#
Support SDR104 mode.
-
enumerator kUSDHC_SupportSDR50Flag#
Support SDR50 mode.
-
enumerator kUSDHC_SupportAdmaFlag#
Enum _usdhc_wakeup_event. Wakeup event mask. .
Values:
-
enumerator kUSDHC_WakeupEventOnCardInt#
Wakeup on card interrupt.
-
enumerator kUSDHC_WakeupEventOnCardInsert#
Wakeup on card insertion.
-
enumerator kUSDHC_WakeupEventOnCardRemove#
Wakeup on card removal.
-
enumerator kUSDHC_WakeupEventsAll#
All wakeup events
-
enumerator kUSDHC_WakeupEventOnCardInt#
Enum _usdhc_reset. Reset type mask. .
Values:
-
enumerator kUSDHC_ResetAll#
Reset all except card detection.
-
enumerator kUSDHC_ResetCommand#
Reset command line.
-
enumerator kUSDHC_ResetData#
Reset data line.
-
enumerator kUSDHC_ResetTuning#
Reset tuning circuit.
-
enumerator kUSDHC_ResetsAll#
All reset types
-
enumerator kUSDHC_ResetAll#
Enum _usdhc_transfer_flag. Transfer flag mask.
Values:
-
enumerator kUSDHC_EnableDmaFlag#
Enable DMA.
-
enumerator kUSDHC_CommandTypeSuspendFlag#
Suspend command.
-
enumerator kUSDHC_CommandTypeResumeFlag#
Resume command.
-
enumerator kUSDHC_CommandTypeAbortFlag#
Abort command.
-
enumerator kUSDHC_EnableBlockCountFlag#
Enable block count.
-
enumerator kUSDHC_EnableAutoCommand12Flag#
Enable auto CMD12.
-
enumerator kUSDHC_DataReadFlag#
Enable data read.
-
enumerator kUSDHC_MultipleBlockFlag#
Multiple block data read/write.
-
enumerator kUSDHC_EnableAutoCommand23Flag#
Enable auto CMD23.
-
enumerator kUSDHC_ResponseLength136Flag#
136-bit response length.
-
enumerator kUSDHC_ResponseLength48Flag#
48-bit response length.
-
enumerator kUSDHC_ResponseLength48BusyFlag#
48-bit response length with busy status.
-
enumerator kUSDHC_EnableCrcCheckFlag#
Enable CRC check.
-
enumerator kUSDHC_EnableIndexCheckFlag#
Enable index check.
-
enumerator kUSDHC_DataPresentFlag#
Data present flag.
-
enumerator kUSDHC_EnableDmaFlag#
Enum _usdhc_present_status_flag. Present status flag mask. .
Values:
-
enumerator kUSDHC_CommandInhibitFlag#
Command inhibit.
-
enumerator kUSDHC_DataInhibitFlag#
Data inhibit.
-
enumerator kUSDHC_DataLineActiveFlag#
Data line active.
-
enumerator kUSDHC_SdClockStableFlag#
SD bus clock stable.
-
enumerator kUSDHC_WriteTransferActiveFlag#
Write transfer active.
-
enumerator kUSDHC_ReadTransferActiveFlag#
Read transfer active.
-
enumerator kUSDHC_BufferWriteEnableFlag#
Buffer write enable.
-
enumerator kUSDHC_BufferReadEnableFlag#
Buffer read enable.
-
enumerator kUSDHC_ReTuningRequestFlag#
Re-tuning request flag, only used for SDR104 mode.
-
enumerator kUSDHC_DelaySettingFinishedFlag#
Delay setting finished flag.
-
enumerator kUSDHC_CardInsertedFlag#
Card inserted.
-
enumerator kUSDHC_CommandLineLevelFlag#
Command line signal level.
-
enumerator kUSDHC_Data0LineLevelFlag#
Data0 line signal level.
-
enumerator kUSDHC_Data1LineLevelFlag#
Data1 line signal level.
-
enumerator kUSDHC_Data2LineLevelFlag#
Data2 line signal level.
-
enumerator kUSDHC_Data3LineLevelFlag#
Data3 line signal level.
-
enumerator kUSDHC_Data4LineLevelFlag#
Data4 line signal level.
-
enumerator kUSDHC_Data5LineLevelFlag#
Data5 line signal level.
-
enumerator kUSDHC_Data6LineLevelFlag#
Data6 line signal level.
-
enumerator kUSDHC_Data7LineLevelFlag#
Data7 line signal level.
-
enumerator kUSDHC_CommandInhibitFlag#
Enum _usdhc_interrupt_status_flag. Interrupt status flag mask. .
Values:
-
enumerator kUSDHC_CommandCompleteFlag#
Command complete.
-
enumerator kUSDHC_DataCompleteFlag#
Data complete.
-
enumerator kUSDHC_BlockGapEventFlag#
Block gap event.
-
enumerator kUSDHC_DmaCompleteFlag#
DMA interrupt.
-
enumerator kUSDHC_BufferWriteReadyFlag#
Buffer write ready.
-
enumerator kUSDHC_BufferReadReadyFlag#
Buffer read ready.
-
enumerator kUSDHC_CardInsertionFlag#
Card inserted.
-
enumerator kUSDHC_CardRemovalFlag#
Card removed.
-
enumerator kUSDHC_CardInterruptFlag#
Card interrupt.
-
enumerator kUSDHC_ReTuningEventFlag#
Re-Tuning event, only for SD3.0 SDR104 mode.
-
enumerator kUSDHC_TuningPassFlag#
SDR104 mode tuning pass flag.
-
enumerator kUSDHC_TuningErrorFlag#
SDR104 tuning error flag.
-
enumerator kUSDHC_CommandTimeoutFlag#
Command timeout error.
-
enumerator kUSDHC_CommandCrcErrorFlag#
Command CRC error.
-
enumerator kUSDHC_CommandEndBitErrorFlag#
Command end bit error.
-
enumerator kUSDHC_CommandIndexErrorFlag#
Command index error.
-
enumerator kUSDHC_DataTimeoutFlag#
Data timeout error.
-
enumerator kUSDHC_DataCrcErrorFlag#
Data CRC error.
-
enumerator kUSDHC_DataEndBitErrorFlag#
Data end bit error.
-
enumerator kUSDHC_AutoCommand12ErrorFlag#
Auto CMD12 error.
-
enumerator kUSDHC_DmaErrorFlag#
DMA error.
-
enumerator kUSDHC_CommandErrorFlag#
Command error
-
enumerator kUSDHC_DataErrorFlag#
Data error
-
enumerator kUSDHC_ErrorFlag#
All error
-
enumerator kUSDHC_DataFlag#
Data interrupts
-
enumerator kUSDHC_DataDMAFlag#
Data interrupts
-
enumerator kUSDHC_CommandFlag#
Command interrupts
-
enumerator kUSDHC_CardDetectFlag#
Card detection interrupts
-
enumerator kUSDHC_SDR104TuningFlag#
SDR104 tuning flag.
-
enumerator kUSDHC_AllInterruptFlags#
All flags mask
-
enumerator kUSDHC_CommandCompleteFlag#
Enum _usdhc_auto_command12_error_status_flag. Auto CMD12 error status flag mask. .
Values:
-
enumerator kUSDHC_AutoCommand12NotExecutedFlag#
Not executed error.
-
enumerator kUSDHC_AutoCommand12TimeoutFlag#
Timeout error.
-
enumerator kUSDHC_AutoCommand12EndBitErrorFlag#
End bit error.
-
enumerator kUSDHC_AutoCommand12CrcErrorFlag#
CRC error.
-
enumerator kUSDHC_AutoCommand12IndexErrorFlag#
Index error.
-
enumerator kUSDHC_AutoCommand12NotIssuedFlag#
Not issued error.
-
enumerator kUSDHC_AutoCommand12NotExecutedFlag#
Enum _usdhc_standard_tuning. Standard tuning flag.
Values:
-
enumerator kUSDHC_ExecuteTuning#
Used to start tuning procedure.
-
enumerator kUSDHC_TuningSampleClockSel#
When std_tuning_en bit is set, this bit is used to select sampleing clock.
-
enumerator kUSDHC_ExecuteTuning#
Enum _usdhc_adma_error_status_flag. ADMA error status flag mask. .
Values:
-
enumerator kUSDHC_AdmaLenghMismatchFlag#
Length mismatch error.
-
enumerator kUSDHC_AdmaDescriptorErrorFlag#
Descriptor error.
-
enumerator kUSDHC_AdmaLenghMismatchFlag#
Enum _usdhc_adma_error_state. ADMA error state.
This state is the detail state when ADMA error has occurred.
Values:
-
enumerator kUSDHC_AdmaErrorStateStopDma#
Stop DMA, previous location set in the ADMA system address is errored address.
-
enumerator kUSDHC_AdmaErrorStateFetchDescriptor#
Fetch descriptor, current location set in the ADMA system address is errored address.
-
enumerator kUSDHC_AdmaErrorStateChangeAddress#
Change address, no DMA error has occurred.
-
enumerator kUSDHC_AdmaErrorStateTransferData#
Transfer data, previous location set in the ADMA system address is errored address.
-
enumerator kUSDHC_AdmaErrorStateInvalidLength#
Invalid length in ADMA descriptor.
-
enumerator kUSDHC_AdmaErrorStateInvalidDescriptor#
Invalid descriptor fetched by ADMA.
-
enumerator kUSDHC_AdmaErrorState#
ADMA error state
-
enumerator kUSDHC_AdmaErrorStateStopDma#
Enum _usdhc_force_event. Force event bit position. .
Values:
-
enumerator kUSDHC_ForceEventAutoCommand12NotExecuted#
Auto CMD12 not executed error.
-
enumerator kUSDHC_ForceEventAutoCommand12Timeout#
Auto CMD12 timeout error.
-
enumerator kUSDHC_ForceEventAutoCommand12CrcError#
Auto CMD12 CRC error.
-
enumerator kUSDHC_ForceEventEndBitError#
Auto CMD12 end bit error.
-
enumerator kUSDHC_ForceEventAutoCommand12IndexError#
Auto CMD12 index error.
-
enumerator kUSDHC_ForceEventAutoCommand12NotIssued#
Auto CMD12 not issued error.
-
enumerator kUSDHC_ForceEventCommandTimeout#
Command timeout error.
-
enumerator kUSDHC_ForceEventCommandCrcError#
Command CRC error.
-
enumerator kUSDHC_ForceEventCommandEndBitError#
Command end bit error.
-
enumerator kUSDHC_ForceEventCommandIndexError#
Command index error.
-
enumerator kUSDHC_ForceEventDataTimeout#
Data timeout error.
-
enumerator kUSDHC_ForceEventDataCrcError#
Data CRC error.
-
enumerator kUSDHC_ForceEventDataEndBitError#
Data end bit error.
-
enumerator kUSDHC_ForceEventAutoCommand12Error#
Auto CMD12 error.
-
enumerator kUSDHC_ForceEventCardInt#
Card interrupt.
-
enumerator kUSDHC_ForceEventDmaError#
Dma error.
-
enumerator kUSDHC_ForceEventTuningError#
Tuning error.
-
enumerator kUSDHC_ForceEventsAll#
All force event flags mask.
-
enumerator kUSDHC_ForceEventAutoCommand12NotExecuted#
-
enum _usdhc_transfer_direction#
Data transfer direction.
Values:
-
enumerator kUSDHC_TransferDirectionReceive#
USDHC transfer direction receive.
-
enumerator kUSDHC_TransferDirectionSend#
USDHC transfer direction send.
-
enumerator kUSDHC_TransferDirectionReceive#
-
enum _usdhc_data_bus_width#
Data transfer width.
Values:
-
enumerator kUSDHC_DataBusWidth1Bit#
1-bit mode
-
enumerator kUSDHC_DataBusWidth4Bit#
4-bit mode
-
enumerator kUSDHC_DataBusWidth8Bit#
8-bit mode
-
enumerator kUSDHC_DataBusWidth1Bit#
-
enum _usdhc_endian_mode#
Endian mode.
Values:
-
enumerator kUSDHC_EndianModeBig#
Big endian mode.
-
enumerator kUSDHC_EndianModeHalfWordBig#
Half word big endian mode.
-
enumerator kUSDHC_EndianModeLittle#
Little endian mode.
-
enumerator kUSDHC_EndianModeBig#
-
enum _usdhc_dma_mode#
DMA mode.
Values:
-
enumerator kUSDHC_DmaModeSimple#
External DMA.
-
enumerator kUSDHC_DmaModeAdma1#
ADMA1 is selected.
-
enumerator kUSDHC_DmaModeAdma2#
ADMA2 is selected.
-
enumerator kUSDHC_ExternalDMA#
External DMA mode selected.
-
enumerator kUSDHC_DmaModeSimple#
Enum _usdhc_sdio_control_flag. SDIO control flag mask. .
Values:
-
enumerator kUSDHC_StopAtBlockGapFlag#
Stop at block gap.
-
enumerator kUSDHC_ReadWaitControlFlag#
Read wait control.
-
enumerator kUSDHC_InterruptAtBlockGapFlag#
Interrupt at block gap.
-
enumerator kUSDHC_ReadDoneNo8CLK#
Read done without 8 clk for block gap.
-
enumerator kUSDHC_ExactBlockNumberReadFlag#
Exact block number read.
-
enumerator kUSDHC_StopAtBlockGapFlag#
-
enum _usdhc_boot_mode#
MMC card boot mode.
Values:
-
enumerator kUSDHC_BootModeNormal#
Normal boot
-
enumerator kUSDHC_BootModeAlternative#
Alternative boot
-
enumerator kUSDHC_BootModeNormal#
-
enum _usdhc_card_command_type#
The command type.
Values:
-
enumerator kCARD_CommandTypeNormal#
Normal command
-
enumerator kCARD_CommandTypeSuspend#
Suspend command
-
enumerator kCARD_CommandTypeResume#
Resume command
-
enumerator kCARD_CommandTypeAbort#
Abort command
-
enumerator kCARD_CommandTypeEmpty#
Empty command
-
enumerator kCARD_CommandTypeNormal#
-
enum _usdhc_card_response_type#
The command response type.
Defines the command response type from card to host controller.
Values:
-
enumerator kCARD_ResponseTypeNone#
Response type: none
-
enumerator kCARD_ResponseTypeR1#
Response type: R1
-
enumerator kCARD_ResponseTypeR1b#
Response type: R1b
-
enumerator kCARD_ResponseTypeR2#
Response type: R2
-
enumerator kCARD_ResponseTypeR3#
Response type: R3
-
enumerator kCARD_ResponseTypeR4#
Response type: R4
-
enumerator kCARD_ResponseTypeR5#
Response type: R5
-
enumerator kCARD_ResponseTypeR5b#
Response type: R5b
-
enumerator kCARD_ResponseTypeR6#
Response type: R6
-
enumerator kCARD_ResponseTypeR7#
Response type: R7
-
enumerator kCARD_ResponseTypeNone#
Enum _usdhc_adma1_descriptor_flag. The mask for the control/status field in ADMA1 descriptor.
Values:
-
enumerator kUSDHC_Adma1DescriptorValidFlag#
Valid flag.
-
enumerator kUSDHC_Adma1DescriptorEndFlag#
End flag.
-
enumerator kUSDHC_Adma1DescriptorInterrupFlag#
Interrupt flag.
-
enumerator kUSDHC_Adma1DescriptorActivity1Flag#
Activity 1 flag.
-
enumerator kUSDHC_Adma1DescriptorActivity2Flag#
Activity 2 flag.
-
enumerator kUSDHC_Adma1DescriptorTypeNop#
No operation.
-
enumerator kUSDHC_Adma1DescriptorTypeTransfer#
Transfer data.
-
enumerator kUSDHC_Adma1DescriptorTypeLink#
Link descriptor.
-
enumerator kUSDHC_Adma1DescriptorTypeSetLength#
Set data length.
-
enumerator kUSDHC_Adma1DescriptorValidFlag#
Enum _usdhc_adma2_descriptor_flag. ADMA1 descriptor control and status mask.
Values:
-
enumerator kUSDHC_Adma2DescriptorValidFlag#
Valid flag.
-
enumerator kUSDHC_Adma2DescriptorEndFlag#
End flag.
-
enumerator kUSDHC_Adma2DescriptorInterruptFlag#
Interrupt flag.
-
enumerator kUSDHC_Adma2DescriptorActivity1Flag#
Activity 1 mask.
-
enumerator kUSDHC_Adma2DescriptorActivity2Flag#
Activity 2 mask.
-
enumerator kUSDHC_Adma2DescriptorTypeNop#
No operation.
-
enumerator kUSDHC_Adma2DescriptorTypeReserved#
Reserved.
-
enumerator kUSDHC_Adma2DescriptorTypeTransfer#
Transfer type.
-
enumerator kUSDHC_Adma2DescriptorTypeLink#
Link type.
-
enumerator kUSDHC_Adma2DescriptorValidFlag#
Enum _usdhc_adma_flag. ADMA descriptor configuration flag. .
Values:
-
enumerator kUSDHC_AdmaDescriptorSingleFlag#
Try to finish the transfer in a single ADMA descriptor. If transfer size is bigger than one ADMA descriptor’s ability, new another descriptor for data transfer.
-
enumerator kUSDHC_AdmaDescriptorMultipleFlag#
Create multiple ADMA descriptors within the ADMA table, this is used for mmc boot mode specifically, which need to modify the ADMA descriptor on the fly, so the flag should be used combining with stop at block gap feature.
-
enumerator kUSDHC_AdmaDescriptorSingleFlag#
-
enum _usdhc_burst_len#
DMA transfer burst len config.
Values:
-
enumerator kUSDHC_EnBurstLenForINCR#
Enable burst len for INCR.
-
enumerator kUSDHC_EnBurstLenForINCR4816#
Enable burst len for INCR4/INCR8/INCR16.
-
enumerator kUSDHC_EnBurstLenForINCR4816WRAP#
Enable burst len for INCR4/8/16 WRAP.
-
enumerator kUSDHC_EnBurstLenForINCR#
Enum _usdhc_transfer_data_type. Tansfer data type definition.
Values:
-
enumerator kUSDHC_TransferDataNormal#
Transfer normal read/write data.
-
enumerator kUSDHC_TransferDataTuning#
Transfer tuning data.
-
enumerator kUSDHC_TransferDataBoot#
Transfer boot data.
-
enumerator kUSDHC_TransferDataBootcontinous#
Transfer boot data continuously.
-
enumerator kUSDHC_TransferDataNormal#
-
typedef enum _usdhc_transfer_direction usdhc_transfer_direction_t#
Data transfer direction.
-
typedef enum _usdhc_data_bus_width usdhc_data_bus_width_t#
Data transfer width.
-
typedef enum _usdhc_endian_mode usdhc_endian_mode_t#
Endian mode.
-
typedef enum _usdhc_dma_mode usdhc_dma_mode_t#
DMA mode.
-
typedef enum _usdhc_boot_mode usdhc_boot_mode_t#
MMC card boot mode.
-
typedef enum _usdhc_card_command_type usdhc_card_command_type_t#
The command type.
-
typedef enum _usdhc_card_response_type usdhc_card_response_type_t#
The command response type.
Defines the command response type from card to host controller.
-
typedef enum _usdhc_burst_len usdhc_burst_len_t#
DMA transfer burst len config.
-
typedef uint32_t usdhc_adma1_descriptor_t#
Defines the ADMA1 descriptor structure.
-
typedef struct _usdhc_adma2_descriptor usdhc_adma2_descriptor_t#
Defines the ADMA2 descriptor structure.
-
typedef struct _usdhc_capability usdhc_capability_t#
USDHC capability information.
Defines a structure to save the capability information of USDHC.
-
typedef struct _usdhc_boot_config usdhc_boot_config_t#
Data structure to configure the MMC boot feature.
-
typedef struct _usdhc_config usdhc_config_t#
Data structure to initialize the USDHC.
-
typedef struct _usdhc_command usdhc_command_t#
Card command descriptor.
Defines card command-related attribute.
-
typedef struct _usdhc_adma_config usdhc_adma_config_t#
ADMA configuration.
-
typedef struct _usdhc_scatter_gather_data_list usdhc_scatter_gather_data_list_t#
Card scatter gather data list.
Allow application register uncontinuous data buffer for data transfer.
-
typedef struct _usdhc_scatter_gather_data usdhc_scatter_gather_data_t#
Card scatter gather data descriptor.
Defines a structure to contain data-related attribute. The ‘enableIgnoreError’ is used when upper card driver wants to ignore the error event to read/write all the data and not to stop read/write immediately when an error event happens. For example, bus testing procedure for MMC card.
-
typedef struct _usdhc_scatter_gather_transfer usdhc_scatter_gather_transfer_t#
usdhc scatter gather transfer.
-
typedef struct _usdhc_data usdhc_data_t#
Card data descriptor.
Defines a structure to contain data-related attribute. The ‘enableIgnoreError’ is used when upper card driver wants to ignore the error event to read/write all the data and not to stop read/write immediately when an error event happens. For example, bus testing procedure for MMC card.
-
typedef struct _usdhc_transfer usdhc_transfer_t#
Transfer state.
-
typedef struct _usdhc_handle usdhc_handle_t#
USDHC handle typedef.
-
typedef struct _usdhc_transfer_callback usdhc_transfer_callback_t#
USDHC callback functions.
-
typedef status_t (*usdhc_transfer_function_t)(USDHC_Type *base, usdhc_transfer_t *content)#
USDHC transfer function.
-
typedef struct _usdhc_host usdhc_host_t#
USDHC host descriptor.
-
USDHC_MAX_BLOCK_COUNT#
Maximum block count can be set one time.
-
FSL_USDHC_ENABLE_SCATTER_GATHER_TRANSFER#
USDHC scatter gather feature control macro.
-
USDHC_ADMA1_ADDRESS_ALIGN#
The alignment size for ADDRESS filed in ADMA1’s descriptor.
-
USDHC_ADMA1_LENGTH_ALIGN#
The alignment size for LENGTH field in ADMA1’s descriptor.
-
USDHC_ADMA2_ADDRESS_ALIGN#
The alignment size for ADDRESS field in ADMA2’s descriptor.
-
USDHC_ADMA2_LENGTH_ALIGN#
The alignment size for LENGTH filed in ADMA2’s descriptor.
-
USDHC_ADMA1_DESCRIPTOR_ADDRESS_SHIFT#
The bit shift for ADDRESS filed in ADMA1’s descriptor.
Address/page field
Reserved
Attribute
31 12
11 6
05
04
03
02
01
00
address or data length
000000
Act2
Act1
0
Int
End
Valid
Act2
Act1
Comment
31-28
27-12
0
0
No op
Don’t care
0
1
Set data length
0000
Data Length
1
0
Transfer data
Data address
1
1
Link descriptor
Descriptor address
-
USDHC_ADMA1_DESCRIPTOR_ADDRESS_MASK#
The bit mask for ADDRESS field in ADMA1’s descriptor.
-
USDHC_ADMA1_DESCRIPTOR_LENGTH_SHIFT#
The bit shift for LENGTH filed in ADMA1’s descriptor.
-
USDHC_ADMA1_DESCRIPTOR_LENGTH_MASK#
The mask for LENGTH field in ADMA1’s descriptor.
-
USDHC_ADMA1_DESCRIPTOR_MAX_LENGTH_PER_ENTRY#
The maximum value of LENGTH filed in ADMA1’s descriptor. Since the max transfer size ADMA1 support is 65535 which is indivisible by 4096, so to make sure a large data load transfer (>64KB) continuously (require the data address be always align with 4096), software will set the maximum data length for ADMA1 to (64 - 4)KB.
-
USDHC_ADMA2_DESCRIPTOR_LENGTH_SHIFT#
The bit shift for LENGTH field in ADMA2’s descriptor.
Address field
Length
Reserved
Attribute
63 32
31 16
15 06
05
04
03
02
01
00
32-bit address
16-bit length
0000000000
Act2
Act1
0
Int
End
Valid
Act2
Act1
Comment
Operation
0
0
No op
Don’t care
0
1
Reserved
Read this line and go to next one
1
0
Transfer data
Transfer data with address and length set in this descriptor line
1
1
Link descriptor
Link to another descriptor
-
USDHC_ADMA2_DESCRIPTOR_LENGTH_MASK#
The bit mask for LENGTH field in ADMA2’s descriptor.
-
USDHC_ADMA2_DESCRIPTOR_MAX_LENGTH_PER_ENTRY#
The maximum value of LENGTH field in ADMA2’s descriptor.
-
struct _usdhc_adma2_descriptor#
- #include <fsl_usdhc.h>
Defines the ADMA2 descriptor structure.
-
struct _usdhc_capability#
- #include <fsl_usdhc.h>
USDHC capability information.
Defines a structure to save the capability information of USDHC.
Public Members
-
uint32_t sdVersion#
Support SD card/sdio version.
-
uint32_t mmcVersion#
Support EMMC card version.
-
uint32_t maxBlockLength#
Maximum block length united as byte.
-
uint32_t maxBlockCount#
Maximum block count can be set one time.
-
uint32_t flags#
Capability flags to indicate the support information(_usdhc_capability_flag).
-
uint32_t sdVersion#
-
struct _usdhc_boot_config#
- #include <fsl_usdhc.h>
Data structure to configure the MMC boot feature.
Public Members
-
uint32_t ackTimeoutCount#
Timeout value for the boot ACK. The available range is 0 ~ 15.
-
usdhc_boot_mode_t bootMode#
Boot mode selection.
-
uint32_t blockCount#
Stop at block gap value of automatic mode. Available range is 0 ~ 65535.
-
size_t blockSize#
Block size.
-
bool enableBootAck#
Enable or disable boot ACK.
-
bool enableAutoStopAtBlockGap#
Enable or disable auto stop at block gap function in boot period.
-
uint32_t ackTimeoutCount#
-
struct _usdhc_config#
- #include <fsl_usdhc.h>
Data structure to initialize the USDHC.
Public Members
-
uint32_t dataTimeout#
Data timeout value.
-
usdhc_endian_mode_t endianMode#
Endian mode.
-
uint8_t readWatermarkLevel#
Watermark level for DMA read operation. Available range is 1 ~ 128.
-
uint8_t writeWatermarkLevel#
Watermark level for DMA write operation. Available range is 1 ~ 128.
-
uint32_t dataTimeout#
-
struct _usdhc_command#
- #include <fsl_usdhc.h>
Card command descriptor.
Defines card command-related attribute.
Public Members
-
uint32_t index#
Command index.
-
uint32_t argument#
Command argument.
-
usdhc_card_command_type_t type#
Command type.
-
usdhc_card_response_type_t responseType#
Command response type.
-
uint32_t response[4U]#
Response for this command.
-
uint32_t responseErrorFlags#
Response error flag, which need to check the command reponse.
-
uint32_t flags#
Cmd flags.
-
uint32_t index#
-
struct _usdhc_adma_config#
- #include <fsl_usdhc.h>
ADMA configuration.
Public Members
-
usdhc_dma_mode_t dmaMode#
DMA mode.
-
uint32_t *admaTable#
ADMA table address, can’t be null if transfer way is ADMA1/ADMA2.
-
uint32_t admaTableWords#
ADMA table length united as words, can’t be 0 if transfer way is ADMA1/ADMA2.
-
usdhc_dma_mode_t dmaMode#
-
struct _usdhc_scatter_gather_data_list#
- #include <fsl_usdhc.h>
Card scatter gather data list.
Allow application register uncontinuous data buffer for data transfer.
-
struct _usdhc_scatter_gather_data#
- #include <fsl_usdhc.h>
Card scatter gather data descriptor.
Defines a structure to contain data-related attribute. The ‘enableIgnoreError’ is used when upper card driver wants to ignore the error event to read/write all the data and not to stop read/write immediately when an error event happens. For example, bus testing procedure for MMC card.
Public Members
-
bool enableAutoCommand12#
Enable auto CMD12.
-
bool enableAutoCommand23#
Enable auto CMD23.
-
bool enableIgnoreError#
Enable to ignore error event to read/write all the data.
-
usdhc_transfer_direction_t dataDirection#
data direction
-
uint8_t dataType#
this is used to distinguish the normal/tuning/boot data.
-
size_t blockSize#
Block size.
-
usdhc_scatter_gather_data_list_t sgData#
scatter gather data
-
bool enableAutoCommand12#
-
struct _usdhc_scatter_gather_transfer#
- #include <fsl_usdhc.h>
usdhc scatter gather transfer.
Public Members
-
usdhc_scatter_gather_data_t *data#
Data to transfer.
-
usdhc_command_t *command#
Command to send.
-
usdhc_scatter_gather_data_t *data#
-
struct _usdhc_data#
- #include <fsl_usdhc.h>
Card data descriptor.
Defines a structure to contain data-related attribute. The ‘enableIgnoreError’ is used when upper card driver wants to ignore the error event to read/write all the data and not to stop read/write immediately when an error event happens. For example, bus testing procedure for MMC card.
Public Members
-
bool enableAutoCommand12#
Enable auto CMD12.
-
bool enableAutoCommand23#
Enable auto CMD23.
-
bool enableIgnoreError#
Enable to ignore error event to read/write all the data.
-
uint8_t dataType#
this is used to distinguish the normal/tuning/boot data.
-
size_t blockSize#
Block size.
-
uint32_t blockCount#
Block count.
-
uint32_t *rxData#
Buffer to save data read.
-
const uint32_t *txData#
Data buffer to write.
-
bool enableAutoCommand12#
-
struct _usdhc_transfer#
- #include <fsl_usdhc.h>
Transfer state.
-
struct _usdhc_transfer_callback#
- #include <fsl_usdhc.h>
USDHC callback functions.
Public Members
-
void (*CardInserted)(USDHC_Type *base, void *userData)#
Card inserted occurs when DAT3/CD pin is for card detect
-
void (*CardRemoved)(USDHC_Type *base, void *userData)#
Card removed occurs
-
void (*SdioInterrupt)(USDHC_Type *base, void *userData)#
SDIO card interrupt occurs
-
void (*BlockGap)(USDHC_Type *base, void *userData)#
stopped at block gap event
-
void (*TransferComplete)(USDHC_Type *base, usdhc_handle_t *handle, status_t status, void *userData)#
Transfer complete callback.
-
void (*ReTuning)(USDHC_Type *base, void *userData)#
Handle the re-tuning.
-
void (*CardInserted)(USDHC_Type *base, void *userData)#
-
struct _usdhc_handle#
- #include <fsl_usdhc.h>
USDHC handle.
Defines the structure to save the USDHC state information and callback function.
Note
All the fields except interruptFlags and transferredWords must be allocated by the user.
Public Members
-
usdhc_data_t *volatile data#
Transfer parameter. Data to transfer.
-
usdhc_command_t *volatile command#
Transfer parameter. Command to send.
-
volatile uint32_t transferredWords#
Transfer status. Words transferred by DATAPORT way.
-
usdhc_transfer_callback_t callback#
Callback function.
-
void *userData#
Parameter for transfer complete callback.
-
bool enDMA#
Transfer parameter. Was DMA used?
-
usdhc_data_t *volatile data#
-
struct _usdhc_host#
- #include <fsl_usdhc.h>
USDHC host descriptor.
Public Members
-
USDHC_Type *base#
USDHC peripheral base address.
-
uint32_t sourceClock_Hz#
USDHC source clock frequency united in Hz.
-
usdhc_config_t config#
USDHC configuration.
-
usdhc_capability_t capability#
USDHC capability information.
-
usdhc_transfer_function_t transfer#
USDHC transfer function.
-
USDHC_Type *base#
VBATCON Driver#
-
void VBATCON_GetDefaultConfig(vbatcon_config_t *config)#
Populate a configuration structure with hardware reset defaults.
Mirrors the per-register reset values from RM Chapter 105:
CTRL = 0x0100_0000 -> LONG_PRESS_EN = 1, AEC = 0, BTN_TIMEOUT/DEBOUNCE/TURN_ON_TIME/NAT = 0
CLOCK_CTRL = 0x0000_0000 -> all gates off, SW switch off
EVENTS = 0x0000_0000 -> all interrupts disabled
Resulting fields:
buttonTimeout = kVBATCON_BtnTimeout5s
debounceTime = kVBATCON_Debounce50ms
turnOnTime = kVBATCON_TurnOnTime500ms
noAckTime = kVBATCON_NoAckTime1000ms
enableLongPress = true
enableAbnormalCheck = false
enableBBSMClockGate = false
enableLPTMRClockGate = false
enableUlp32kSwitch = false
ulp32kSource = kVBATCON_Ulp32kSourceFro32k
interruptEnable = 0
- Parameters:
config – Pointer to configuration to fill; must not be NULL.
-
void VBATCON_Init(VBATCON_Type *base, const vbatcon_config_t *config)#
Initialize the entire VBATCON module from a configuration.
Writes CTRL, CLOCK_CTRL, and EVENTS to the configured state in three full-word writes. Any pending W1C event-status bits in EVENTS are cleared. GPRs are left untouched (they retain user data across power cycles).
- Parameters:
base – VBATCON peripheral base.
config – Pointer to configuration; must not be NULL.
-
void VBATCON_Deinit(VBATCON_Type *base)#
Reset VBATCON CTRL/CLOCK_CTRL/EVENTS to their hardware defaults.
Restores CTRL to 0x0100_0000, CLOCK_CTRL to 0, and EVENTS to 0 (interrupts disabled, all pending status cleared via W1C). GPRs are left untouched.
- Parameters:
base – VBATCON peripheral base.
-
static inline uint32_t VBATCON_GetVersionId(VBATCON_Type *base)#
Get the VBATCON version-ID register value.
- Parameters:
base – VBATCON peripheral base.
- Returns:
Raw VERID value (VERSION | REVISION | IPID).
-
static inline uint32_t VBATCON_GetGprArraySize(VBATCON_Type *base)#
Get the size of the GPR array implemented by hardware.
- Parameters:
base – VBATCON peripheral base.
- Returns:
Number of 32-bit GPR words (0 if not implemented).
-
void VBATCON_SetButtonTimeout(VBATCON_Type *base, vbatcon_btn_timeout_t timeout)#
Set the long button-press timeout.
- Parameters:
base – VBATCON peripheral base.
timeout – Selected timeout, see vbatcon_btn_timeout_t.
-
void VBATCON_SetDebounceTime(VBATCON_Type *base, vbatcon_debounce_t debounce)#
Set the button debounce time.
- Parameters:
base – VBATCON peripheral base.
debounce – Selected debounce, see vbatcon_debounce_t.
-
void VBATCON_SetTurnOnTime(VBATCON_Type *base, vbatcon_turn_on_time_t time)#
Set the turn-on time (press duration before pmic_mode asserts).
- Parameters:
base – VBATCON peripheral base.
time – Selected turn-on time, see vbatcon_turn_on_time_t.
-
void VBATCON_SetNoAckTime(VBATCON_Type *base, vbatcon_no_ack_time_t time)#
Set the PMU no-acknowledge timeout for DPD entry.
- Parameters:
base – VBATCON peripheral base.
time – Selected no-ACK time, see vbatcon_no_ack_time_t.
-
void VBATCON_EnableLongPress(VBATCON_Type *base, bool enable)#
Enable or disable long-press power-on/off.
- Parameters:
base – VBATCON peripheral base.
enable – true: enable; false: disable.
-
void VBATCON_EnableAbnormalEntryCheck(VBATCON_Type *base, bool enable)#
Enable or disable abnormal-entry deadlock protection.
- Parameters:
base – VBATCON peripheral base.
enable – true: enable; false: disable.
-
static inline void VBATCON_EnableInterrupts(VBATCON_Type *base, uint32_t mask)#
Enable VBATCON interrupt sources.
EVENTS[7:4] are W1C status bits; the implementation writes 0 to those positions so a concurrently-pending event is not silently cleared.
- Parameters:
base – VBATCON peripheral base.
mask – OR’ed mask of _vbatcon_interrupt_enable values.
-
static inline void VBATCON_DisableInterrupts(VBATCON_Type *base, uint32_t mask)#
Disable VBATCON interrupt sources.
EVENTS[7:4] are W1C status bits; the implementation writes 0 to those positions so a concurrently-pending event is not silently cleared.
- Parameters:
base – VBATCON peripheral base.
mask – OR’ed mask of _vbatcon_interrupt_enable values.
-
static inline uint32_t VBATCON_GetEventFlags(VBATCON_Type *base)#
Get the asserted event flags.
- Parameters:
base – VBATCON peripheral base.
- Returns:
OR’ed _vbatcon_event_flags currently set.
-
void VBATCON_ClearEventFlags(VBATCON_Type *base, uint32_t mask)#
Clear event flags (write-1-to-clear).
Only the lower 8 status bits are W1C; enable bits are preserved.
- Parameters:
base – VBATCON peripheral base.
mask – OR’ed mask of _vbatcon_event_flags to clear.
-
void VBATCON_EnableBBSMClockGate(VBATCON_Type *base, bool enable)#
Enable or disable the BBSM functional-clock gate.
- Parameters:
base – VBATCON peripheral base.
enable – true: enable clock gate; false: disable.
-
void VBATCON_EnableLPTMRClockGate(VBATCON_Type *base, bool enable)#
Enable or disable the VBAT_LPTIMER functional-clock gate.
- Parameters:
base – VBATCON peripheral base.
enable – true: enable clock gate; false: disable.
-
void VBATCON_EnableUlp32kSwitch(VBATCON_Type *base, bool enable)#
Enable or disable software override of the ULP32K source.
- Parameters:
base – VBATCON peripheral base.
enable – true: software-controlled ULP32K source; false: hardware default.
-
void VBATCON_SelectUlp32kSource(VBATCON_Type *base, vbatcon_ulp32k_source_t source)#
Select the ULP32K clock source (only effective when SW switch is enabled).
- Parameters:
base – VBATCON peripheral base.
source – Source selection, see vbatcon_ulp32k_source_t.
-
status_t VBATCON_SwitchUlp32kSource(VBATCON_Type *base, vbatcon_ulp32k_source_t source, uint32_t timeout)#
Switch the ULP32K clock source with readiness polling.
Polls the corresponding ready flag (OSC_RDY for OSC32K, FRO_RDY for FRO32K) before enabling the software override and committing the source selection in a single CLOCK_CTRL write.
- Parameters:
base – VBATCON peripheral base.
source – Target clock source.
timeout – Maximum number of polling iterations. 0 = check current state only, no wait.
- Return values:
kStatus_Success – Source was ready and the switch was committed.
kStatus_Timeout – Source did not become ready within
timeoutiterations.
-
static inline uint32_t VBATCON_GetClockStatusFlags(VBATCON_Type *base)#
Get clock-status flags from CLOCK_CTRL.
- Parameters:
base – VBATCON peripheral base.
- Returns:
OR’ed _vbatcon_clock_status_flags currently asserted.
-
static inline void VBATCON_WriteGPR(VBATCON_Type *base, uint8_t index, uint32_t value)#
Write a 32-bit value to a VBATCON GPR.
- Parameters:
base – VBATCON peripheral base.
index – GPR index (0 .. VBATCON_GPR_COUNT - 1).
value – 32-bit value to store.
-
static inline uint32_t VBATCON_ReadGPR(VBATCON_Type *base, uint8_t index)#
Read a 32-bit value from a VBATCON GPR.
- Parameters:
base – VBATCON peripheral base.
index – GPR index (0 .. VBATCON_GPR_COUNT - 1).
- Returns:
Stored 32-bit value.
-
FSL_VBATCON_DRIVER_VERSION#
VBATCON driver version 1.0.0.
-
enum _vbatcon_btn_timeout#
VBATCON button-press timeout selection.
Selects how long the on/off button must be held to request a power-down. Maps to CTRL[BTN_TIMEOUT].
Values:
-
enumerator kVBATCON_BtnTimeout5s#
5 seconds.
-
enumerator kVBATCON_BtnTimeout10s#
10 seconds.
-
enumerator kVBATCON_BtnTimeout15s#
15 seconds.
-
enumerator kVBATCON_BtnTimeoutDisabled#
Timeout disabled; long button presses do not trigger a power-down.
-
enumerator kVBATCON_BtnTimeout5s#
-
enum _vbatcon_debounce#
VBATCON button debounce time selection.
Maps to CTRL[DEBOUNCE]. Values are in milliseconds.
Values:
-
enumerator kVBATCON_Debounce50ms#
50 ms debounce.
-
enumerator kVBATCON_Debounce100ms#
100 ms debounce.
-
enumerator kVBATCON_Debounce500ms#
500 ms debounce.
-
enumerator kVBATCON_Debounce0ms#
0 ms (no debounce).
-
enumerator kVBATCON_Debounce50ms#
-
enum _vbatcon_turn_on_time#
VBATCON turn-on time selection.
Time the button must be pressed before pmic_mode is asserted. Maps to CTRL[TURN_ON_TIME]. Values are in milliseconds unless noted.
Values:
-
enumerator kVBATCON_TurnOnTime500ms#
500 ms turn-on time.
-
enumerator kVBATCON_TurnOnTime50ms#
50 ms turn-on time.
-
enumerator kVBATCON_TurnOnTime100ms#
100 ms turn-on time.
-
enumerator kVBATCON_TurnOnTime0ms#
0 ms; requires already in DPD and press > 50 us.
-
enumerator kVBATCON_TurnOnTime500ms#
-
enum _vbatcon_no_ack_time#
VBATCON PMU no-ACK timeout selection.
Timeout (in ms) after the system requests deep-power-down. Maps to CTRL[NAT].
Values:
-
enumerator kVBATCON_NoAckTime1000ms#
1000 ms PMU no-ACK timeout.
-
enumerator kVBATCON_NoAckTime500ms#
500 ms PMU no-ACK timeout.
-
enumerator kVBATCON_NoAckTime1000ms#
-
enum _vbatcon_ulp32k_source#
VBATCON ULP32K clock source.
Maps to CLOCK_CTRL[SW_SEL].
Values:
-
enumerator kVBATCON_Ulp32kSourceFro32k#
FRO32K is selected as ULP32K clock source.
-
enumerator kVBATCON_Ulp32kSourceOsc32k#
OSC32K is selected as ULP32K clock source.
-
enumerator kVBATCON_Ulp32kSourceFro32k#
-
enum _vbatcon_event_flags#
VBATCON event/interrupt flags.
These flags can be used as a mask for the event-flag and interrupt-enable APIs. They live in the lower 8 bits of the EVENTS register (status, write-1-to-clear).
Values:
-
enumerator kVBATCON_EventEmergencyOff#
Emergency power-off requested.
-
enumerator kVBATCON_EventPowerOff#
Power-off interrupt requested.
-
enumerator kVBATCON_EventPowerOn#
Power-on interrupt requested.
-
enumerator kVBATCON_EventOscError#
OSC32K error interrupt requested.
-
enumerator kVBATCON_EventAll#
All event flags.
-
enumerator kVBATCON_EventEmergencyOff#
-
enum _vbatcon_interrupt_enable#
VBATCON interrupt-enable flags.
These flags can be OR’ed and passed to VBATCON_EnableInterrupts / VBATCON_DisableInterrupts. They live in bits [23:20] of the EVENTS register.
Values:
-
enumerator kVBATCON_IrqEmergencyOff#
Emergency power-off enable.
-
enumerator kVBATCON_IrqPowerOff#
Power-off interrupt enable.
-
enumerator kVBATCON_IrqPowerOn#
Power-on interrupt enable.
-
enumerator kVBATCON_IrqOscError#
OSC32K error interrupt enable.
-
enumerator kVBATCON_IrqAll#
All interrupt sources.
-
enumerator kVBATCON_IrqEmergencyOff#
-
enum _vbatcon_clock_status_flags#
VBATCON clock status flags (read-only from CLOCK_CTRL).
Values:
-
enumerator kVBATCON_ClockStatusOscReady#
OSC32K is ready.
-
enumerator kVBATCON_ClockStatusFroReady#
FRO32K is ready.
-
enumerator kVBATCON_ClockStatusOscScxoStable#
OSC32K SCXO stable.
-
enumerator kVBATCON_ClockStatusOscTcxoStable#
OSC32K TCXO stable.
-
enumerator kVBATCON_ClockStatusOscReady#
-
typedef enum _vbatcon_btn_timeout vbatcon_btn_timeout_t#
VBATCON button-press timeout selection.
Selects how long the on/off button must be held to request a power-down. Maps to CTRL[BTN_TIMEOUT].
-
typedef enum _vbatcon_debounce vbatcon_debounce_t#
VBATCON button debounce time selection.
Maps to CTRL[DEBOUNCE]. Values are in milliseconds.
-
typedef enum _vbatcon_turn_on_time vbatcon_turn_on_time_t#
VBATCON turn-on time selection.
Time the button must be pressed before pmic_mode is asserted. Maps to CTRL[TURN_ON_TIME]. Values are in milliseconds unless noted.
-
typedef enum _vbatcon_no_ack_time vbatcon_no_ack_time_t#
VBATCON PMU no-ACK timeout selection.
Timeout (in ms) after the system requests deep-power-down. Maps to CTRL[NAT].
-
typedef enum _vbatcon_ulp32k_source vbatcon_ulp32k_source_t#
VBATCON ULP32K clock source.
Maps to CLOCK_CTRL[SW_SEL].
-
typedef struct _vbatcon_config vbatcon_config_t#
VBATCON configuration structure.
Used by VBATCON_GetDefaultConfig and VBATCON_Init to bring the whole module (CTRL, CLOCK_CTRL, EVENTS) to a known state in one call. GPRs hold user data and are not touched by Init.
-
struct _vbatcon_config#
- #include <fsl_vbatcon.h>
VBATCON configuration structure.
Used by VBATCON_GetDefaultConfig and VBATCON_Init to bring the whole module (CTRL, CLOCK_CTRL, EVENTS) to a known state in one call. GPRs hold user data and are not touched by Init.
Public Members
-
vbatcon_btn_timeout_t buttonTimeout#
Long-press timeout to request power-down.
-
vbatcon_debounce_t debounceTime#
Button input debounce time.
-
vbatcon_turn_on_time_t turnOnTime#
Press duration before pmic_mode is asserted.
-
vbatcon_no_ack_time_t noAckTime#
PMU no-ACK timeout for DPD entry.
-
bool enableLongPress#
true: enable long-press power-on/off.
-
bool enableAbnormalCheck#
true: enable abnormal-entry deadlock protection.
-
bool enableBBSMClockGate#
true: gate BBSM functional clock.
-
bool enableLPTMRClockGate#
true: gate VBAT_LPTIMER functional clock.
-
bool enableUlp32kSwitch#
true: enable software override of ULP32K source.
-
vbatcon_ulp32k_source_t ulp32kSource#
ULP32K source (only effective when SW switch is enabled).
-
uint32_t interruptEnable#
OR’ed _vbatcon_interrupt_enable mask. 0 = all disabled.
-
vbatcon_btn_timeout_t buttonTimeout#
Xbar#
-
void XBAR_Init(xbar_instance_t xbarInstance)#
Initializes the XBAR modules.
This function un-gates the XBAR clock.
- Parameters:
xbarInstance – XBAR peripheral address.
-
void XBAR_Deinit(xbar_instance_t xbarInstance)#
Shutdown the XBAR modules.
This function disables XBAR clock.
- Parameters:
xbarInstance – XBAR peripheral address.
-
status_t XBAR_SetSignalsConnection(xbar_input_signal_t input, xbar_output_signal_t output)#
Set connection between the selected XBAR_IN[*] input and the XBAR_OUT[*] output signal.
This function connects the XBAR input to the selected XBAR output. If more than one XBAR module is available, only the inputs and outputs from the same module can be connected.
Example:
XBAR_SetSignalsConnection(kXBAR_DSC1_InputLogicLow, kXBAR_DSC1_OutputTriggerSyncIn0);
- Parameters:
input – XBAR input signal.
output – XBAR output signal.
- Return values:
kStatus_Success – Signal connection set successfully.
kStatus_InvalidArgument – Failed because of invalid argument.
-
status_t XBAR_ClearOutputStatusFlag(xbar_output_signal_t output)#
Clears the edge detection status flags.
- Parameters:
output – XBAR output signal.
- Return values:
kStatus_Success – Signal connection set successfully.
kStatus_InvalidArgument – Failed because of invalid argument.
-
status_t XBAR_GetOutputStatusFlag(xbar_output_signal_t output, bool *flag)#
Gets the active edge detection status.
This function gets the active edge detect status of all XBAR_OUTs. If the active edge occurs, the return value is asserted. When the interrupt or the DMA functionality is enabled for the XBAR_OUTx, this field is 1 when the interrupt or DMA request is asserted and 0 when the interrupt or DMA request has been cleared.
- Parameters:
output – XBAR output signal.
flag – get XBAR output status flag.
- Return values:
kStatus_Success – Signal connection set successfully.
kStatus_InvalidArgument – Failed because of invalid argument.
-
status_t XBAR_SetOutputSignalConfig(xbar_output_signal_t output, const xbar_control_config_t *controlConfig)#
Configures the XBAR control register.
This function configures an XBAR control register. The active edge detection and the DMA/IRQ function on the corresponding XBAR output can be set.
Example:
xbar_control_config_t userConfig; userConfig.activeEdge = kXBAR_EdgeRising; userConfig.requestType = kXBAR_RequestInterruptEnable; XBAR_SetOutputSignalConfig(kXBARA_OutputDMAMUX18, &userConfig);
- Parameters:
output – XBAR output signal.
controlConfig – Pointer to structure that keeps configuration of control register.
- Return values:
kStatus_Success – Signal connection set successfully.
kStatus_InvalidArgument – Failed because of invalid argument.
-
status_t XBAR_LockSelReg(xbar_output_signal_t output)#
Lock the XBAR SEL register.
When locked, the register can’t be written until reset the XBAR module.
- Parameters:
output – XBAR output signal.
- Return values:
kStatus_Success – Register locked successfully.
kStatus_InvalidArgument – Failed because of invalid argument.
-
status_t XBAR_LockCtrlReg(xbar_output_signal_t output)#
Lock the XBAR CTRL register.
When locked, the register can’t be written until reset the XBAR module.
- Parameters:
output – XBAR output signal.
- Return values:
kStatus_Success – Register locked successfully.
kStatus_InvalidArgument – Failed because of invalid argument.
-
enum _xbar_active_edge#
XBAR active edge for detection.
Values:
-
enumerator kXBAR_EdgeNone#
Edge detection status bit never asserts.
-
enumerator kXBAR_EdgeRising#
Edge detection status bit asserts on rising edges.
-
enumerator kXBAR_EdgeFalling#
Edge detection status bit asserts on falling edges.
-
enumerator kXBAR_EdgeRisingAndFalling#
Edge detection status bit asserts on rising and falling edges.
-
enumerator kXBAR_EdgeMax#
Max value.
-
enumerator kXBAR_EdgeNone#
-
enum _xbar_request#
Defines the XBAR DMA and interrupt configurations.
Values:
-
enumerator kXBAR_RequestDisable#
Interrupt and DMA are disabled.
-
enumerator kXBAR_RequestDMAEnable#
DMA enabled, interrupt disabled.
-
enumerator kXBAR_RequestInterruptEnable#
Interrupt enabled, DMA disabled.
-
enumerator kXBAR_RequestMax#
Max value.
-
enumerator kXBAR_RequestDisable#
-
typedef uint16_t xbar_reg_t#
-
typedef enum _xbar_active_edge xbar_active_edge_t#
XBAR active edge for detection.
-
typedef enum _xbar_request xbar_request_t#
Defines the XBAR DMA and interrupt configurations.
-
typedef struct _xbar_control_config xbar_control_config_t#
Defines the configuration structure of the XBAR control register.
This structure keeps the configuration of XBAR control register for one output. Control registers are available only for a few outputs. Not every XBAR module has control registers.
-
FSL_XBAR_DRIVER_VERSION#
-
struct xbar_info_t#
- #include <fsl_xbar.h>
Find the instance index from base address and register offset mappings.
-
struct _xbar_control_config#
- #include <fsl_xbar.h>
Defines the configuration structure of the XBAR control register.
This structure keeps the configuration of XBAR control register for one output. Control registers are available only for a few outputs. Not every XBAR module has control registers.
Public Members
-
xbar_active_edge_t activeEdge#
Active edge to be detected.
-
xbar_request_t requestType#
Selects DMA/Interrupt request.
-
xbar_active_edge_t activeEdge#
XSPI: Serial Peripheral Interface Driver#
Status structure of XSPI.
Values:
-
enumerator kStatus_XSPI_Busy#
XSPI is Busy
-
enumerator kStatus_XSPI_IpCommandUsageError#
XSPI Ip Command Usage Error
-
enumerator kStatus_XSPI_IpCommandtriggerError#
XSPI Ip Command Trigger Error
-
enumerator kStatus_XSPI_IllegalInstructionError#
XSPI Illegal Instruction Error
-
enumerator kStatus_XSPI_SequenceExecutionTimeout#
XSPI Sequence Execution Timeout
-
enumerator kStatus_XSPI_FradCheckError#
XSPI Frad Check Error
-
enumerator kStatus_XSPI_TgQueueWritingError#
XSPI Tg Queue Writing Error
-
enumerator kStatus_XSPI_IpsBusTransError#
XSPI Ip Bus Transfer Error
-
enumerator kStatus_XSPI_AhbReadAccessAsserted#
AHB read access is asserted.
-
enumerator kStatus_XSPI_AhbWriteAccessAsserted#
AHB write access is asserted.
-
enumerator kStatus_XSPI_IPAccessAsserted#
IP access is asserted.
-
enumerator kStatus_XSPI_AhbSubBufferFactorError#
Wrong sub buffer factor input.
-
enumerator kStatus_XSPI_RegWriteLocked#
Fail to write register due to write operation is locked.
-
enumerator kStatus_XSPI_WaterMarkIllegal#
The watermark value to set is not in multiple of 4 bytes.
-
enumerator kStatus_XSPI_PageProgramWaitFlagAsserted#
The page program wait flag already asserted.
-
enumerator kStatus_XSPI_IpAccessAddrSettingInvalid#
The input address for Ip access is invalid.
-
enumerator kStatus_XSPI_RxBufferEntriesCountError#
The count of entries of RX buffer is incorrect.
-
enumerator kStatus_XSPI_IpAccessIPCRInvalid#
Access attributes to write IPCR are not correct.
-
enumerator kStatus_XSPI_IpAccessNotGranted#
IP request not granted by arbiter.
-
enumerator kStatus_XSPI_IpReadFinished#
Finish IP read all data stored in buffer.
-
enumerator kStatus_XSPI_IpWriteFinished#
Finish IP write operation.
-
enumerator kStatus_XSPI_TxBufferUnderrun#
XSPI attempted to pull data when the TX buffer is empty.
-
enumerator kStatus_XSPI_ArbiterGranted#
XSPI arbiter granted.
-
enumerator kStatus_XSPI_Busy#
-
enum _xspi_lut_instr#
CMD definition of XSPI, use to form LUT instruction, xspi_lut_instr_t.
Values:
-
enumerator kXSPI_Command_STOP#
Stop execution, de-assert CS.
-
enumerator kXSPI_Command_SDR#
Transmit Command code to Flash, using SDR mode.
-
enumerator kXSPI_Command_RADDR_SDR#
Transmit Row Address to Flash, using SDR mode.
-
enumerator kXSPI_Command_DUMMY_SDR#
Leave data lines un-driven by xSPI controller, using SDR mode.
-
enumerator kXSPI_Command_MODE_SDR#
Transmit 8-bit Mode bits to Flash, using SDR mode.
-
enumerator kXSPI_Command_MODE2_SDR#
Transmit 2-bit Mode bits to Flash, using SDR mode.
-
enumerator kXSPI_Command_MODE4_SDR#
Transmit 4-bit Mode bits to Flash, using SDR mode.
-
enumerator kXSPI_Command_READ_SDR#
Receive Read Data from Flash, using SDR mode.
-
enumerator kXSPI_Command_WRITE_SDR#
Transmit Programming Data to Flash, using SDR mode.
-
enumerator kXSPI_Command_JMP_ON_CS#
Stop execution, de-assert CS and save operand[7:0] as the instruction start pointer for next sequence
-
enumerator kXSPI_Command_RADDR_DDR#
Transmit Row Address to Flash, using DDR mode.
-
enumerator kXSPI_Command_MODE_DDR#
Transmit 8-bit Mode bits to Flash, using DDR mode.
-
enumerator kXSPI_Command_MODE2_DDR#
Transmit 2-bit Mode bits to Flash, using DDR mode.
-
enumerator kXSPI_Command_MODE4_DDR#
Transmit 4-bit Mode bits to Flash, using DDR mode.
-
enumerator kXSPI_Command_READ_DDR#
Receive Read Data from Flash, using DDR mode.
-
enumerator kXSPI_Command_WRITE_DDR#
Transmit Programming Data to Flash, using DDR mode.
-
enumerator kXSPI_Command_LEARN_DDR#
Receive Read Data or Preamble bit from Flash, DDR mode.
-
enumerator kXSPI_Command_DDR#
Transmit Command code to Flash, using DDR mode.
-
enumerator kXSPI_Command_CADDR_SDR#
Transmit Column Address to Flash, using SDR mode.
-
enumerator kXSPI_Command_CADDR_DDR#
Transmit Column Address to Flash, using DDR mode.
-
enumerator kXSPI_Command_JUMP_TO_SEQ#
Jump the LUT sequence pointed to by the operand.
-
enumerator kXSPI_Command_STOP#
-
enum _xspi_pad#
pad definition of XSPI, use to form LUT instruction.
Values:
-
enumerator kXSPI_1PAD#
Transmit command/address and transmit/receive data only through DATA0/DATA1.
-
enumerator kXSPI_2PAD#
Transmit command/address and transmit/receive data only through DATA[1:0].
-
enumerator kXSPI_4PAD#
Transmit command/address and transmit/receive data only through DATA[3:0].
-
enumerator kXSPI_8PAD#
Transmit command/address and transmit/receive data only through DATA[7:0].
-
enumerator kXSPI_1PAD#
-
enum _xspi_flags#
XSPI interrupt status flags.
- Deprecated:
For Error flag please use xspi_error_flag_t as instead, for cmd execution and arbitration flag please use xspi_cmd_execution_arbitration_flag_t as instead.
Values:
-
enumerator kXSPI_DataLearningFailedFlag#
Data learning failed.
-
enumerator kXSPI_DllAbortFlag#
DLL Abort.
-
enumerator kXSPI_DllUnlockFlag#
This field is set whenever DLL unlock event occurs, irrespective of flash memory access.
-
enumerator kXSPI_TxBufferFillFlag#
If the field remains cleared, the TX buffer can be considered as full.
-
enumerator kXSPI_TxBufferUnderrunFlag#
This field is set if the module tries to pull data when the TX buffer is empty
-
enumerator kXSPI_RxBufferOverflowFlag#
This field is set when no more data can be pushed into the RX buffer from the serial flash memory device.
-
enumerator kXSPI_RxBufferDrainFlag#
This field is set if SR[RXWE] is asserted.
-
enumerator kXSPI_AhbAbortErrorFlag#
This flag can be set when AHB transaction error
-
enumerator kXSPI_AhbIllegalTransactionErrorFlag#
-
enumerator kXSPI_AhbIllegalBurstSizeErrorFlag#
The total burst size is more than prefetch size.
-
enumerator kXSPI_AhbBufferOverflowFlag#
The size of the AHB access exceed the size of the AHB buffer.
-
enumerator kXSPI_AhbPerformanceMonitorOverflowFlag#
AHB performance hit or miss counter overflow.
-
enumerator kXSPI_AhbReadAddressErrorFlag#
The master send an AHB read address to that buffer is not within the address range of any sub-buffers or the address within multiple sub-buffers.
-
enumerator kXSPI_IllegalInstructionErrorFlag#
This field is set when an illegal instruction is encountered by the controller in any of the sequences.
-
enumerator kXSPI_IpCmdtriggerErrorFlag#
Write access to Rx buffer control reg when IP-triggered command is executing.
-
enumerator kXSPI_PageProgramWaitFlag#
Indicates assertion of the page-program wait flag after writing to flash memory.
-
enumerator kXSPI_IpCommandExecutionDoneFlag#
Indicates XSPI has completed a running IP command.
-
enumerator kXSPI_SequenceExecutionTimeoutFlag#
Sequence execution timeout.
-
enumerator kXSPI_FradMatchErrorFlag#
-
enumerator kXSPI_Frad0AccessErrorFlag#
-
enumerator kXSPI_Frad1AccessErrorFlag#
-
enumerator kXSPI_Frad2AccessErrorFlag#
-
enumerator kXSPI_Frad3AccessErrorFlag#
-
enumerator kXSPI_Frad4AccessErrorFlag#
-
enumerator kXSPI_Frad5AccessErrorFlag#
-
enumerator kXSPI_Frad6AccessErrorFlag#
-
enumerator kXSPI_Frad7AccessErrorFlag#
-
enumerator kXSPI_Frad8AccessErrorFlag#
-
enumerator kXSPI_Frad9AccessErrorFlag#
-
enumerator kXSPI_Frad10AccessErrorFlag#
-
enumerator kXSPI_Frad11AccessErrorFlag#
-
enumerator kXSPI_Frad12AccessErrorFlag#
-
enumerator kXSPI_Frad13AccessErrorFlag#
-
enumerator kXSPI_Frad14AccessErrorFlag#
-
enumerator kXSPI_Frad15AccessErrorFlag#
-
enumerator kXSPI_FradnAccErrorFlag#
ORed value of all frad error flag,.
-
enumerator kXSPI_IpsErrorFlag#
-
enumerator kXSPI_TgnSfarErrorFlag#
-
enumerator kXSPI_TgnIpcrErrorFlag#
-
enumerator kXSPI_LockRegErrorFlag#
-
enumerator kXSPI_ArbLockTimeoutFlag#
-
enumerator kXSPI_ArbWinEventFlag#
-
enum _xspi_error_flag#
The enumeration of error flags. .
Values:
-
enumerator kXSPI_ErrorNoFradMatch#
The transaction address does not lie within the address range of any FRAD.
-
enumerator kXSPI_ErrorFrad0Access#
The transaction address lies within the address range of the FRAD0 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock by another manager.
-
enumerator kXSPI_ErrorFrad1Access#
The transaction address lies within the address range of the FRAD1 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock by another manager.
-
enumerator kXSPI_ErrorFrad2Access#
The transaction address lies within the address range of the FRAD2 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock by another manager.
-
enumerator kXSPI_ErrorFrad3Access#
The transaction address lies within the address range of the FRAD3 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock by another manager.
-
enumerator kXSPI_ErrorFrad4Access#
The transaction address lies within the address range of the FRAD4 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock by another manager.
-
enumerator kXSPI_ErrorFrad5Access#
The transaction address lies within the address range of the FRAD5 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock by another manager.
-
enumerator kXSPI_ErrorFrad6Access#
The transaction address lies within the address range of the FRAD6 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock by another manager.
-
enumerator kXSPI_ErrorFrad7Access#
The transaction address lies within the address range of the FRAD7 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock by another manager.
-
enumerator kXSPI_ErrorFrad8Access#
-
enumerator kXSPI_ErrorFrad9Access#
-
enumerator kXSPI_ErrorFrad10Access#
-
enumerator kXSPI_ErrorFrad11Access#
-
enumerator kXSPI_ErrorFrad12Access#
-
enumerator kXSPI_ErrorFrad13Access#
-
enumerator kXSPI_ErrorFrad14Access#
-
enumerator kXSPI_ErrorFrad15Access#
-
enumerator kXSPI_ErrorIpBusTransfer#
A common error has occurred and XSPI has generated an IPS bus transfer error.
-
enumerator kXSPI_ErrorTg0Sfar#
An SFAR write trigger an error while written to the TG0.
-
enumerator kXSPI_ErrorTg0Ipcr#
An IPCR write trigger an error while written to the TG0.
-
enumerator kXSPI_ErrorTimeout#
A flash memory transaction has triggered a timeout error and has been terminated by SFP.
-
enumerator kXSPI_ArbitrationWin#
The target group request was granted access.
-
enumerator kXSPI_ErrorArbitrationLock#
Arbitration lock has timed out.
-
enumerator kXSPI_ErrorWriteLockedReg#
An attempt to write a locked register.
-
enumerator kXSPI_ErrorAllFlags#
-
enumerator kXSPI_ErrorNoFradMatch#
-
enum _xspi_cmd_execution_arbitration_flag#
The enumeration of cmd execution and arbitration. .
Values:
-
enumerator kXSPI_FlagIpCmdFinished#
IP command transaction finished flag.
-
enumerator kXSPI_FlagAhbReadAddrError#
Wrong AHB read address, XSPI return AHB error payload.
-
enumerator kXSPI_FlagAhbPerformanceMonitorOverflow#
Buffer hit or miss counter overflow.
-
enumerator kXSPI_FlagIpCmdTriggerFail#
Fail when set IP RX buffer watermark.
-
enumerator kXSPI_FlagPageProgramWait#
Indicate assertion of the page-program wait flag after writing to flash memory.
-
enumerator kXSPI_FlagAhbBufferOverflow#
The size of the AHB access exceeds the size of AHB buffer.
-
enumerator kXSPI_FlagAhbIllegalBurstSizeError#
The total burst size of the AHB transacton is greater than the prefetch data size.
-
enumerator kXSPI_FlagAhbIllegalTransactionError#
XSPI has not generated a response to the AHB bus due to an illegal transaction and expiration of the watchdog timer.
-
enumerator kXSPI_FlagAhbTransactionError#
AHB transaction error.
-
enumerator kXSPI_FlagRxBufferWatermarkExceeded#
The RX buffer watermark has been exceeded.
-
enumerator kXSPI_FlagRxBufferOverflow#
The RX buffer cannot receive any more data from the SFM device.
-
enumerator kXSPI_FlagIllegalInstrError#
The xspi encountered an illegal instruction in any sequence.
-
enumerator kXSPI_FlagDllUnlock#
DLL unlock.
-
enumerator kXSPI_FlagTxBufferUnderRun#
XSPI attempt to pull data when the TX buffer is empty.
-
enumerator kXSPI_FlagTxBufferFill#
The TX buffer is filling.
-
enumerator kXSPI_FlagDllAbort#
DLL terminate.
-
enumerator kXSPI_FlagDataLearningPatternFailure#
The XSPI encountered a DATA_LEARN instruction in a sequence, but no sampling point is found for the data learning pattern.
-
enumerator kXSPI_FlagIpCmdFinished#
-
enum _xspi_interrupt_enable#
Values:
-
enumerator kXSPI_TransactionFinishIntEnable#
Enable generation of an interrupt when an IP command transaction completes.
-
enumerator kXSPI_AhbReadAddrErrorIntEnable#
Enable generation of an interrupt on occurrence of an AHB read address error.
-
enumerator kXSPI_AhbPerformanceMonitorOverflowIntEnable#
Enable generation of an interrupt on a buffer hit or miss counter overflow.
-
enumerator kXSPI_IpCmdTrigFailErrorIntEnable#
IP command trigger fail error interrupt enable.
-
enumerator kXSPI_PageProgramWaitIntEnable#
Enable generation of an interrupt on page-program wait.
-
enumerator kXSPI_AhbBufferOverflowIntEnable#
Enable generation of an interrupt on occurrence of an AHB buffer overflow.
-
enumerator kXSPI_AhbIllegalBurstSizeErrorIntEnable#
Enable generation of an interrupt on occurrence of an AHB illegal burst size error.
-
enumerator kXSPI_AhbIllegalTransactionErrorIntEnable#
Enable generation of an interrupt of an AHB illegal transaction error.
-
enumerator kXSPI_AhbAbortErrorIntEnable#
Enable generation of an interrupt on occurrence of an AHB abort error.
-
enumerator kXSPI_RxBufferDrainIntEnable#
Enable generation of an interrupt on occurrence of RX buffer drain.
-
enumerator kXSPI_RxBufferOverflowIntEnable#
Enable generation of an interrupt on occurrence of RX buffer overflow.
-
enumerator kXSPI_IllegalInstrErrorIntEnable#
Enable generation of an interrupt on occurrence of an illegal instruction error.
-
enumerator kXSPI_DllUnlockIntEnable#
Enable generation of an interrupt on a DLL unlock event.
-
enumerator kXSPI_TxBufferUnderrunIntEnable#
Enable generation of an interrupt on TX buffer underrun.
-
enumerator kXSPI_TxBufferFillIntEnable#
Enable generation of an interrupt on TX buffer fill.
-
enumerator kXSPI_DataLearningPatternFailIntEnable#
Enable generation of an interrupt on data learning pattern failure.
-
enumerator kXSPI_NoFradMatchErrorIntEnable#
Enable the interrupt generated when the transaction address does not lie within the address range of any FRAD.
-
enumerator kXSPI_Frad0AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD0 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad1AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD1 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad2AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD2 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad3AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD3 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad4AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD4 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad5AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD5 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad6AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD6 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad7AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD7 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad8AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD0 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad9AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD9 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad10AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD10 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad11AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD11 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad12AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD12 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad13AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD13 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad14AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD14 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_Frad15AccessErrorIntEnable#
Enable the interrupt generated when the transaction address lies within the address range of the FRAD15 but it does not pass the access permission checks for the FRAD or the FRAD is under exclusive lock.
-
enumerator kXSPI_IpsErrIntEnable#
Enable the interrupt generated when a common error has occurred an XSPI has generated an IPS bus transfer error.
-
enumerator kXSPI_Tg0SfarErrIntEnable#
Enable the interrupt generated when an SFAR write triggers an error while being written to the target group 0.
-
enumerator kXSPI_Tg0IpcrErrIntEnable#
Enable the interrupt generated when an IPCR write triggers an error while being written to the target group 0.
-
enumerator kXSPI_TimeoutErrIntEnable#
Enable the interrupt generated when a flash memory transaction triggers a timeout error and has been terminated by SFP.
-
enumerator kXSPI_ArbitrationWinIntEnable#
Enable the interrupt generated when the target group queue request is granted access.
-
enumerator kXSPI_ArbitrationLockTimeoutErrIntEnable#
Enable the interrupt generated when a flash memory transaction triggers a timeout error and has been terminated by SFP.
-
enumerator kXSPI_LockRegWriteErrIntEnable#
Enable the interrupt generated by an attempt to write a locked register.
-
enumerator kXSPI_TransactionFinishIntEnable#
-
enum _xspi_external_signal#
The enumeration of Idle signal drive IOFA[3] and IOFA[2].
Values:
-
enumerator XSPI_SignalIOFA2#
Idle signal drive IOFA[2].
-
enumerator XSPI_SignalIOFA3#
Idle signal drive IOFA[3].
-
enumerator XSPI_SignalIOFA2#
-
enum _xspi_dll_mode#
Dll Mode enumerations.
Values:
-
enumerator kXSPI_AutoUpdateMode#
Dll mode : Auto update mode.
-
enumerator kXSPI_BypassMode#
Dll mode : Bypass mode.
-
enumerator kXSPI_AutoUpdateMode#
-
enum _xspi_sample_clk_source#
The enumeration of sample clock source which is used to sample data from external devices.
Note
If external device support Data strobe signal, the sample clock should selected as kXSPI_SampleClkFromExternalDQS.
Values:
-
enumerator kXSPI_SampleClkFromNonInvertedFullySpeedDummyPadLoopback#
Sample clock from non inverted fully speed dummy pad loopback.
-
enumerator kXSPI_SampleClkFromInvertedFullySpeedDummyPadLoopback#
Sample clock from inverted fully speed dummy pad loopback.
-
enumerator kXSPI_SampleClkFromHalfSpeedDummyPadLoopback#
Sample clock from half fully speed dummy pad loopback.
-
enumerator kXSPI_SampleClkFromDqsPadLoopback#
Sample clock from Dqs pad loopback.
-
enumerator kXSPI_SampleClkFromExternalDQS#
Sample clock from external DQS signal.
-
enumerator kXSPI_SampleClkFromNonInvertedFullySpeedDummyPadLoopback#
-
enum _xspi_data_learning_pad_select#
The selection of data learning pad.
Values:
-
enumerator kXSPI_OnlyIO1#
IO1 selected as pad to use for pattern matching IO.
-
enumerator kXSPI_BothIO1IO3#
IO1 and IO3 selected as pad to use for pattern matching IO.
-
enumerator kXSPI_OnlyIO1#
-
enum _xspi_device_addr_mode#
External device’s address mode.
Values:
-
enumerator kXSPI_DeviceByteAddressable#
Byte addressable.
-
enumerator kXSPI_Device2ByteAddressable#
Two bytes addressable.
-
enumerator kXSPI_Device4ByteAddressable#
Four bytes addressable.
-
enumerator kXSPI_DeviceByteAddressable#
-
enum _xspi_device_interface_type#
The enumeration of external device’s interface type, hyper bus or SPI(including strandard and extended).
Note
Different interface result different settings.
Values:
-
enumerator kXSPI_StrandardExtendedSPI#
External device follow SPI protocol, DQS_OUT_EN must be 0
-
enumerator kXSPI_HyperBus#
External device follow hyper Bus protocol, DQS_OUT_EN must be 1
-
enumerator kXSPI_StrandardExtendedSPI#
-
enum _xspi_hyper_bus_x16_mode#
The enumeration of hyper bus X16 mode.
Values:
-
enumerator kXSPI_x16ModeDisable#
X16 mode is disabled.
-
enumerator kXSPI_x16ModeEnabledOnlyData#
X16 mode is enabled only for data.
-
enumerator kXSPI_x16ModeEnabledAddrCmdData#
X16 mode is enabled for address, command, and data.
-
enumerator kXSPI_x16ModeDisable#
-
enum _xspi_ddr_data_aligned_clk#
Enumeration defining the alignment modes of XSPI DDR data with respect to the internal reference clock.
Values:
-
enumerator kXSPI_DDRDataAlignedWithInternalRefClk#
DDR data aligned with internal reference clock.
-
enumerator kXSPI_DDRDataAlignedWith2xInternalRefClk#
DDR data aligned with 2X internal reference clock.
-
enumerator kXSPI_DDRDataAlignedWithInternalRefClk#
-
enum _xspi_command_type#
Command type.
Values:
-
enumerator kXSPI_Command#
XSPI operation: Only command, both TX and Rx buffer are ignored.
-
enumerator kXSPI_Config#
XSPI operation: Configure device mode, the TX fifo size is fixed in LUT.
-
enumerator kXSPI_Read#
XSPI operation: Read, only Rx Buffer is effective.
-
enumerator kXSPI_Write#
XSPI operation: Read, only Tx Buffer is effective.
-
enumerator kXSPI_Command#
-
enum _xspi_mdad_mask_type#
The enumeration of SFP MDAD mask type.
Values:
-
enumerator kXSPI_MdadMaskTypeAnd#
Target master is mask & reference.
-
enumerator kXSPI_MdadMaskTypeOr#
Target master is mask | reference.
-
enumerator kXSPI_MdadMaskTypeAnd#
-
enum _xspi_mdad_error_reason#
The enumeration of MDAD error reasons.
Values:
-
enumerator kXSPI_ErrorOnlyDataSize#
Error reason: Only Data size without required attributes.
-
enumerator kXSPI_ErrorOnlySeqId#
Error reason: Only sequence ID without required attributes.
-
enumerator kXSPI_ErrorBothDataSizeSeqId#
Error reason: Both Data size and sequence ID without required attributes.
-
enumerator kXSPI_ErrorOnlyDataSize#
-
enum _xspi_exclusive_access_lock_mode#
Exclusive access lock.
Values:
-
enumerator kXSPI_ExclusiveAccessLockDisabled#
Write permissions available for all masters based on their MDxACP evaluation.
-
enumerator kXSPI_ExclusiveAccessLockEnabled#
Write permissions revoked for all domains, Any write transaction coming to this flash address will result in an error..
-
enumerator kXSPI_ExclusiveAccessLockExceptMasterId#
Write permissions are revoked for all masters except the master ID specified by FRADn_WORD2[EALO] fields.
-
enumerator kXSPI_ExclusiveAccessLockDisabled#
-
enum _xspi_secure_attribute#
XSPI defines the secure attribute selection criteria for entry into descriptor queue…
Values:
-
enumerator kXSPI_AttributeMasterNonsecureOnly#
Allow the bus attribute for this master to non-secure only
-
enumerator kXSPI_AttributeMasterSecureOnly#
Allow the bus attribute for this master to secure only
-
enumerator kXSPI_AttributeMasterNonsecureSecureBoth#
Allow the bus master’s attribute: Both secure and non-secure
-
enumerator kXSPI_AttributeMasterNonsecureOnly#
-
enum _xspi_descriptor_lock#
Descriptor lock.
Values:
-
enumerator kXSPI_DescriptorLockDisabled#
Descriptor registers can be written by any master
-
enumerator kXSPI_DescriptorLockEnabledTillHardReset#
FRAD descriptor is read-only till next hard reset.
-
enumerator kXSPI_DescriptorLockEnabledExceptMasterId#
Descriptors are read-only. MDnACP fields can be programmed only by the master with ID matching the MID.
-
enumerator kXSPI_DescriptorLockEnabled#
Descriptor registers are read-only.
-
enumerator kXSPI_DescriptorLockDisabled#
-
enum _xspi_target_group#
The enumeration of target group.
Values:
-
enumerator kXSPI_TargetGroup0#
Target groupe queue 0
-
enumerator kXSPI_TargetGroup1#
Target groupe queue 1
-
enumerator kXSPI_TargetGroup0#
-
enum _xspi_subbuffer_division_factor#
Subbuffer division factor.
Values:
-
enumerator kXSPI_Division0#
division factor 0
-
enumerator kXSPI_Division2#
division factor 2 subbuffer size/2
-
enumerator kXSPI_Division4#
division factor 4 subbuffer size/4
-
enumerator kXSPI_Division8#
division factor 8 subbuffer size/8
-
enumerator kXSPI_Division16#
division factor 16 subbuffer size/16
-
enumerator kXSPI_Division0#
-
enum _xspi_ahb_sub_buffer_status#
The enumeration of sub buffer status, empty, full, or partially full.
Values:
-
enumerator kXSPI_AhbSubBufferEmpty#
Current sub buffer is empty.
-
enumerator kXSPI_AhbSubBufferFull#
Current sub buffer is full.
-
enumerator kXSPI_AhbSubBufferPartiallyFull#
Current sub buffer contains some entries.
-
enumerator kXSPI_AhbSubBufferEmpty#
-
enum _xspi_ppw_flag_clear_policy#
The enumeration of XSPI page program waiting flag clear policy.
Values:
-
enumerator kXSPI_SoftwareClearPPWFlag#
Application should clear the flag manually, after check the WIP of external flag is cleared.
-
enumerator kXSPI_HardwareClearPPWFlag#
The flag is cleared by hardware automatically, the variable in type of xspi_device_status_reg_info_t should be defined.
-
enumerator kXSPI_SoftwareClearPPWFlag#
-
enum _xspi_ahb_split_size#
XSPI AHB Split Size These bits are used to control the split size when split function is enabled BFGENCR[SPLITEN] is ‘1’.
Values:
-
enumerator kXSPI_AhbSplitSize8b#
Enable AHB transaction split and split size is 8 bytes.
-
enumerator kXSPI_AhbSplitSize16b#
Enable AHB transaction split and split size is 16 bytes.
-
enumerator kXSPI_AhbSplitSize32b#
Enable AHB transaction split and split size is 32 bytes.
-
enumerator kXSPI_AhbSplitSize64b#
Enable AHB transaction split and split size is 64 bytes.
-
enumerator kXSPI_AhbSplitSizeDisabled#
Disable AHB Transaction Split feature.
-
enumerator kXSPI_AhbSplitSize8b#
-
enum _xspi_ahb_alignment#
XSPI AHB access towards flash is broken if this AHB alignment boundary is crossed. This field is only supported XSPI0 XSPI1.
Values:
-
enumerator kXSPI_AhbAlignmentNoLimit#
no limit
-
enumerator kXSPI_AhbAlignment256BLimit#
256B limit
-
enumerator kXSPI_AhbAlignment512BLimit#
512B limit
-
enumerator kXSPI_AhbAlignment1KBLimit#
1KB limit
-
enumerator kXSPI_AhbAlignmentNoLimit#
-
enum _xspi_ahb_request_suspend_state#
The enumeration of AHB request suspend state.
Values:
-
enumerator kXSPI_AhbRequestNoSuspended#
None of AHB request is suspended.
-
enumerator kXSPI_AhbRequestSuspended#
The AHB request is suspended.
-
enumerator kXSPI_AhbRequestNotApplicable#
The AHB request is not applicable.
-
enumerator kXSPI_AhbReqestResumed#
The AHB request is resumed.
-
enumerator kXSPI_AhbRequestNoSuspended#
-
enum _xspi_otfad_prefetch_boundary#
The enumeration of OTFAD prefetch address boundary.
Values:
-
enumerator kXSPI_OTFADPrefetchNoBoundary#
No prefetch address boundary.
-
enumerator kXSPI_OTFADPrefetchBoundary1K#
Prefetch address boundary is 1K.
-
enumerator kXSPI_OTFADPrefetchNoBoundary#
-
enum _xspi_byte_order#
Byte ordering endianness.
Values:
-
enumerator kXSPI_64BitBE#
64 bit big endian
-
enumerator kXSPI_32BitLE#
32 bit little endian
-
enumerator kXSPI_32BitBE#
32 bit big endian
-
enumerator kXSPI_64BitLE#
64 bit little endian
-
enumerator kXSPI_64BitBE#
-
typedef enum _xspi_lut_instr xspi_lut_instr_t#
CMD definition of XSPI, use to form LUT instruction, xspi_lut_instr_t.
-
typedef enum _xspi_flags xspi_flags_t#
XSPI interrupt status flags.
- Deprecated:
For Error flag please use xspi_error_flag_t as instead, for cmd execution and arbitration flag please use xspi_cmd_execution_arbitration_flag_t as instead.
-
typedef struct _xspi_device_status_reg_info xspi_device_status_reg_info_t#
The structure of external device’s status register information(location, priority).
Note
Only useful when AHB write to flash device is enabled, and use hardware to clear ppw flag.
-
typedef enum _xspi_dll_mode xspi_dll_mode_t#
Dll Mode enumerations.
-
typedef union _xspi_dll_para xspi_dll_para_t#
The union of user custommed DLL parameters, in case of kXSPI_BypassMode bypassModePara is used, in case of kXSPI_AutoUpdateMode autoUpdateModoPara is used.
-
typedef struct _xspi_dll_config xspi_dll_config_t#
The structure of Delay-lock-loop configuration.
-
typedef enum _xspi_sample_clk_source xspi_sample_clk_source_t#
The enumeration of sample clock source which is used to sample data from external devices.
Note
If external device support Data strobe signal, the sample clock should selected as kXSPI_SampleClkFromExternalDQS.
-
typedef enum _xspi_data_learning_pad_select xspi_data_learning_pad_select_t#
The selection of data learning pad.
-
typedef struct _xspi_data_learning_config xspi_data_learning_config_t#
The configuration of data learning.
Note
Data learning feature only supported in the DQS sampling method(kXSPI_SampleClkFromExternalDQS).
-
typedef struct _xspi_sample_clk_config xspi_sample_clk_config_t#
Sample clock configuration, which used to sample data from external device.
-
typedef enum _xspi_device_addr_mode xspi_device_addr_mode_t#
External device’s address mode.
-
typedef enum _xspi_device_interface_type xspi_device_interface_type_t#
The enumeration of external device’s interface type, hyper bus or SPI(including strandard and extended).
Note
Different interface result different settings.
-
typedef enum _xspi_hyper_bus_x16_mode xspi_hyper_bus_x16_mode_t#
The enumeration of hyper bus X16 mode.
-
typedef union _xspi_device_interface_settings xspi_device_interface_settings_t#
The union of external device’s settings, if external device following hyper bus protocol #hyperBusSettings take effects, if external device following SPI protocol #strandardExtendedSPISettings take effects.
-
typedef enum _xspi_ddr_data_aligned_clk xspi_ddr_data_aligned_clk_t#
Enumeration defining the alignment modes of XSPI DDR data with respect to the internal reference clock.
-
typedef struct _xspi_device_ddr_config xspi_device_ddr_config_t#
The structure of device DDR configuration.
-
typedef struct _xspi_device_config xspi_device_config_t#
External device configuration items.
-
typedef enum _xspi_command_type xspi_command_type_t#
Command type.
-
typedef enum _xspi_mdad_mask_type xspi_mdad_mask_type_t#
The enumeration of SFP MDAD mask type.
-
typedef enum _xspi_mdad_error_reason xspi_mdad_error_reason_t#
The enumeration of MDAD error reasons.
-
typedef enum _xspi_exclusive_access_lock_mode xspi_exclusive_access_lock_mode_t#
Exclusive access lock.
-
typedef enum _xspi_secure_attribute xspi_secure_attribute_t#
XSPI defines the secure attribute selection criteria for entry into descriptor queue…
-
typedef struct _xspi_mdad_config xspi_mdad_config_t#
MDAD configuration.
-
typedef struct _xspi_sfp_mdad_config xspi_sfp_mdad_config_t#
The structure of SFP MDAD configurations for all target groups.
-
typedef enum _xspi_descriptor_lock xspi_descriptor_lock_t#
Descriptor lock.
-
typedef struct _xspi_frad_tg_config xspi_frad_tg_config_t#
FRAD configuration.
-
typedef struct _xspi_frad_config_t xspi_frad_config_t#
FRAD configuration.
-
typedef struct _xspi_sfp_frad_config xspi_sfp_frad_config_t#
The structure of SFP FRAD configurations.
-
typedef struct _xspi_frad_transaction_info xspi_frad_transaction_info_t#
The structure of latest FRAD transaction information.
-
typedef struct _xspi_ip_access_config xspi_ip_access_config_t#
Configurations of IP access(including IP read and write).
-
typedef enum _xspi_target_group xspi_target_group_t#
The enumeration of target group.
-
typedef struct _xspi_tg_add_write_status xspi_tg_add_write_status_t#
The status of latest target group address write operation.
-
typedef struct _xspi_transfer xspi_transfer_t#
Transfer structure used for XSPI functional interface.
-
typedef struct _xspi_handle xspi_handle_t#
-
typedef void (*xspi_transfer_callback_t)(XSPI_Type *base, xspi_handle_t *handle, status_t status, void *userData)#
XSPI transfer callback function.
-
typedef enum _xspi_subbuffer_division_factor xspi_subbuffer_division_factor_t#
Subbuffer division factor.
-
typedef struct _xspi_ahbBuffer_sub_buffer_config xspi_ahbBuffer_sub_buffer_config_t#
The structure of sub-buffer configurations.
-
typedef struct _xspi_ahbBuffer_config xspi_ahbBuffer_config_t#
Structure of AHB buffer configurations.
Note
When an AHB read access comes it is assigned to a buffer based on its master ID. Then it further assigned to a sub-buffer based on which sub-buffer address range this transaction lies into.
Note
When sub-buffer division is hit, in case of a buffer miss the controller will fetch the data equal to the size of that sub-buffer.
Note
If sub-buffer division is enabled for a buffer the hit/miss check is done at sub-buffer level. And if prefetch is enable, the prefetch takes place for individual sub-buffers.
-
typedef enum _xspi_ahb_sub_buffer_status xspi_ahb_sub_buffer_status_t#
The enumeration of sub buffer status, empty, full, or partially full.
-
typedef struct _xspi_ahbBuffer_perf_monitor_result xspi_ahbBuffer_perf_monitor_result_t#
The result of AHB buffer performance monitor, including buffer miss count and buffer hit count.
-
typedef enum _xspi_ppw_flag_clear_policy xspi_ppw_flag_clear_policy_t#
The enumeration of XSPI page program waiting flag clear policy.
-
typedef struct _xspi_ahb_write_config xspi_ahb_write_config_t#
The configuration of AHB write access.
-
typedef enum _xspi_ahb_split_size xspi_ahb_split_size_t#
XSPI AHB Split Size These bits are used to control the split size when split function is enabled BFGENCR[SPLITEN] is ‘1’.
-
typedef enum _xspi_ahb_alignment xspi_ahb_alignment_t#
XSPI AHB access towards flash is broken if this AHB alignment boundary is crossed. This field is only supported XSPI0 XSPI1.
-
typedef struct _xspi_ahb_access_config xspi_ahb_access_config_t#
The structure of AHB access configurations, including AHB buffer settings, AHB Read Seq ID, AHB write settings.
-
typedef struct _xspi_ahb_read_error_info xspi_ahb_read_error_info_t#
The structure of information when AHB read error occur.
-
typedef enum _xspi_ahb_request_suspend_state xspi_ahb_request_suspend_state_t#
The enumeration of AHB request suspend state.
-
typedef struct _xspi_ahb_request_suspend_info xspi_ahb_request_suspend_info_t#
The structure of information when AHB reqest is suspended.
-
typedef enum _xspi_otfad_prefetch_boundary xspi_otfad_prefetch_boundary_t#
The enumeration of OTFAD prefetch address boundary.
-
typedef enum _xspi_byte_order xspi_byte_order_t#
Byte ordering endianness.
-
typedef struct _xspi_config xspi_config_t#
XSPI configuration structure.
-
FSL_XSPI_DRIVER_VERSION#
-
XSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1)#
Formula to form XSPI instructions in LUT table.
-
XSPI_TARGET_GROUP_COUNT#
-
XSPI_SFP_FRAD_COUNT#
-
XSPI_TG_REG_ADDR(base, tg, reg)#
-
XSPI_TG_REG_VAL(base, tg, reg)#
-
XSPI_TG_REG_ADDR_RBDR(base, tg)#
-
XSPI_TG_REG_VAL_RBDR_INDEX(base, tg, i)#
-
XSPI_TG_REG_ADDR_INT_EN(base, tg)#
-
XSPI_TG_REG_ADDR_RSER(base, tg)#
-
XSPI_IP_RX_BUFFER_SIZE#
-
XSPI_IP_TX_BUFFER_SIZE#
-
uint32_t XSPI_GetInstance(XSPI_Type *base)#
Get the instance number for XSPI.
- Parameters:
base – XSPI base pointer.
-
status_t XSPI_CheckAndClearErrorTG(XSPI_Type *base, xspi_target_group_t tgId, uint32_t status)#
Check and clear IP command execution errors.
- Parameters:
base – XSPI base pointer.
tgId – Specify the target group.
status – interrupt status.
-
void XSPI_Init(XSPI_Type *base, const xspi_config_t *ptrConfig)#
Initializes the XSPI module and internal state.
This function configures the XSPI with the input configure parameters. Users should call this function before any XSPI operations.
- Parameters:
base – XSPI peripheral base address.
ptrConfig – XSPI configure structure.
-
void XSPI_GetDefaultConfig(xspi_config_t *ptrConfig)#
Gets default settings for XSPI.
Warning
The parameter devconfig will be removed in next release.
- Parameters:
base – XSPI peripheral base address.
ptrConfig – XSPI configuration structure.
-
void XSPI_Deinit(XSPI_Type *base)#
Deinitialize the XSPI module.
Clears the XSPI state and XSPI module registers.
- Parameters:
base – XSPI peripheral base address.
devconfig – Flash configuration parameters.
-
void XSPI_UpdateLUT(XSPI_Type *base, uint8_t index, const uint32_t *cmd, uint8_t count)#
Updates the LUT table.
- Parameters:
base – XSPI peripheral base address.
index – From which index start to update. It could be any index of the LUT table, which also allows user to update command content inside a command. Each command consists of up to 10 instructions and occupy 5*32-bit memory.
cmd – Command sequence array.
count – Number of instruction-operand pairs
-
static inline void XSPI_UpdateByteOrder(XSPI_Type *base, xspi_byte_order_t byteOrder)#
-
static inline void XSPI_EnableModule(XSPI_Type *base, bool enable)#
Enable or disable the XSPI module.
- Parameters:
base – XSPI peripheral base address.
enable – true means enable XSPI, false means disable.
-
static inline bool XSPI_CheckModuleEnabled(XSPI_Type *base)#
Check if the XSPI module is enabled.
- Parameters:
base – XSPI peripheral base address.
- Return values:
true – XSPI module is enabled.
false – XSPI module is disabled.
-
void XSPI_ResetSfmAndAhbDomain(XSPI_Type *base)#
Reset Serial flash memory domain and AHB domain at the same time.
Note
Resetting only the Serial flash memory domain and AHB domain may cause undesirable side effects.
- Parameters:
base – XSPI peripheral base address.
-
static inline void XSPI_ResetTgQueueTG(XSPI_Type *base, xspi_target_group_t tgId)#
Reset IPS target group queue.
- Parameters:
base – XSPI peripheral base address.
tgId – Target group ID.
-
static inline void XSPI_SoftwareReset(XSPI_Type *base)#
Software reset flash memory domain, AHB domain, and Target group at the same time.
- Parameters:
base – XSPI peripheral base address.
-
static inline bool XSPI_CheckGlobalConfigLocked(XSPI_Type *base)#
Check if write access to registers(MGC, MRC, MTO, SFP_ARB_TIMEOUT, SFP_LUT_ENn, LUTn, BFGENCR) is locked.
- Parameters:
base – XSPI peripheral base address.
- Return values:
false – Write access to listed registers is not locked.
true – Write access to listed registers is locked.
-
void XSPI_SetHyperBusX16Mode(XSPI_Type *base, xspi_hyper_bus_x16_mode_t x16Mode)#
Set Hyper bus X16 mode.
- Parameters:
base – XSPI peripheral base address.
x16Mode – Specify X16 mode.
-
status_t XSPI_UpdateDeviceAddrMode(XSPI_Type *base, xspi_device_addr_mode_t addrMode)#
Update address mode to access external device.
- Parameters:
base – XSPI peripheral base address.
addrMode – Specify the address mode to update.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail to update address mode due to AHB read access asserted.
kStatus_XSPI_IPAccessAsserted – Fail to update address mode due to a IP access already asserted.
kStatus_XSPI_AhbWriteAccessAsserted – Fail to update address mode due to AHB write access asserted.
kStatus_Success – Successfully to update address mode.
-
static inline void XSPI_EnableVariableLatency(XSPI_Type *base, bool enable)#
Enable/disable variable latency for XSPI.
Note
Only useful for hyper bus device.
Note
It is application responsibility to enable variable latency for external hyper bus device(by change device’s register).
- Parameters:
base – XSPI peripheral base address.
enable – Specify operation:
true Enable variable latency;
false Disable variable latency.
-
static inline void XSPI_EnableDozeMode(XSPI_Type *base, bool enable)#
Enable/disable Doze mode for XSPI controller.
Note
Once doze mode is enabled, the XSPI controller will enter disable mode when system in low power modes.
- Parameters:
base – XSPI peripheral base address
enable – Specify operation:
true Enable Doze mode;
false Disable Doze mode.
-
static inline void XSPI_SetSignalOutputValue(XSPI_Type *base, uint32_t signalMask, bool outputLogic)#
Specify the logic level of the XSPI IOFA[3] and IOFA[2] output in the inactive state.
- Parameters:
base – XSPI peripheral base address
signalMask – Should be the OR’ed value of _xspi_external_signal.
outputLogic – Output logic of selected signals,
false Output logic 0;
true Output logic 1.
-
static inline void XSPI_EnableInvertedSerialClockOutput(XSPI_Type *base, bool enable)#
Enable/disable inverted serial clock output for XSPI controller.
Note
It is application responsibility to enable CLKn for external device(by change device’s register).
- Parameters:
base – [in] XSPI peripheral base address
enable – [in] Enable/disable inverted serial clock output:
true Enable inverted serial clock output;
false Disable inverted serial clock output.
-
void XSPI_UpdateDllValue(XSPI_Type *base, xspi_dll_config_t *ptrDllConfig, bool enableDDR, bool enableX16Mode, uint32_t xspiRootClk)#
Update DLL configuration.
- Parameters:
base – [in] XSPI peripheral base address.
ptrDllConfig – [in] Pointer to the DLL configuration.
enableDDR – [in] DDR mode is enabled or not.
enableX16Mode – [in] X16 mode is enabled or not.
xspiRootClk – [in] The frequency of xspi root clock, the unit is Hz.
-
status_t XSPI_SetDataLearningConfig(XSPI_Type *base, xspi_data_learning_config_t *ptrDataLearningConfig)#
Set Data learning configurations.
- Parameters:
base – [in] XSPI peripheral base address.
ptrDataLearningConfig – [in] Pointer to data learning configuration.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail to set data learning configuration due to AHB read access asserted.
kStatus_XSPI_IPAccessAsserted – Fail to set data learning configuration due to a IP access already asserted.
kStatus_XSPI_AhbWriteAccessAsserted – Fail to set data learning configuration due to AHB write access asserted.
kStatus_Success – Successfully to set Data learning configurations.
-
static inline bool XSPI_CheckDataLearningFailure(XSPI_Type *base)#
Check if data learning failure has detected.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – Data learning has failed.
false – Data learning not fail.
-
static inline void XSPI_GetDataLearningEdgeMatchSignature(XSPI_Type *base, uint8_t *posEdgeMatch, uint8_t *negEdgeMatch)#
Get data learning positive and negative edge match signature.
- Parameters:
base – [in] XSPI peripheral base address.
posEdgeMatch – [out] Pointer to the memory to store positive edge match signature.
negEdgeMatch – [out] Pointer to the memory to store negative edge match signature.
-
status_t XSPI_SetDeviceConfig(XSPI_Type *base, xspi_device_config_t *devConfig)#
Set device configuration.
- Parameters:
base – [in] XSPI peripheral base address.
devConfig – [in] Pointer to device configuration.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail to set device configuration due to AHB read access asserted.
kStatus_XSPI_IPAccessAsserted – Fail to set device configuration due to a IP access already asserted.
kStatus_XSPI_AhbWriteAccessAsserted – Fail to set device configuration due to AHB write access asserted.
kStatus_Success – Successfully to set device configurations.
-
static inline void XSPI_EnableInterruptsTG(XSPI_Type *base, xspi_target_group_t tgId, uint64_t mask)#
Enables the XSPI interrupts for specific target group.
- Parameters:
base – XSPI peripheral base address.
tgId – Target group ID.
mask – XSPI interrupt source mask.
-
static inline void XSPI_DisableInterruptsTG(XSPI_Type *base, xspi_target_group_t tgId, uint64_t mask)#
Disables the XSPI interrupts for specific target group.
- Parameters:
base – XSPI peripheral base address.
tgId – Target group ID.
mask – XSPI interrupt source mask.
-
static inline void XSPI_EnableTxDMATG(XSPI_Type *base, xspi_target_group_t tgId, bool enable)#
Enables or disables XSPI IP Tx FIFO DMA requests for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
enable – [in] Enable flag for transmit DMA request. Pass true for enable, false for disable.
-
static inline void XSPI_EnableRxDMATG(XSPI_Type *base, xspi_target_group_t tgId, bool enable)#
Enables or disables XSPI IP Rx FIFO DMA requests for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
enable – [in] Enable flag for receive DMA request. Pass true for enable, false for disable.
-
static inline uint32_t XSPI_GetTxFifoAddressTG(XSPI_Type *base, xspi_target_group_t tgId)#
Gets XSPI IP tx fifo address for DMA transfer for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Returns:
The tx fifo address for the target group.
-
static inline uint32_t XSPI_GetRxFifoAddressTG(XSPI_Type *base, xspi_target_group_t tgId)#
Gets XSPI IP rx fifo address for DMA transfer for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Returns:
The rx fifo address for the target group.
-
static inline uint32_t XSPI_GetErrorStatusFlagsTG(XSPI_Type *base, xspi_target_group_t tgId)#
Get error status flags for specific target group.
- Parameters:
base – XSPI peripheral base address.
tgId – Target group ID.
- Returns:
All asserted error status flags for the target group. Should be the OR’ed value of xspi_error_flag_t.
-
static inline void XSPI_ClearErrorStatusFlagsTG(XSPI_Type *base, xspi_target_group_t tgId, uint32_t flags)#
Clear input error status flags for specific target group.
- Parameters:
base – XSPI peripheral base address.
tgId – Target group ID.
flags – Error flags to clear. Should be the OR’ed value of xspi_error_flag_t.
-
static inline bool XSPI_CheckIpRequestGrantedTG(XSPI_Type *base, xspi_target_group_t tgId)#
Check if the IP access request was granted access for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Return values:
true – The IP access is granted arbitration for the target group.
false – No IP access is queued for the target group.
-
static inline bool XSPI_GetBusIdleStatusTG(XSPI_Type *base, xspi_target_group_t tgId)#
Return whether the bus is idle for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Return values:
true – Bus is idle for the target group.
false – Bus is busy for the target group.
-
static inline uint32_t XSPI_GetCmdExecutionArbitrationStatusFlagsTG(XSPI_Type *base, xspi_target_group_t tgId)#
Get asserted flags about SFM command execution and arbitration for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Returns:
The assert flags about SFM command execution and arbitration for the target group. should be the OR’ed value of xspi_cmd_execution_arbitration_flag_t.
-
static inline void XSPI_ClearCmdExecutionArbitrationStatusFlagsTG(XSPI_Type *base, xspi_target_group_t tgId, uint32_t flags)#
Clear asserted flags about SFM command execution and arbitration for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
flags – [in] The mask of flags to clear.
-
static inline bool XSPI_GetBusIdleStatus(XSPI_Type *base)#
Return whether the bus is idle.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – Bus is idle.
false – Bus is busy.
-
static inline bool XSPI_CheckAhbReadAccessAsserted(XSPI_Type *base)#
Check if AHB read access has been requested or is ongoing.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – AHB read access is requested or is ongoing.
false – AHB read access is not requested and is not ongoing.
-
static inline bool XSPI_CheckAhbWriteAccessAsserted(XSPI_Type *base)#
Check if AHB write access has been requested or is ongoing.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – AHB read access is requested or is ongoing.
false – AHB read access is not requested and is not ongoing.
-
static inline void XSPI_ResetTxRxBufferTG(XSPI_Type *base, xspi_target_group_t tgId, bool txFifo, bool rxFifo)#
Clear the XSPI IP TX/RX buffer logic.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
txFifo – [in] Pass true to reset TX FIFO.
rxFifo – [in] Pass true to reset RX FIFO.
-
static inline void XSPI_ClearTxBufferTG(XSPI_Type *base, xspi_target_group_t tgId)#
Clear TX buffer for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
-
static inline bool XSPI_CheckTxBuffLockOpenTG(XSPI_Type *base, xspi_target_group_t tgId)#
Check if IP manager can write to TX buffer for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Return values:
true – Tx buffer lock is open.
false – Tx buffer lock is not open.
-
static inline void XSPI_WriteTxBufferTG(XSPI_Type *base, xspi_target_group_t tgId, uint32_t data)#
Writes data into IPS TX Buffer for specific target group.
- Parameters:
base – [in] XSPI peripheral base address
tgId – [in] Target group ID.
data – [in] The data bytes to send.
-
status_t XSPI_UpdateTxBufferWaterMarkTG(XSPI_Type *base, xspi_target_group_t tgId, uint32_t waterMark)#
Update watermark for TX buffer.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
waterMark – [in] The watermark to set, the unit is byte, should be the multiple of 4 byte.
- Return values:
kStatus_XSPI_IPAccessAsserted – Fail to update watermark for Tx buffer, due to IP access is asserted.
kStatus_XSPI_WaterMarkIllegal – Fail to update watermark for Tx buffer, due to input watermark is not the multiple of 4 bytes.
kStatus_Success – Successful to update watermark.
-
static inline void XSPI_ClearRxBufferTG(XSPI_Type *base, xspi_target_group_t tgId)#
Clear RX buffer for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
-
static inline uint32_t XSPI_ReadRxBufferTG(XSPI_Type *base, xspi_target_group_t tgId, uint8_t fifoIndex)#
Receive data from IPX RX FIFO for specific target group.
- Parameters:
base – [in] XSPI peripheral base address
tgId – [in] Target group ID.
fifoIndex – [in] Source fifo index.
- Returns:
The data in the FIFO.
-
static inline void XSPI_TriggerRxBufferPopEventTG(XSPI_Type *base, xspi_target_group_t tgId)#
Trigger a pop event for RX buffer pop event for specific target group.
Note
Each pop event discard watermark + 1 enties from RX buffer.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
-
static inline bool XSPI_CheckRxBufferWaterMarkExceedTG(XSPI_Type *base, xspi_target_group_t tgId)#
Check if RX buffer watermark is exceed for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Return values:
true – The RX buffer watermark has been excceded.
false – The RX buffer watermark has not been exceeded.
-
static inline uint32_t XSPI_GetRxBufferAvailableBytesCountTG(XSPI_Type *base, xspi_target_group_t tgId)#
Get RX buffer aviailable bytes count for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Returns:
The available counts if bytes in RX buffer.
-
static inline uint32_t XSPI_GetRxBufferRemovedBytesCountTG(XSPI_Type *base, xspi_target_group_t tgId)#
Get counts of bytes already removed from RX buffer for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Returns:
Counts of removed bytes.
-
static inline bool XSPI_CheckIpWriteTriggeredTG(XSPI_Type *base, xspi_target_group_t tgId)#
Check if IP write access is triggered for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Return values:
true – The IP write access is granted arbitration.
false – No IP write access is queued.
-
static inline bool XSPI_CheckIpReadTriggeredTG(XSPI_Type *base, xspi_target_group_t tgId)#
Check if IP read access is triggered for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Return values:
true – The IP read access is granted arbitration.
false – No IP read access is queued.
-
static inline bool XSPI_CheckFSMValidTG(XSPI_Type *base, xspi_target_group_t tgId)#
Check if IPS transfer is granted arbitration or execution for specific target group.
Note
The FSMSTAT[VLD] goes to 0 once the IPS transfer is completed and XSPI is IDLE.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Return values:
true – Valid, the IPS transfer is granted arbitration or execution.
false – Not valid, no IPS transfer is queued.
-
static inline bool XSPI_CheckIPAccessAssertedTG(XSPI_Type *base, xspi_target_group_t tgId)#
Check if IP access is asserted for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Target group ID.
- Return values:
false – The Access triggered by IP bus is not asserted.
true – The Access triggered by IP bus is asserted.
-
static inline bool XSPI_CheckIPAccessAsserted(XSPI_Type *base)#
Check if IP access is asserted.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
false – The Access triggered by IP bus is not asserted.
true – The Access triggered by IP bus is asserted.
-
status_t XSPI_UpdateRxBufferWaterMarkTG(XSPI_Type *base, xspi_target_group_t tgId, uint32_t waterMark)#
Update watermark for RX buffer.
Set watermark as 4 bytes: XSPI_UpdateRxBufferWaterMarkTG(XSPI0, tgId, 4UL); Set watermark as 8 bytes: XSPI_UpdateRxBufferWaterMarkTG(XSPI0, tgId, 8UL);
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Specify the target group.
waterMark – [in] Specify the number of bytes in the RX buffer which causes XSPI to assert the watermark exceeded flag, should be in multiple of 4 bytes.
- Return values:
kStatus_XSPI_IPAccessAsserted – Fail to update watermark for Rx buffer, due to IP access is asserted.
kStatus_XSPI_WaterMarkIllegal – Fail to update watermark for Tx buffer, due to input watermark is not the multiple of 4 bytes.
kStatus_Success – Successful to update watermark.
-
void XSPI_SetSFPFradEALModeTG(XSPI_Type *base, xspi_target_group_t tgId, xspi_exclusive_access_lock_mode_t ealMode, uint8_t fradId)#
Set exclusive access lock mode for the specific frad.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Specify the target group.
ealMode – [in] Specify the exclusive access lock mode.
fradId – [in] Specify the frad.
-
void XSPI_GetFradLastTransactionsInfo(XSPI_Type *base, xspi_target_group_t tgId, xspi_frad_transaction_info_t *ptrInfo, uint8_t fradId)#
Get FARD latest transaction information.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Specify the target group.
ptrInfo – [out] Pointer to the variable in type of xspi_frad_transaction_info_t to store information.
fradId – [in] Specify the frad Id.
-
void XSPI_UpdateSFPConfig(XSPI_Type *base, xspi_sfp_mdad_config_t *ptrSfpMdadConfig, xspi_sfp_frad_config_t *ptrSfpFradConfig)#
Update SFP configurations, including MDAD configurations and FRAD configurations.
- Parameters:
base – [in] XSPI peripheral base address.
ptrMdadConfig – [in] Pointer to the SFP MDAD configuration.
ptrFradConfig – [in] Pointer to the SFP FRAD configuration.
-
static inline bool XSPI_CheckSFPFradEnabled(XSPI_Type *base)#
Check if SFP FRAD check is enabled for IP write access.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
false – SFP FRAD check is disabled.
true – SFP FRAD check is enabled for IP write access.
-
xspi_mdad_error_reason_t XSPI_GetMdadErrorReason(XSPI_Type *base, xspi_target_group_t tgId)#
Get MDAD check error reason for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Specify the target group.
- Returns:
The details of MDAD error reason, in type of xspi_mdad_error_reason_t.
-
status_t XSPI_UpdateSFPArbitrationLockTimeoutCounter(XSPI_Type *base, uint32_t countValue)#
Update SFP arbitration lock timeout counter.
Note
The SFP arbitration lock time out counter starts when Page program wait flag asserted.
- Parameters:
base – [in] XSPI peripheral base address.
countValue – [in] The count value, specify the time in IPS clock cycles.
- Return values:
kStatus_XSPI_RegWriteLocked – Write operation to related register is locked.
kStatus_Success – Success to update timeout counter.
-
void XSPI_ClearTgAddrWriteStatus(XSPI_Type *base, xspi_target_group_t tgId)#
Clear address write status for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Specify the target group to clear address write status.
-
void XSPI_GetTgAddrWriteStatus(XSPI_Type *base, xspi_target_group_t tgId, xspi_tg_add_write_status_t *ptrStatus)#
Get address write status for specific target group.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Specify the target group.
ptrStatus – [out] Pointer to the variable in type of xspi_tg_add_write_status_t to store address write status.
-
void XSPI_UnlockIpAccessArbitrationTG(XSPI_Type *base, xspi_target_group_t tgId)#
Unlock Ip access arbitration.
- Parameters:
base – [in] XSPI peripheral base address.
tgId – [in] Specify the target group.
-
static inline void XSPI_ClearIPAccessSeqPointer(XSPI_Type *base)#
Clear Ip access sequence pointer.
- Parameters:
base – [in] XSPI peripheral base address.
-
status_t XSPI_UpdateIPAccessTimeoutCounter(XSPI_Type *base, uint32_t countValue)#
Update the count of SFP access timeout counter.
Note
The counter starts when any IP access pass SFP check(if enabled), and request is granted by XSPI arbiter and XSPI is IDLE.
Note
The counter does not start in case of IP access was granted by XSPI is not IDLE.
- Parameters:
base – XSPI peripheral base address.
countValue – The count value, specify the time in IPS clock cycles.
- Return values:
kStatus_XSPI_RegWriteLocked – Write operation to related register is locked.
kStatus_Success – Success to update timeout counter.
-
status_t XSPI_StartIpAccess(XSPI_Type *base, uint32_t addr, uint8_t seqIndex, size_t byteSize, xspi_target_group_t tgId, bool lockArbitration)#
Start IP access(including read and write) in blocking way.
- Parameters:
base – [in] XSPI peripheral base address.
addr – [in] Address of external device to read/write.
seqIndex – [in] Sequence Id of the pre-programmed LUT.
byteSize – [in] Size of data to read/write, the unit of byte.
tgId – [in] Specify the target group used to write/read.
lockArbitration – [in] Lock arbitration or not.
- Return values:
kStatus_XSPI_IpAccessAddrSettingInvalid – Wrong Address input.
kStatus_XSPI_IpAccessIPCRInvalid – Wrong seqindex or bytesize input.
kStatus_Success – Success to start Ip access.
-
status_t XSPI_StartIpAccessNonBlocking(XSPI_Type *base, uint32_t addr, uint8_t seqIndex, size_t byteSize, xspi_target_group_t tgId, bool lockArbitration)#
Start IP access in non-blocking way.
- Parameters:
base – [in] XSPI peripheral base address.
addr – [in] Address of external device to read/write.
seqIndex – [in] Sequence Id of the pre-programmed LUT.
byteSize – [in] Size of data to transfer, the unit of byte.
tgId – [in] Specify the target group to use.
lockArbitration – [in] Lock arbitration or not.
- Return values:
kStatus_Success – Success to start Ip access.
kStatus_XSPI_IpAccessIPCRInvalid – Invalid to set IPCR register.
kStatus_XSPI_IpAccessAddrSettingInvalid – Invalid to set SFAR register.
-
status_t XSPI_SetIpAccessConfig(XSPI_Type *base, xspi_ip_access_config_t *ptrIpAccessConfig)#
Set IP access configurations, including SFP configurations, sfp arbitration lock timeout value, Ip access timeout value.
- Parameters:
base – [in] XSPI peripheral base address.
ptrIpAccessConfig – [in] Pointer to the variable which contains Ip access configurations.
- Return values:
kStatus_XSPI_RegWriteLocked – Write operation to related register is locked.
kStatus_Success – Success to update timeout counter.
-
status_t XSPI_WriteBlockingTG(XSPI_Type *base, xspi_target_group_t tgId, uint8_t *buffer, size_t size)#
Sends a buffer of data bytes using blocking method for specific target group.
Note
This function blocks via polling until all bytes have been sent.
- Parameters:
base – XSPI peripheral base address
tgId – Target group ID
buffer – The data bytes to send
size – The number of data bytes to send
- Return values:
kStatus_Success – write success without error
kStatus_XSPI_SequenceExecutionTimeout – sequence execution timeout
kStatus_XSPI_IpCommandSequenceError – IP command sequence error detected
kStatus_XSPI_IpCommandGrantTimeout – IP command grant timeout detected
-
status_t XSPI_ReadBlockingTG(XSPI_Type *base, xspi_target_group_t tgId, uint8_t *buffer, size_t size)#
Receives a buffer of data bytes using a blocking method for specific target group.
Note
This function blocks via polling until all bytes have been sent.
- Parameters:
base – XSPI peripheral base address
tgId – Target group ID
buffer – The data bytes to send
size – The number of data bytes to receive
- Return values:
kStatus_Success – read success without error
kStatus_XSPI_SequenceExecutionTimeout – sequence execution timeout
kStatus_XSPI_IpCommandSequenceError – IP command sequence error detected
kStatus_XSPI_IpCommandGrantTimeout – IP command grant timeout detected
-
void XSPI_TransferCreateHandle(XSPI_Type *base, xspi_handle_t *handle, xspi_transfer_callback_t callback, void *userData, xspi_target_group_t targetGroup)#
Initializes the XSPI handle for specific target group which is used in transactional functions.
- Parameters:
base – XSPI peripheral base address.
handle – pointer to xspi_handle_t structure to store the transfer state.
callback – pointer to user callback function.
userData – user parameter passed to the callback function.
targetGroup – target group ID for this handle.
-
status_t XSPI_TransferBlocking(XSPI_Type *base, xspi_transfer_t *xfer)#
Execute command to transfer a buffer data bytes using a blocking method.
Note
In case of flash page program, if WEL(Write enable) automatically cleared after program operation, then WEL should be asserted before invoking this API and the transfer size should not bigger than page size.
- Parameters:
base – [in] XSPI peripheral base address
xfer – [in] pointer to the transfer structure.
- Return values:
kStatus_Success – command transfer success without error
kStatus_XSPI_SequenceExecutionTimeout – sequence execution timeout
kStatus_XSPI_IpCommandSequenceError – IP command sequence error detected
kStatus_XSPI_IpCommandGrantTimeout – IP command grant timeout detected
-
status_t XSPI_TransferNonBlocking(XSPI_Type *base, xspi_handle_t *handle, xspi_transfer_t *xfer)#
Perform a interrupt non-blocking transfer on the XSPI bus.
Note
Calling the API returns immediately after transfer initiates. The user needs to call XSPI_GetTransferCount to poll the transfer status to check whether the transfer is finished. If the return status is not kStatus_XSPI_Busy, the transfer is finished. For XSPI_Read, the dataSize should be multiple of rx watermark level, or XSPI could not read data properly.
- Parameters:
base – [in] XSPI peripheral base address.
handle – [in] pointer to xspi_handle_t structure which stores the transfer state.
xfer – [in] pointer to xspi_transfer_t structure.
- Return values:
kStatus_Success – Successfully start the data transmission.
kStatus_XSPI_Busy – Previous transmission still not finished.
-
status_t XSPI_TransferGetCount(XSPI_Type *base, xspi_handle_t *handle, size_t *count)#
Get the master transfer status during a interrupt non-blocking transfer.
- Parameters:
base – [in] XSPI peripheral base address.
handle – [in] pointer to xspi_handle_t structure which stores the transfer state.
count – [out] Number of bytes transferred so far by the non-blocking transaction.
- Return values:
kStatus_InvalidArgument – count is Invalid.
kStatus_Success – Successfully return the count.
-
void XSPI_TransferAbort(XSPI_Type *base, xspi_handle_t *handle)#
Abort an interrupt non-blocking transfer early.
Note
This API can be called at any time when an interrupt non-blocking transfer initiates to abort the transfer early.
- Parameters:
base – [in] XSPI peripheral base address.
handle – [in] pointer to xspi_handle_t structure which stores the transfer state
-
static inline void XSPI_ClearAhbBuffer(XSPI_Type *base)#
Blocks to clear AHB buffer and abort ongoing prefetch transaction(if prefetch is enabled.)
Note
The function return only after all AHB buffer pointers are cleared.
- Parameters:
base – [in] XSPI peripheral base address.
-
status_t XSPI_EnableAhbBufferWriteFlush(XSPI_Type *base, bool enable)#
Enable/disable the clearing of AHB read prefetch buffers when the same flash address is written by an AHB or IP command.
- Parameters:
base – [in] XSPI peripheral base address.
enable – [in] Used to enable/disable write flush.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted.
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted.
kStatus_Success – Successfully to enable/disable AHB buffer write flush.
-
status_t XSPI_SetAhbBufferConfig(XSPI_Type *base, xspi_ahbBuffer_config_t *ptrBuffer0Config, xspi_ahbBuffer_config_t *ptrBuffer1Config, xspi_ahbBuffer_config_t *ptrBuffer2Config, xspi_ahbBuffer_config_t *ptrBuffer3Config)#
Set AHB buffer configurations.
- Parameters:
base – [in] XSPI peripheral base address.
ptrBuffer0Config – [in] Pointer to the variable which contain buffer0 configurations.
ptrBuffer1Config – [in] Pointer to the variable which contain buffer1 configurations.
ptrBuffer2Config – [in] Pointer to the variable which contain buffer2 configurations.
ptrBuffer3Config – [in] Pointer to the variable which contain buffer3 configurations.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted.
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted.
kStatus_Success – Success to set AHB buffer configurations.
-
status_t XSPI_UpdateAhbBufferSize(XSPI_Type *base, uint16_t buf0Size, uint16_t buf1Size, uint16_t buf2Size, uint16_t buf3Size)#
Set Buffer size for all 4 AHB buffers.
- Parameters:
base – [in] XSPI peripheral base address.
buf0Size – [in] Specify size of AHB buffer0, range of 512, 256, 128, 64, 32, 16, 8, 4, 2, 0.
buf1Size – [in] Specify size of AHB buffer1, range of 512, 256, 128, 64, 32, 16, 8, 4, 2, 0.
buf2Size – [in] Specify size of AHB buffer2, range of 512, 256, 128, 64, 32, 16, 8, 4, 2, 0.
buf3Size – [in] Specify size of AHB buffer3, range of 512, 256, 128, 64, 32, 16, 8, 4, 2, 0.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted.
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted.
kStatus_Success – Success to set AHB buffer size.
-
xspi_ahb_sub_buffer_status_t XSPI_GetAhbSubBufferStatus(XSPI_Type *base, uint8_t ahbBufferId, uint8_t subBufferId)#
Get status of AHB sub buffer.
Note
This function only useful when sub-division feature of the selected AHB buffer is enabled.
- Parameters:
base – [in] XSPI peripheral base address.
ahbBufferId – [in] The Id of AHB buffer, range from 0 to 3.
subBufferId – [in] The Id of AHB buffer sub division, range from 0 to 3.
- Returns:
Current status of selected AHB sub buffer, in type of xspi_ahb_sub_buffer_status_t.
-
static inline void XSPI_StartAhbBufferPerfMonitor(XSPI_Type *base)#
Start AHB buffer performance monitor.
- Parameters:
base – [in] XSPI peripheral base address.
-
void XSPI_EnableAhbBufferPerfMonitor(XSPI_Type *base, uint8_t ahbBufferId, uint8_t subBufferId)#
Enable AHB buffer performance monitor for selected AHB buffer’s sub buffer.
- Parameters:
base – [in] XSPI peripheral base address.
ahbBufferId – [in] Specify the selected AHB buffer.
subBufferId – [in] Specify the selected sub-buffer.
-
static inline void XSPI_DisableAhbBufferPerfMonitor(XSPI_Type *base, uint8_t ahbBufferId)#
Disable AHB buffer performance monitor for selected AHB buffer.
- Parameters:
base – [in] XSPI peripheral base address.
ahbBufferId – [in] Specify the selected AHB buffer.
-
static inline void XSPI_StopAhbBufferPerfMonitor(XSPI_Type *base)#
Stop AHB buffer performance monitor.
- Parameters:
base – [in] XSPI peripheral base address.
-
static inline void XSPI_GetAhbBufferPerfMonitorResult(XSPI_Type *base, uint8_t ahbBufferId, xspi_ahbBuffer_perf_monitor_result_t *ptrPerfMonitorResult)#
Get AHB buffer performance monitor result.
- Parameters:
base – [in] XSPI peripheral base address.
ahbBufferId – [in] Specify AHB buffer Id.
ptrPerfMonitorResult – [out] Pointer to the variable to store selected AHB buffer’s performance monitor result.
-
static inline bool XSPI_CheckAhbBufferPerfMonitorTimeCounterOverflow(XSPI_Type *base)#
Check if AHB buffer performance monitor timeout counter is overflow.
- Parameters:
base – XSPI peripheral base address.
- Return values:
false – AHB buffer performance monitor timeout counter is not overflow.
true – AHB buffer performance monitor timeout counter is overflow.
-
static inline bool XSPI_CheckAhbBufferPerfMonitorHitOverflow(XSPI_Type *base, uint8_t ahbBufferId)#
Check if AHB buffer performance monitor buffer hit counter is overflow.
- Parameters:
base – [in] XSPI peripheral base address.
ahbBufferId – [in] Specify the AHB buffer Id.
- Return values:
false – Overflow not detected.
true – Overflow is detected.
-
static inline bool XSPI_CheckAhbBufferPerfMonitorMissOverflow(XSPI_Type *base, uint8_t ahbBufferId)#
Check if AHB buffer performance monitor buffer miss counter is overflow.
- Parameters:
base – [in] XSPI peripheral base address.
ahbBufferId – [in] Specify the AHB buffer Id.
- Return values:
false – Overflow not detected.
true – Overflow is detected.
-
static inline uint32_t XSPI_GetAhbBufferPerfMonitorTimeCounter(XSPI_Type *base)#
Get AHB buffer performance monitor timeout value.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
The value of time counter, in AHB clock cycles, since the performance monitor was running.
-
status_t XSPI_SetAhbAccessSplitSize(XSPI_Type *base, xspi_ahb_split_size_t ahbSplitSize)#
Set AHB transaction(read/write) split size.
Note
For AHB write, if enable split feature(ahbSplitSize not set as kXSPI_AhbSplitSizeDisabled), XSPI will split one single AHB write burst into smaller bursts on external device side.
Note
For AHB read, if enable split feature, HW will realign the prefetch size to split size and in that way split a single read burst into smaller bursts.
- Parameters:
base – [in] XSPI peripheral base address.
ahbSplitSize – [in] Specify the AHB split size.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_RegWriteLocked – Fail due to write operation to related registers is locked.
kStatus_Success – Success to set AHB access split size.
-
status_t XSPI_SetAhbAccessBoundary(XSPI_Type *base, xspi_ahb_alignment_t alignment)#
Set AHB transaction(read/write) boundary.
Note
For AHB write, XSPI keeps track of the start address and then compares it with the address of subsequent transaction receive on the AHB bus, when the input alignment is reached, XSPI negates AHB HREADY to block new accesses. This signal will be kept low until all the previous received write data is written to external memory and chip select is de-asserted. After that it allows next AHB write data to be received by making HREADY high thus ensuring that transaction is split at address boundary on external memory.
Note
For AHB read, XSPI checks the start address and end address to see if it is crossing the address boundary specified by input alignment. If the transaction crosses the address boundary, then it reduces the transaction size such that the data pre-fetch is stopped before the address boundary. Now if the AHB master is reading the data sequentially it will get buffer hits up to the input alignment boundary. When it reaches the next address boundary it will get a buffer miss and a new data pre-fetch will be launched towards the external memory device.
- Parameters:
base – [in] XSPI peripheral base address.
alignment – [in] Specify the AHB alignment, in type of xspi_ahb_alignment_t.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_RegWriteLocked – Fail due to write operation to related registers is locked.
kStatus_Success – Success to set AHB access boundary.
-
status_t XSPI_SetAhbReadDataSeqId(XSPI_Type *base, uint8_t seqId)#
Set AHB read sequence Id.
- Parameters:
base – [in] XSPI peripheral base address.
seqId – [in] Specify the sequence Id in LUT used for AHB read.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_RegWriteLocked – Fail due to write operation to related registers is locked.
kStatus_Success – Success to set AHB read sequence Id.
-
status_t XSPI_SetAhbWriteDataSeqId(XSPI_Type *base, uint8_t seqId)#
Set AHB write sequence Id.
- Parameters:
base – [in] XSPI peripheral base address.
seqId – [in] Specify the sequence Id in LUT used for AHB write.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_RegWriteLocked – Fail due to write operation to related registers is locked.
kStatus_Success – Success to set AHB write sequence Id.
-
status_t XSPI_UpdateAhbHreadyTimeOutValue(XSPI_Type *base, uint16_t timeoutValue)#
Specify how long XSPI can hold HEADY low while waiting for response to an AHB transfer.
Note
If the specified time out value expired, an AHB illegal transaction error will be triggerred.
- Parameters:
base – [in] XSPI peripheral base address.
timeoutValue – [in] In multiples of 50000 AHB clock cycles, default value is 3, it means waiting for 150000 AHB clock cycles.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_Success – Success to set AHB HREADY timeout value.
-
status_t XSPI_SetAhbErrorPayload(XSPI_Type *base, uint32_t highPayload, uint32_t lowPayload)#
Pre-define error payload which will be provided on the read data bus when the HEADY timeout counter expires.
Note
If the incoming AHB read request master is not mapped to any of the AHB buffer, the XSPI will keep the AHB HREADY signal low and will provided this pre-defined error payload on the AHB read data bus when the HEADY timeout counter expires.
- Parameters:
base – [in] XSPI peripheral base address.
highPayload – [in] High 32bits payload to set.
lowPayload – [in] Low 32bits payload to set.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_Success – Success to set AHB HREADY timeout value.
-
xspi_ahb_read_error_info_t XSPI_ReturnAhbReadErrorInfo(XSPI_Type *base)#
Return AHB read error information.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
Latest AHB read error information, in type of xspi_ahb_read_error_info_t.
-
static inline void XSPI_ClearAhbAccessSeqPointer(XSPI_Type *base)#
Clear AHB access sequence pointer.
- Parameters:
base – [in] XSPI peripheral base address.
-
void XSPI_GetAhbRequestSuspendInfo(XSPI_Type *base, xspi_ahb_request_suspend_info_t *ptrSuspendInfo)#
Get Ahb request suspend information if priority mechanism is enabled.
- Parameters:
base – [in] XSPI peripheral base address.
ptrSuspendInfo – [out] Contain latest suspend info, the value may be 0xFF if the item is invalid in current suspend state.
-
static inline void XSPI_EnableAhbReadPrefetch(XSPI_Type *base, bool enable)#
Enable/disable AHB Read Prefetch feature.
- Parameters:
base – [in] XSPI peripheral base address.
enable – [in] Used to enable/disable AHB read prefetch:
false Disable AHB read prefetch;
true Enable AHB read prefetch.
-
status_t XSPI_BlockAccessAfterAhbWrite(XSPI_Type *base, bool blockSequentWrite, bool blockRead)#
Block access(write and read) after the AHB write operation.
Note
If external flash support RWW, read should not be blocked:
XSPI_BlockAccessAfterAhbWrite(XSPI0, true, false);
Note
If either of access is blocked, the page program wait flag will be asserted after an AHB write sequence completed. The assertion of flag will lock the arbitration and all access to the external memory are blocked. And the internal “page wait time” counter starts(Invoke XSPI_UpdatePageWaitTimeCounter to update counter value). After this counter reaches the value, a read is triggered by the XSPI module to read external device’s status register(The seq id should be pre-defined by XSPI_SetAhbReadStatusRegSeqId), and the value is stored in the XSPI internal regsiter. And there are two options(Invoke XSPI_SelectPPWFlagClearPolicy to select) to clear the asserted page program wait flag.
Automatic cleared by XSPI hardware;
Cleared by software.
Note
As soon as the page program wait flag is asserted, another counter(SFP arbitration
lock counter) also started, if the flag not cleared in desired counter value the arbitration lock timeout error will be generated.
- Parameters:
base – [in] XSPI peripheral base address.
blockSequentWrite – [in] Block sequence write or not.
blockRead – [in] Block read or not.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_Success – Success to set related registers..
-
status_t XSPI_SelectPPWFlagClearPolicy(XSPI_Type *base, xspi_ppw_flag_clear_policy_t policy)#
Set Page program wait flag clear policy.
Note
If set as hardware policy, the device’s WIP information should be set by invoking XSPI_SetSFMStatusRegInfo()
- Parameters:
base – [in] XSPI peripheral base address.
policy – [in] Specify the policy to clear page program wait flag.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_RegWriteLocked – Fail due to write operation to related registers is locked.
kStatus_Success – Success to set PPW flag clear policy.
-
status_t XSPI_UpdatePageWaitTimeCounter(XSPI_Type *base, uint32_t countValue)#
Update page wait timeout counter.
- Parameters:
base – [in] XSPI peripheral base address.
countValue – [in] The value of counter, in AHB clock cycles.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_PageProgramWaitFlagAsserted – Page program wait flag already asserted.
kStatus_Success – Successfully to update page wait timeout counter.
-
status_t XSPI_SetAhbReadStatusRegSeqId(XSPI_Type *base, uint8_t seqId)#
Set AHB read status register sequence Id.
Note
The read status sequence only triggerred when the page wait time counter expired.
- Parameters:
base – [in] XSPI peripheral base address.
seqId – [in] Specify the sequence Id in LUT used for AHB read status register.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_RegWriteLocked – Fail due to write operation to related registers is locked.
kStatus_Success – Success to set AHB read status register sequence Id.
-
static inline uint16_t XSPI_GetSFMStatusRegValue(XSPI_Type *base)#
Get external serial flash’s status register value.
Note
This function is only useful after the Page program wait flag is asserted due to either wait/read access is blocked after the AHB write operation.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
The status regsiter value of external device.
-
status_t XSPI_SetSFMStatusRegInfo(XSPI_Type *base, xspi_device_status_reg_info_t *ptrStatusRegInfo)#
Set Serial flash memory status register information.
- Parameters:
base – [in] XSPI peripheral base address.
ptrStatusRegInfo – [in] Pointer to the variable which contain status register information.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_PageProgramWaitFlagAsserted – Page program wait flag already asserted.
kStatus_Success – Successfully to set status register information.
-
status_t XSPI_EnableAhbWriteTerminate(XSPI_Type *base, bool enable)#
Enable or disable AHB write terminate functionality.
- Parameters:
base – XSPI peripheral base address.
enable – True to enable AHB write terminate, false to disable.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_Success – Success to enable/disable AHB write terminate functionality.
-
status_t XSPI_SetAhbAccessConfig(XSPI_Type *base, xspi_ahb_access_config_t *ptrAhbAccessConfig)#
Set AHB access configuration.
- Parameters:
base – [in] XSPI peripheral base address.
ptrAhbAccessConfig – [in] Pointer to the variable which contains AHB access configurations.
- Return values:
kStatus_XSPI_AhbReadAccessAsserted – Fail due to an AHB read access already asserted
kStatus_XSPI_AhbWriteAccessAsserted – Fail due to an AHB write access already asserted
kStatus_XSPI_RegWriteLocked – Fail due to write operation to related registers is locked.
kStatus_Success – Success to set AHB read status register sequence Id.
-
static inline void XSPI_EnableTxDMA(XSPI_Type *base, bool enable)#
Enables or disables XSPI IP Tx FIFO DMA requests.
- Parameters:
base – [in] XSPI peripheral base address.
enable – [in] Enable flag for transmit DMA request. Pass true for enable, false for disable.
-
static inline void XSPI_EnableRxDMA(XSPI_Type *base, bool enable)#
Enables or disables XSPI IP Rx FIFO DMA requests.
- Parameters:
base – [in] XSPI peripheral base address.
enable – [in] Enable flag for receive DMA request. Pass true for enable, false for disable.
-
static inline uint32_t XSPI_GetTxFifoAddress(XSPI_Type *base)#
Gets XSPI IP tx fifo address for DMA transfer.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
The tx fifo address.
-
static inline uint32_t XSPI_GetRxFifoAddress(XSPI_Type *base)#
Gets XSPI IP rx fifo address for DMA transfer.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
The rx fifo address.
-
static inline uint32_t XSPI_GetErrorStatusFlags(XSPI_Type *base)#
Get error status flags.
- Parameters:
base – XSPI peripheral base address.
- Returns:
All asserted error status flags for the target group. Should be the OR’ed value of xspi_error_flag_t.
-
static inline void XSPI_ClearErrorStatusFlags(XSPI_Type *base, uint32_t flags)#
Clear input error status flags.
- Parameters:
base – XSPI peripheral base address.
flags – Error flags to clear. Should be the OR’ed value of xspi_error_flag_t.
-
static inline uint32_t XSPI_GetInterruptStatusFlags(XSPI_Type *base)#
Get the XSPI interrupt status flags.
- Deprecated:
Please use XSPI_GetErrorStatusFlags() as instead.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
interrupt status flag, use status flag to AND xspi_flags_t could get the related status.
-
static inline bool XSPI_CheckIpRequestGranted(XSPI_Type *base)#
Check if the IP access request was granted access.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – IP request granted.
false – IP request not granted.
-
static inline uint32_t XSPI_GetCmdExecutionArbitrationStatusFlags(XSPI_Type *base)#
Get asserted flags about SFM command execution and arbitration.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
The assert flags about SFM command execution and arbitration, should be the OR’ed value of xspi_cmd_execution_arbitration_flag_t.
-
static inline void XSPI_ClearCmdExecutionArbitrationStatusFlags(XSPI_Type *base, uint32_t flags)#
Clear asserted flags about SFM command execution and arbitration.
- Parameters:
base – [in] XSPI peripheral base address.
flags – [in] The mask of flags to clear.
-
static inline void XSPI_ClearTxBuffer(XSPI_Type *base)#
Clear TX buffer.
- Parameters:
base – [in] XSPI peripheral base address.
-
static inline void XSPI_ClearRxBuffer(XSPI_Type *base)#
Clear RX buffer.
- Parameters:
base – [in] XSPI peripheral base address.
-
static inline void XSPI_ResetTxRxBuffer(XSPI_Type *base, bool txFifo, bool rxFifo)#
Clear the XSPI IP TX/RX buffer logic.
- Parameters:
base – [in] XSPI peripheral base address.
txFifo – [in] Pass true to reset TX FIFO.
rxFifo – [in] Pass true to reset RX FIFO.
-
static inline status_t XSPI_UpdateRxBufferWaterMark(XSPI_Type *base, uint32_t waterMark)#
Update watermark for RX buffer.
Set watermark as 4 bytes: XSPI_UpdateRxBufferWaterMark(XSPI0, 4UL); Set watermark as 8 bytes: XSPI_UpdateRxBufferWaterMark(XSPI0, 8UL);
- Parameters:
base – [in] XSPI peripheral base address.
waterMark – [in] Specify the number of bytes in the RX buffer which causes XSPI to assert the watermark exceeded flag, should be in multiple of 4 bytes.
- Return values:
kStatus_XSPI_IPAccessAsserted – Fail to update watermark for Rx buffer, due to IP access is asserted.
kStatus_XSPI_WaterMarkIllegal – Fail to update watermark for Tx buffer, due to input watermark is not the multiple of 4 bytes.
kStatus_Success – Successful to update watermark.
-
static inline status_t XSPI_UpdateTxBufferWaterMark(XSPI_Type *base, uint32_t waterMark)#
Update watermark for TX buffer.
- Parameters:
base – [in] XSPI peripheral base address.
waterMark – [in] The watermark to set.
- Returns:
Status of the operation.
-
static inline void XSPI_UnlockIpAccessArbitration(XSPI_Type *base)#
Unlock IP access arbitration.
- Parameters:
base – [in] XSPI peripheral base address.
-
static inline status_t XSPI_CheckAndClearError(XSPI_Type *base, uint32_t status)#
Check and clear IP command execution errors.
- Parameters:
base – XSPI peripheral base address.
status – Interrupt status.
- Returns:
Status of the operation.
-
static inline void XSPI_WriteTxBuffer(XSPI_Type *base, uint32_t data)#
Writes data into IPS TX Buffer.
- Parameters:
base – [in] XSPI peripheral base address.
data – [in] The data bytes to send.
-
static inline uint32_t XSPI_ReadRxBuffer(XSPI_Type *base, uint8_t fifoIndex)#
Receive data from IPX RX FIFO.
- Parameters:
base – [in] XSPI peripheral base address.
fifoIndex – [in] Source fifo index.
- Returns:
The data in the FIFO.
-
static inline void XSPI_TriggerRxBufferPopEvent(XSPI_Type *base)#
Trigger a pop event for RX buffer.
- Parameters:
base – [in] XSPI peripheral base address.
-
static inline bool XSPI_CheckRxBufferWaterMarkExceed(XSPI_Type *base)#
Check if RX buffer watermark is exceeded.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – The RX buffer watermark has been exceeded.
false – The RX buffer watermark has not been exceeded.
-
static inline uint32_t XSPI_GetRxBufferAvailableBytesCount(XSPI_Type *base)#
Get RX buffer available bytes count.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
The available counts of bytes in RX buffer.
-
static inline uint32_t XSPI_GetRxBufferRemovedBytesCount(XSPI_Type *base)#
Get counts of bytes already removed from RX buffer.
- Parameters:
base – [in] XSPI peripheral base address.
- Returns:
Counts of removed bytes.
-
static inline bool XSPI_CheckIPAccessGranted(XSPI_Type *base)#
Check if IP access is granted by XSPI arbitration.
- Deprecated:
Use XSPI_CheckIpRequestGranted() as instead
- Parameters:
base – XSPI peripheral base address.
- Return values:
true – The IP access is granted arbitration.
false – No IP access is queued.
-
static inline bool XSPI_CheckIpWriteTriggered(XSPI_Type *base)#
Check if IP write access is triggered.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – The IP write access is granted arbitration.
false – No IP write access is queued.
-
static inline bool XSPI_CheckIpReadTriggered(XSPI_Type *base)#
Check if IP read access is triggered.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – The IP read access is granted arbitration.
false – No IP read access is queued.
-
static inline bool XSPI_CheckFSMValid(XSPI_Type *base)#
Check if IPS transfer is granted arbitration or execution.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – Valid, the IPS transfer is granted.
false – Not valid, no IPS transfer is queued.
-
static inline bool XSPI_CheckTxBuffLockOpen(XSPI_Type *base)#
Check if IP manager can write to TX buffer.
- Parameters:
base – [in] XSPI peripheral base address.
- Return values:
true – TX buffer lock is open.
false – TX buffer lock is not open.
-
static inline void XSPI_EnableInterrupts(XSPI_Type *base, uint64_t mask)#
Enables the XSPI interrupts.
- Parameters:
base – XSPI peripheral base address.
mask – XSPI interrupt source mask.
-
static inline void XSPI_DisableInterrupts(XSPI_Type *base, uint64_t mask)#
Disables the XSPI interrupts.
- Parameters:
base – XSPI peripheral base address.
mask – XSPI interrupt source mask.
-
static inline void XSPI_SetSFPFradEALMode(XSPI_Type *base, xspi_exclusive_access_lock_mode_t ealMode, uint8_t fradId)#
Set exclusive access lock mode for the specific FRAD.
- Parameters:
base – [in] XSPI peripheral base address.
ealMode – [in] Specify the exclusive access lock mode.
fradId – [in] Specify the FRAD.
-
static inline status_t XSPI_WriteBlocking(XSPI_Type *base, uint8_t *buffer, size_t size)#
Sends a buffer of data bytes using blocking method.
- Parameters:
base – XSPI peripheral base address.
buffer – The data bytes to send.
size – The number of data bytes to send.
- Returns:
Status of the operation.
-
static inline status_t XSPI_ReadBlocking(XSPI_Type *base, uint8_t *buffer, size_t size)#
Receives a buffer of data bytes using a blocking method.
- Parameters:
base – XSPI peripheral base address.
buffer – The data bytes to receive.
size – The number of data bytes to receive.
- Returns:
Status of the operation.
-
struct _xspi_device_status_reg_info#
- #include <fsl_xspi.h>
The structure of external device’s status register information(location, priority).
Note
Only useful when AHB write to flash device is enabled, and use hardware to clear ppw flag.
Public Members
-
uint8_t wipLocation#
WIP bit field’s location.
-
bool upperHalfWordSelected#
Specify which half word(upper or lower) is selected.
-
bool value1Expired#
Specify the value to be check o selected wip location to determine if the page progame wait period is expired, true means expected value is 1, false means expected value is 0.
-
uint8_t wipLocation#
-
union _xspi_dll_para#
- #include <fsl_xspi.h>
The union of user custommed DLL parameters, in case of kXSPI_BypassMode bypassModePara is used, in case of kXSPI_AutoUpdateMode autoUpdateModoPara is used.
-
struct _xspi_dll_config#
- #include <fsl_xspi.h>
The structure of Delay-lock-loop configuration.
Public Members
-
xspi_dll_mode_t dllMode#
Dll mode auto update mode or bypass mode
-
bool useRefValue#
Specify to use reference value or not, if the reference code do not satisfy the specific usecase, it is application’s responsibility to set custom parameters
true: following inputs are ignored, use the reference values provided by NXP as instead;
false: following inputs take effect.
-
xspi_dll_para_t dllCustomPara#
User custommed parameter to configure DLL, different DLL mode corresponding to different parameters, please refer to the union xspi_dll_para_t.
-
uint8_t dllCustomDelayTapNum#
User custommed number of delay elements for each delay tap.
-
bool enableCdl8#
Enable course delay line 8.
-
xspi_dll_mode_t dllMode#
-
struct _xspi_data_learning_config#
- #include <fsl_xspi.h>
The configuration of data learning.
Note
Data learning feature only supported in the DQS sampling method(kXSPI_SampleClkFromExternalDQS).
Public Members
-
uint32_t pattern#
Pre-defined pattern to match.
-
bool deviceSupported#
Specify if external device support data learning feature.
-
xspi_data_learning_pad_select_t padSelected#
Used to select pad which use for pattern matching IO.
-
uint32_t pattern#
-
struct _xspi_sample_clk_config#
- #include <fsl_xspi.h>
Sample clock configuration, which used to sample data from external device.
Public Members
-
xspi_sample_clk_source_t sampleClkSource#
Specify the sample clock source.
-
bool enableDQSLatency#
Enable DQS latency or not.
-
xspi_dll_config_t dllConfig#
Specify the DLL configuration, to improve data accuracy, please adjust DLL settings based on specific use.
-
xspi_sample_clk_source_t sampleClkSource#
-
union _xspi_device_interface_settings#
- #include <fsl_xspi.h>
The union of external device’s settings, if external device following hyper bus protocol hyperBusSettings take effects, if external device following SPI protocol strandardExtendedSPISettings take effects.
Public Members
-
struct _xspi_device_interface_settings strandardExtendedSPISettings#
-
struct _xspi_device_interface_settings hyperBusSettings#
-
struct _xspi_device_interface_settings strandardExtendedSPISettings#
-
struct _xspi_device_ddr_config#
- #include <fsl_xspi.h>
The structure of device DDR configuration.
Public Members
-
bool enableDdr#
Used to enable/disable DDR mode.
-
xspi_ddr_data_aligned_clk_t ddrDataAlignedClk#
Specify the DDR data aligned clock.
-
bool enableByteSwapInOctalMode#
Swap byte order in octal mode.
-
bool enableDdr#
-
struct _xspi_device_config#
- #include <fsl_xspi.h>
External device configuration items.
Public Members
-
uint32_t xspiRootClk#
XSPI serial root clock.
-
bool enableCknPad#
Enable/disable clock on differential CKN pad for flash memory A.
-
xspi_device_interface_type_t deviceInterface#
Type of external device’s interface: hyperBus or Strandard/Extended SPI.
-
xspi_device_interface_settings_t interfaceSettings#
Settings of specified interface.
-
uint8_t CSHoldTime#
CS line hold time.
-
uint8_t CSSetupTime#
CS line setup time.
-
xspi_sample_clk_config_t sampleClkConfig#
Configuration of sample clock.
-
xspi_device_ddr_config_t *ptrDeviceDdrConfig#
Set as NULL to set device as SDR mode, to change to DDR mode, this member should be populated.
-
xspi_device_addr_mode_t addrMode#
Address mode of external device.
-
uint8_t columnAddrWidth#
Width of column address.
-
bool enableCASInterleaving#
Usually enabled in dual-die device.
-
uint32_t deviceSize[XSPI_SFAD_COUNT2]#
Size of external device, the unit is KB.
-
xspi_device_status_reg_info_t *ptrDeviceRegInfo#
Pointer to the structure to store external device’s WIP register information, should set as NULL if AHB page write is not used or if AHB page write is used but use software policy to clear flag.
-
uint32_t xspiRootClk#
-
struct _xspi_mdad_config#
- #include <fsl_xspi.h>
MDAD configuration.
Public Members
-
bool assignIsValid#
Specify if the MDAD configuration for the target group is valid
-
bool enableDescriptorLock#
This field provides a means to make the MDAD descriptor read-only. Once written ‘1’ this field will remain ‘1’ until hard reset
-
uint8_t maskType#
0b - ANDed mask 1b - ORed mask
-
uint8_t mask#
Defines the 6-bit mask value for the ID-Match comparison
-
uint8_t masterIdReference#
Specifies the reference value of the Master-ID for MID-comparison
-
xspi_secure_attribute_t secureAttribute#
Defines the secure attribute selection criteria for entry into descriptor queue
-
bool assignIsValid#
-
struct _xspi_sfp_mdad_config#
- #include <fsl_xspi.h>
The structure of SFP MDAD configurations for all target groups.
Public Members
-
xspi_mdad_config_t tgMdad[(2U)]#
Specify MDAD configurations for each target group.
-
xspi_mdad_config_t tgMdad[(2U)]#
-
struct _xspi_frad_tg_config#
- #include <fsl_xspi.h>
FRAD configuration.
Public Members
-
uint8_t tgMasterAccess[(2U)]#
This field define the access restrictions for respective Master Domain corresponding to this FRAD region. Access permissions are decided based on secure an privilege attributes of current transaction. Read access is not restricted.
-
bool assignIsValid#
This field indicates whether the FRAD Descriptor for a specific flash region is valid.
-
xspi_descriptor_lock_t descriptorLock#
This field enables masking of accidental write on FRAD registers. Lock is enabled/disabled by Secure/ Privileged master.
-
xspi_exclusive_access_lock_mode_t exclusiveAccessLock#
This field provides exclusive write lock over a FRAD region based on MDnACP.
-
uint8_t tgMasterAccess[(2U)]#
-
struct _xspi_frad_config_t#
- #include <fsl_xspi.h>
FRAD configuration.
-
struct _xspi_sfp_frad_config#
- #include <fsl_xspi.h>
The structure of SFP FRAD configurations.
Public Members
-
xspi_frad_config_t fradConfig[(8U)]#
Specify FRAD configuration for each item.
-
xspi_frad_config_t fradConfig[(8U)]#
-
struct _xspi_frad_transaction_info#
- #include <fsl_xspi.h>
The structure of latest FRAD transaction information.
Public Members
-
uint32_t startAddr#
Latest IP access start address.
-
uint8_t masterId#
Latest IP access master Id.
-
bool isSecureAccess#
Latest IP access is secure access or not.
-
bool isPrivilegeAccess#
Latest IP access is privilege access or not.
-
bool isCompError#
Indicates the error status of the flash region specific comparision check for the latest transaction.
-
bool isCompValid#
Indicates availability of the result or status of a flash region-specific comparison check.
-
uint32_t startAddr#
-
struct _xspi_ip_access_config#
- #include <fsl_xspi.h>
Configurations of IP access(including IP read and write).
Public Members
-
xspi_sfp_mdad_config_t *ptrSfpMdadConfig#
Pointer to the variable in type of xspi_sfp_mdad_config_t to set SFP MDAD feature, set as NULL to disable SFP MDAD feature.
-
xspi_sfp_frad_config_t *ptrSfpFradConfig#
Pointer to the variable in type of xspi_sfp_frad_config_t to set SFP FRAD feature, set as NULL to disable SFP FRAD
-
uint32_t sfpArbitrationLockTimeoutValue#
Specify the time in IPS clock cycles before an unreleased arbitration triggers a timeout error.
-
uint32_t ipAccessTimeoutValue#
Specify the maximum time in IPS clock cycles for XSPI to wait fro an ongoing write or read command to complete before terminating the command.
-
xspi_sfp_mdad_config_t *ptrSfpMdadConfig#
-
struct _xspi_tg_add_write_status#
- #include <fsl_xspi.h>
The status of latest target group address write operation.
-
struct _xspi_transfer#
- #include <fsl_xspi.h>
Transfer structure used for XSPI functional interface.
Public Members
-
uint32_t deviceAddress#
Operation device address.
-
xspi_command_type_t cmdType#
Execution command type.
-
uint8_t seqIndex#
Sequence ID for command.
-
uint32_t *data#
Data buffer.
-
size_t dataSize#
Data size in bytes.
-
xspi_target_group_t targetGroup#
Target group.
-
uint32_t deviceAddress#
-
struct _xspi_handle#
- #include <fsl_xspi.h>
Transfer handle structure for XSPI.
Public Members
-
uint32_t state#
Internal state for XSPI transfer
-
xspi_target_group_t tgId#
Target Group.
-
uint8_t *data#
Data buffer.
-
size_t dataSize#
Remaining Data size in bytes.
-
size_t transferTotalSize#
Total Data size in bytes.
-
xspi_transfer_callback_t completionCallback#
Callback for users while transfer finish or error occurred
-
void *userData#
XSPI callback function parameter.
-
size_t curTransferSize#
Transfer size of current IP access.
-
uint32_t state#
-
struct _xspi_ahbBuffer_sub_buffer_config#
- #include <fsl_xspi.h>
The structure of sub-buffer configurations.
Public Members
-
xspi_subbuffer_division_factor_t divFactor#
Specify the divide factor for current sub-buffer.
-
uint32_t startAddr#
Specify the start address of current sub-buffer.
-
uint32_t endAddr#
Specify the end address of current sub-buffer.
-
bool enableAhbMonitor#
Enable/disable AHB performance monitor for current sub-buffer.
-
xspi_subbuffer_division_factor_t divFactor#
-
struct _xspi_ahbBuffer_config#
- #include <fsl_xspi.h>
Structure of AHB buffer configurations.
Note
When an AHB read access comes it is assigned to a buffer based on its master ID. Then it further assigned to a sub-buffer based on which sub-buffer address range this transaction lies into.
Note
When sub-buffer division is hit, in case of a buffer miss the controller will fetch the data equal to the size of that sub-buffer.
Note
If sub-buffer division is enabled for a buffer the hit/miss check is done at sub-buffer level. And if prefetch is enable, the prefetch takes place for individual sub-buffers.
Public Members
-
uint8_t masterId#
Specify the ID of the AHB master to be associated with buffer.
-
xspi_ahbBuffer_sub_buffer_config_t *ptrSubBuffer0Config#
Pointer to sub buffer0’s configuration.
-
xspi_ahbBuffer_sub_buffer_config_t *ptrSubBuffer1Config#
Pointer to sub buffer1’s configuration.
-
xspi_ahbBuffer_sub_buffer_config_t *ptrSubBuffer2Config#
Pointer to sub buffer2’s configuration.
-
xspi_ahbBuffer_sub_buffer_config_t *ptrSubBuffer3Config#
Pointer to sub buffer3’s configuration.
-
uint8_t masterId#
-
struct _xspi_ahbBuffer_perf_monitor_result#
- #include <fsl_xspi.h>
The result of AHB buffer performance monitor, including buffer miss count and buffer hit count.
-
struct _xspi_ahb_write_config#
- #include <fsl_xspi.h>
The configuration of AHB write access.
Public Members
-
bool blockSequenceWrite#
Enable/disable sequence write operation after page program start.
-
bool blockRead#
Enable/disable read operation after page program start, can be false for RWW extern device.
-
xspi_ppw_flag_clear_policy_t policy#
Specify the policy to clear ppw flag, hardware or software.
-
uint32_t pageWaitTimeoutValue#
Specify, in AHB clock cycles, how long XSPI waits before triggering a read of the device status register, only useful in hardare policy.
-
uint8_t AWRSeqIndex#
Specify the sequence index for AHB write.
-
uint8_t ARDSRSeqIndex#
Specify the sequence index for AHB read status, only useful if either sequence write or read is blocked.
-
bool blockSequenceWrite#
-
struct _xspi_ahb_access_config#
- #include <fsl_xspi.h>
The structure of AHB access configurations, including AHB buffer settings, AHB Read Seq ID, AHB write settings.
Public Members
-
xspi_ahbBuffer_config_t buffer[4]#
AHB buffer size.
-
uint8_t ARDSeqIndex#
Specify the sequence index for AHB read data.
-
bool enableAHBPrefetch#
Enable/disable AHB read prefetch feature, when enabled, XSPI will fetch more data than current AHB burst.
-
bool enableAHBBufferWriteFlush#
Set true to enable flush of AHB buffer, due to either AHB write or IP access to avoid stable data in AHB buffer.
-
xspi_ahb_split_size_t ahbSplitSize#
Specify ahb split size, set as kXSPI_AhbSplitSizeDisabled if do not want to use this feature.
-
xspi_ahb_alignment_t ahbAlignment#
AHB access towards flash is broken if this AHB alignment boundary is crossed, only support XSPI0 XSPI1
-
xspi_ahb_write_config_t *ptrAhbWriteConfig#
Set as NULL if AHB write feature is not used.
-
bool enableWriteTerminate#
True to enable an AHB transaction can terminate the ongoing AHB read-prefetch, in default it is enabled.
-
xspi_ahbBuffer_config_t buffer[4]#
-
struct _xspi_ahb_read_error_info#
- #include <fsl_xspi.h>
The structure of information when AHB read error occur.
-
struct _xspi_ahb_request_suspend_info#
- #include <fsl_xspi.h>
The structure of information when AHB reqest is suspended.
Public Members
-
xspi_ahb_request_suspend_state_t state#
Current AHB request state.
-
uint8_t subBufferId#
Suspended AHB request’s sub buffer Id.
-
uint8_t ahbBufferId#
Suspended AHB request’s buffer Id.
-
uint16_t dataLeft#
How many data left to transfer.
-
uint32_t address#
Current address of suspended AHB request.
-
xspi_ahb_request_suspend_state_t state#
-
struct _xspi_config#
- #include <fsl_xspi.h>
XSPI configuration structure.
Public Members
-
xspi_byte_order_t byteOrder#
Byte ordering endianness
-
bool enableDoze#
Enable/disable doze mode support.
-
xspi_ahb_access_config_t *ptrAhbAccessConfig#
Pointer to AHB access configuration, can be NULL is AHB access is not used.
-
xspi_ip_access_config_t *ptrIpAccessConfig#
Pointer to IP access configuration, can be NULL is IP access is not used.
-
xspi_byte_order_t byteOrder#
-
struct bypassModePara
Public Members
-
uint16_t delayElementCoarseValue#
Delay element coarse adjustment value, range from 0 to 15.
-
uint16_t delayElementFineValue#
Delay element fine adjustment value, range from 0 to 7.
-
uint16_t offsetDelayElementCount#
Specify the number of offset delay elements, range from 0 to 15.
-
uint16_t enableHighFreq#
If set as true, high frequency used for delay chain operations, otherwise low frequency is used.
-
uint16_t bypassModeReserved#
Reserved.
-
uint16_t delayElementCoarseValue#
-
struct autoUpdateModoPara
Public Members
-
uint16_t referenceCounter#
Specify count of interval for DLL phase detection, range from 0 to 15.
-
uint16_t resolution#
Specify minimum resolution for the DLL phase detctor, range from 0 to 15.
-
uint16_t offsetDelayElementCount#
Specify the number of offset delay elements, range from 0 to 15.
-
uint16_t tDiv16OffsetDelayElementCount#
Specify the number of T/16 offset elements in the incoming DQS, range from 0 to 15.
-
uint16_t enableHighFreq#
If set as true, high frequency used for delay chain operations, otherwise low frequency is used.
-
uint16_t referenceCounter#
-
struct strandardExtendedSPISettings
Public Members
-
uint32_t pageSize#
The size of page to program, the unit is byte.
-
uint32_t pageSize#
-
struct hyperBusSettings
Public Members
-
xspi_hyper_bus_x16_mode_t x16Mode#
Specify hyper bus X16 mode.
-
bool enableVariableLatency#
If enabled, the count of latency is depends on hyper bus device.
-
bool forceBit10To1#
Force bit 10 to logic one or not.
-
uint32_t pageSize#
The size of page to program, the unit is byte.
-
xspi_hyper_bus_x16_mode_t x16Mode#
-
union enaPri#
-
struct ahbErrorPayload#
XSPI eDMA Driver#
-
enum _xspi_edma_ntransfer_size#
eDMA transfer configuration
Values:
-
enumerator kXSPI_EDMAnSize1Bytes#
Source/Destination data transfer size is 1 byte every time
-
enumerator kXSPI_EDMAnSize2Bytes#
Source/Destination data transfer size is 2 bytes every time
-
enumerator kXSPI_EDMAnSize4Bytes#
Source/Destination data transfer size is 4 bytes every time
-
enumerator kXSPI_EDMAnSize8Bytes#
Source/Destination data transfer size is 8 bytes every time
-
enumerator kXSPI_EDMAnSize32Bytes#
Source/Destination data transfer size is 32 bytes every time
-
enumerator kXSPI_EDMAnSize1Bytes#
-
typedef struct _xspi_edma_handle xspi_edma_handle_t#
-
typedef void (*xspi_edma_callback_t)(XSPI_Type *base, xspi_edma_handle_t *handle, status_t status, void *userData)#
XSPI eDMA transfer callback function for finish and error.
-
typedef enum _xspi_edma_ntransfer_size xspi_edma_transfer_nsize_t#
eDMA transfer configuration
-
FSL_XSPI_EDMA_DRIVER_VERSION#
XSPI EDMA driver version 2.0.6.
-
void XSPI_TransferCreateHandleEDMA(XSPI_Type *base, xspi_edma_handle_t *handle, xspi_edma_callback_t callback, void *userData, edma_handle_t *txDmaHandle, edma_handle_t *rxDmaHandle)#
Initializes the XSPI handle for transfer which is used in transactional functions and set the callback.
- Parameters:
base – XSPI peripheral base address
handle – Pointer to xspi_edma_handle_t structure
callback – XSPI callback, NULL means no callback.
userData – User callback function data.
txDmaHandle – User requested DMA handle for TX DMA transfer.
rxDmaHandle – User requested DMA handle for RX DMA transfer.
-
void XSPI_TransferUpdateSizeEDMA(XSPI_Type *base, xspi_edma_handle_t *handle, xspi_edma_transfer_nsize_t nsize)#
Update XSPI EDMA transfer source data transfer size(SSIZE) and destination data transfer size(DSIZE).
See also
- Parameters:
base – XSPI peripheral base address
handle – Pointer to xspi_edma_handle_t structure
nsize – XSPI DMA transfer data transfer size(SSIZE/DSIZE), by default the size is kFLEXPSI_EDMAnSize1Bytes(one byte).
-
status_t XSPI_TransferEDMA(XSPI_Type *base, xspi_edma_handle_t *handle, xspi_transfer_t *xfer)#
Transfers XSPI data using an eDMA non-blocking method.
This function writes/receives data to/from the XSPI transmit/receive FIFO. This function is non-blocking.
- Parameters:
base – XSPI peripheral base address.
handle – Pointer to xspi_edma_handle_t structure
xfer – XSPI transfer structure.
- Return values:
kStatus_XSPI_Busy – XSPI is busy transfer.
kStatus_InvalidArgument – The watermark configuration is invalid, the watermark should be power of 2 to do successfully EDMA transfer.
kStatus_Success – XSPI successfully start edma transfer.
-
void XSPI_TransferAbortEDMA(XSPI_Type *base, xspi_edma_handle_t *handle)#
Aborts the transfer data using eDMA.
This function aborts the transfer data using eDMA.
- Parameters:
base – XSPI peripheral base address.
handle – Pointer to xspi_edma_handle_t structure
-
status_t XSPI_TransferGetTransferCountEDMA(XSPI_Type *base, xspi_edma_handle_t *handle, size_t *count)#
Gets the transferred counts of transfer.
- Parameters:
base – XSPI peripheral base address.
handle – Pointer to xspi_edma_handle_t structure.
count – Bytes transfer.
- Return values:
kStatus_Success – Succeed get the transfer count.
kStatus_NoTransferInProgress – There is not a non-blocking transaction currently in progress.
-
edma_handle_t *txDmaHandle#
eDMA handler for XSPI Tx.
-
edma_handle_t *rxDmaHandle#
eDMA handler for XSPI Rx.
-
size_t transferSize#
Bytes need to transfer.
-
xspi_edma_transfer_nsize_t nsize#
eDMA SSIZE/DSIZE in each transfer.
-
uint32_t nbytes#
eDMA minor byte transfer count initially configured.
-
uint8_t count#
The transfer data count in a DMA request.
-
uint32_t state#
Internal state for XSPI eDMA transfer.
-
xspi_edma_callback_t completionCallback#
A callback function called after the eDMA transfer is finished.
-
void *userData#
User callback parameter
-
struct _xspi_edma_handle#
- #include <fsl_xspi_edma.h>
XSPI DMA transfer handle, users should not touch the content of the handle.