Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

The section describes the programming interface of the TSI HAL driver. The TSI HAL driver is designed to control the touch sensing input peripheral and provide basic functions to measure the RAW values of electrode capacitance.

Files

file  fsl_tsi_hal.h
 
file  fsl_tsi_v2_hal_specific.h
 
file  fsl_tsi_v4_hal_specific.h
 

Data Structures

struct  tsi_n_consecutive_scans_limits_t
 TSI low power scan intervals limits. More...
 
struct  tsi_reference_osc_charge_current_limits_t
 TSI Reference oscillator charge current select limits. More...
 
struct  tsi_external_osc_charge_current_limits_t
 TSI External oscillator charge current select limits. More...
 
struct  tsi_active_mode_prescaler_limits_t
 TSI active mode prescaler limits. More...
 
struct  tsi_parameter_limits_t
 TSI operation mode limits. More...
 
struct  tsi_config_t
 TSI configuration structure. More...
 

Enumerations

enum  tsi_status_t { ,
  kStatus_TSI_Busy,
  kStatus_TSI_LowPower,
  kStatus_TSI_Recalibration,
  kStatus_TSI_InvalidChannel,
  kStatus_TSI_InvalidMode,
  kStatus_TSI_Initialized,
  kStatus_TSI_Error
}
 Error codes for the TSI driver. More...
 
enum  tsi_n_consecutive_scans_t {
  kTsiConsecutiveScansNumber_1time = 0,
  kTsiConsecutiveScansNumber_2time = 1,
  kTsiConsecutiveScansNumber_3time = 2,
  kTsiConsecutiveScansNumber_4time = 3,
  kTsiConsecutiveScansNumber_5time = 4,
  kTsiConsecutiveScansNumber_6time = 5,
  kTsiConsecutiveScansNumber_7time = 6,
  kTsiConsecutiveScansNumber_8time = 7,
  kTsiConsecutiveScansNumber_9time = 8,
  kTsiConsecutiveScansNumber_10time = 9,
  kTsiConsecutiveScansNumber_11time = 10,
  kTsiConsecutiveScansNumber_12time = 11,
  kTsiConsecutiveScansNumber_13time = 12,
  kTsiConsecutiveScansNumber_14time = 13,
  kTsiConsecutiveScansNumber_15time = 14,
  kTsiConsecutiveScansNumber_16time = 15,
  kTsiConsecutiveScansNumber_17time = 16,
  kTsiConsecutiveScansNumber_18time = 17,
  kTsiConsecutiveScansNumber_19time = 18,
  kTsiConsecutiveScansNumber_20time = 19,
  kTsiConsecutiveScansNumber_21time = 20,
  kTsiConsecutiveScansNumber_22time = 21,
  kTsiConsecutiveScansNumber_23time = 22,
  kTsiConsecutiveScansNumber_24time = 23,
  kTsiConsecutiveScansNumber_25time = 24,
  kTsiConsecutiveScansNumber_26time = 25,
  kTsiConsecutiveScansNumber_27time = 26,
  kTsiConsecutiveScansNumber_28time = 27,
  kTsiConsecutiveScansNumber_29time = 28,
  kTsiConsecutiveScansNumber_30time = 29,
  kTsiConsecutiveScansNumber_31time = 30,
  kTsiConsecutiveScansNumber_32time = 31
}
 TSI number of scan intervals for each electrode. More...
 
enum  tsi_electrode_osc_prescaler_t {
  kTsiElecOscPrescaler_1div = 0,
  kTsiElecOscPrescaler_2div = 1,
  kTsiElecOscPrescaler_4div = 2,
  kTsiElecOscPrescaler_8div = 3,
  kTsiElecOscPrescaler_16div = 4,
  kTsiElecOscPrescaler_32div = 5,
  kTsiElecOscPrescaler_64div = 6,
  kTsiElecOscPrescaler_128div = 7
}
 TSI electrode oscillator prescaler. More...
 
enum  tsi_low_power_interval_t {
  kTsiLowPowerInterval_1ms = 0,
  kTsiLowPowerInterval_5ms = 1,
  kTsiLowPowerInterval_10ms = 2,
  kTsiLowPowerInterval_15ms = 3,
  kTsiLowPowerInterval_20ms = 4,
  kTsiLowPowerInterval_30ms = 5,
  kTsiLowPowerInterval_40ms = 6,
  kTsiLowPowerInterval_50ms = 7,
  kTsiLowPowerInterval_75ms = 8,
  kTsiLowPowerInterval_100ms = 9,
  kTsiLowPowerInterval_125ms = 10,
  kTsiLowPowerInterval_150ms = 11,
  kTsiLowPowerInterval_200ms = 12,
  kTsiLowPowerInterval_300ms = 13,
  kTsiLowPowerInterval_400ms = 14,
  kTsiLowPowerInterval_500ms = 15
}
 TSI low power scan intervals. More...
 
enum  tsi_reference_osc_charge_current_t {
  kTsiRefOscChargeCurrent_2uA = 0,
  kTsiRefOscChargeCurrent_4uA = 1,
  kTsiRefOscChargeCurrent_6uA = 2,
  kTsiRefOscChargeCurrent_8uA = 3,
  kTsiRefOscChargeCurrent_10uA = 4,
  kTsiRefOscChargeCurrent_12uA = 5,
  kTsiRefOscChargeCurrent_14uA = 6,
  kTsiRefOscChargeCurrent_16uA = 7,
  kTsiRefOscChargeCurrent_18uA = 8,
  kTsiRefOscChargeCurrent_20uA = 9,
  kTsiRefOscChargeCurrent_22uA = 10,
  kTsiRefOscChargeCurrent_24uA = 11,
  kTsiRefOscChargeCurrent_26uA = 12,
  kTsiRefOscChargeCurrent_28uA = 13,
  kTsiRefOscChargeCurrent_30uA = 14,
  kTsiRefOscChargeCurrent_32uA = 15,
  kTsiRefOscChargeCurrent_500nA = 0,
  kTsiRefOscChargeCurrent_1uA = 1,
  kTsiRefOscChargeCurrent_2uA = 2,
  kTsiRefOscChargeCurrent_4uA = 3,
  kTsiRefOscChargeCurrent_8uA = 4,
  kTsiRefOscChargeCurrent_16uA = 5,
  kTsiRefOscChargeCurrent_32uA = 6,
  kTsiRefOscChargeCurrent_64uA = 7
}
 TSI Reference oscillator charge current select. More...
 
