|
#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) |
|
|
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...
|
|