MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
This document consists of sections titled with Driver Overview, Data Structures, Enumerations, Functions, etc., each with an overview list and detailed documentation. It is recommended to read the Driver Overview first for it includes a comprehensive description of the peripheral, driver and driver changes. Other sections give detailed information for APIs, enums, macros, etc., for your further reference.
Driver Overview | |
QTMR Peripheral and Driver Overview | |
Content including 1) peripheral features, work logic and work method; 2) driver design logic and use method; 3) typical use case. | |
The Driver Change Log | |
The current QTMR driver version is 2.0.0. | |
Data Structures | |
struct | qtmr_channel_input_config_t |
The structure for configuring Quad Timer channel input signal. More... | |
struct | qtmr_channel_count_config_t |
The structure for configuring Quad Timer channel counting behaviors. More... | |
struct | qtmr_channel_output_config_t |
The structure for configuring Quad Timer channel output signal (OFLAG). More... | |
struct | qtmr_channel_cooperation_config_t |
The structure for configuring Quad Timer channel cooperation mode with other channels. More... | |
struct | qtmr_channel_config_t |
Quad Timer channel configuration covering all channel configurable fields. More... | |
struct | qtmr_input_pin_filter_config_t |
The structure for configuring Quad Timer module input pin filter. More... | |
struct | qtmr_config_t |
Quad Timer module configuration which contain channel config structure pointers and input pin filter config structure pointers. More... | |
Driver version | |
#define | FSL_QTMR_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
Version. | |
Initialization and deinitialization Interfaces | |
void | QTMR_Init (TMR_Type *base, const qtmr_config_t *psConfig) |
Initialization Quad Timer module with provided structure. More... | |
void | QTMR_Deinit (TMR_Type *base) |
De-initialization Quad Timer module. More... | |
void | QTMR_GetChannelDefaultConfig (qtmr_channel_config_t *psConfig) |
Gets an available pre-defined options for Quad Timer channel module's configuration. More... | |
void | QTMR_SetupChannleConfig (TMR_Type *base, qtmr_channel_number_t eChannelNumber, const qtmr_channel_config_t *psConfig) |
Setup a Quad Timer channel with provided structure. More... | |
Input signal control related Interfaces | |
static void | QTMR_SetPrimaryCountSource (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_primary_count_source_t ePrimarySource) |
Sets primary input source. More... | |
static void | QTMR_SetSecondaryCountSource (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_secondary_count_source_t source) |
Sets secondary input source. More... | |
void | QTMR_SetSecondarySourceInputCaptureMode (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_secondary_source_capture_mode_t eCaptureMode) |
Sets secondary input capture mode. More... | |
static void | QTMR_EnableSecondarySourceFault (TMR_Type *base, qtmr_channel_number_t eChannelNumber, bool bEnable) |
Enables/Disables secondary input source signal fault feature. More... | |
static void | QTMR_EnableInputInvert (TMR_Type *base, qtmr_channel_number_t eChannelNumber, bool bEnable) |
Enables/Disables input pin signal polarity invert feature. More... | |
static void | QTMR_SetInputFilter (TMR_Type *base, qtmr_input_pin_t ePin, uint8_t u8Count, uint8_t u8Period) |
Sets input filter for one input pin. More... | |
static uint16_t | QTMR_GetInputPinValueInSecondarySource (TMR_Type *base, qtmr_channel_number_t eChannelNumber) |
Gets the external input signal value selected via the secondary input source. More... | |
Channel count related Interfaces | |
void | QTMR_SetCountMode (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_count_mode_t eCountMode) |
Sets channel count mode. More... | |
static void | QTMR_SetCountLength (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_count_length_t eLength) |
Sets channel count length. More... | |
static void | QTMR_SetCountDirection (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_count_direction_t eDirection) |
Sets channel count direction. More... | |
static qtmr_channel_count_direction_t | QTMR_GetCountDirection (TMR_Type *base, qtmr_channel_number_t eChannelNumber) |
Gets channel count direction. More... | |
static void | QTMR_SetCountTimes (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_count_times_t eTimes) |
Sets channel count times. More... | |
static void | QTMR_SetCountLoadMode (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_count_load_mode_t eLoadMode) |
Sets channel count load mode. More... | |
static void | QTMR_SetCompare1PreloadControl (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_count_preload_mode_t ePreloadMode) |
Sets channel preload mode for compare register 1. More... | |
static void | QTMR_SetCompare2PreloadControl (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_count_preload_mode_t ePreloadMode) |
Sets channel preload mode for compare register 2. More... | |
static void | QTMR_SetCompare1PreloadValue (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Comp1Preload) |
Sets channel compare register 1 preload register value. More... | |
static void | QTMR_SetCompare2PreloadValue (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Comp2Preload) |
Sets channel compare register 2 preload register value. More... | |
static void | QTMR_SetLoadValue (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Load) |
Sets channel load register value. More... | |
static void | QTMR_SetCompare1Value (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Comp1) |
Sets channel count compare register 1. More... | |
static void | QTMR_SetCompare2Value (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Comp2) |
Sets channel count compare register 2. More... | |
static uint16_t | QTMR_ReadCaptureValue (TMR_Type *base, qtmr_channel_number_t eChannelNumber) |
Gets channel capture register value. More... | |
static uint16_t | QTMR_GetHoldValue (TMR_Type *base, qtmr_channel_number_t eChannelNumber) |
Gets channel hold register value. More... | |
static void | QTMR_SetCounterValue (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Count) |
Sets channel counter register value. More... | |
static uint16_t | QTMR_GetCounterValue (TMR_Type *base, qtmr_channel_number_t eChannelNumber) |
Reads channel counter register value. More... | |
Channel output signal (OFLAG) related Interfaces | |
static void | QTMR_SetOutputMode (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_output_mode_t eOutputMode) |
Sets Channel output signal (OFLAG) work mode. More... | |
static void | QTMR_SetOutputValueOnForce (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_output_value_on_force_t eValue) |
Sets the value of output signal when a force event occurs. More... | |
static void | QTMR_EnableOutputInvert (TMR_Type *base, qtmr_channel_number_t eChannelNumber, bool bEnable) |
Enables/Disables output signal polarity invert feature. More... | |
static void | QTMR_EnableSwForceOutput (TMR_Type *base, qtmr_channel_number_t eChannelNumber) |
Enables software triggers a FORCE command to output signal. More... | |
static void | QTMR_EnableOutputPin (TMR_Type *base, qtmr_channel_number_t eChannelNumber, bool bEnable) |
Enables/Disables output signal (OFLAG) drive on the external pin feature. More... | |
Channel cooperation control related Interfaces | |
static void | QTMR_EnableMasterMode (TMR_Type *base, qtmr_channel_number_t eChannelNumber, bool bEnable) |
Enables/Disables channel master mode. More... | |
static void | QTMR_EnableMasterForceOFLAG (TMR_Type *base, qtmr_channel_number_t eChannelNumber, bool bEnable) |
Enables/Disables force the channel output signal (OFLAG) state by master channel compare event. More... | |
static void | QTMR_EnableMasterReInit (TMR_Type *base, qtmr_channel_number_t eChannelNumber, bool bEnable) |
Enables/Disables channel be re-initialized by master channel compare event feature. More... | |
DMA control Interfaces | |
static void | QTMR_EnableDma (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Mask) |
Enables the Quad Timer DMA request according to a provided mask. More... | |
static void | QTMR_DisableDma (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Mask) |
Disables the Quad Timer DMA request according to a provided mask. More... | |
Interrupt control Interfaces | |
static void | QTMR_EnableInterrupts (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Mask) |
Enables the Quad Timer interrupts according to a provided mask. More... | |
static void | QTMR_DisableInterrupts (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Mask) |
Disables the Quad Timer interrupts according to a provided mask. More... | |
QTMR channel Status Flag Interfaces | |
static uint16_t | QTMR_GetStatusFlags (TMR_Type *base, qtmr_channel_number_t eChannelNumber) |
Gets the Quad Timer status flags. More... | |
static void | QTMR_ClearStatusFlags (TMR_Type *base, qtmr_channel_number_t eChannelNumber, uint16_t u16Mask) |
Clears the Quad Timer status flags. More... | |
QTMR channel debug control Interface | |
static void | QTMR_SetDebugActions (TMR_Type *base, qtmr_channel_number_t eChannelNumber, qtmr_channel_debug_action_t eDebugMode) |
Sets channel debug actions. More... | |
QTMR channels enable/disable control Interfaces | |
static void | QTMR_EnableChannels (TMR_Type *base, uint16_t u16Mask) |
Enables the Quad Timer channels according to a provided mask. More... | |
static void | QTMR_DisableChannels (TMR_Type *base, uint16_t u16Mask) |
Disables the Quad Timer channels according to a provided mask. More... | |
struct qtmr_channel_input_config_t |
Data Fields | |
qtmr_channel_primary_count_source_t | ePrimarySource: 4U |
Specify the primary input source. More... | |
qtmr_channel_secondary_count_source_t | eSecondarySource: 2U |
Specify the secondary input source. More... | |
bool | bEnableSecondarySrcFaultFunction: 1U |
true: The selected secondary input acts as a fault signal which can clear the channel output signal when it is set, false: Fault function disabled. More... | |
bool | eEnableInputInvert: 1U |
true: Invert input signal value when select input pin as primary or/and secondary input source false: no operation. More... | |
qtmr_channel_primary_count_source_t qtmr_channel_input_config_t::ePrimarySource |
qtmr_channel_secondary_count_source_t qtmr_channel_input_config_t::eSecondarySource |
bool qtmr_channel_input_config_t::bEnableSecondarySrcFaultFunction |
bool qtmr_channel_input_config_t::eEnableInputInvert |
struct qtmr_channel_count_config_t |
Data Fields | |
qtmr_channel_count_mode_t | eCountMode: 4U |
Configures channel count mode. More... | |
qtmr_channel_count_length_t | eCountLength: 1U |
Configures channel count length. More... | |
qtmr_channel_count_direction_t | eCountDir: 1U |
Configures channel count direction. More... | |
qtmr_channel_count_times_t | eCountTimes: 1U |
Configures channel count times. More... | |
qtmr_channel_count_load_mode_t | eCountLoadMode: 1U |
Configures channel count load mode. More... | |
qtmr_channel_count_mode_t qtmr_channel_count_config_t::eCountMode |
qtmr_channel_count_length_t qtmr_channel_count_config_t::eCountLength |
qtmr_channel_count_direction_t qtmr_channel_count_config_t::eCountDir |
qtmr_channel_count_times_t qtmr_channel_count_config_t::eCountTimes |
qtmr_channel_count_load_mode_t qtmr_channel_count_config_t::eCountLoadMode |
struct qtmr_channel_output_config_t |
Data Fields | |
qtmr_channel_output_mode_t | eOutputMode: 3U |
Configures channel output signal work mode. More... | |
qtmr_channel_output_value_on_force_t | eOutputValueOnForce: 1U |
The value of output signal when force event occur. More... | |
bool | bEnableOutputInvert: 1U |
True: the polarity of output signal will be inverted, false: The output signal is not inverted. More... | |
bool | bEnableSwForceOutput: 1U |
True: forces the current value of eOFLAGValueOnForce to output signal. More... | |
bool | bEnableOutputPin: 1U |
True: the output signal is driven on the external pin. More... | |
qtmr_channel_output_mode_t qtmr_channel_output_config_t::eOutputMode |
qtmr_channel_output_value_on_force_t qtmr_channel_output_config_t::eOutputValueOnForce |
bool qtmr_channel_output_config_t::bEnableOutputInvert |
bool qtmr_channel_output_config_t::bEnableSwForceOutput |
false: no operation.
bool qtmr_channel_output_config_t::bEnableOutputPin |
false: the external pin is configured as an input.
struct qtmr_channel_cooperation_config_t |
Data Fields | |
bool | bEnableMasterReInit: 1U |
true: Master channel within the module can re-initialize this channel when it has a compare event, false: no operation. More... | |
bool | bEnableMasterForceOFLAG: 1U |
true: Master channel within the module can force this channel OFLAG signal when it has a compare event, false: no operation. More... | |
bool | bEnableMasterMode: 1U |
true: This channel is configured as mater channel, it can broadcast compare event to all channels within the module to re-initialize channel and/or force channel output signal, false: no operation. More... | |
bool qtmr_channel_cooperation_config_t::bEnableMasterReInit |
bool qtmr_channel_cooperation_config_t::bEnableMasterForceOFLAG |
bool qtmr_channel_cooperation_config_t::bEnableMasterMode |
struct qtmr_channel_config_t |
Data Fields | |
qtmr_channel_input_config_t | sInputConfig |
Configures channel input signal. More... | |
qtmr_channel_count_config_t | sCountConfig |
Configures channel count work mode. More... | |
qtmr_channel_output_config_t | sOutputConfig |
Configures channel output signal (OFLAG) work mode. More... | |
qtmr_channel_debug_action_t | eDebugMode |
Configures channel operation in chip debug mode. More... | |
uint16_t | u16EnabledInterruptMask |
The mask of the interrupts to be enabled, should be the OR'ed of _qtmr_channel_interrupt_enable. More... | |
uint16_t | u16EnabledDMAMask |
The mask of the interrupts to be enabled, should be the OR'ed of _qtmr_channel_dma_enable. More... | |
uint16_t | u16Comp1 |
Value for Channel compare register 1. More... | |
uint16_t | u16Comp2 |
Value for Channel compare register 2. More... | |
uint16_t | u16Comp1Preload |
Value for Channel compare 1 preload register. More... | |
uint16_t | u16Comp2Preload |
Value for Channel compare 2 preload register. More... | |
uint16_t | u16Load |
Value for Channel load register. More... | |
uint16_t | u16Count |
Value for Channel counter value register. More... | |
bool | bEnableChannel |
True: enable the channel prescaler (if it is being used) and counter false: disable channel. More... | |
qtmr_channel_input_config_t qtmr_channel_config_t::sInputConfig |
qtmr_channel_count_config_t qtmr_channel_config_t::sCountConfig |
qtmr_channel_output_config_t qtmr_channel_config_t::sOutputConfig |
qtmr_channel_debug_action_t qtmr_channel_config_t::eDebugMode |
uint16_t qtmr_channel_config_t::u16EnabledInterruptMask |
uint16_t qtmr_channel_config_t::u16EnabledDMAMask |
uint16_t qtmr_channel_config_t::u16Comp1 |
uint16_t qtmr_channel_config_t::u16Comp2 |
uint16_t qtmr_channel_config_t::u16Comp1Preload |
uint16_t qtmr_channel_config_t::u16Comp2Preload |
uint16_t qtmr_channel_config_t::u16Load |
uint16_t qtmr_channel_config_t::u16Count |
bool qtmr_channel_config_t::bEnableChannel |
struct qtmr_input_pin_filter_config_t |
struct qtmr_config_t |
enum qtmr_input_pin_t |
When "channel output 0~3" or "IP bus clock prescaler" is chosen, active edge is the rising edge. When "input pin 0~3" is chosen, active edge and active level is determined by input invert feature (IPS). Disable input invert feature means active edge is rising edge, active level is high level, enable input invert feature means active edge is falling edge, active level is low level.
enum _qtmr_channel_enable |
void QTMR_Init | ( | TMR_Type * | base, |
const qtmr_config_t * | psConfig | ||
) |
This function can initial one or more channels of the Quad Timer module.
This examples shows how only initial channel 0.
base | Quad Timer peripheral base address. |
psConfig | Pointer to user's Quad Timer config structure. See qtmr_config_t. |
void QTMR_Deinit | ( | TMR_Type * | base | ) |
base | Quad Timer peripheral base address. |
void QTMR_GetChannelDefaultConfig | ( | qtmr_channel_config_t * | psConfig | ) |
This function initializes the channel configuration structure with a free run 16bit timer work setting. The default values are:
psConfig | Pointer to user's Quad Timer channel config structure. See qtmr_channel_config_t. |
void QTMR_SetupChannleConfig | ( | TMR_Type * | base, |
qtmr_channel_number_t | eChannelNumber, | ||
const qtmr_channel_config_t * | psConfig | ||
) |
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
psConfig | Pointer to user's Quad Timer channel config structure. See qtmr_channel_config_t. |
|
inlinestatic |
This function select the primary input source, it can select from "input pin 0~3", "channel output 0~3" and "IP bus clock prescaler".
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
ePrimarySource | The primary input source. See qtmr_channel_primary_count_source_t. |
|
inlinestatic |
This function select the secondary input source, it can select from "input pin 0~3".
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
source | The Secondary input source. See qtmr_secondary_count_source_t. |
void QTMR_SetSecondarySourceInputCaptureMode | ( | TMR_Type * | base, |
qtmr_channel_number_t | eChannelNumber, | ||
qtmr_channel_secondary_source_capture_mode_t | eCaptureMode | ||
) |
This function select the capture mode for secondary input, it can select from "disable capture", "capture on rising/falling edge" and "capture on both edges". Need enable capture mode when input edge interrupt is needed.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eCaptureMode | The capture mode of secondary input. See qtmr_channel_secondary_source_capture_mode_t. |
|
inlinestatic |
Enable fault feature will make secondary input acts as a fault signal so that the channel output signal (OFLAG) is cleared when the secondary input is set.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
bEnable | Enable the feature or not.
|
|
inlinestatic |
This function enables/disables input pin signal polarity invert feature.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
bEnable | Enable the feature or not.
|
|
inlinestatic |
Sets input filter if the input signal is noisy.
base | Quad Timer peripheral base address. |
ePin | Quad Timer input pin number. See qtmr_input_pin_t. |
u8Count | Range is 0~7, represent the number of consecutive samples that must agree prior to the input filter accepting an input transition. Actual consecutive samples numbers is (u8Count + 3). |
u8Period | Represent the sampling period (in IP bus clock cycles) of the input pin signals. Each input is sampled multiple times at the rate specified by this field. If u8Period is 0, then the input pin filter is bypassed. |
|
inlinestatic |
This function read the value of the secondary input source, the input pin IPS and filtering have been applied to the read back value.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
void QTMR_SetCountMode | ( | TMR_Type * | base, |
qtmr_channel_number_t | eChannelNumber, | ||
qtmr_channel_count_mode_t | eCountMode | ||
) |
This function select channel basic count mode which trigger by primary input or/and secondary input events.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eCountMode | The mode of operation for the count. See qtmr_counting_mode_t. |
|
inlinestatic |
This function select channel single count length from "until roll over" or "until compare". "until roll over" means count until 0xFFFF, "until compare" means count until reach COMP1 (for count up) or COMP2 (for count up) value (unless the output signal is in alternating compare mode, this mode make channel use COMP1 and COMP2 alternately).
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eLength | The channel count length. See qtmr_channel_count_length_t. |
|
inlinestatic |
This function select channel count direction from "count up" or "count down". Under normal count mode, this function decide the count direction directly, when chose "secondary specifies direction" count mode, count direction decide by "the secondary input level" XOR with "the function selection".
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eDirection | The channel count direction. See qtmr_channel_count_direction_t. |
|
inlinestatic |
This function read the channel count direction of the last count during quadrature encoded count mode.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
|
inlinestatic |
This function select channel count times from "once" or "repeatedly". If select "once" with "until compare", channel will stop when reach COMP1 (for count up) or COMP2 (for count up) (unless the output signal is in alternating compare mode, this mode will make channel reaching COMP1, re-initializes then count reaching COMP2, and then stops).
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eTimes | The channel count times. See qtmr_channel_count_times_t. |
|
inlinestatic |
This function select channel count re-initialized load mode from "normal" or "alternative". "normal" means channel counter re-initialized from LOAD register when compare event, "alternative" means channel counter can re-initialized from LOAD (count up) or CMPLD2 (count down) when compare event.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eLoadMode | The channel count load mode. See qtmr_channel_count_load_mode_t. |
|
inlinestatic |
This function select channel preload mode for compare register 1. Default the COMP1 register never preload, when enabled, the COMP1 can preload from CMPLD1 register when COMP1 or COMP2 compare event.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
ePreloadMode | The compare register 1 preload mode. See qtmr_channel_count_preload_mode_t. |
|
inlinestatic |
This function select channel preload mode for compare register 2. Default the COMP2 register never preload, when enabled, the COMP2 can preload from CMPLD2 register when COMP1 or COMP2 compare event.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
ePreloadMode | The compare register 2 preload mode. See qtmr_channel_count_preload_mode_t. |
|
inlinestatic |
This function set the CMPLD1 register value. The COMP1 can preload from CMPLD1 register when preload mode is not "never preload".
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Comp1Preload | Value for Channel compare register 1 preload register. |
|
inlinestatic |
This function set the CMPLD2 register value. The COMP2 can preload from CMPLD2 register when preload mode is not "never preload".
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Comp2Preload | Value for Channel compare register 2 preload register. |
|
inlinestatic |
This function set the LOAD register value. The channel will re-initialize the counter value with this register after counter compare or overflow event.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Load | Value used to initialize the counter after counter compare or overflow event. |
|
inlinestatic |
This function set the COMP1 register value. It use to trigger compare event in count up mode or alternating compare mode.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Comp1 | Value for Channel compare register 1. |
|
inlinestatic |
This function set the COMP2 register value. It use to trigger compare event in count down mode or alternating compare mode.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
comp | Value for Channel compare register 2. |
|
inlinestatic |
This function read the CAPT register value, which store the real-time channel counter value when input capture event.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
|
inlinestatic |
This function read the HOLD register value, which stores the channel counter's values of specific channels whenever any of the four channels within a module is read.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
|
inlinestatic |
This function set the CNTR register value, the channel will start counting based on this value.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Count | The channel counter initialize value. |
|
inlinestatic |
This function read the CNTR register value, which stores the channel real-time channel counting value. This read operation will trigger HOLD register update.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
|
inlinestatic |
This function select channel output signal (OFLAG) work mode base on different channel event.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eOutputMode | The mode of operation for the OFLAG output signal. See qtmr_channel_output_mode_t. |
|
inlinestatic |
This function config the value of output signal when a force event occurs. Force events can be a software command or compare event from a master channel.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eValue | The value of output signal when force event occur. See qtmr_channel_output_value_on_force_t. |
|
inlinestatic |
This function enables/disables the invert feature of output signal (OFLAG).
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
bEnable | Enable the feature or not.
|
|
inlinestatic |
This function uses a software command to trigger force event, which can force the current value of SCTRL[VAL] bit to be written to the OFLAG output.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
|
inlinestatic |
This function enables/disables output signal (OFLAG) drive on the external pin feature.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
bEnable | Enable the feature or not.
|
|
inlinestatic |
This function enables/disables channel master mode.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
bEnable | Enable the feature or not.
|
|
inlinestatic |
This function enables/disables the compare event from master channel within the same module to force the state of this channel OFLAG output signal.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
bEnable | Enable the feature or not.
|
|
inlinestatic |
This function enables/disables the compare event from master channel within the same module to force the re-initialization of this channel.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
bEnable | Enable the feature or not.
|
|
inlinestatic |
This function enables the Quad Timer DMA request according to a provided mask. The mask is a logical OR of enumerators members. See _qtmr_channel_dma_enable. This examples shows how to enable compare 1 register preload DMA request and compare 2 register preload DMA request.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Mask | The QTMR DMA requests to enable. Logical OR of _qtmr_channel_dma_enable. |
|
inlinestatic |
This function disables the Quad Timer DMA request according to a provided mask. The mask is a logical OR of enumerators members. See _qtmr_channel_dma_enable. This examples shows how to disable compare 1 register preload DMA request and compare 2 register preload DMA request.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Mask | The QTMR DMA requests to disable. Logical OR of _qtmr_channel_dma_enable. |
|
inlinestatic |
This function enables the Quad Timer interrupts according to a provided mask. The mask is a logical OR of enumerators members. See _qtmr_channel_interrupt_enable. This examples shows how to enable compare 1 interrupt and compare 2 interrupt.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Mask | The QTMR DMA interrupts to enable. Logical OR of _qtmr_channel_interrupt_enable. |
|
inlinestatic |
This function disables the Quad Timer interrupts according to a provided mask. The mask is a logical OR of enumerators members. See _qtmr_channel_interrupt_enable. This examples shows how to disable compare 1 interrupt and compare 2 interrupt.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
u16Mask | The QTMR DMA interrupts to disable. Logical OR of _qtmr_channel_interrupt_enable. |
|
inlinestatic |
This function gets all QTMR channel status flags. The flags are returned as the logical OR value of the enumerators _qtmr_channel_status_flags. To check for a specific status, compare the return value with enumerators in the _qtmr_channel_status_flags. For example, to check whether the compare flag set.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
|
inlinestatic |
This function clears QTMR channel status flags with a provide mask. The mask is a logical OR of enumerators _qtmr_channel_status_flags. This examples shows how to clear compare 1 flag and compare 2 flag.
base | Quad Timer peripheral base address |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t |
u16Mask | The QTMR status flags to clear. Logical OR of _qtmr_channel_status_flags |
|
inlinestatic |
This function selects the certain actions which will perform when the chip entering debug mode.
base | Quad Timer peripheral base address. |
eChannelNumber | Quad Timer channel number. See qtmr_channel_number_t. |
eDebugMode | The Quad Timer channel actions in response to the chip entering debug mode. See qtmr_channel_debug_action_t. |
|
inlinestatic |
This function enables the Quad Timer channels according to a provided mask. The mask is a logical OR of enumerators _qtmr_channel_enable. This examples shows how to enable channel 0 and channel 1.
base | Quad Timer peripheral base address. |
u16Mask | The QTMR channels to enable. Logical OR of _qtmr_channel_enable. |
|
inlinestatic |
This function disables the Quad Timer channels according to a provided mask. The mask is a logical OR of enumerators _qtmr_channel_enable. This examples shows how to disable channel 0 and channel 1.
base | Quad Timer peripheral base address. |
u16Mask | The QTMR channels to enable. Logical OR of _qtmr_channel_enable. |