enum  tsi_external_osc_charge_current_t {
  kTsiExtOscChargeCurrent_2uA = 0,
  kTsiExtOscChargeCurrent_4uA = 1,
  kTsiExtOscChargeCurrent_6uA = 2,
  kTsiExtOscChargeCurrent_8uA = 3,
  kTsiExtOscChargeCurrent_10uA = 4,
  kTsiExtOscChargeCurrent_12uA = 5,
  kTsiExtOscChargeCurrent_14uA = 6,
  kTsiExtOscChargeCurrent_16uA = 7,
  kTsiExtOscChargeCurrent_18uA = 8,
  kTsiExtOscChargeCurrent_20uA = 9,
  kTsiExtOscChargeCurrent_22uA = 10,
  kTsiExtOscChargeCurrent_24uA = 11,
  kTsiExtOscChargeCurrent_26uA = 12,
  kTsiExtOscChargeCurrent_28uA = 13,
  kTsiExtOscChargeCurrent_30uA = 14,
  kTsiExtOscChargeCurrent_32uA = 15,
  kTsiExtOscChargeCurrent_500nA = 0,
  kTsiExtOscChargeCurrent_1uA = 1,
  kTsiExtOscChargeCurrent_2uA = 2,
  kTsiExtOscChargeCurrent_4uA = 3,
  kTsiExtOscChargeCurrent_8uA = 4,
  kTsiExtOscChargeCurrent_16uA = 5,
  kTsiExtOscChargeCurrent_32uA = 6,
  kTsiExtOscChargeCurrent_64uA = 7
}
 TSI External oscillator charge current select. More...
 
enum  tsi_internal_cap_trim_t {
  kTsiIntCapTrim_0_5pF = 0,
  kTsiIntCapTrim_0_6pF = 1,
  kTsiIntCapTrim_0_7pF = 2,
  kTsiIntCapTrim_0_8pF = 3,
  kTsiIntCapTrim_0_9pF = 4,
  kTsiIntCapTrim_1_0pF = 5,
  kTsiIntCapTrim_1_1pF = 6,
  kTsiIntCapTrim_1_2pF = 7
}
 TSI Internal capacitance trim value. More...
 
enum  tsi_osc_delta_voltage_t {
  kTsiOscDeltaVoltage_100mV = 0,
  kTsiOscDeltaVoltage_150mV = 1,
  kTsiOscDeltaVoltage_200mV = 2,
  kTsiOscDeltaVoltage_250mV = 3,
  kTsiOscDeltaVoltage_300mV = 4,
  kTsiOscDeltaVoltage_400mV = 5,
  kTsiOscDeltaVoltage_500mV = 6,
  kTsiOscDeltaVoltage_600mV = 7
}
 TSI Delta voltage applied to analog oscillators. More...
 
enum  tsi_active_mode_clock_divider_t {
  kTsiActiveClkDiv_1div = 0,
  kTsiActiveClkDiv_2048div = 1
}
 TSI Active mode clock divider. More...
 
enum  tsi_active_mode_clock_source_t {
  kTsiActiveClkSource_BusClock = 0,
  kTsiActiveClkSource_MCGIRCLK = 1,
  kTsiActiveClkSource_OSCERCLK = 2
}
 TSI Active mode clock source. More...
 
enum  tsi_active_mode_prescaler_t {
  kTsiActiveModePrescaler_1div = 0,
  kTsiActiveModePrescaler_2div = 1,
  kTsiActiveModePrescaler_4div = 2,
  kTsiActiveModePrescaler_8div = 3,
  kTsiActiveModePrescaler_16div = 4,
  kTsiActiveModePrescaler_32div = 5,
  kTsiActiveModePrescaler_64div = 6,
  kTsiActiveModePrescaler_128div = 7
}
 TSI active mode prescaler. More...
 
enum  tsi_analog_mode_select_t {
  kTsiAnalogModeSel_Capacitive = 0,
  kTsiAnalogModeSel_NoiseNoFreqLim = 4,
  kTsiAnalogModeSel_NoiseFreqLim = 8
}
 TSI analog mode select. More...
 
enum  tsi_reference_osc_charge_current_t {
  kTsiRefOscChargeCurrent_2uA = 0,
  kTsiRefOscChargeCurrent_4uA = 1,
  kTsiRefOscChargeCurrent_6uA = 2,
  kTsiRefOscChargeCurrent_8uA = 3,
  kTsiRefOscChargeCurrent_10uA = 4,
  kTsiRefOscChargeCurrent_12uA = 5,
  kTsiRefOscChargeCurrent_14uA = 6,
  kTsiRefOscChargeCurrent_16uA = 7,
  kTsiRefOscChargeCurrent_18uA = 8,
  kTsiRefOscChargeCurrent_20uA = 9,
  kTsiRefOscChargeCurrent_22uA = 10,
  kTsiRefOscChargeCurrent_24uA = 11,
  kTsiRefOscChargeCurrent_26uA = 12,
  kTsiRefOscChargeCurrent_28uA = 13,
  kTsiRefOscChargeCurrent_30uA = 14,
  kTsiRefOscChargeCurrent_32uA = 15,
  kTsiRefOscChargeCurrent_500nA = 0,
  kTsiRefOscChargeCurrent_1uA = 1,
  kTsiRefOscChargeCurrent_2uA = 2,
  kTsiRefOscChargeCurrent_4uA = 3,
  kTsiRefOscChargeCurrent_8uA = 4,
  kTsiRefOscChargeCurrent_16uA = 5,
  kTsiRefOscChargeCurrent_32uA = 6,
  kTsiRefOscChargeCurrent_64uA = 7
}
 TSI Reference oscillator charge and discharge current select. More...
 
enum  tsi_oscilator_voltage_rails_t {
  kTsiOscVolRails_Dv_103 = 0,
  kTsiOscVolRails_Dv_073 = 1,
  kTsiOscVolRails_Dv_043 = 2,
  kTsiOscVolRails_Dv_029 = 3
}
 TSI oscilator's voltage rails. More...
 
enum  tsi_external_osc_charge_current_t {
  kTsiExtOscChargeCurrent_2uA = 0,
  kTsiExtOscChargeCurrent_4uA = 1,
  kTsiExtOscChargeCurrent_6uA = 2,
  kTsiExtOscChargeCurrent_8uA = 3,
  kTsiExtOscChargeCurrent_10uA = 4,
  kTsiExtOscChargeCurrent_12uA = 5,
  kTsiExtOscChargeCurrent_14uA = 6,
  kTsiExtOscChargeCurrent_16uA = 7,
  kTsiExtOscChargeCurrent_18uA = 8,
  kTsiExtOscChargeCurrent_20uA = 9,
  kTsiExtOscChargeCurrent_22uA = 10,
  kTsiExtOscChargeCurrent_24uA = 11,
  kTsiExtOscChargeCurrent_26uA = 12,
  kTsiExtOscChargeCurrent_28uA = 13,
  kTsiExtOscChargeCurrent_30uA = 14,
  kTsiExtOscChargeCurrent_32uA = 15,
  kTsiExtOscChargeCurrent_500nA = 0,
  kTsiExtOscChargeCurrent_1uA = 1,
  kTsiExtOscChargeCurrent_2uA = 2,
  kTsiExtOscChargeCurrent_4uA = 3,
  kTsiExtOscChargeCurrent_8uA = 4,
  kTsiExtOscChargeCurrent_16uA = 5,
  kTsiExtOscChargeCurrent_32uA = 6,
  kTsiExtOscChargeCurrent_64uA = 7
}
 TSI External oscillator charge and discharge current select. More...
 
