ftm_ic_driver.h File Reference
#include "ftm_common.h"

Go to the source code of this file.

Data Structures

struct  ftm_input_ch_param_t
 FlexTimer driver Input capture parameters for each channel. More...
 
struct  ftm_input_param_t
 FlexTimer driver input capture parameters. More...
 

Enumerations

enum  ftm_input_op_mode_t { FTM_EDGE_DETECT = 0U, FTM_SIGNAL_MEASUREMENT = 1U, FTM_NO_OPERATION = 2U }
 FTM status. More...
 
enum  ftm_signal_measurement_mode_t {
  FTM_NO_MEASUREMENT = 0x00U, FTM_RISING_EDGE_PERIOD_MEASUREMENT = 0x01U, FTM_FALLING_EDGE_PERIOD_MEASUREMENT = 0x02U, FTM_PERIOD_ON_MEASUREMENT = 0x03U,
  FTM_PERIOD_OFF_MEASUREMENT = 0x04U
}
 FlexTimer input capture measurement type for dual edge input capture. More...
 
enum  ftm_edge_alignment_mode_t { FTM_NO_PIN_CONTROL = 0x00U, FTM_RISING_EDGE = 0x01U, FTM_FALLING_EDGE = 0x02U, FTM_BOTH_EDGES = 0x03U }
 FlexTimer input capture edge mode, rising edge, or falling edge. More...
 
enum  ftm_ic_op_mode_t {
  FTM_DISABLE_OPERATION = 0x00U, FTM_TIMESTAMP_RISING_EDGE = 0x01U, FTM_TIMESTAMP_FALLING_EDGE = 0x02U, FTM_TIMESTAMP_BOTH_EDGES = 0x03U,
  FTM_MEASURE_RISING_EDGE_PERIOD = 0x04U, FTM_MEASURE_FALLING_EDGE_PERIOD = 0x05U, FTM_MEASURE_PULSE_HIGH = 0x06U, FTM_MEASURE_PULSE_LOW = 0x07U
}
 The measurement type for input capture mode Implements : ftm_ic_op_mode_t_Class. More...
 

Functions

status_t FTM_DRV_InitInputCapture (uint32_t instance, const ftm_input_param_t *param)
 Configures Channel Input Capture for either getting time-stamps on edge detection or on signal measurement . When the edge specified in the captureMode argument occurs on the channel the FTM counter is captured into the CnV register. The user will have to read the CnV register separately to get this value. The filter function is disabled if the filterVal argument passed in is 0. The filter function is available only on channels 0,1,2,3. More...
 
status_t FTM_DRV_DeinitInputCapture (uint32_t instance, const ftm_input_param_t *param)
 Disables input capture mode and clears FTM timer configuration. More...
 
uint16_t FTM_DRV_GetInputCaptureMeasurement (uint32_t instance, uint8_t channel)
 This function is used to calculate the measurement and/or time stamps values which are read from the C(n, n+1)V registers and stored to the static buffers. More...
 
status_t FTM_DRV_StartNewSignalMeasurement (uint32_t instance, uint8_t channel)
 Starts new single-shot signal measurement of the given channel. More...
 
status_t FTM_IC_DRV_SetChannelMode (uint32_t instance, uint8_t channel, ftm_ic_op_mode_t inputMode, bool enableContinuousCapture)
 Set mode operation for channel in the input captue mode. More...