Data Structures | |
struct | ftm_state_t |
FlexTimer state structure of the driver. More... | |
struct | ftm_pwm_sync_t |
FlexTimer Registers sync parameters Please don't use software and hardware trigger simultaneously Implements : ftm_pwm_sync_t_Class. More... | |
struct | ftm_user_config_t |
Configuration structure that the user needs to set. More... | |
Macros | |
#define | FTM_RMW_SC(base, mask, value) (((base)->SC) = ((((base)->SC) & ~(mask)) | (value))) |
FTM_SC - Read and modify and write to Status And Control (RW) More... | |
#define | FTM_RMW_CNT(base, mask, value) (((base)->CNT) = ((((base)->CNT) & ~(mask)) | (value))) |
FTM_CNT - Read and modify and write to Counter (RW) More... | |
#define | FTM_RMW_MOD(base, mask, value) (((base)->MOD) = ((((base)->MOD) & ~(mask)) | (value))) |
FTM_MOD - Read and modify and write Modulo (RW) More... | |
#define | FTM_RMW_CNTIN(base, mask, value) (((base)->CNTIN) = ((((base)->CNTIN) & ~(mask)) | (value))) |
FTM_CNTIN - Read and modify and write Counter Initial Value (RW) More... | |
#define | FTM_RMW_STATUS(base, mask, value) (((base)->STATUS) = ((((base)->STATUS) & ~(mask)) | (value))) |
FTM_STATUS - Read and modify and write Capture And Compare Status (RW) More... | |
#define | FTM_RMW_MODE(base, mask, value) (((base)->MODE) = ((((base)->MODE) & ~(mask)) | (value))) |
FTM_MODE - Read and modify and write Counter Features Mode Selection (RW) More... | |
#define | FTM_RMW_CnSCV_REG(base, channel, mask, value) (((base)->CONTROLS[channel].CnSC) = ((((base)->CONTROLS[channel].CnSC) & ~(mask)) | (value))) |
FTM_CnSCV - Read and modify and write Channel (n) Status And Control (RW) More... | |
#define | FTM_RMW_DEADTIME(base, mask, value) (((base)->DEADTIME) = ((((base)->DEADTIME) & ~(mask)) | (value))) |
FTM_DEADTIME - Read and modify and write Dead-time Insertion Control (RW) More... | |
#define | FTM_RMW_EXTTRIG_REG(base, mask, value) (((base)->EXTTRIG) = ((((base)->EXTTRIG) & ~(mask)) | (value))) |
FTM_EXTTRIG - Read and modify and write External Trigger Control (RW) More... | |
#define | FTM_RMW_FLTCTRL(base, mask, value) (((base)->FLTCTRL) = ((((base)->FLTCTRL) & ~(mask)) | (value))) |
FTM_FLTCTRL - Read and modify and write Fault Control (RW) More... | |
#define | FTM_RMW_FMS(base, mask, value) (((base)->FMS) = ((((base)->FMS) & ~(mask)) | (value))) |
FTM_FMS - Read and modify and write Fault Mode Status (RW) More... | |
#define | FTM_RMW_CONF(base, mask, value) (((base)->CONF) = ((((base)->CONF) & ~(mask)) | (value))) |
FTM_CONF - Read and modify and write Configuration (RW) More... | |
#define | FTM_RMW_POL(base, mask, value) (((base)->POL) = ((((base)->POL) & ~(mask)) | (value))) |
POL - Read and modify and write Polarity (RW) More... | |
#define | FTM_RMW_FILTER(base, mask, value) (((base)->FILTER) = ((((base)->FILTER) & ~(mask)) | (value))) |
FILTER - Read and modify and write Filter (RW) More... | |
#define | FTM_RMW_SYNC(base, mask, value) (((base)->SYNC) = ((((base)->SYNC) & ~(mask)) | (value))) |
SYNC - Read and modify and write Synchronization (RW) More... | |
#define | FTM_RMW_QDCTRL(base, mask, value) (((base)->QDCTRL) = ((((base)->QDCTRL) & ~(mask)) | (value))) |
QDCTRL - Read and modify and write Quadrature Decoder Control And Status (RW) More... | |
#define | FTM_RMW_PAIR0DEADTIME(base, mask, value) (((base)->PAIR0DEADTIME) = ((((base)->PAIR0DEADTIME) & ~(mask)) | (value))) |
FTM_PAIR0DEADTIME - Read and modify and write Dead-time Insertion Control for the pair 0 (RW) More... | |
#define | FTM_RMW_PAIR1DEADTIME(base, mask, value) (((base)->PAIR1DEADTIME) = ((((base)->PAIR1DEADTIME) & ~(mask)) | (value))) |
FTM_PAIR1DEADTIME - Read and modify and write Dead-time Insertion Control for the pair 1 (RW) More... | |
#define | FTM_RMW_PAIR2DEADTIME(base, mask, value) (((base)->PAIR2DEADTIME) = ((((base)->PAIR2DEADTIME) & ~(mask)) | (value))) |
FTM_PAIR2DEADTIME - Read and modify and write Dead-time Insertion Control for the pair 2 (RW) More... | |
#define | FTM_RMW_PAIR3DEADTIME(base, mask, value) (((base)->PAIR3DEADTIME) = ((((base)->PAIR3DEADTIME) & ~(mask)) | (value))) |
FTM_PAIR3DEADTIME - Read and modify and write Dead-time Insertion Control for the pair 3 (RW) More... | |
#define | FTM_RMW_MOD_MIRROR(base, mask, value) (((base)->MOD_MIRROR) = ((((base)->MOD_MIRROR) & ~(mask)) | (value))) |
FTM_MOD_MIRROR - Read and modify and write mirror of modulo value for the FTM counter (RW) More... | |
#define | FTM_RMW_CnV_MIRROR(base, channel, mask, value) (((base)->CV_MIRROR[channel]) = ((((base)->CV_MIRROR[channel]) & ~(mask)) | (value))) |
FTM_CnV_MIRROR - Read and modify and write mirror of channel (n) match value (RW) More... | |
#define | CHAN0_IDX (0U) |
Channel number for CHAN1. More... | |
#define | CHAN1_IDX (1U) |
Channel number for CHAN2. More... | |
#define | CHAN2_IDX (2U) |
Channel number for CHAN3. More... | |
#define | CHAN3_IDX (3U) |
Channel number for CHAN4. More... | |
#define | CHAN4_IDX (4U) |
Channel number for CHAN5. More... | |
#define | CHAN5_IDX (5U) |
Channel number for CHAN6. More... | |
#define | CHAN6_IDX (6U) |
Channel number for CHAN7. More... | |
#define | CHAN7_IDX (7U) |
Functions | |
static void | FTM_DRV_SetClockFilterPs (FTM_Type *const ftmBase, uint8_t filterPrescale) |
Sets the filter Pre-scaler divider. More... | |
static uint8_t | FTM_DRV_GetClockFilterPs (const FTM_Type *ftmBase) |
Reads the FTM filter clock divider. More... | |
static uint16_t | FTM_DRV_GetCounter (const FTM_Type *ftmBase) |
Returns the FTM peripheral current counter value. More... | |
static uint16_t | FTM_DRV_GetMod (const FTM_Type *ftmBase) |
Returns the FTM peripheral counter modulo value. More... | |
static uint16_t | FTM_DRV_GetCounterInitVal (const FTM_Type *ftmBase) |
Returns the FTM peripheral counter initial value. More... | |
static void | FTM_DRV_ClearChSC (FTM_Type *const ftmBase, uint8_t channel) |
Clears the content of Channel (n) Status And Control. More... | |
static uint8_t | FTM_DRV_GetChnEdgeLevel (const FTM_Type *ftmBase, uint8_t channel) |
Gets the FTM peripheral timer channel edge level. More... | |
static void | FTM_DRV_SetChnIcrstCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Configure the feature of FTM counter reset by the selected input capture event. More... | |
static bool | FTM_DRV_IsChnIcrst (const FTM_Type *ftmBase, uint8_t channel) |
Returns whether the FTM FTM counter is reset. More... | |
static void | FTM_DRV_SetChnDmaCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Enables or disables the FTM peripheral timer channel DMA. More... | |
static bool | FTM_DRV_IsChnDma (const FTM_Type *ftmBase, uint8_t channel) |
Returns whether the FTM peripheral timer channel DMA is enabled. More... | |
static void | FTM_DRV_SetTrigModeControlCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Enables or disables the trigger generation on FTM channel outputs. More... | |
static bool | FTM_DRV_GetTriggerControled (const FTM_Type *ftmBase, uint8_t channel) |
Returns whether the trigger mode is enabled. More... | |
static bool | FTM_DRV_GetChInputState (const FTM_Type *ftmBase, uint8_t channel) |
Get the state of channel input. More... | |
static bool | FTM_DRV_GetChOutputValue (const FTM_Type *ftmBase, uint8_t channel) |
Get the value of channel output. More... | |
static uint16_t | FTM_DRV_GetChnCountVal (const FTM_Type *ftmBase, uint8_t channel) |
Gets the FTM peripheral timer channel counter value. More... | |
static bool | FTM_DRV_GetChnEventStatus (const FTM_Type *ftmBase, uint8_t channel) |
Gets the FTM peripheral timer channel event status. More... | |
static uint32_t | FTM_DRV_GetEventStatus (const FTM_Type *ftmBase) |
Gets the FTM peripheral timer status info for all channels. More... | |
static void | FTM_DRV_ClearChnEventStatus (FTM_Type *const ftmBase, uint8_t channel) |
Clears the FTM peripheral timer all channel event status. More... | |
static void | FTM_DRV_SetChnOutputMask (FTM_Type *const ftmBase, uint8_t channel, bool mask) |
Sets the FTM peripheral timer channel output mask. More... | |
static void | FTM_DRV_SetChnOutputInitStateCmd (FTM_Type *const ftmBase, uint8_t channel, bool state) |
Sets the FTM peripheral timer channel output initial state 0 or 1. More... | |
static void | FTM_DRV_DisableFaultInt (FTM_Type *const ftmBase) |
Disables the FTM peripheral timer fault interrupt. More... | |
static void | FTM_DRV_SetCaptureTestCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM peripheral timer capture test mode. More... | |
static bool | FTM_DRV_IsFtmEnable (const FTM_Type *ftmBase) |
Get status of the FTMEN bit in the FTM_MODE register. More... | |
static void | FTM_DRV_SetCountReinitSyncCmd (FTM_Type *const ftmBase, bool enable) |
Determines if the FTM counter is re-initialized when the selected trigger for synchronization is detected. More... | |
static bool | FTM_DRV_IsWriteProtectionEnabled (const FTM_Type *ftmBase) |
Checks whether the write protection is enabled. More... | |
static bool | FTM_DRV_IsFaultInputEnabled (const FTM_Type *ftmBase) |
Checks whether the logic OR of the fault inputs is enabled. More... | |
static bool | FTM_DRV_IsFaultFlagDetected (const FTM_Type *ftmBase, uint8_t channel) |
Checks whether a fault condition is detected at the fault input. More... | |
static void | FTM_DRV_ClearFaultFlagDetected (FTM_Type *const ftmBase, uint8_t channel) |
Clear a fault condition is detected at the fault input. More... | |
static void | FTM_DRV_SetDualChnInvertCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables or disables the channel invert for a channel pair. More... | |
static void | FTM_DRV_SetChnSoftwareCtrlCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Enables or disables the channel software output control. More... | |
static void | FTM_DRV_SetChnSoftwareCtrlVal (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Sets the channel software output control value. More... | |
static void | FTM_DRV_SetGlobalLoadCmd (FTM_Type *const ftmBase) |
Set the global load mechanism. More... | |
static void | FTM_DRV_SetLoadCmd (FTM_Type *const ftmBase, bool enable) |
Enable the global load. More... | |
static void | FTM_DRV_SetHalfCycleCmd (FTM_Type *const ftmBase, bool enable) |
Enable the half cycle reload. More... | |
static void | FTM_DRV_SetPwmLoadCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the loading of MOD, CNTIN and CV with values of their write buffer. More... | |
static void | FTM_DRV_SetPwmLoadChnSelCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Includes or excludes the channel in the matching process. More... | |
static void | FTM_DRV_SetInitTrigOnReloadCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM initialization trigger on Reload Point. More... | |
static void | FTM_DRV_SetGlobalTimeBaseOutputCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM global time base signal generation to other FTM's. More... | |
static void | FTM_DRV_SetGlobalTimeBaseCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM timer global time base. More... | |
static void | FTM_DRV_SetLoadFreq (FTM_Type *const ftmBase, uint8_t val) |
Sets the FTM timer TOF Frequency. More... | |
static void | FTM_DRV_SetExtPairDeadtimeValue (FTM_Type *const ftmBase, uint8_t channelPair, uint8_t value) |
Sets the FTM extended dead-time value for the channel pair. More... | |
static void | FTM_DRV_SetPairDeadtimePrescale (FTM_Type *const ftmBase, uint8_t channelPair, ftm_deadtime_ps_t divider) |
Sets the FTM dead time divider for the channel pair. More... | |
static void | FTM_DRV_SetPairDeadtimeCount (FTM_Type *const ftmBase, uint8_t channelPair, uint8_t count) |
Sets the FTM dead-time value for the channel pair. More... | |
static void | FTM_DRV_SetMirrorMod (FTM_Type *const ftmBase, uint16_t value) |
Sets the mirror of the modulo integer value. More... | |
static uint16_t | FTM_DRV_GetMirrorMod (const FTM_Type *ftmBase) |
Returns the mirror of the FTM peripheral counter modulo value. More... | |
static uint8_t | FTM_DRV_GetModFracVal (const FTM_Type *ftmBase) |
Returns The modulo fractional value is used in the PWM period dithering. More... | |
static void | FTM_DRV_SetMirrorChnMatchVal (FTM_Type *const ftmBase, uint8_t channel, uint16_t value) |
Sets the mirror of the channel (n) match integer value. More... | |
static uint16_t | FTM_DRV_GetMirrorChnMatchVal (const FTM_Type *ftmBase, uint8_t channel) |
Returns the mirror of the channel (n) match integer value. More... | |
static uint8_t | FTM_DRV_GetChnMatchFracVal (const FTM_Type *ftmBase, uint8_t channel) |
Returns the channel (n) match fractional value. More... | |
status_t | FTM_DRV_Init (uint32_t instance, const ftm_user_config_t *info, ftm_state_t *state) |
Initializes the FTM driver. More... | |
status_t | FTM_DRV_Deinit (uint32_t instance) |
Shuts down the FTM driver. More... | |
status_t | FTM_DRV_MaskOutputChannels (uint32_t instance, uint32_t channelsMask, bool softwareTrigger) |
This function will mask the output of the channels and at match events will be ignored by the masked channels. More... | |
status_t | FTM_DRV_SetInitialCounterValue (uint32_t instance, uint16_t counterValue, bool softwareTrigger) |
This function configure the initial counter value. The counter will get this value after an overflow event. More... | |
status_t | FTM_DRV_SetHalfCycleReloadPoint (uint32_t instance, uint16_t reloadPoint, bool softwareTrigger) |
This function configure the value of the counter which will generates an reload point. More... | |
status_t | FTM_DRV_SetSoftOutChnValue (uint32_t instance, uint8_t channelsValues, bool softwareTrigger) |
This function will force the output value of a channel to a specific value. Before using this function it's mandatory to mask the match events using FTM_DRV_MaskOutputChannels and to enable software output control using FTM_DRV_SetSoftwareOutputChannelControl. More... | |
status_t | FTM_DRV_SetSoftwareOutputChannelControl (uint32_t instance, uint8_t channelsMask, bool softwareTrigger) |
This function will configure which output channel can be software controlled. More... | |
status_t | FTM_DRV_SetAllChnSoftwareOutputControl (uint32_t instance, uint8_t channelMask, uint8_t channelValueMask) |
This function will control list of channels by software to force the output to specified value. More... | |
status_t | FTM_DRV_SetInvertingControl (uint32_t instance, uint8_t channelsPairMask, bool softwareTrigger) |
This function will configure if the second channel of a pair will be inverted or not. More... | |
status_t | FTM_DRV_SetModuloCounterValue (uint32_t instance, uint16_t counterValue, bool softwareTrigger) |
This function configure the maximum counter value. More... | |
status_t | FTM_DRV_SetOutputlevel (uint32_t instance, uint8_t channel, uint8_t level) |
This function will set the channel edge or level on the selection of the channel mode. More... | |
status_t | FTM_DRV_SetSync (uint32_t instance, const ftm_pwm_sync_t *param) |
This function configures sync mechanism for some FTM registers (MOD, CNINT, HCR, CnV, OUTMASK, INVCTRL, SWOCTRL). More... | |
status_t | FTM_DRV_EnableInterrupts (uint32_t instance, uint32_t interruptMask) |
This function will enable the generation a list of interrupts. It includes the FTM overflow interrupts, the reload point interrupt, the fault interrupt and the channel (n) interrupt. More... | |
void | FTM_DRV_DisableInterrupts (uint32_t instance, uint32_t interruptMask) |
This function is used to disable some interrupts. More... | |
uint32_t | FTM_DRV_GetEnabledInterrupts (uint32_t instance) |
This function will get the enabled FTM interrupts. More... | |
uint32_t | FTM_DRV_GetStatusFlags (uint32_t instance) |
This function will get the FTM status flags. More... | |
void | FTM_DRV_ClearStatusFlags (uint32_t instance, uint32_t flagMask) |
This function is used to clear the FTM status flags. More... | |
uint32_t | FTM_DRV_GetFrequency (uint32_t instance) |
Retrieves the frequency of the clock source feeding the FTM counter. More... | |
uint16_t | FTM_DRV_ConvertFreqToPeriodTicks (uint32_t instance, uint32_t freqencyHz) |
This function is used to covert the given frequency to period in ticks. More... | |
Variables | |
FTM_Type *const | g_ftmBase [(2u)] |
Table of base addresses for FTM instances. More... | |
const IRQn_Type | g_ftmIrqId [(2u)][(8U)] |
Interrupt vectors for the FTM peripheral. More... | |
const IRQn_Type | g_ftmFaultIrqId [(2u)] |
const IRQn_Type | g_ftmOverflowIrqId [(2u)] |
const IRQn_Type | g_ftmReloadIrqId [(2u)] |
ftm_state_t * | ftmStatePtr [(2u)] |
Pointer to runtime state structure. More... | |
#define CHAN0_IDX (0U) |
Channel number for CHAN1.
Definition at line 197 of file ftm_common.h.
#define CHAN1_IDX (1U) |
Channel number for CHAN2.
Definition at line 199 of file ftm_common.h.
#define CHAN2_IDX (2U) |
Channel number for CHAN3.
Definition at line 201 of file ftm_common.h.
#define CHAN3_IDX (3U) |
Channel number for CHAN4.
Definition at line 203 of file ftm_common.h.
#define CHAN4_IDX (4U) |
Channel number for CHAN5.
Definition at line 205 of file ftm_common.h.
#define CHAN5_IDX (5U) |
Channel number for CHAN6.
Definition at line 207 of file ftm_common.h.
#define CHAN6_IDX (6U) |
Channel number for CHAN7.
Definition at line 209 of file ftm_common.h.
#define CHAN7_IDX (7U) |
Definition at line 211 of file ftm_common.h.
#define FTM_RMW_CnSCV_REG | ( | base, | |
channel, | |||
mask, | |||
value | |||
) | (((base)->CONTROLS[channel].CnSC) = ((((base)->CONTROLS[channel].CnSC) & ~(mask)) | (value))) |
FTM_CnSCV - Read and modify and write Channel (n) Status And Control (RW)
Definition at line 115 of file ftm_common.h.
#define FTM_RMW_CNT | ( | base, | |
mask, | |||
value | |||
) | (((base)->CNT) = ((((base)->CNT) & ~(mask)) | (value))) |
FTM_CNT - Read and modify and write to Counter (RW)
Definition at line 90 of file ftm_common.h.
#define FTM_RMW_CNTIN | ( | base, | |
mask, | |||
value | |||
) | (((base)->CNTIN) = ((((base)->CNTIN) & ~(mask)) | (value))) |
FTM_CNTIN - Read and modify and write Counter Initial Value (RW)
Definition at line 100 of file ftm_common.h.
#define FTM_RMW_CnV_MIRROR | ( | base, | |
channel, | |||
mask, | |||
value | |||
) | (((base)->CV_MIRROR[channel]) = ((((base)->CV_MIRROR[channel]) & ~(mask)) | (value))) |
FTM_CnV_MIRROR - Read and modify and write mirror of channel (n) match value (RW)
Channel number for CHAN0.
Definition at line 190 of file ftm_common.h.
#define FTM_RMW_CONF | ( | base, | |
mask, | |||
value | |||
) | (((base)->CONF) = ((((base)->CONF) & ~(mask)) | (value))) |
FTM_CONF - Read and modify and write Configuration (RW)
Definition at line 139 of file ftm_common.h.
#define FTM_RMW_DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->DEADTIME) = ((((base)->DEADTIME) & ~(mask)) | (value))) |
FTM_DEADTIME - Read and modify and write Dead-time Insertion Control (RW)
Definition at line 120 of file ftm_common.h.
#define FTM_RMW_EXTTRIG_REG | ( | base, | |
mask, | |||
value | |||
) | (((base)->EXTTRIG) = ((((base)->EXTTRIG) & ~(mask)) | (value))) |
FTM_EXTTRIG - Read and modify and write External Trigger Control (RW)
Definition at line 124 of file ftm_common.h.
#define FTM_RMW_FILTER | ( | base, | |
mask, | |||
value | |||
) | (((base)->FILTER) = ((((base)->FILTER) & ~(mask)) | (value))) |
FILTER - Read and modify and write Filter (RW)
Definition at line 149 of file ftm_common.h.
#define FTM_RMW_FLTCTRL | ( | base, | |
mask, | |||
value | |||
) | (((base)->FLTCTRL) = ((((base)->FLTCTRL) & ~(mask)) | (value))) |
FTM_FLTCTRL - Read and modify and write Fault Control (RW)
Definition at line 129 of file ftm_common.h.
#define FTM_RMW_FMS | ( | base, | |
mask, | |||
value | |||
) | (((base)->FMS) = ((((base)->FMS) & ~(mask)) | (value))) |
FTM_FMS - Read and modify and write Fault Mode Status (RW)
Definition at line 134 of file ftm_common.h.
#define FTM_RMW_MOD | ( | base, | |
mask, | |||
value | |||
) | (((base)->MOD) = ((((base)->MOD) & ~(mask)) | (value))) |
FTM_MOD - Read and modify and write Modulo (RW)
Definition at line 95 of file ftm_common.h.
#define FTM_RMW_MOD_MIRROR | ( | base, | |
mask, | |||
value | |||
) | (((base)->MOD_MIRROR) = ((((base)->MOD_MIRROR) & ~(mask)) | (value))) |
FTM_MOD_MIRROR - Read and modify and write mirror of modulo value for the FTM counter (RW)
Definition at line 185 of file ftm_common.h.
#define FTM_RMW_MODE | ( | base, | |
mask, | |||
value | |||
) | (((base)->MODE) = ((((base)->MODE) & ~(mask)) | (value))) |
FTM_MODE - Read and modify and write Counter Features Mode Selection (RW)
Definition at line 110 of file ftm_common.h.
#define FTM_RMW_PAIR0DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->PAIR0DEADTIME) = ((((base)->PAIR0DEADTIME) & ~(mask)) | (value))) |
FTM_PAIR0DEADTIME - Read and modify and write Dead-time Insertion Control for the pair 0 (RW)
Definition at line 164 of file ftm_common.h.
#define FTM_RMW_PAIR1DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->PAIR1DEADTIME) = ((((base)->PAIR1DEADTIME) & ~(mask)) | (value))) |
FTM_PAIR1DEADTIME - Read and modify and write Dead-time Insertion Control for the pair 1 (RW)
Definition at line 169 of file ftm_common.h.
#define FTM_RMW_PAIR2DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->PAIR2DEADTIME) = ((((base)->PAIR2DEADTIME) & ~(mask)) | (value))) |
FTM_PAIR2DEADTIME - Read and modify and write Dead-time Insertion Control for the pair 2 (RW)
Definition at line 174 of file ftm_common.h.
#define FTM_RMW_PAIR3DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->PAIR3DEADTIME) = ((((base)->PAIR3DEADTIME) & ~(mask)) | (value))) |
FTM_PAIR3DEADTIME - Read and modify and write Dead-time Insertion Control for the pair 3 (RW)
Definition at line 179 of file ftm_common.h.
#define FTM_RMW_POL | ( | base, | |
mask, | |||
value | |||
) | (((base)->POL) = ((((base)->POL) & ~(mask)) | (value))) |
POL - Read and modify and write Polarity (RW)
Definition at line 144 of file ftm_common.h.
#define FTM_RMW_QDCTRL | ( | base, | |
mask, | |||
value | |||
) | (((base)->QDCTRL) = ((((base)->QDCTRL) & ~(mask)) | (value))) |
QDCTRL - Read and modify and write Quadrature Decoder Control And Status (RW)
Definition at line 159 of file ftm_common.h.
#define FTM_RMW_SC | ( | base, | |
mask, | |||
value | |||
) | (((base)->SC) = ((((base)->SC) & ~(mask)) | (value))) |
FTM_SC - Read and modify and write to Status And Control (RW)
Definition at line 85 of file ftm_common.h.
#define FTM_RMW_STATUS | ( | base, | |
mask, | |||
value | |||
) | (((base)->STATUS) = ((((base)->STATUS) & ~(mask)) | (value))) |
FTM_STATUS - Read and modify and write Capture And Compare Status (RW)
Definition at line 105 of file ftm_common.h.
#define FTM_RMW_SYNC | ( | base, | |
mask, | |||
value | |||
) | (((base)->SYNC) = ((((base)->SYNC) & ~(mask)) | (value))) |
SYNC - Read and modify and write Synchronization (RW)
Definition at line 154 of file ftm_common.h.
enum ftm_bdm_mode_t |
Options for the FlexTimer behavior in BDM Mode.
Implements : ftm_bdm_mode_t_Class
Definition at line 370 of file ftm_common.h.
enum ftm_clock_ps_t |
FlexTimer pre-scaler factor selection for the clock source. In quadrature decoder mode set FTM_CLOCK_DIVID_BY_1.
Implements : ftm_clock_ps_t_Class
Definition at line 252 of file ftm_common.h.
enum ftm_clock_source_t |
FlexTimer clock source selection.
Implements : ftm_clock_source_t_Class
Enumerator | |
---|---|
FTM_CLOCK_SOURCE_NONE |
None use clock for FTM |
FTM_CLOCK_SOURCE_SYSTEMCLK |
System clock |
FTM_CLOCK_SOURCE_FIXEDCLK |
Fixed clock |
FTM_CLOCK_SOURCE_EXTERNALCLK |
External clock |
Definition at line 238 of file ftm_common.h.
enum ftm_config_mode_t |
FlexTimer operation mode.
Implements : ftm_config_mode_t_Class
Definition at line 221 of file ftm_common.h.
enum ftm_deadtime_ps_t |
FlexTimer pre-scaler factor for the dead-time insertion.
Implements : ftm_deadtime_ps_t_Class
Enumerator | |
---|---|
FTM_DEADTIME_DIVID_BY_1 |
Divide by 1 |
FTM_DEADTIME_DIVID_BY_4 |
Divide by 4 |
FTM_DEADTIME_DIVID_BY_16 |
Divide by 16 |
Definition at line 334 of file ftm_common.h.
List of FTM interrupts.
Implements : ftm_interrupt_option_t_Class
Definition at line 269 of file ftm_common.h.
enum ftm_pwm_sync_mode_t |
FTM update register.
Implements : ftm_pwm_sync_mode_t_Class
Enumerator | |
---|---|
FTM_WAIT_LOADING_POINTS |
FTM register is updated at first loading point |
FTM_UPDATE_NOW |
FTM register is updated immediately |
Definition at line 323 of file ftm_common.h.
FlexTimer quadrature decode modes, phase encode or count and direction mode.
Implements : ftm_quad_decode_mode_t_Class
Enumerator | |
---|---|
FTM_QUAD_PHASE_ENCODE |
Phase encoding mode |
FTM_QUAD_COUNT_AND_DIR |
Counter and direction encoding mode |
Definition at line 346 of file ftm_common.h.
FlexTimer quadrature phase polarities, normal or inverted polarity.
Implements : ftm_quad_phase_polarity_t_Class
Definition at line 357 of file ftm_common.h.
enum ftm_reg_update_t |
FTM sync source.
Implements : ftm_reg_update_t_Class
Enumerator | |
---|---|
FTM_SYSTEM_CLOCK |
Register is updated with its buffer value at all rising edges of system clock |
FTM_PWM_SYNC |
Register is updated with its buffer value at the FTM synchronization |
Definition at line 310 of file ftm_common.h.
enum ftm_status_flag_t |
List of FTM flags.
Implements : ftm_status_flag_t_Class
Definition at line 289 of file ftm_common.h.
|
inlinestatic |
Clears the FTM peripheral timer all channel event status.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_ClearChnEventStatus_Activity
Definition at line 796 of file ftm_common.h.
|
inlinestatic |
Clears the content of Channel (n) Status And Control.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_ClearChSC_Activity
Definition at line 543 of file ftm_common.h.
|
inlinestatic |
Clear a fault condition is detected at the fault input.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel |
Implements : FTM_DRV_ClearFaultFlagDetected_Activity
Definition at line 982 of file ftm_common.h.
void FTM_DRV_ClearStatusFlags | ( | uint32_t | instance, |
uint32_t | flagMask | ||
) |
This function is used to clear the FTM status flags.
[in] | instance | The FTM peripheral instance number. |
[in] | flagMask | The status flags to clear. This is a logical OR of members of the enumeration ftm_status_flag_t |
Definition at line 681 of file ftm_common.c.
uint16_t FTM_DRV_ConvertFreqToPeriodTicks | ( | uint32_t | instance, |
uint32_t | freqencyHz | ||
) |
This function is used to covert the given frequency to period in ticks.
[in] | instance | The FTM peripheral instance number. |
[in] | freqencyHz | Frequency value in Hz. |
Definition at line 788 of file ftm_common.c.
status_t FTM_DRV_Deinit | ( | uint32_t | instance | ) |
Shuts down the FTM driver.
[in] | instance | The FTM peripheral instance number. |
Definition at line 196 of file ftm_common.c.
|
inlinestatic |
Disables the FTM peripheral timer fault interrupt.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_DisableFaultInt_Activity
Definition at line 869 of file ftm_common.h.
void FTM_DRV_DisableInterrupts | ( | uint32_t | instance, |
uint32_t | interruptMask | ||
) |
This function is used to disable some interrupts.
[in] | instance | The FTM peripheral instance number. |
[in] | interruptMask | The mask of interrupt. This is a logical OR of members of the enumeration ftm_interrupt_option_t |
Definition at line 536 of file ftm_common.c.
status_t FTM_DRV_EnableInterrupts | ( | uint32_t | instance, |
uint32_t | interruptMask | ||
) |
This function will enable the generation a list of interrupts. It includes the FTM overflow interrupts, the reload point interrupt, the fault interrupt and the channel (n) interrupt.
[in] | instance | The FTM peripheral instance number. |
[in] | interruptMask | The mask of interrupt. This is a logical OR of members of the enumeration ftm_interrupt_option_t |
Definition at line 485 of file ftm_common.c.
|
inlinestatic |
Get the state of channel input.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_GetChInputState_Activity
Definition at line 709 of file ftm_common.h.
|
inlinestatic |
Gets the FTM peripheral timer channel counter value.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_GetChnCountVal_Activity
Definition at line 746 of file ftm_common.h.
|
inlinestatic |
Gets the FTM peripheral timer channel edge level.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_GetChnEdgeLevel_Activity
Definition at line 565 of file ftm_common.h.
|
inlinestatic |
Gets the FTM peripheral timer channel event status.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_GetChnEventStatus_Activity
Definition at line 766 of file ftm_common.h.
|
inlinestatic |
Returns the channel (n) match fractional value.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel (n) |
Implements : FTM_DRV_GetChnMatchFracVal_Activity
Definition at line 1448 of file ftm_common.h.
|
inlinestatic |
Get the value of channel output.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_GetChOutputValue_Activity
Definition at line 728 of file ftm_common.h.
|
inlinestatic |
Reads the FTM filter clock divider.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_GetClockFilterPs_Activity
Definition at line 488 of file ftm_common.h.
|
inlinestatic |
Returns the FTM peripheral current counter value.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_GetCounter_Activity
Definition at line 502 of file ftm_common.h.
|
inlinestatic |
Returns the FTM peripheral counter initial value.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_GetCounterInitVal_Activity
Definition at line 530 of file ftm_common.h.
uint32_t FTM_DRV_GetEnabledInterrupts | ( | uint32_t | instance | ) |
This function will get the enabled FTM interrupts.
[in] | instance | The FTM peripheral instance number. |
Definition at line 585 of file ftm_common.c.
|
inlinestatic |
Gets the FTM peripheral timer status info for all channels.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_GetEventStatus_Activity
Definition at line 783 of file ftm_common.h.
uint32_t FTM_DRV_GetFrequency | ( | uint32_t | instance | ) |
Retrieves the frequency of the clock source feeding the FTM counter.
Function will return a 0 if no clock source is selected and the FTM counter is disabled
[in] | instance | The FTM peripheral instance number. |
Definition at line 733 of file ftm_common.c.
|
inlinestatic |
Returns the mirror of the channel (n) match integer value.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel (n) |
Implements : FTM_DRV_GetMirrorChnMatchVal_Activity
Definition at line 1432 of file ftm_common.h.
|
inlinestatic |
Returns the mirror of the FTM peripheral counter modulo value.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_GetMirrorMod_Activity
Definition at line 1387 of file ftm_common.h.
|
inlinestatic |
Returns the FTM peripheral counter modulo value.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_GetMod_Activity
Definition at line 516 of file ftm_common.h.
|
inlinestatic |
Returns The modulo fractional value is used in the PWM period dithering.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_GetModFracVal_Activity
Definition at line 1401 of file ftm_common.h.
uint32_t FTM_DRV_GetStatusFlags | ( | uint32_t | instance | ) |
This function will get the FTM status flags.
[in] | instance | The FTM peripheral instance number. |
Definition at line 631 of file ftm_common.c.
|
inlinestatic |
Returns whether the trigger mode is enabled.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_GetTriggerControled_Activity
Definition at line 690 of file ftm_common.h.
status_t FTM_DRV_Init | ( | uint32_t | instance, |
const ftm_user_config_t * | info, | ||
ftm_state_t * | state | ||
) |
Initializes the FTM driver.
[in] | instance | The FTM peripheral instance number. |
[in] | info | The FTM user configuration structure, see ftm_user_config_t. |
[out] | state | The FTM state structure of the driver. |
Definition at line 117 of file ftm_common.c.
|
inlinestatic |
Returns whether the FTM peripheral timer channel DMA is enabled.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_IsChnDma_Activity
Definition at line 650 of file ftm_common.h.
|
inlinestatic |
Returns whether the FTM FTM counter is reset.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_DRV_IsChnIcrst_Activity
Definition at line 610 of file ftm_common.h.
|
inlinestatic |
Checks whether a fault condition is detected at the fault input.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel |
Implements : FTM_DRV_IsFaultFlagDetected_Activity
Definition at line 966 of file ftm_common.h.
|
inlinestatic |
Checks whether the logic OR of the fault inputs is enabled.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_IsFaultInputEnabled_Activity
Definition at line 949 of file ftm_common.h.
|
inlinestatic |
Get status of the FTMEN bit in the FTM_MODE register.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_IsFtmEnable_Activity
Definition at line 900 of file ftm_common.h.
|
inlinestatic |
Checks whether the write protection is enabled.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_DRV_IsWriteProtectionEnabled_Activity
Definition at line 933 of file ftm_common.h.
status_t FTM_DRV_MaskOutputChannels | ( | uint32_t | instance, |
uint32_t | channelsMask, | ||
bool | softwareTrigger | ||
) |
This function will mask the output of the channels and at match events will be ignored by the masked channels.
[in] | instance | The FTM peripheral instance number. |
[in] | channelsMask | The mask which will select which channels will ignore match events. |
[in] | softwareTrigger | If true a software trigger is generate to update PWM parameters. |
Definition at line 216 of file ftm_common.c.
status_t FTM_DRV_SetAllChnSoftwareOutputControl | ( | uint32_t | instance, |
uint8_t | channelMask, | ||
uint8_t | channelValueMask | ||
) |
This function will control list of channels by software to force the output to specified value.
[in] | instance | The FTM peripheral instance number. |
[in] | channelMask | The mask which will configure the channels which can be software controlled. |
[in] | channelValueMask | The values which will be software configured for channels. |
Definition at line 321 of file ftm_common.c.
|
inlinestatic |
Enables or disables the FTM peripheral timer capture test mode.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | Capture Test Mode Enable
|
Implements : FTM_DRV_SetCaptureTestCmd_Activity
Definition at line 884 of file ftm_common.h.
|
inlinestatic |
Enables or disables the FTM peripheral timer channel DMA.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
[in] | enable | Enable DMA transfers for the channel
|
Implements : FTM_DRV_SetChnDmaCmd_Activity
Definition at line 629 of file ftm_common.h.
|
inlinestatic |
Configure the feature of FTM counter reset by the selected input capture event.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
[in] | enable | Enable the FTM counter reset
|
Implements : FTM_DRV_SetChnIcrstCmd_Activity
Definition at line 589 of file ftm_common.h.
|
inlinestatic |
Sets the FTM peripheral timer channel output initial state 0 or 1.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
[in] | state | Initial state for channels output
|
Implements : FTM_DRV_SetChnOutputInitStateCmd_Activity
Definition at line 846 of file ftm_common.h.
|
inlinestatic |
Sets the FTM peripheral timer channel output mask.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
[in] | mask | Value to set Output Mask
|
Implements : FTM_DRV_SetChnOutputMask_Activity
Definition at line 819 of file ftm_common.h.
|
inlinestatic |
Enables or disables the channel software output control.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | Channel to be enabled or disabled |
[in] | enable | State of channel software output control
|
Implements : FTM_DRV_SetChnSoftwareCtrlCmd_Activity
Definition at line 1032 of file ftm_common.h.
|
inlinestatic |
Sets the channel software output control value.
[in] | ftmBase | The FTM base address pointer. |
[in] | channel | Channel to be configured |
[in] | enable | State of software output control value
|
Implements : FTM_DRV_SetChnSoftwareCtrlVal_Activity
Definition at line 1059 of file ftm_common.h.
|
inlinestatic |
Sets the filter Pre-scaler divider.
[in] | ftmBase | The FTM base address pointer |
[in] | filterPrescale | The FTM peripheral clock pre-scale divider |
Implements : FTM_DRV_SetClockFilterPs_Activity
Definition at line 473 of file ftm_common.h.
|
inlinestatic |
Determines if the FTM counter is re-initialized when the selected trigger for synchronization is detected.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | FTM counter re-initialization selection
|
Implements : FTM_DRV_SetCountReinitSyncCmd_Activity
Definition at line 916 of file ftm_common.h.
|
inlinestatic |
Enables or disables the channel invert for a channel pair.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | enable | State of channel invert for a channel pair
|
Implements : FTM_DRV_SetDualChnInvertCmd_Activity
Definition at line 1005 of file ftm_common.h.
|
inlinestatic |
Sets the FTM extended dead-time value for the channel pair.
[in] | ftmBase | The FTM base address pointer |
[in] | channelPair | The FTM peripheral channel pair (n) |
[in] | value | The FTM peripheral extend pre-scale divider using the concatenation with the dead-time value |
Implements : FTM_DRV_SetExtPairDeadtimeValue_Activity
Definition at line 1258 of file ftm_common.h.
|
inlinestatic |
Set the global load mechanism.
[in] | ftmBase | The FTM base address pointer
|
Implements : FTM_DRV_SetGlobalLoadCmd_Activity
Definition at line 1085 of file ftm_common.h.
|
inlinestatic |
Enables or disables the FTM timer global time base.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of global time base
|
Implements : FTM_DRV_SetGlobalTimeBaseCmd_Activity
Definition at line 1229 of file ftm_common.h.
|
inlinestatic |
Enables or disables the FTM global time base signal generation to other FTM's.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of global time base signal
|
Implements : FTM_DRV_SetGlobalTimeBaseOutputCmd_Activity
Definition at line 1213 of file ftm_common.h.
|
inlinestatic |
Enable the half cycle reload.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of the half cycle match as a reload opportunity
|
Implements : FTM_DRV_SetHalfCycleCmd_Activity
Definition at line 1123 of file ftm_common.h.
status_t FTM_DRV_SetHalfCycleReloadPoint | ( | uint32_t | instance, |
uint16_t | reloadPoint, | ||
bool | softwareTrigger | ||
) |
This function configure the value of the counter which will generates an reload point.
[in] | instance | The FTM peripheral instance number. |
[in] | reloadPoint | Counter value which generates the reload point. |
[in] | softwareTrigger | If true a software trigger is generate to update parameters. |
Definition at line 258 of file ftm_common.c.
status_t FTM_DRV_SetInitialCounterValue | ( | uint32_t | instance, |
uint16_t | counterValue, | ||
bool | softwareTrigger | ||
) |
This function configure the initial counter value. The counter will get this value after an overflow event.
[in] | instance | The FTM peripheral instance number. |
[in] | counterValue | Initial counter value. |
[in] | softwareTrigger | If true a software trigger is generate to update parameters. |
Definition at line 237 of file ftm_common.c.
|
inlinestatic |
Enables or disables the FTM initialization trigger on Reload Point.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | bit controls whether an initialization trigger is generated
|
Implements : FTM_DRV_SetInitTrigOnReloadCmd_Activity
Definition at line 1197 of file ftm_common.h.
status_t FTM_DRV_SetInvertingControl | ( | uint32_t | instance, |
uint8_t | channelsPairMask, | ||
bool | softwareTrigger | ||
) |
This function will configure if the second channel of a pair will be inverted or not.
[in] | instance | The FTM peripheral instance number. |
[in] | channelsPairMask | The mask which will configure which channel pair will invert the second channel. |
[in] | softwareTrigger | If true a software trigger is generate to update registers. |
Definition at line 344 of file ftm_common.c.
|
inlinestatic |
Enable the global load.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of the global load mechanism
|
Implements : FTM_DRV_SetLoadCmd_Activity
Definition at line 1100 of file ftm_common.h.
|
inlinestatic |
Sets the FTM timer TOF Frequency.
[in] | ftmBase | The FTM base address pointer |
[in] | val | Value of the TOF bit set frequency |
Implements : FTM_DRV_SetLoadFreq_Activity
Definition at line 1243 of file ftm_common.h.
|
inlinestatic |
Sets the mirror of the channel (n) match integer value.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel (n) |
[in] | value | The value to be set to the mirror of the channel (n) match integer value |
Implements : FTM_DRV_SetMirrorChnMatchVal_Activity
Definition at line 1415 of file ftm_common.h.
|
inlinestatic |
Sets the mirror of the modulo integer value.
[in] | ftmBase | The FTM base address pointer |
[in] | value | The value to be set to the timer modulo |
Implements : FTM_DRV_SetMirrorMod_Activity
Definition at line 1372 of file ftm_common.h.
status_t FTM_DRV_SetModuloCounterValue | ( | uint32_t | instance, |
uint16_t | counterValue, | ||
bool | softwareTrigger | ||
) |
This function configure the maximum counter value.
[in] | instance | The FTM peripheral instance number. |
[in] | counterValue | Maximum counter value |
[in] | softwareTrigger | If true a software trigger is generate to update parameters. |
Definition at line 364 of file ftm_common.c.
status_t FTM_DRV_SetOutputlevel | ( | uint32_t | instance, |
uint8_t | channel, | ||
uint8_t | level | ||
) |
This function will set the channel edge or level on the selection of the channel mode.
[in] | instance | The FTM peripheral instance number. |
[in] | channel | The channel number. |
[in] | level | The level or edge selection for channel mode. |
Definition at line 385 of file ftm_common.c.
|
inlinestatic |
Sets the FTM dead-time value for the channel pair.
[in] | ftmBase | The FTM base address pointer |
[in] | channelPair | The FTM peripheral channel pair (n) |
[in] | count | The FTM peripheral selects the dead-time value
|
Implements : FTM_DRV_SetPairDeadtimeCount_Activity
Definition at line 1336 of file ftm_common.h.
|
inlinestatic |
Sets the FTM dead time divider for the channel pair.
[in] | ftmBase | The FTM base address pointer |
[in] | channelPair | The FTM peripheral channel pair (n) |
[in] | divider | The FTM peripheral pre-scaler divider
|
Implements : FTM_DRV_SetPairDeadtimePrescale_Activity
Definition at line 1297 of file ftm_common.h.
|
inlinestatic |
Includes or excludes the channel in the matching process.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | Channel to be configured |
[in] | enable | State of channel
|
Implements : FTM_DRV_SetPwmLoadChnSelCmd_Activity
Definition at line 1170 of file ftm_common.h.
|
inlinestatic |
Enables or disables the loading of MOD, CNTIN and CV with values of their write buffer.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of loading updated values
|
Implements : FTM_DRV_SetPwmLoadCmd_Activity
Definition at line 1146 of file ftm_common.h.
status_t FTM_DRV_SetSoftOutChnValue | ( | uint32_t | instance, |
uint8_t | channelsValues, | ||
bool | softwareTrigger | ||
) |
This function will force the output value of a channel to a specific value. Before using this function it's mandatory to mask the match events using FTM_DRV_MaskOutputChannels and to enable software output control using FTM_DRV_SetSoftwareOutputChannelControl.
[in] | instance | The FTM peripheral instance number. |
[in] | channelsValues | The values which will be software configured for channels. |
[in] | softwareTrigger | If true a software trigger is generate to update registers. |
Definition at line 281 of file ftm_common.c.
status_t FTM_DRV_SetSoftwareOutputChannelControl | ( | uint32_t | instance, |
uint8_t | channelsMask, | ||
bool | softwareTrigger | ||
) |
This function will configure which output channel can be software controlled.
[in] | instance | The FTM peripheral instance number. |
[in] | channelsMask | The mask which will configure the channels which can be software controlled. |
[in] | softwareTrigger | If true a software trigger is generate to update registers. |
Definition at line 301 of file ftm_common.c.
status_t FTM_DRV_SetSync | ( | uint32_t | instance, |
const ftm_pwm_sync_t * | param | ||
) |
This function configures sync mechanism for some FTM registers (MOD, CNINT, HCR, CnV, OUTMASK, INVCTRL, SWOCTRL).
[in] | instance | The FTM peripheral instance number. |
[in] | param | The sync configuration structure. |
Definition at line 409 of file ftm_common.c.
|
inlinestatic |
Enables or disables the trigger generation on FTM channel outputs.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
[in] | enable | Trigger mode control
|
Implements : FTM_DRV_SetTrigModeControlCmd_Activity
Definition at line 669 of file ftm_common.h.
ftm_state_t* ftmStatePtr[(2u)] |
Pointer to runtime state structure.
Definition at line 84 of file ftm_common.c.
FTM_Type* const g_ftmBase[(2u)] |
Table of base addresses for FTM instances.
Definition at line 71 of file ftm_common.c.
const IRQn_Type g_ftmFaultIrqId[(2u)] |
Definition at line 75 of file ftm_common.c.
const IRQn_Type g_ftmIrqId[(2u)][(8U)] |
Interrupt vectors for the FTM peripheral.
Definition at line 74 of file ftm_common.c.
const IRQn_Type g_ftmOverflowIrqId[(2u)] |
Definition at line 76 of file ftm_common.c.
const IRQn_Type g_ftmReloadIrqId[(2u)] |
Definition at line 77 of file ftm_common.c.