enum  tsi_channel_number_t {
  kTsiChannelNumber_0 = 0,
  kTsiChannelNumber_1 = 1,
  kTsiChannelNumber_2 = 2,
  kTsiChannelNumber_3 = 3,
  kTsiChannelNumber_4 = 4,
  kTsiChannelNumber_5 = 5,
  kTsiChannelNumber_6 = 6,
  kTsiChannelNumber_7 = 7,
  kTsiChannelNumber_8 = 8,
  kTsiChannelNumber_9 = 9,
  kTsiChannelNumber_10 = 10,
  kTsiChannelNumber_11 = 11,
  kTsiChannelNumber_12 = 12,
  kTsiChannelNumber_13 = 13,
  kTsiChannelNumber_14 = 14,
  kTsiChannelNumber_15 = 15
}
 TSI channel number. More...
 

Functions

void TSI_HAL_Init (TSI_Type *base)
 Initialize hardware. More...
 
void TSI_HAL_SetConfiguration (TSI_Type *base, tsi_config_t *config)
 Set configuration of hardware. More...
 
uint32_t TSI_HAL_Recalibrate (TSI_Type *base, tsi_config_t *config, const uint32_t electrodes, const tsi_parameter_limits_t *parLimits)
 Recalibrate TSI hardware. More...
 
void TSI_HAL_EnableLowPower (TSI_Type *base)
 Enable low power for TSI module. More...
 
void TSI_HAL_DisableLowPower (TSI_Type *base)
 Disable low power for TSI module. More...
 
static uint32_t TSI_HAL_IsModuleEnabled (TSI_Type *base)
 Get module flag enable. More...
 
static uint32_t TSI_HAL_GetScanTriggerMode (TSI_Type *base)
 Get TSI scan trigger mode. More...
 
static uint32_t TSI_HAL_IsScanInProgress (TSI_Type *base)
 Get scan in progress flag. More...
 
static uint32_t TSI_HAL_GetEndOfScanFlag (TSI_Type *base)
 Get end of scan flag. More...
 
static uint32_t TSI_HAL_GetOutOfRangeFlag (TSI_Type *base)
 Get out of range flag. More...
 
static
tsi_electrode_osc_prescaler_t 
TSI_HAL_GetPrescaler (TSI_Type *base)
 Get prescaler. More...
 
static tsi_n_consecutive_scans_t TSI_HAL_GetNumberOfScans (TSI_Type *base)
 Get number of scans (NSCN). More...
 
static void TSI_HAL_EnableModule (TSI_Type *base)
 Enable Touch Sensing Input Module. More...
 
static void TSI_HAL_DisableModule (TSI_Type *base)
 Disable Touch Sensing Input Module. More...
 
static void TSI_HAL_EnableStop (TSI_Type *base)
 Enable TSI module in stop mode. More...
 
static void TSI_HAL_DisableStop (TSI_Type *base)
 Disable TSI module in stop mode. More...
 
static void TSI_HAL_EnableOutOfRangeInterrupt (TSI_Type *base)
 Enable out of range interrupt. More...
 
static void TSI_HAL_EnableEndOfScanInterrupt (TSI_Type *base)
 Enable end of scan interrupt. More...
 
static void TSI_HAL_EnablePeriodicalScan (TSI_Type *base)
 Enable periodical (hardware) trigger scan. More...
 
static void TSI_HAL_EnableSoftwareTriggerScan (TSI_Type *base)
 Enable software trigger scan. More...
 
static void TSI_HAL_EnableErrorInterrupt (TSI_Type *base)
 Enable error interrupt. More...
 
static void TSI_HAL_DisableErrorInterrupt (TSI_Type *base)
 Disable error interrupt. More...
 
static void TSI_HAL_ClearOutOfRangeFlag (TSI_Type *base)
 Clear out of range flag. More...
 
static void TSI_HAL_ClearEndOfScanFlag (TSI_Type *base)
 Clear end of scan flag. More...
 
static void TSI_HAL_EnableInterrupt (TSI_Type *base)
 Enable TSI module interrupt. More...
 
static void TSI_HAL_DisableInterrupt (TSI_Type *base)
 Disable TSI interrupt. More...
 
static uint32_t TSI_HAL_IsInterruptEnabled (TSI_Type *base)
 Get interrupt enable flag. More...
 
static void TSI_HAL_StartSoftwareTrigger (TSI_Type *base)
 Start measurement (trigger the new measurement). More...
 
static uint32_t TSI_HAL_IsOverrun (TSI_Type *base)
 Get overrun flag. More...
 
static void TSI_HAL_ClearOverrunFlag (TSI_Type *base)
 Clear over run flag. More...
 
static uint32_t TSI_HAL_GetExternalElectrodeErrorFlag (TSI_Type *base)
 Get external electrode error flag. More...
 
static void TSI_HAL_ClearExternalElectrodeErrorFlag (TSI_Type *base)
 Clear external electrode error flag. More...
 
static void TSI_HAL_SetPrescaler (TSI_Type *base, tsi_electrode_osc_prescaler_t prescaler)
 Set prescaler. More...
 
static void TSI_HAL_SetNumberOfScans (TSI_Type *base, tsi_n_consecutive_scans_t number)
 Set number of scans (NSCN). More...
 
static void TSI_HAL_SetLowPowerScanInterval (TSI_Type *base, tsi_low_power_interval_t interval)
 Set low power scan interval. More...
 
static tsi_low_power_interval_t TSI_HAL_GetLowPowerScanInterval (TSI_Type *base)
 Get low power scan interval. More...
 
static void TSI_HAL_SetLowPowerClock (TSI_Type *base, uint32_t clock)
 Set low power clock. More...
 
static uint32_t TSI_HAL_GetLowPowerClock (TSI_Type *base)
 Get low power clock. More...
 
static void TSI_HAL_SetReferenceChargeCurrent (TSI_Type *base, tsi_reference_osc_charge_current_t current)
 Set the reference oscilator charge current. More...
 
static
tsi_reference_osc_charge_current_t 
TSI_HAL_GetReferenceChargeCurrent (TSI_Type *base)
 Get the reference oscilator charge current. More...
 
static void TSI_HAL_SetElectrodeChargeCurrent (TSI_Type *base, tsi_external_osc_charge_current_t current)
 Set electrode charge current. More...
 
static
tsi_external_osc_charge_current_t 
TSI_HAL_GetElectrodeChargeCurrent (TSI_Type *base)
 Get electrode charge current. More...
 
static void TSI_HAL_SetScanModulo (TSI_Type *base, uint32_t modulo)
 Set scan modulo value. More...
 
static uint32_t TSI_HAL_GetScanModulo (TSI_Type *base)
 Get scan modulo value. More...
 
static void TSI_HAL_SetActiveModeSource (TSI_Type *base, uint32_t source)
 Set active mode source. More...
 
static uint32_t TSI_HAL_GetActiveModeSource (TSI_Type *base)
 Get active mode source. More...
 
static void TSI_HAL_SetActiveModePrescaler (TSI_Type *base, tsi_active_mode_prescaler_t prescaler)
 Set active mode prescaler. More...
 
static uint32_t TSI_HAL_GetActiveModePrescaler (TSI_Type *base)
 Get active mode prescaler. More...
 
