![]() |
S32 SDK
|
FlexTimer Module Hardware Abstraction Level. FTM HAL provides low level APIs for reading and writing to all hardware features of the FlexTimer module.
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 | 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) |
Enumerations | |
enum | ftm_clock_source_t { FTM_CLOCK_SOURCE_NONE = 0x00U, FTM_CLOCK_SOURCE_SYSTEMCLK = 0x01U, FTM_CLOCK_SOURCE_FIXEDCLK = 0x02U, FTM_CLOCK_SOURCE_EXTERNALCLK = 0x03U } |
FlexTimer clock source selection. More... | |
enum | ftm_clock_ps_t { FTM_CLOCK_DIVID_BY_1 = 0x00U, FTM_CLOCK_DIVID_BY_2 = 0x01U, FTM_CLOCK_DIVID_BY_4 = 0x02U, FTM_CLOCK_DIVID_BY_8 = 0x03U, FTM_CLOCK_DIVID_BY_16 = 0x04U, FTM_CLOCK_DIVID_BY_32 = 0x05U, FTM_CLOCK_DIVID_BY_64 = 0x06U, FTM_CLOCK_DIVID_BY_128 = 0x07U } |
FlexTimer pre-scaler factor selection for the clock source. In quadrature decoder mode set FTM_CLOCK_DIVID_BY_1. More... | |
enum | ftm_deadtime_ps_t { FTM_DEADTIME_DIVID_BY_1 = 0x01U, FTM_DEADTIME_DIVID_BY_4 = 0x02U, FTM_DEADTIME_DIVID_BY_16 = 0x03U } |
FlexTimer pre-scaler factor for the dead-time insertion. More... | |
enum | ftm_polarity_t { FTM_POLARITY_LOW = 0x00U, FTM_POLARITY_HIGH = 0x01U } |
FlexTimer PWM output pulse mode, high-true or low-true on match up. More... | |
enum | ftm_second_channel_polarity_t { FTM_MAIN_INVERTED = 0x01U, FTM_MAIN_DUPLICATED = 0x00U } |
FlexTimer PWM channel (n+1) polarity for combine mode. More... | |
enum | ftm_quad_decode_mode_t { FTM_QUAD_PHASE_ENCODE = 0x00U, FTM_QUAD_COUNT_AND_DIR = 0x01U } |
FlexTimer quadrature decode modes, phase encode or count and direction mode. More... | |
enum | ftm_quad_phase_polarity_t { FTM_QUAD_PHASE_NORMAL = 0x00U, FTM_QUAD_PHASE_INVERT = 0x01U } |
FlexTimer quadrature phase polarities, normal or inverted polarity. More... | |
enum | ftm_bdm_mode_t { FTM_BDM_MODE_00 = 0x00U, FTM_BDM_MODE_01 = 0x01U, FTM_BDM_MODE_10 = 0x02U, FTM_BDM_MODE_11 = 0x03U } |
Options for the FlexTimer behavior in BDM Mode. More... | |
enum | ftm_fault_mode_t { FTM_FAULT_CONTROL_DISABLED = 0x00U, FTM_FAULT_CONTROL_MAN_EVEN = 0x01U, FTM_FAULT_CONTROL_MAN_ALL = 0x02U, FTM_FAULT_CONTROL_AUTO_ALL = 0x03U } |
FlexTimer fault control. More... | |
enum | ftm_reg_update_t { FTM_SYSTEM_CLOCK = 0U, FTM_PWM_SYNC = 1U } |
FTM sync source. More... | |
enum | ftm_pwm_sync_mode_t { FTM_WAIT_LOADING_POINTS = 0U, FTM_UPDATE_NOW = 1U } |
FTM update register. More... | |
Functions | |
static void | FTM_HAL_SetHalfCycleValue (FTM_Type *const ftmBase, uint16_t value) |
Sets the value for the half cycle reload register. More... | |
static void | FTM_HAL_SetClockFilterPs (FTM_Type *const ftmBase, uint8_t filterPrescale) |
Sets the filter Pre-scaler divider. More... | |
static uint8_t | FTM_HAL_GetClockFilterPs (const FTM_Type *ftmBase) |
Reads the FTM filter clock divider. More... | |
static void | FTM_HAL_SetClockSource (FTM_Type *const ftmBase, ftm_clock_source_t clock) |
Sets the FTM clock source. More... | |
static uint8_t | FTM_HAL_GetClockSource (const FTM_Type *ftmBase) |
Reads the FTM clock source. More... | |
static void | FTM_HAL_SetClockPs (FTM_Type *const ftmBase, ftm_clock_ps_t ps) |
Sets the FTM clock divider. More... | |
static uint8_t | FTM_HAL_GetClockPs (const FTM_Type *ftmBase) |
Reads the FTM clock divider. More... | |
static void | FTM_HAL_SetTimerOverflowInt (FTM_Type *const ftmBase, bool state) |
Enables the FTM peripheral timer overflow interrupt. More... | |
static bool | FTM_HAL_IsOverflowIntEnabled (const FTM_Type *ftmBase) |
Reads the bit that controls enabling the FTM timer overflow interrupt. More... | |
static void | FTM_HAL_EnablePwmChannelOutputs (FTM_Type *const ftmBase, uint8_t channel) |
Enable PWM channel Outputs. More... | |
static void | FTM_HAL_DisablePwmChannelOutputs (FTM_Type *const ftmBase, uint8_t channel) |
Disable PWM channel Outputs. More... | |
static void | FTM_HAL_ClearTimerOverflow (FTM_Type *const ftmBase) |
Clears the timer overflow interrupt flag. More... | |
static bool | FTM_HAL_HasTimerOverflowed (const FTM_Type *ftmBase) |
Returns the FTM peripheral timer overflow interrupt flag. More... | |
static void | FTM_HAL_SetCpwms (FTM_Type *const ftmBase, bool mode) |
Sets the FTM count direction bit. More... | |
static bool | FTM_HAL_GetCpwms (const FTM_Type *ftmBase) |
Gets the FTM count direction bit. More... | |
static void | FTM_HAL_SetReIntEnabledCmd (FTM_Type *const ftmBase, bool enable) |
Set the FTM reload interrupt enable. More... | |
static bool | FTM_HAL_GetReloadFlag (const FTM_Type *ftmBase) |
Get the state whether the FTM counter reached a reload point. More... | |
static void | FTM_HAL_ClearReloadFlag (FTM_Type *const ftmBase) |
Clears the reload flag bit. More... | |
static void | FTM_HAL_SetCounter (FTM_Type *const ftmBase, uint16_t value) |
Sets the FTM peripheral current counter value. More... | |
static uint16_t | FTM_HAL_GetCounter (const FTM_Type *ftmBase) |
Returns the FTM peripheral current counter value. More... | |
static void | FTM_HAL_SetMod (FTM_Type *const ftmBase, uint16_t value) |
Sets the FTM peripheral timer modulo value. More... | |
static uint16_t | FTM_HAL_GetMod (const FTM_Type *ftmBase) |
Returns the FTM peripheral counter modulo value. More... | |
static void | FTM_HAL_SetCounterInitVal (FTM_Type *const ftmBase, uint16_t value) |
Sets the FTM peripheral timer counter initial value. More... | |
static uint16_t | FTM_HAL_GetCounterInitVal (const FTM_Type *ftmBase) |
Returns the FTM peripheral counter initial value. More... | |
static void | FTM_HAL_SetChnMSnBAMode (FTM_Type *const ftmBase, uint8_t channel, uint8_t selection) |
Sets the FTM peripheral timer channel mode. More... | |
static void | FTM_HAL_SetChnEdgeLevel (FTM_Type *const ftmBase, uint8_t channel, uint8_t level) |
Sets the FTM peripheral timer channel edge level. More... | |
static void | FTM_HAL_ClearChSC (FTM_Type *const ftmBase, uint8_t channel) |
Clears the content of Channel (n) Status And Control. More... | |
static uint8_t | FTM_HAL_GetChnMode (const FTM_Type *ftmBase, uint8_t channel) |
Gets the FTM peripheral timer channel mode. More... | |
static uint8_t | FTM_HAL_GetChnEdgeLevel (const FTM_Type *ftmBase, uint8_t channel) |
Gets the FTM peripheral timer channel edge level. More... | |
static void | FTM_HAL_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_HAL_IsChnIcrst (const FTM_Type *ftmBase, uint8_t channel) |
Returns whether the FTM FTM counter is reset. More... | |
static void | FTM_HAL_SetChnDmaCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Enables or disables the FTM peripheral timer channel DMA. More... | |
static bool | FTM_HAL_IsChnDma (const FTM_Type *ftmBase, uint8_t channel) |
Returns whether the FTM peripheral timer channel DMA is enabled. More... | |
static bool | FTM_HAL_IsChnIntEnabled (const FTM_Type *ftmBase, uint8_t channel) |
Get FTM channel(n) interrupt enabled or not. More... | |
static void | FTM_HAL_EnableChnInt (FTM_Type *const ftmBase, uint8_t channel) |
Enables the FTM peripheral timer channel(n) interrupt. More... | |
static void | FTM_HAL_DisableChnInt (FTM_Type *const ftmBase, uint8_t channel) |
Disables the FTM peripheral timer channel(n) interrupt. More... | |
static bool | FTM_HAL_HasChnEventOccurred (const FTM_Type *ftmBase, uint8_t channel) |
Returns whether any event for the FTM peripheral timer channel has occurred. More... | |
static void | FTM_HAL_ClearChnEventFlag (FTM_Type *const ftmBase, uint8_t channel) |
Clear the channel flag by writing a 0 to the CHF bit. More... | |
static void | FTM_HAL_SetTrigModeControlCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Enables or disables the trigger generation on FTM channel outputs. More... | |
static bool | FTM_HAL_GetTriggerControled (const FTM_Type *ftmBase, uint8_t channel) |
Returns whether the trigger mode is enabled. More... | |
static bool | FTM_HAL_GetChInputState (const FTM_Type *ftmBase, uint8_t channel) |
Get the state of channel input. More... | |
static bool | FTM_HAL_GetChOutputValue (const FTM_Type *ftmBase, uint8_t channel) |
Get the value of channel output. More... | |
static void | FTM_HAL_SetChnCountVal (FTM_Type *const ftmBase, uint8_t channel, uint16_t value) |
Sets the FTM peripheral timer channel counter value. More... | |
static uint16_t | FTM_HAL_GetChnCountVal (const FTM_Type *ftmBase, uint8_t channel) |
Gets the FTM peripheral timer channel counter value. More... | |
static bool | FTM_HAL_GetChnEventStatus (const FTM_Type *ftmBase, uint8_t channel) |
Gets the FTM peripheral timer channel event status. More... | |
static uint32_t | FTM_HAL_GetEventStatus (const FTM_Type *ftmBase) |
Gets the FTM peripheral timer status info for all channels. More... | |
static void | FTM_HAL_ClearChnEventStatus (FTM_Type *const ftmBase, uint8_t channel) |
Clears the FTM peripheral timer all channel event status. More... | |
static void | FTM_HAL_SetOutmaskReg (FTM_Type *const ftmBase, uint32_t regVal) |
Writes the provided value to the OUTMASK register. More... | |
static void | FTM_HAL_SetChnOutputMask (FTM_Type *const ftmBase, uint8_t channel, bool mask) |
Sets the FTM peripheral timer channel output mask. More... | |
static void | FTM_HAL_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_HAL_SetChnOutputPolarityCmd (FTM_Type *const ftmBase, uint8_t channel, ftm_polarity_t polarity) |
Sets the FTM peripheral timer channel output polarity. More... | |
static void | FTM_HAL_SetChnFaultInputPolarityCmd (FTM_Type *const ftmBase, uint8_t fltChannel, ftm_polarity_t polarity) |
Sets the FTM peripheral timer channel fault input polarity. More... | |
static void | FTM_HAL_SetFaultInt (FTM_Type *const ftmBase, bool state) |
Enables/disables the FTM peripheral timer fault interrupt. More... | |
static void | FTM_HAL_DisableFaultInt (FTM_Type *const ftmBase) |
Disables the FTM peripheral timer fault interrupt. More... | |
static bool | FTM_HAL_IsFaultIntEnabled (const FTM_Type *ftmBase) |
Return true/false whether the Fault interrupt was enabled or not. More... | |
static void | FTM_HAL_ClearFaultsIsr (FTM_Type *const ftmBase) |
Clears all fault interrupt flags that are active. More... | |
static void | FTM_HAL_SetFaultControlMode (FTM_Type *const ftmBase, ftm_fault_mode_t mode) |
Defines the FTM fault control mode. More... | |
static void | FTM_HAL_SetCaptureTestCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM peripheral timer capture test mode. More... | |
static void | FTM_HAL_SetWriteProtectionCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM write protection. More... | |
static void | FTM_HAL_Enable (FTM_Type *const ftmBase, bool enable) |
Enables the FTM peripheral timer group. More... | |
static bool | FTM_HAL_IsFtmEnable (const FTM_Type *ftmBase) |
Get status of the FTMEN bit in the FTM_MODE register. More... | |
static void | FTM_HAL_SetInitChnOutputCmd (FTM_Type *const ftmBase, bool enable) |
Initializes the channels output. More... | |
static void | FTM_HAL_SetPwmSyncMode (FTM_Type *const ftmBase, bool enable) |
Sets the FTM peripheral timer sync mode. More... | |
static void | FTM_HAL_SetSoftwareTriggerCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM peripheral timer software trigger. More... | |
static void | FTM_HAL_SetHardwareSyncTriggerSrc (FTM_Type *const ftmBase, uint8_t trigger_num, bool enable) |
Sets the FTM hardware synchronization trigger. More... | |
static void | FTM_HAL_SetOutmaskPwmSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Determines when the OUTMASK register is updated with the value of its buffer. More... | |
static void | FTM_HAL_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 void | FTM_HAL_SetMaxLoadingCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM peripheral timer maximum loading points. More... | |
static void | FTM_HAL_SetMinLoadingCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM peripheral timer minimum loading points. More... | |
static void | FTM_HAL_SetDualChnMofCombineCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables the FTM peripheral timer channel modified combine mode. More... | |
static void | FTM_HAL_SetDualChnFaultCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables the FTM peripheral timer channel pair fault control. More... | |
static void | FTM_HAL_SetDualChnPwmSyncCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables or disables the FTM peripheral timer channel pair counter PWM sync. More... | |
static void | FTM_HAL_SetDualChnDeadtimeCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables or disabled the FTM peripheral timer channel pair deadtime insertion. More... | |
static void | FTM_HAL_SetDualChnDecapCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables or disables the FTM peripheral timer channel dual edge capture. More... | |
static void | FTM_HAL_SetDualEdgeCaptureCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables the FTM peripheral timer dual edge capture mode. More... | |
static bool | FTM_HAL_GetDualEdgeCaptureBit (const FTM_Type *ftmBase, uint8_t chnlPairNum) |
Enables the FTM peripheral timer dual edge capture mode. More... | |
static void | FTM_HAL_SetDualChnCompCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, ftm_second_channel_polarity_t polarity) |
Enables or disables the FTM peripheral timer channel pair output complement mode. More... | |
static void | FTM_HAL_SetDualChnCombineCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables or disables the FTM peripheral timer channel pair output combine mode. More... | |
static bool | FTM_HAL_GetDualChnCombineCmd (const FTM_Type *ftmBase, uint8_t chnlPairNum) |
Verify if an channels pair is used in combine mode or not. More... | |
static bool | FTM_HAL_GetDualChnMofCombineCmd (const FTM_Type *ftmBase, uint8_t chnlPairNum) |
Verify if an channels pair is used in the modified combine mode or not. More... | |
static void | FTM_HAL_SetExtDeadtimeValue (FTM_Type *const ftmBase, uint8_t value) |
Sets the FTM extended dead-time value. More... | |
static void | FTM_HAL_SetDeadtimePrescale (FTM_Type *const ftmBase, ftm_deadtime_ps_t divider) |
Sets the FTM dead time divider. More... | |
static void | FTM_HAL_SetDeadtimeCount (FTM_Type *const ftmBase, uint8_t count) |
Sets the FTM deadtime value. More... | |
static void | FTM_HAL_SetInitTriggerCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the generation of the trigger when the FTM counter is equal to the CNTIN register. More... | |
static bool | FTM_HAL_IsChnTriggerGenerated (const FTM_Type *ftmBase) |
Checks whether any channel trigger event has occurred. More... | |
static void | FTM_HAL_ClearChnTriggerFlag (FTM_Type *const ftmBase) |
Clear the channel trigger flag. More... | |
static bool | FTM_HAL_GetDetectedFaultInput (const FTM_Type *ftmBase) |
Gets the FTM detected fault input. More... | |
static bool | FTM_HAL_IsWriteProtectionEnabled (const FTM_Type *ftmBase) |
Checks whether the write protection is enabled. More... | |
static bool | FTM_HAL_IsFaultInputEnabled (const FTM_Type *ftmBase) |
Checks whether the logic OR of the fault inputs is enabled. More... | |
static bool | FTM_HAL_IsFaultFlagDetected (const FTM_Type *ftmBase, uint8_t channel) |
Checks whether a fault condition is detected at the fault input. More... | |
static void | FTM_HAL_ClearFaultFlagDetected (FTM_Type *const ftmBase, uint8_t channel) |
Clear a fault condition is detected at the fault input. More... | |
static void | FTM_HAL_SetQuadDecoderCmd (FTM_Type *const ftmBase, bool enable) |
Enables the channel quadrature decoder. More... | |
static void | FTM_HAL_SetQuadPhaseAFilterCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the phase A input filter. More... | |
static void | FTM_HAL_SetQuadPhaseBFilterCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the phase B input filter. More... | |
static void | FTM_HAL_SetQuadPhaseAPolarity (FTM_Type *const ftmBase, ftm_quad_phase_polarity_t mode) |
Selects polarity for the quadrature decode phase A input. More... | |
static void | FTM_HAL_SetQuadPhaseBPolarity (FTM_Type *const ftmBase, ftm_quad_phase_polarity_t mode) |
Selects polarity for the quadrature decode phase B input. More... | |
static void | FTM_HAL_SetQuadMode (FTM_Type *const ftmBase, ftm_quad_decode_mode_t quadMode) |
Sets the encoding mode used in quadrature decoding mode. More... | |
static bool | FTM_HAL_GetQuadDir (const FTM_Type *ftmBase) |
Gets the FTM counter direction in quadrature mode. More... | |
static bool | FTM_HAL_GetQuadTimerOverflowDir (const FTM_Type *ftmBase) |
Gets the Timer overflow direction in quadrature mode. More... | |
static void | FTM_HAL_SetFaultInputFilterVal (FTM_Type *const ftmBase, uint32_t value) |
Sets the fault input filter value. More... | |
static void | FTM_HAL_SetFaultInputFilterCmd (FTM_Type *const ftmBase, uint8_t inputNum, bool enable) |
Enables or disables the fault input filter. More... | |
static void | FTM_HAL_ClearFaultControl (FTM_Type *const ftmBase) |
Clears the entire content value of the Fault control register. More... | |
static void | FTM_HAL_SetFaultInputCmd (FTM_Type *const ftmBase, uint8_t inputNum, bool enable) |
Enables or disables the fault input. More... | |
static void | FTM_HAL_SetPwmFaultBehavior (FTM_Type *const ftmBase, bool enable) |
Configures the behavior of the PWM outputs when a fault is detected. More... | |
static void | FTM_HAL_SetDualChnInvertCmd (FTM_Type *const ftmBase, uint8_t chnlPairNum, bool enable) |
Enables or disables the channel invert for a channel pair. More... | |
static void | FTM_HAL_SetInvctrlReg (FTM_Type *const ftmBase, uint32_t regVal) |
Writes the provided value to the Inverting control register. More... | |
static void | FTM_HAL_SetChnSoftwareCtrlCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Enables or disables the channel software output control. More... | |
static void | FTM_HAL_SetAllChnSoftwareCtrlCmd (FTM_Type *const ftmBase, uint8_t channelsMask) |
Enables or disables the channel software output control.The main difference between this function and FTM_HAL_SetChnSoftwareCtrlCmd is that this can configure all the channels in the same time. More... | |
static void | FTM_HAL_SetChnSoftwareCtrlVal (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Sets the channel software output control value. More... | |
static void | FTM_HAL_SetAllChnSoftwareCtrlVal (FTM_Type *const ftmBase, uint8_t channelsValues) |
Sets the channel software output control value. More... | |
static void | FTM_HAL_SetGlobalLoadCmd (FTM_Type *const ftmBase) |
Set the global load mechanism. More... | |
static void | FTM_HAL_SetLoadCmd (FTM_Type *const ftmBase, bool enable) |
Enable the global load. More... | |
static void | FTM_HAL_SetHalfCycleCmd (FTM_Type *const ftmBase, bool enable) |
Enable the half cycle reload. More... | |
static void | FTM_HAL_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_HAL_SetPwmLoadChnSelCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Includes or excludes the channel in the matching process. More... | |
static void | FTM_HAL_SetInitTrigOnReloadCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM initialization trigger on Reload Point. More... | |
static void | FTM_HAL_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_HAL_SetGlobalTimeBaseCmd (FTM_Type *const ftmBase, bool enable) |
Enables or disables the FTM timer global time base. More... | |
static void | FTM_HAL_SetBdmMode (FTM_Type *const ftmBase, ftm_bdm_mode_t val) |
Sets the BDM mode. More... | |
static void | FTM_HAL_SetLoadFreq (FTM_Type *const ftmBase, uint8_t val) |
Sets the FTM timer TOF Frequency. More... | |
static void | FTM_HAL_SetSwoctrlHardwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets the sync mode for the FTM SWOCTRL register when using a hardware trigger. More... | |
static void | FTM_HAL_SetInvctrlHardwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets sync mode for FTM INVCTRL register when using a hardware trigger. More... | |
static void | FTM_HAL_SetOutmaskHardwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets sync mode for FTM OUTMASK register when using a hardware trigger. More... | |
static void | FTM_HAL_SetModCntinCvHardwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets sync mode for FTM MOD, CNTIN and CV registers when using a hardware trigger. More... | |
static void | FTM_HAL_SetCounterHardwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets sync mode for FTM counter register when using a hardware trigger. More... | |
static void | FTM_HAL_SetSwoctrlSoftwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets sync mode for FTM SWOCTRL register when using a software trigger. More... | |
static void | FTM_HAL_SetInvctrlSoftwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets sync mode for FTM INVCTRL register when using a software trigger. More... | |
static void | FTM_HAL_SetOutmaskSoftwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets sync mode for FTM OUTMASK register when using a software trigger. More... | |
static void | FTM_HAL_SetModCntinCvSoftwareSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets sync mode for FTM MOD, CNTIN and CV registers when using a software trigger. More... | |
static void | FTM_HAL_SetHwTriggerSyncModeCmd (FTM_Type *const ftmBase, bool enable) |
Sets hardware trigger mode. More... | |
static void | FTM_HAL_SetCounterSoftwareSyncModeCmd (FTM_Type *const ftmBase, ftm_pwm_sync_mode_t update_mode) |
Sets sync mode for FTM counter register when using a software trigger. More... | |
static void | FTM_HAL_SetPwmSyncModeCmd (FTM_Type *const ftmBase, bool mode) |
Sets the PWM synchronization mode to enhanced or legacy. More... | |
static void | FTM_HAL_SetSwoctrlPwmSyncModeCmd (FTM_Type *const ftmBase, ftm_reg_update_t mode) |
Sets the SWOCTRL register PWM synchronization mode. More... | |
static void | FTM_HAL_SetInvctrlPwmSyncModeCmd (FTM_Type *const ftmBase, ftm_reg_update_t mode) |
Sets the INVCTRL register PWM synchronization mode. More... | |
static void | FTM_HAL_SetCntinPwmSyncModeCmd (FTM_Type *const ftmBase, ftm_reg_update_t mode) |
Sets the CNTIN register PWM synchronization mode. More... | |
static void | FTM_HAL_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_HAL_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_HAL_SetPairDeadtimeCount (FTM_Type *const ftmBase, uint8_t channelPair, uint8_t count) |
Sets the FTM dead-time value for the channel pair. More... | |
void | FTM_HAL_Reset (FTM_Type *const ftmBase) |
Resets the FTM registers. All the register use in the driver should be reset to default value of each register. More... | |
void | FTM_HAL_Init (FTM_Type *const ftmBase, ftm_clock_ps_t ftmClockPrescaler) |
Initializes the FTM. This function will enable the flexTimer module and selects one pre-scale factor for the FTM clock source. More... | |
void | FTM_HAL_SetChnTriggerCmd (FTM_Type *const ftmBase, uint8_t channel, bool enable) |
Enables or disables the generation of the FTM peripheral timer channel trigger when the FTM counter is equal to its initial value. More... | |
void | FTM_HAL_SetChnInputCaptureFilter (FTM_Type *const ftmBase, uint8_t channel, uint8_t value) |
Sets the FTM peripheral timer channel input capture filter value. More... | |
FTM instance number | |
#define | FTM0_IDX (0U) |
Instance number for FTM0. More... | |
#define | FTM1_IDX (1U) |
Instance number for FTM2. More... | |
#define | FTM2_IDX (2U) |
Instance number for FTM3. More... | |
#define | FTM3_IDX (3U) |
#define FTM0_IDX (0U) |
#define FTM_RMW_CnSCV_REG | ( | base, | |
channel, | |||
mask, | |||
value | |||
) | (((base)->CONTROLS[channel].CnSC) = ((((base)->CONTROLS[channel].CnSC) & ~(mask)) | (value))) |
#define FTM_RMW_CNT | ( | base, | |
mask, | |||
value | |||
) | (((base)->CNT) = ((((base)->CNT) & ~(mask)) | (value))) |
#define FTM_RMW_CNTIN | ( | base, | |
mask, | |||
value | |||
) | (((base)->CNTIN) = ((((base)->CNTIN) & ~(mask)) | (value))) |
#define FTM_RMW_CONF | ( | base, | |
mask, | |||
value | |||
) | (((base)->CONF) = ((((base)->CONF) & ~(mask)) | (value))) |
#define FTM_RMW_DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->DEADTIME) = ((((base)->DEADTIME) & ~(mask)) | (value))) |
#define FTM_RMW_EXTTRIG_REG | ( | base, | |
mask, | |||
value | |||
) | (((base)->EXTTRIG) = ((((base)->EXTTRIG) & ~(mask)) | (value))) |
#define FTM_RMW_FILTER | ( | base, | |
mask, | |||
value | |||
) | (((base)->FILTER) = ((((base)->FILTER) & ~(mask)) | (value))) |
#define FTM_RMW_FLTCTRL | ( | base, | |
mask, | |||
value | |||
) | (((base)->FLTCTRL) = ((((base)->FLTCTRL) & ~(mask)) | (value))) |
#define FTM_RMW_FMS | ( | base, | |
mask, | |||
value | |||
) | (((base)->FMS) = ((((base)->FMS) & ~(mask)) | (value))) |
#define FTM_RMW_MOD | ( | base, | |
mask, | |||
value | |||
) | (((base)->MOD) = ((((base)->MOD) & ~(mask)) | (value))) |
#define FTM_RMW_MODE | ( | base, | |
mask, | |||
value | |||
) | (((base)->MODE) = ((((base)->MODE) & ~(mask)) | (value))) |
#define FTM_RMW_PAIR0DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->PAIR0DEADTIME) = ((((base)->PAIR0DEADTIME) & ~(mask)) | (value))) |
#define FTM_RMW_PAIR1DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->PAIR1DEADTIME) = ((((base)->PAIR1DEADTIME) & ~(mask)) | (value))) |
#define FTM_RMW_PAIR2DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->PAIR2DEADTIME) = ((((base)->PAIR2DEADTIME) & ~(mask)) | (value))) |
#define FTM_RMW_PAIR3DEADTIME | ( | base, | |
mask, | |||
value | |||
) | (((base)->PAIR3DEADTIME) = ((((base)->PAIR3DEADTIME) & ~(mask)) | (value))) |
#define FTM_RMW_POL | ( | base, | |
mask, | |||
value | |||
) | (((base)->POL) = ((((base)->POL) & ~(mask)) | (value))) |
#define FTM_RMW_QDCTRL | ( | base, | |
mask, | |||
value | |||
) | (((base)->QDCTRL) = ((((base)->QDCTRL) & ~(mask)) | (value))) |
#define FTM_RMW_SC | ( | base, | |
mask, | |||
value | |||
) | (((base)->SC) = ((((base)->SC) & ~(mask)) | (value))) |
#define FTM_RMW_STATUS | ( | base, | |
mask, | |||
value | |||
) | (((base)->STATUS) = ((((base)->STATUS) & ~(mask)) | (value))) |
#define FTM_RMW_SYNC | ( | base, | |
mask, | |||
value | |||
) | (((base)->SYNC) = ((((base)->SYNC) & ~(mask)) | (value))) |
enum ftm_bdm_mode_t |
Options for the FlexTimer behavior in BDM Mode.
Implements : ftm_bdm_mode_t_Class
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
enum ftm_clock_source_t |
enum ftm_deadtime_ps_t |
enum ftm_fault_mode_t |
FlexTimer fault control.
Implements : ftm_fault_mode_t_Class
enum ftm_polarity_t |
enum ftm_pwm_sync_mode_t |
FlexTimer quadrature phase polarities, normal or inverted polarity.
Implements : ftm_quad_phase_polarity_t_Class
enum ftm_reg_update_t |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Enables the FTM peripheral timer group.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | FTM mode selection
|
Implements : FTM_HAL_Enable_Activity
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Get the state of channel input.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_HAL_GetChInputState_Activity
|
inlinestatic |
|
inlinestatic |
|
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_HAL_GetChnEventStatus_Activity
|
inlinestatic |
|
inlinestatic |
Get the value of channel output.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_HAL_GetChOutputValue_Activity
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Gets the FTM detected fault input.
This function reads the status for all fault inputs
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_HAL_GetDetectedFaultInput_Activity
|
inlinestatic |
Verify if an channels pair is used in combine mode or not.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
Implements : FTM_HAL_GetDualChnCombineCmd_Activity
|
inlinestatic |
Verify if an channels pair is used in the modified combine mode or not.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
Implements : FTM_HAL_GetDualChnMofCombineCmd_Activity
|
inlinestatic |
Enables the FTM peripheral timer dual edge capture mode.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
Implements : FTM_HAL_GetDualEdgeCaptureBit_Activity
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Gets the Timer overflow direction in quadrature mode.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_HAL_GetQuadTimerOverflowDir_Activity
|
inlinestatic |
Get the state whether the FTM counter reached a reload point.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_HAL_GetReloadFlag_Activity
|
inlinestatic |
Returns whether the trigger mode is enabled.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_HAL_GetTriggerControled_Activity
|
inlinestatic |
Returns whether any event for the FTM peripheral timer channel has occurred.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
Implements : FTM_HAL_HasChnEventOccurred_Activity
|
inlinestatic |
Returns the FTM peripheral timer overflow interrupt flag.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_HAL_HasTimerOverflowed_Activity
void FTM_HAL_Init | ( | FTM_Type *const | ftmBase, |
ftm_clock_ps_t | ftmClockPrescaler | ||
) |
|
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_HAL_IsChnDma_Activity
|
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_HAL_IsChnIcrst_Activity
|
inlinestatic |
|
inlinestatic |
|
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_HAL_IsFaultFlagDetected_Activity
|
inlinestatic |
Checks whether the logic OR of the fault inputs is enabled.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_HAL_IsFaultInputEnabled_Activity
|
inlinestatic |
|
inlinestatic |
Get status of the FTMEN bit in the FTM_MODE register.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_HAL_IsFtmEnable_Activity
|
inlinestatic |
Reads the bit that controls enabling the FTM timer overflow interrupt.
[in] | ftmBase | The FTM base address pointer |
Implements : FTM_HAL_IsOverflowIntEnabled_Activity
|
inlinestatic |
void FTM_HAL_Reset | ( | FTM_Type *const | ftmBase | ) |
|
inlinestatic |
Enables or disables the channel software output control.The main difference between this function and FTM_HAL_SetChnSoftwareCtrlCmd is that this can configure all the channels in the same time.
[in] | ftmBase | The FTM base address pointer |
[in] | channelsMask | Channels to be enabled or disabled |
Implements : FTM_HAL_SetAllChnSoftwareCtrlCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets the BDM mode.
[in] | ftmBase | The FTM base address pointer |
[in] | val | The FTM behavior in BDM mode
|
Implements : FTM_HAL_SetBdmMode_Activity
|
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_HAL_SetCaptureTestCmd_Activity
|
inlinestatic |
|
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_HAL_SetChnDmaCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets the FTM peripheral timer channel fault input polarity.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
[in] | polarity | The polarity to be set
|
Implements : FTM_HAL_SetChnFaultInputPolarityCmd_Activity
|
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_HAL_SetChnIcrstCmd_Activity
void FTM_HAL_SetChnInputCaptureFilter | ( | FTM_Type *const | ftmBase, |
uint8_t | channel, | ||
uint8_t | value | ||
) |
|
inlinestatic |
|
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_HAL_SetChnOutputInitStateCmd_Activity
|
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_HAL_SetChnOutputMask_Activity
|
inlinestatic |
Sets the FTM peripheral timer channel output polarity.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
[in] | polarity | The polarity to be set
|
Implements : FTM_HAL_SetChnOutputPolarityCmd_Activity
|
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_HAL_SetChnSoftwareCtrlCmd_Activity
|
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_HAL_SetChnSoftwareCtrlVal_Activity
void FTM_HAL_SetChnTriggerCmd | ( | FTM_Type *const | ftmBase, |
uint8_t | channel, | ||
bool | enable | ||
) |
Enables or disables the generation of the FTM peripheral timer channel trigger when the FTM counter is equal to its initial value.
[in] | ftmBase | The FTM base address pointer |
[in] | channel | The FTM peripheral channel number |
[in] | enable | Enables the generation of the channel trigger
|
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Sets the CNTIN register PWM synchronization mode.
[in] | ftmBase | The FTM base address pointer |
[in] | mode | State of register synchronization
|
Implements : FTM_HAL_SetCntinPwmSyncModeCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets sync mode for FTM counter register when using a hardware trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of FTM counter synchronization
|
Implements : FTM_HAL_SetCounterHardwareSyncModeCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets sync mode for FTM counter register when using a software trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | update_mode | State of FTM counter synchronization
|
Implements : FTM_HAL_SetCounterSoftwareSyncModeCmd_Activity
|
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_HAL_SetCountReinitSyncCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets the FTM deadtime value.
[in] | ftmBase | The FTM base address pointer |
[in] | count | The FTM peripheral pre-scaler divider
|
Implements : FTM_HAL_SetDeadtimeCount_Activity
|
inlinestatic |
Sets the FTM dead time divider.
[in] | ftmBase | The FTM base address pointer |
[in] | divider | The FTM peripheral pre-scaler divider
|
Implements : FTM_HAL_SetDeadtimePrescale_Activity
|
inlinestatic |
Enables or disables the FTM peripheral timer channel pair output combine mode.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | enable | State of channel pair output combine mode
|
Implements : FTM_HAL_SetDualChnCombineCmd_Activity
|
inlinestatic |
Enables or disables the FTM peripheral timer channel pair output complement mode.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | polarity | State of channel pair output complement mode
|
Implements : FTM_HAL_SetDualChnCompCmd_Activity
|
inlinestatic |
Enables or disabled the FTM peripheral timer channel pair deadtime insertion.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | enable | State of channel pair deadtime insertion
|
Implements : FTM_HAL_SetDualChnDeadtimeCmd_Activity
|
inlinestatic |
Enables or disables the FTM peripheral timer channel dual edge capture.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | enable | State of channel dual edge capture
|
Implements : FTM_HAL_SetDualChnDecapCmd_Activity
|
inlinestatic |
Enables the FTM peripheral timer channel pair fault control.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | enable | State of channel pair fault control
|
Implements : FTM_HAL_SetDualChnFaultCmd_Activity
|
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_HAL_SetDualChnInvertCmd_Activity
|
inlinestatic |
Enables the FTM peripheral timer channel modified combine mode.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | enable | State of channel pair outputs modified combine
|
Implements : FTM_HAL_SetDualChnMofCombineCmd_Activity
|
inlinestatic |
Enables or disables the FTM peripheral timer channel pair counter PWM sync.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | enable | State of channel pair counter PWM sync
|
Implements : FTM_HAL_SetDualChnPwmSyncCmd_Activity
|
inlinestatic |
Enables the FTM peripheral timer dual edge capture mode.
[in] | ftmBase | The FTM base address pointer |
[in] | chnlPairNum | The FTM peripheral channel pair number |
[in] | enable | State of dual edge capture mode
|
Implements : FTM_HAL_SetDualEdgeCaptureCmd_Activity
|
inlinestatic |
|
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_HAL_SetExtPairDeadtimeValue_Activity
|
inlinestatic |
Defines the FTM fault control mode.
[in] | ftmBase | The FTM base address pointer |
[in] | mode | Fault control mode value
|
Implements : FTM_HAL_SetFaultControlMode_Activity
|
inlinestatic |
Enables or disables the fault input.
[in] | ftmBase | The FTM base address pointer |
[in] | inputNum | fault input to be configured, valid value 0, 1, 2, 3 |
[in] | enable | State of fault input
|
Implements : FTM_HAL_SetFaultInputCmd_Activity
|
inlinestatic |
Enables or disables the fault input filter.
[in] | ftmBase | The FTM base address pointer |
[in] | inputNum | Fault input to be configured, valid value 0, 1, 2, 3 |
[in] | enable | State of fault input filter
|
Implements : FTM_HAL_SetFaultInputFilterCmd_Activity
|
inlinestatic |
|
inlinestatic |
Enables/disables the FTM peripheral timer fault interrupt.
[in] | ftmBase | The FTM base address pointer |
[in] | state | Timer fault interrupt state
|
Implements : FTM_HAL_SetFaultInt_Activity
|
inlinestatic |
|
inlinestatic |
|
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_HAL_SetGlobalTimeBaseOutputCmd_Activity
|
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_HAL_SetHalfCycleCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets the FTM hardware synchronization trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | trigger_num | Number of trigger
|
[in] | enable | State of trigger
|
Implements : FTM_HAL_SetHardwareSyncTriggerSrc_Activity
|
inlinestatic |
Sets hardware trigger mode.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of hardware trigger mode
|
Implements : FTM_HAL_SetHwTriggerSyncModeCmd_Activity
|
inlinestatic |
Initializes the channels output.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | Initialize the channels output
|
Implements : FTM_HAL_SetInitChnOutputCmd_Activity
|
inlinestatic |
Enables or disables the generation of the trigger when the FTM counter is equal to the CNTIN register.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of initialization trigger
|
Implements : FTM_HAL_SetInitTriggerCmd_Activity
|
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_HAL_SetInitTrigOnReloadCmd_Activity
|
inlinestatic |
Sets sync mode for FTM INVCTRL register when using a hardware trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of inverting control synchronization
|
Implements : FTM_HAL_SetInvctrlHardwareSyncModeCmd_Activity
|
inlinestatic |
Sets the INVCTRL register PWM synchronization mode.
[in] | ftmBase | The FTM base address pointer |
[in] | mode | State of register synchronization
|
Implements : FTM_HAL_SetInvctrlPwmSyncModeCmd_Activity
|
inlinestatic |
Writes the provided value to the Inverting control register.
This function is enable/disable inverting control on multiple channel pairs.
[in] | ftmBase | The FTM base address pointer |
[in] | regVal | Value to be written to the register |
Implements : FTM_HAL_SetInvctrlReg_Activity
|
inlinestatic |
Sets sync mode for FTM INVCTRL register when using a software trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of State of inverting control synchronization
|
Implements : FTM_HAL_SetInvctrlSoftwareSyncModeCmd_Activity
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Enables or disables the FTM peripheral timer maximum loading points.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | Maximum loading point selection
|
Implements : FTM_HAL_SetMaxLoadingCmd_Activity
|
inlinestatic |
Enables or disables the FTM peripheral timer minimum loading points.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | Minimum loading point selection
|
Implements : FTM_HAL_SetMinLoadingCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets sync mode for FTM MOD, CNTIN and CV registers when using a hardware trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of registers synchronization
|
Implements : FTM_HAL_SetModCntinCvHardwareSyncModeCmd_Activity
|
inlinestatic |
Sets sync mode for FTM MOD, CNTIN and CV registers when using a software trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of registers synchronization
|
Implements : FTM_HAL_SetModCntinCvSoftwareSyncModeCmd_Activity
|
inlinestatic |
Sets sync mode for FTM OUTMASK register when using a hardware trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of output mask synchronization
|
Implements : FTM_HAL_SetOutmaskHardwareSyncModeCmd_Activity
|
inlinestatic |
Determines when the OUTMASK register is updated with the value of its buffer.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | Output Mask synchronization selection
|
Implements : FTM_HAL_SetOutmaskPwmSyncModeCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets sync mode for FTM OUTMASK register when using a software trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of output mask synchronization
|
Implements : FTM_HAL_SetOutmaskSoftwareSyncModeCmd_Activity
|
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_HAL_SetPairDeadtimeCount_Activity
|
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_HAL_SetPairDeadtimePrescale_Activity
|
inlinestatic |
Configures the behavior of the PWM outputs when a fault is detected.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of fault output
|
Implements : FTM_HAL_SetPwmFaultBehavior_Activity
|
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_HAL_SetPwmLoadChnSelCmd_Activity
|
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_HAL_SetPwmLoadCmd_Activity
|
inlinestatic |
Sets the FTM peripheral timer sync mode.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | PWM synchronization mode
|
Implements : FTM_HAL_SetPwmSyncMode_Activity
|
inlinestatic |
Sets the PWM synchronization mode to enhanced or legacy.
[in] | ftmBase | The FTM base address pointer |
[in] | mode | State of synchronization mode
|
Implements : FTM_HAL_SetPwmSyncModeCmd_Activity
|
inlinestatic |
|
inlinestatic |
Sets the encoding mode used in quadrature decoding mode.
[in] | ftmBase | The FTM base address pointer |
[in] | quadMode | Quadrature decoder mode selection
|
Implements : FTM_HAL_SetQuadMode_Activity
|
inlinestatic |
|
inlinestatic |
Selects polarity for the quadrature decode phase A input.
[in] | ftmBase | The FTM base address pointer |
[in] | mode | Phase A input polarity selection
|
Implements : FTM_HAL_SetQuadPhaseAPolarity_Activity
|
inlinestatic |
|
inlinestatic |
Selects polarity for the quadrature decode phase B input.
[in] | ftmBase | The FTM base address pointer |
[in] | mode | Phase B input polarity selection
|
Implements : FTM_HAL_SetQuadPhaseBPolarity_Activity
|
inlinestatic |
|
inlinestatic |
Enables or disables the FTM peripheral timer software trigger.
[in] | ftmBase | The FTM base address pointer. |
[in] | enable | Software trigger selection
|
Implements : FTM_HAL_SetSoftwareTriggerCmd_Activity
|
inlinestatic |
Sets the sync mode for the FTM SWOCTRL register when using a hardware trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of software output control synchronization
|
Implements : FTM_HAL_SetSwoctrlHardwareSyncModeCmd_Activity
|
inlinestatic |
Sets the SWOCTRL register PWM synchronization mode.
[in] | ftmBase | The FTM base address pointer |
[in] | mode | State of register synchronization
|
Implements : FTM_HAL_SetSwoctrlPwmSyncModeCmd_Activity
|
inlinestatic |
Sets sync mode for FTM SWOCTRL register when using a software trigger.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | State of software output control synchronization
|
Implements : FTM_HAL_SetSwoctrlSoftwareSyncModeCmd_Activity
|
inlinestatic |
|
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_HAL_SetTrigModeControlCmd_Activity
|
inlinestatic |
Enables or disables the FTM write protection.
[in] | ftmBase | The FTM base address pointer |
[in] | enable | The FTM write protection selection
|
Implements : FTM_HAL_SetWriteProtectionCmd_Activity