static void TSI_HAL_SetLowPowerChannel (TSI_Type *base, uint32_t channel)
 Set low power channel. More...
 
static uint32_t TSI_HAL_GetLowPowerChannel (TSI_Type *base)
 Get low power channel. More...
 
static void TSI_HAL_EnableChannel (TSI_Type *base, uint32_t channel)
 Enable channel. More...
 
static void TSI_HAL_EnableChannels (TSI_Type *base, uint32_t channelsMask)
 Enable channels. More...
 
static void TSI_HAL_DisableChannel (TSI_Type *base, uint32_t channel)
 Disable channel. More...
 
static void TSI_HAL_DisableChannels (TSI_Type *base, uint32_t channelsMask)
 Disable channels. More...
 
static uint32_t TSI_HAL_GetEnabledChannel (TSI_Type *base, uint32_t channel)
 Returns if channel is enabled. More...
 
static uint32_t TSI_HAL_GetEnabledChannels (TSI_Type *base)
 Returns mask of enabled channels. More...
 
static uint16_t TSI_HAL_GetWakeUpChannelCounter (TSI_Type *base)
 Set the Wake up channel counter. More...
 
static uint32_t TSI_HAL_GetCounter (TSI_Type *base, uint32_t channel)
 Get tsi counter on actual channel. More...
 
static void TSI_HAL_SetLowThreshold (TSI_Type *base, uint32_t low_threshold)
 Set low threshold. More...
 
static void TSI_HAL_SetHighThreshold (TSI_Type *base, uint32_t high_threshold)
 Set high threshold. More...
 
static uint32_t TSI_HAL_GetEnableStop (TSI_Type *base)
 Gets the TSI STOP enable. More...
 
static void TSI_HAL_EnableHardwareTriggerScan (TSI_Type *base)
 Enables the periodical (hardware) trigger scan. More...
 
static void TSI_HAL_CurrentSourcePairSwapped (TSI_Type *base)
 Swaps the current sources (CURSW) of electrode oscillator and reference oscillator. More...
 
static void TSI_HAL_CurrentSourcePairNotSwapped (TSI_Type *base)
 Does not swap the current sources (CURSW) of electrode oscillator and reference oscillator. More...
 
static uint32_t TSI_HAL_GetCurrentSourcePairSwapped (TSI_Type *base)
 Gets the current source pair swapped status. More...
 
static void TSI_HAL_SetMeasuredChannelNumber (TSI_Type *base, uint32_t channel)
 Sets the the measured channel number. More...
 
static uint32_t TSI_HAL_GetMeasuredChannelNumber (TSI_Type *base)
 Gets the measured channel number. More...
 
static void TSI_HAL_DmaTransferEnable (TSI_Type *base)
 DMA transfer enable. More...
 
static void TSI_HAL_DmaTransferDisable (TSI_Type *base)
 DMA transfer disable - does not generate DMA transfer request. More...
 
static uint32_t TSI_HAL_IsDmaTransferEnable (TSI_Type *base)
 Gets the DMA transfer enable flag. More...
 
static uint32_t TSI_HAL_GetCounter (TSI_Type *base)
 Gets the conversion counter value. More...
 
static void TSI_HAL_SetMode (TSI_Type *base, tsi_analog_mode_select_t mode)
 Sets the analog mode of the TSI module. More...
 
static tsi_analog_mode_select_t TSI_HAL_GetMode (TSI_Type *base)
 Gets the analog mode of the TSI module. More...
 
static uint32_t TSI_HAL_GetNoiseResult (TSI_Type *base)
 Gets the analog mode of the TSI module. More...
 
static void TSI_HAL_SetOscilatorVoltageRails (TSI_Type *base, tsi_oscilator_voltage_rails_t dvolt)
 Sets the oscillator's voltage rails. More...
 
static
tsi_oscilator_voltage_rails_t 
TSI_HAL_GetOscilatorVoltageRails (TSI_Type *base)
 Gets the oscillator's voltage rails. More...
 

Data Structure Documentation

struct tsi_n_consecutive_scans_limits_t

These constants define the limits of the tsi number of consecutive scans in a TSI instance.

Data Fields

tsi_n_consecutive_scans_t upper
 upper limit of number of consecutive scan
 
tsi_n_consecutive_scans_t lower
 lower limit of number of consecutive scan
 
struct tsi_reference_osc_charge_current_limits_t

These constants define the limits of the TSI Reference oscillator charge current select in a TSI instance.

Data Fields

tsi_reference_osc_charge_current_t upper
 Reference oscillator charge current upper limit.
 
tsi_reference_osc_charge_current_t lower
 Reference oscillator charge current lower limit.
 
struct tsi_external_osc_charge_current_limits_t

These constants define the limits of the TSI External oscillator charge current select in a TSI instance.

Data Fields

tsi_external_osc_charge_current_t upper
 External oscillator charge current upper limit.
 
tsi_external_osc_charge_current_t lower
 External oscillator charge current lower limit.
 
struct tsi_active_mode_prescaler_limits_t

These constants define the limits of the TSI active mode prescaler in a TSI instance.

Data Fields

tsi_active_mode_prescaler_t upper
 Input clock source prescaler upper limit.
 
tsi_active_mode_prescaler_t lower
 Input clock source prescaler lower limit.
 
struct tsi_parameter_limits_t

These constants is used to specify the valid range of settings for the recalibration process of TSI parameters

Data Fields

tsi_n_consecutive_scans_limits_t consNumberOfScan
 number of consecutive scan limits
 
tsi_reference_osc_charge_current_limits_t refOscChargeCurrent
 Reference oscillator charge current limits.
 
tsi_external_osc_charge_current_limits_t extOscChargeCurrent
 External oscillator charge current limits.
 
tsi_active_mode_prescaler_limits_t activeModePrescaler
 Input clock source prescaler limits.
 
struct tsi_config_t

This structure contains the settings for the most common TSI configurations including the TSI module charge currents, number of scans, thresholds, and so on.

Data Fields

tsi_electrode_osc_prescaler_t ps
 Prescaler.
 
tsi_external_osc_charge_current_t extchrg
 Electrode charge current.
 
tsi_reference_osc_charge_current_t refchrg
 Reference charge current.
 
tsi_n_consecutive_scans_t nscn
 Number of scans. More...
 
tsi_analog_mode_select_t mode
 TSI mode of operation. More...
 
tsi_oscilator_voltage_rails_t dvolt
 Oscillator's voltage rails. More...
 
uint16_t thresh
 High threshold. More...
 
uint16_t thresl
 Low threshold. More...
 

Field Documentation

tsi_n_consecutive_scans_t tsi_config_t::nscn
tsi_analog_mode_select_t tsi_config_t::mode
tsi_oscilator_voltage_rails_t tsi_config_t::dvolt
uint16_t tsi_config_t::thresh
uint16_t tsi_config_t::thresl

Enumeration Type Documentation

Enumerator
kStatus_TSI_Busy 

TSI still in progress.

kStatus_TSI_LowPower 

TSI is in low power mode.

kStatus_TSI_Recalibration 

TSI is under recalibration process.

kStatus_TSI_InvalidChannel 

Invalid TSI channel.

kStatus_TSI_InvalidMode 

Invalid TSI mode.

kStatus_TSI_Initialized 

The driver is initialized and ready to measure.

kStatus_TSI_Error 

The general driver error.

These constants define the tsi number of consecutive scans in a TSI instance for each electrode.

Enumerator
kTsiConsecutiveScansNumber_1time 

once per electrode

kTsiConsecutiveScansNumber_2time 

twice per electrode

kTsiConsecutiveScansNumber_3time 

3 times consecutive scan

kTsiConsecutiveScansNumber_4time 

4 times consecutive scan

kTsiConsecutiveScansNumber_5time 

5 times consecutive scan

kTsiConsecutiveScansNumber_6time 

6 times consecutive scan

kTsiConsecutiveScansNumber_7time 

7 times consecutive scan

kTsiConsecutiveScansNumber_8time 

8 times consecutive scan

kTsiConsecutiveScansNumber_9time 

9 times consecutive scan

kTsiConsecutiveScansNumber_10time 

10 times consecutive scan

kTsiConsecutiveScansNumber_11time 

11 times consecutive scan

kTsiConsecutiveScansNumber_12time 

12 times consecutive scan

kTsiConsecutiveScansNumber_13time 

13 times consecutive scan

kTsiConsecutiveScansNumber_14time 

14 times consecutive scan

kTsiConsecutiveScansNumber_15time 

15 times consecutive scan

kTsiConsecutiveScansNumber_16time 

16 times consecutive scan

kTsiConsecutiveScansNumber_17time 

17 times consecutive scan

kTsiConsecutiveScansNumber_18time 

18 times consecutive scan

kTsiConsecutiveScansNumber_19time 

19 times consecutive scan

kTsiConsecutiveScansNumber_20time 

20 times consecutive scan

kTsiConsecutiveScansNumber_21time 

21 times consecutive scan

kTsiConsecutiveScansNumber_22time 

22 times consecutive scan

kTsiConsecutiveScansNumber_23time 

23 times consecutive scan

kTsiConsecutiveScansNumber_24time 

24 times consecutive scan

kTsiConsecutiveScansNumber_25time 

25 times consecutive scan

kTsiConsecutiveScansNumber_26time 

26 times consecutive scan

kTsiConsecutiveScansNumber_27time 

27 times consecutive scan

kTsiConsecutiveScansNumber_28time 

28 times consecutive scan

kTsiConsecutiveScansNumber_29time 

29 times consecutive scan

kTsiConsecutiveScansNumber_30time 

30 times consecutive scan

kTsiConsecutiveScansNumber_31time 

31 times consecutive scan

kTsiConsecutiveScansNumber_32time 

32 times consecutive scan

These constants define the tsi electrode oscillator prescaler in a TSI instance.

Enumerator
kTsiElecOscPrescaler_1div 

Electrode oscillator frequency divided by 1.

kTsiElecOscPrescaler_2div 

Electrode oscillator frequency divided by 2.

kTsiElecOscPrescaler_4div 

Electrode oscillator frequency divided by 4.

kTsiElecOscPrescaler_8div 

Electrode oscillator frequency divided by 8.

kTsiElecOscPrescaler_16div 

Electrode oscillator frequency divided by 16.

kTsiElecOscPrescaler_32div 

Electrode oscillator frequency divided by 32.

kTsiElecOscPrescaler_64div 

Electrode oscillator frequency divided by 64.

kTsiElecOscPrescaler_128div 

Electrode oscillator frequency divided by 128.

These constants define the tsi low power scan intervals in a TSI instance.

Enumerator
kTsiLowPowerInterval_1ms 

1ms scan interval

kTsiLowPowerInterval_5ms 

5ms scan interval

kTsiLowPowerInterval_10ms 

10ms scan interval

kTsiLowPowerInterval_15ms 

15ms scan interval

kTsiLowPowerInterval_20ms 

20ms scan interval

kTsiLowPowerInterval_30ms 

30ms scan interval

kTsiLowPowerInterval_40ms 

40ms scan interval

kTsiLowPowerInterval_50ms 

50ms scan interval

kTsiLowPowerInterval_75ms 

75ms scan interval

kTsiLowPowerInterval_100ms 

100ms scan interval

kTsiLowPowerInterval_125ms 

125ms scan interval

kTsiLowPowerInterval_150ms 

150ms scan interval

kTsiLowPowerInterval_200ms 

200ms scan interval

kTsiLowPowerInterval_300ms 

300ms scan interval

kTsiLowPowerInterval_400ms 

400ms scan interval

kTsiLowPowerInterval_500ms 

500ms scan interval

These constants define the tsi Reference oscillator charge current select in a TSI instance.

Enumerator
kTsiRefOscChargeCurrent_2uA 

Reference oscillator charge current is 2uA.

kTsiRefOscChargeCurrent_4uA 

Reference oscillator charge current is 4uA.

kTsiRefOscChargeCurrent_6uA 

Reference oscillator charge current is 6uA.

kTsiRefOscChargeCurrent_8uA 

Reference oscillator charge current is 8uA.

kTsiRefOscChargeCurrent_10uA 

Reference oscillator charge current is 10uA.

kTsiRefOscChargeCurrent_12uA 

Reference oscillator charge current is 12uA.

kTsiRefOscChargeCurrent_14uA 

Reference oscillator charge current is 14uA.

kTsiRefOscChargeCurrent_16uA 

Reference oscillator charge current is 16uA.

kTsiRefOscChargeCurrent_18uA 

Reference oscillator charge current is 18uA.

kTsiRefOscChargeCurrent_20uA 

Reference oscillator charge current is 20uA.

kTsiRefOscChargeCurrent_22uA 

Reference oscillator charge current is 22uA.

kTsiRefOscChargeCurrent_24uA 

Reference oscillator charge current is 24uA.

kTsiRefOscChargeCurrent_26uA 

Reference oscillator charge current is 26uA.

kTsiRefOscChargeCurrent_28uA 

Reference oscillator charge current is 28uA.

kTsiRefOscChargeCurrent_30uA 

Reference oscillator charge current is 30uA.

kTsiRefOscChargeCurrent_32uA 

Reference oscillator charge current is 32uA.

kTsiRefOscChargeCurrent_500nA 

Reference oscillator charge current is 500nA.

kTsiRefOscChargeCurrent_1uA 

Reference oscillator charge current is 1uA.

kTsiRefOscChargeCurrent_2uA 

Reference oscillator charge current is 2uA.

kTsiRefOscChargeCurrent_4uA 

Reference oscillator charge current is 4uA.

kTsiRefOscChargeCurrent_8uA 

Reference oscillator charge current is 8uA.

kTsiRefOscChargeCurrent_16uA 

Reference oscillator charge current is 16uA.

kTsiRefOscChargeCurrent_32uA 

Reference oscillator charge current is 32uA.

kTsiRefOscChargeCurrent_64uA 

Reference oscillator charge current is 64uA.

These constants define the tsi External oscillator charge current select in a TSI instance.

Enumerator
kTsiExtOscChargeCurrent_2uA 

External oscillator charge current is 2uA.

kTsiExtOscChargeCurrent_4uA 

External oscillator charge current is 4uA.

kTsiExtOscChargeCurrent_6uA 

External oscillator charge current is 6uA.

kTsiExtOscChargeCurrent_8uA 

External oscillator charge current is 8uA.

kTsiExtOscChargeCurrent_10uA 

External oscillator charge current is 10uA.

kTsiExtOscChargeCurrent_12uA 

External oscillator charge current is 12uA.

kTsiExtOscChargeCurrent_14uA 

External oscillator charge current is 14uA.

kTsiExtOscChargeCurrent_16uA 

External oscillator charge current is 16uA.

kTsiExtOscChargeCurrent_18uA 

External oscillator charge current is 18uA.

kTsiExtOscChargeCurrent_20uA 

External oscillator charge current is 20uA.

kTsiExtOscChargeCurrent_22uA 

External oscillator charge current is 22uA.

kTsiExtOscChargeCurrent_24uA 

External oscillator charge current is 24uA.

kTsiExtOscChargeCurrent_26uA 

External oscillator charge current is 26uA.

kTsiExtOscChargeCurrent_28uA 

External oscillator charge current is 28uA.

kTsiExtOscChargeCurrent_30uA 

External oscillator charge current is 30uA.

kTsiExtOscChargeCurrent_32uA 

External oscillator charge current is 32uA.

kTsiExtOscChargeCurrent_500nA 

External oscillator charge current is 500nA.

kTsiExtOscChargeCurrent_1uA 

External oscillator charge current is 1uA.

kTsiExtOscChargeCurrent_2uA 

External oscillator charge current is 2uA.

kTsiExtOscChargeCurrent_4uA 

External oscillator charge current is 4uA.

kTsiExtOscChargeCurrent_8uA 

External oscillator charge current is 8uA.

kTsiExtOscChargeCurrent_16uA 

External oscillator charge current is 16uA.

kTsiExtOscChargeCurrent_32uA 

External oscillator charge current is 32uA.

kTsiExtOscChargeCurrent_64uA 

External oscillator charge current is 64uA.

These constants define the tsi Internal capacitance trim value in a TSI instance.

Enumerator
kTsiIntCapTrim_0_5pF 

0.5 pF internal reference capacitance

kTsiIntCapTrim_0_6pF 

0.6 pF internal reference capacitance

kTsiIntCapTrim_0_7pF 

0.7 pF internal reference capacitance

kTsiIntCapTrim_0_8pF 

0.8 pF internal reference capacitance

kTsiIntCapTrim_0_9pF 

0.9 pF internal reference capacitance

kTsiIntCapTrim_1_0pF 

1.0 pF internal reference capacitance

kTsiIntCapTrim_1_1pF 

1.1 pF internal reference capacitance

kTsiIntCapTrim_1_2pF 

1.2 pF internal reference capacitance

These constants define the tsi Delta voltage applied to analog oscillators in a TSI instance.

Enumerator
kTsiOscDeltaVoltage_100mV 

100 mV delta voltage is applied

kTsiOscDeltaVoltage_150mV 

150 mV delta voltage is applied

kTsiOscDeltaVoltage_200mV 

200 mV delta voltage is applied

kTsiOscDeltaVoltage_250mV 

250 mV delta voltage is applied

kTsiOscDeltaVoltage_300mV 

300 mV delta voltage is applied

kTsiOscDeltaVoltage_400mV 

400 mV delta voltage is applied

kTsiOscDeltaVoltage_500mV 

500 mV delta voltage is applied

kTsiOscDeltaVoltage_600mV 

600 mV delta voltage is applied

These constants define the active mode clock divider in a TSI instance.

Enumerator
kTsiActiveClkDiv_1div 

Active mode clock divider is set to 1.

kTsiActiveClkDiv_2048div 

Active mode clock divider is set to 2048.

These constants define the active mode clock source in a TSI instance.

Enumerator
kTsiActiveClkSource_BusClock 

Active mode clock source is set to Bus Clock.

kTsiActiveClkSource_MCGIRCLK 

Active mode clock source is set to MCG Internal reference clock.

kTsiActiveClkSource_OSCERCLK 

Active mode clock source is set to System oscillator output.

These constants define the tsi active mode prescaler in a TSI instance.

Enumerator
kTsiActiveModePrescaler_1div 

Input clock source divided by 1.

kTsiActiveModePrescaler_2div 

Input clock source divided by 2.

kTsiActiveModePrescaler_4div 

Input clock source divided by 4.

kTsiActiveModePrescaler_8div 

Input clock source divided by 8.

kTsiActiveModePrescaler_16div 

Input clock source divided by 16.

kTsiActiveModePrescaler_32div 

Input clock source divided by 32.

kTsiActiveModePrescaler_64div 

Input clock source divided by 64.

kTsiActiveModePrescaler_128div 

Input clock source divided by 128.

Set up TSI analog modes in a TSI instance.

Enumerator
kTsiAnalogModeSel_Capacitive 

Active TSI capacitive sensing mode.

kTsiAnalogModeSel_NoiseNoFreqLim 

TSI works in single threshold noise detection mode and the freq.

limitation is disabled

kTsiAnalogModeSel_NoiseFreqLim 

TSI analog works in single threshold noise detection mode and the freq.

limitation is enabled

These constants define the tsi Reference oscillator charge current select in a TSI (REFCHRG) instance.

Enumerator
kTsiRefOscChargeCurrent_2uA 

Reference oscillator charge current is 2uA.

kTsiRefOscChargeCurrent_4uA 

Reference oscillator charge current is 4uA.

kTsiRefOscChargeCurrent_6uA 

Reference oscillator charge current is 6uA.

kTsiRefOscChargeCurrent_8uA 

Reference oscillator charge current is 8uA.

kTsiRefOscChargeCurrent_10uA 

Reference oscillator charge current is 10uA.

kTsiRefOscChargeCurrent_12uA 

Reference oscillator charge current is 12uA.

kTsiRefOscChargeCurrent_14uA 

Reference oscillator charge current is 14uA.

kTsiRefOscChargeCurrent_16uA 

Reference oscillator charge current is 16uA.

kTsiRefOscChargeCurrent_18uA 

Reference oscillator charge current is 18uA.

kTsiRefOscChargeCurrent_20uA 

Reference oscillator charge current is 20uA.

kTsiRefOscChargeCurrent_22uA 

Reference oscillator charge current is 22uA.

kTsiRefOscChargeCurrent_24uA 

Reference oscillator charge current is 24uA.

kTsiRefOscChargeCurrent_26uA 

Reference oscillator charge current is 26uA.

kTsiRefOscChargeCurrent_28uA 

Reference oscillator charge current is 28uA.

kTsiRefOscChargeCurrent_30uA 

Reference oscillator charge current is 30uA.

kTsiRefOscChargeCurrent_32uA 

Reference oscillator charge current is 32uA.

kTsiRefOscChargeCurrent_500nA 

Reference oscillator charge current is 500nA.

kTsiRefOscChargeCurrent_1uA 

Reference oscillator charge current is 1uA.

kTsiRefOscChargeCurrent_2uA 

Reference oscillator charge current is 2uA.

kTsiRefOscChargeCurrent_4uA 

Reference oscillator charge current is 4uA.

kTsiRefOscChargeCurrent_8uA 

Reference oscillator charge current is 8uA.

kTsiRefOscChargeCurrent_16uA 

Reference oscillator charge current is 16uA.

kTsiRefOscChargeCurrent_32uA 

Reference oscillator charge current is 32uA.

kTsiRefOscChargeCurrent_64uA 

Reference oscillator charge current is 64uA.

These bits indicate the oscillator's voltage rails.

Enumerator
kTsiOscVolRails_Dv_103 

DV = 1.03 V; VP = 1.33 V; Vm = 0.30 V.

kTsiOscVolRails_Dv_073 

DV = 0.73 V; VP = 1.18 V; Vm = 0.45 V.

kTsiOscVolRails_Dv_043 

DV = 0.43 V; VP = 1.03 V; Vm = 0.60 V.

kTsiOscVolRails_Dv_029 

DV = 0.29 V; VP = 0.95 V; Vm = 0.67 V.

These bits indicate the electrode oscillator charge and discharge current value in TSI (EXTCHRG) instance.

Enumerator
kTsiExtOscChargeCurrent_2uA 

External oscillator charge current is 2uA.

kTsiExtOscChargeCurrent_4uA 

External oscillator charge current is 4uA.

kTsiExtOscChargeCurrent_6uA 

External oscillator charge current is 6uA.

kTsiExtOscChargeCurrent_8uA 

External oscillator charge current is 8uA.

kTsiExtOscChargeCurrent_10uA 

External oscillator charge current is 10uA.

kTsiExtOscChargeCurrent_12uA 

External oscillator charge current is 12uA.

kTsiExtOscChargeCurrent_14uA 

External oscillator charge current is 14uA.

kTsiExtOscChargeCurrent_16uA 

External oscillator charge current is 16uA.

kTsiExtOscChargeCurrent_18uA 

External oscillator charge current is 18uA.

kTsiExtOscChargeCurrent_20uA 

External oscillator charge current is 20uA.

kTsiExtOscChargeCurrent_22uA 

External oscillator charge current is 22uA.

kTsiExtOscChargeCurrent_24uA 

External oscillator charge current is 24uA.

kTsiExtOscChargeCurrent_26uA 

External oscillator charge current is 26uA.

kTsiExtOscChargeCurrent_28uA 

External oscillator charge current is 28uA.

kTsiExtOscChargeCurrent_30uA 

External oscillator charge current is 30uA.

kTsiExtOscChargeCurrent_32uA 

External oscillator charge current is 32uA.

kTsiExtOscChargeCurrent_500nA 

External oscillator charge current is 500nA.

kTsiExtOscChargeCurrent_1uA 

External oscillator charge current is 1uA.

kTsiExtOscChargeCurrent_2uA 

External oscillator charge current is 2uA.

kTsiExtOscChargeCurrent_4uA 

External oscillator charge current is 4uA.

kTsiExtOscChargeCurrent_8uA 

External oscillator charge current is 8uA.

kTsiExtOscChargeCurrent_16uA 

External oscillator charge current is 16uA.

kTsiExtOscChargeCurrent_32uA 

External oscillator charge current is 32uA.

kTsiExtOscChargeCurrent_64uA 

External oscillator charge current is 64uA.

These bits specify current channel to be measured.

Enumerator
kTsiChannelNumber_0 

Channel Number 0.

kTsiChannelNumber_1 

Channel Number 1.

kTsiChannelNumber_2 

Channel Number 2.

kTsiChannelNumber_3 

Channel Number 3.

kTsiChannelNumber_4 

Channel Number 4.

kTsiChannelNumber_5 

Channel Number 5.

kTsiChannelNumber_6 

Channel Number 6.

kTsiChannelNumber_7 

Channel Number 7.

kTsiChannelNumber_8 

Channel Number 8.

kTsiChannelNumber_9 

Channel Number 9.

kTsiChannelNumber_10 

Channel Number 10.

kTsiChannelNumber_11 

Channel Number 11.

kTsiChannelNumber_12 

Channel Number 12.

kTsiChannelNumber_13 

Channel Number 13.

kTsiChannelNumber_14 

Channel Number 14.

kTsiChannelNumber_15 

Channel Number 15.

Function Documentation

void TSI_HAL_Init ( TSI_Type *  base)
Parameters
baseTSI module base address.
Returns
none

Initialize the peripheral to default state.

void TSI_HAL_SetConfiguration ( TSI_Type *  base,
tsi_config_t config 
)
Parameters
baseTSI module base address.
configPointer to TSI module configuration structure.
Returns
none

Initialize and sets prescalers, number of scans, clocks, delta voltage capacitance trimmer, reference and electrode charge current and threshold.

uint32_t TSI_HAL_Recalibrate ( TSI_Type *  base,
tsi_config_t config,
const uint32_t  electrodes,
const tsi_parameter_limits_t parLimits 
)
Parameters
baseTSI module base address.
configPointer to TSI module configuration structure.
electrodesThe map of the electrodes.
parLimitsPointer to TSI module parameter limits structure.
Returns
Lowest signal

This function if TSI basic module is enable, than disable him and if module has enabled interrupt, disable him. Then Set prescaler, electrode and reference current, number of scan and voltage rails. Enable module and interrupt if is not. Better if you see implimetation of this function for better understanding TSI_HAL_Recalibrate.

void TSI_HAL_EnableLowPower ( TSI_Type *  base)
Parameters
baseTSI module base address.
Returns
none
void TSI_HAL_DisableLowPower ( TSI_Type *  base)
Parameters
baseTSI module base address.
Returns
None.
static uint32_t TSI_HAL_IsModuleEnabled ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
State of enable module flag.
static uint32_t TSI_HAL_GetScanTriggerMode ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Scan trigger mode.
static uint32_t TSI_HAL_IsScanInProgress ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
True - if scan is in progress. False - otherwise
static uint32_t TSI_HAL_GetEndOfScanFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Current state of end of scan flag.
static uint32_t TSI_HAL_GetOutOfRangeFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
State of out of range flag.
static tsi_electrode_osc_prescaler_t TSI_HAL_GetPrescaler ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Prescaler value.
static tsi_n_consecutive_scans_t TSI_HAL_GetNumberOfScans ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Number of scans.
static void TSI_HAL_EnableModule ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_DisableModule ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableStop ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_DisableStop ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableOutOfRangeInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableEndOfScanInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnablePeriodicalScan ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableSoftwareTriggerScan ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableErrorInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_DisableErrorInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_ClearOutOfRangeFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_ClearEndOfScanFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_DisableInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static uint32_t TSI_HAL_IsInterruptEnabled ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
State of enable interrupt flag.
static void TSI_HAL_StartSoftwareTrigger ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static uint32_t TSI_HAL_IsOverrun ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
State of over run flag.
static void TSI_HAL_ClearOverrunFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static uint32_t TSI_HAL_GetExternalElectrodeErrorFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Stae of external electrode error flag
static void TSI_HAL_ClearExternalElectrodeErrorFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_SetPrescaler ( TSI_Type *  base,
tsi_electrode_osc_prescaler_t  prescaler 
)
inlinestatic
Parameters
baseTSI module base address.
prescalerPrescaler value.
Returns
None.
static void TSI_HAL_SetNumberOfScans ( TSI_Type *  base,
tsi_n_consecutive_scans_t  number 
)
inlinestatic
Parameters
baseTSI module base address.
numberNumber of scans.
Returns
None.
static void TSI_HAL_SetLowPowerScanInterval ( TSI_Type *  base,
tsi_low_power_interval_t  interval 
)
inlinestatic
Parameters
baseTSI module base address.
intervalInterval for low power scan.
Returns
None.
static tsi_low_power_interval_t TSI_HAL_GetLowPowerScanInterval ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Interval for low power scan.
static void TSI_HAL_SetLowPowerClock ( TSI_Type *  base,
uint32_t  clock 
)
inlinestatic
Parameters
baseTSI module base address.
clockLow power clock selection.
static uint32_t TSI_HAL_GetLowPowerClock ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Low power clock selection.
static void TSI_HAL_SetReferenceChargeCurrent ( TSI_Type *  base,
tsi_reference_osc_charge_current_t  current 
)
inlinestatic
Parameters
baseTSI module base address.
currentThe charge current.
Returns
None.
static tsi_reference_osc_charge_current_t TSI_HAL_GetReferenceChargeCurrent ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
The charge current.
static void TSI_HAL_SetElectrodeChargeCurrent ( TSI_Type *  base,
tsi_external_osc_charge_current_t  current 
)
inlinestatic
Parameters
baseTSI module base address.
currentElectrode current.
Returns
None.
static tsi_external_osc_charge_current_t TSI_HAL_GetElectrodeChargeCurrent ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Charge current.
static void TSI_HAL_SetScanModulo ( TSI_Type *  base,
uint32_t  modulo 
)
inlinestatic
Parameters
baseTSI module base address.
moduloScan modulo value.
Returns
None.
static uint32_t TSI_HAL_GetScanModulo ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Scan modulo value.
static void TSI_HAL_SetActiveModeSource ( TSI_Type *  base,
uint32_t  source 
)
inlinestatic
Parameters
baseTSI module base address.
sourceActive mode clock source (LPOSCCLK, MCGIRCLK, OSCERCLK).
Returns
None.
static uint32_t TSI_HAL_GetActiveModeSource ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Source value.
static void TSI_HAL_SetActiveModePrescaler ( TSI_Type *  base,
tsi_active_mode_prescaler_t  prescaler 
)
inlinestatic
Parameters
baseTSI module base address.
prescalerPrescaler's value.
Returns
None.
static uint32_t TSI_HAL_GetActiveModePrescaler ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Prescaler's value.
static void TSI_HAL_SetLowPowerChannel ( TSI_Type *  base,
uint32_t  channel 
)
inlinestatic

Only one channel can wake up MCU.

Parameters
baseTSI module base address.
channelChannel number.
Returns
None.
static uint32_t TSI_HAL_GetLowPowerChannel ( TSI_Type *  base)
inlinestatic

Only one channel can wake up MCU.

Parameters
baseTSI module base address.
Returns
Channel number.
static void TSI_HAL_EnableChannel ( TSI_Type *  base,
uint32_t  channel 
)
inlinestatic
Parameters
baseTSI module base address.
channelChannel to be enabled.
Returns
None.
static void TSI_HAL_EnableChannels ( TSI_Type *  base,
uint32_t  channelsMask 
)
inlinestatic

The function enables channels by mask. It can set all at once.

Parameters
baseTSI module base address.
channelsMaskChannels mask to be enabled.
Returns
None.
static void TSI_HAL_DisableChannel ( TSI_Type *  base,
uint32_t  channel 
)
inlinestatic
Parameters
baseTSI module base address.
channelChannel to be disabled.
Returns
None.
static void TSI_HAL_DisableChannels ( TSI_Type *  base,
uint32_t  channelsMask 
)
inlinestatic

The function disables channels by mask. It can set all at once.

Parameters
baseTSI module base address.
channelsMaskChannels mask to be disabled.
Returns
None.
static uint32_t TSI_HAL_GetEnabledChannel ( TSI_Type *  base,
uint32_t  channel 
)
inlinestatic
Parameters
baseTSI module base address.
channelChannel to be checked.
Returns
True - if channel is enabled, false - otherwise.
static uint32_t TSI_HAL_GetEnabledChannels ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Channels mask that are enabled.
static uint16_t TSI_HAL_GetWakeUpChannelCounter ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Wake up counter value.
static uint32_t TSI_HAL_GetCounter ( TSI_Type *  base,
uint32_t  channel 
)
inlinestatic
Parameters
baseTSI module base address.
channelIndex of TSI channel.
Returns
The counter value.
static void TSI_HAL_SetLowThreshold ( TSI_Type *  base,
uint32_t  low_threshold 
)
inlinestatic
Parameters
baseTSI module base address.
low_thresholdLow counter threshold.
Returns
None.
static void TSI_HAL_SetHighThreshold ( TSI_Type *  base,
uint32_t  high_threshold 
)
inlinestatic
Parameters
baseTSI module base address.
high_thresholdHigh counter threshold.
Returns
None.
static uint32_t TSI_HAL_GetEnableStop ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Number of scans.
static void TSI_HAL_EnableHardwareTriggerScan ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_CurrentSourcePairSwapped ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_CurrentSourcePairNotSwapped ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static uint32_t TSI_HAL_GetCurrentSourcePairSwapped ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Current source pair swapped status.
static void TSI_HAL_SetMeasuredChannelNumber ( TSI_Type *  base,
uint32_t  channel 
)
inlinestatic
Parameters
baseTSI module base address.
channelChannel number 0 ... 15.
Returns
None.
static uint32_t TSI_HAL_GetMeasuredChannelNumber ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
uint32_t Channel number 0 ... 15.
static void TSI_HAL_DmaTransferEnable ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_DmaTransferDisable ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static uint32_t TSI_HAL_IsDmaTransferEnable ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
State of enable module flag.
static uint32_t TSI_HAL_GetCounter ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Accumulated scan counter value ticked by the reference clock.
static void TSI_HAL_SetMode ( TSI_Type *  base,
tsi_analog_mode_select_t  mode 
)
inlinestatic
Parameters
baseTSI module base address.
modeMode value.
Returns
None.
static tsi_analog_mode_select_t TSI_HAL_GetMode ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
tsi_analog_mode_select_t Mode value.
static uint32_t TSI_HAL_GetNoiseResult ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
tsi_analog_mode_select_t Mode value.
static void TSI_HAL_SetOscilatorVoltageRails ( TSI_Type *  base,
tsi_oscilator_voltage_rails_t  dvolt 
)
inlinestatic
Parameters
baseTSI module base address.
dvoltThe voltage rails.
Returns
None.
static tsi_oscilator_voltage_rails_t TSI_HAL_GetOscilatorVoltageRails ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
dvolt The voltage rails..