TC configuration structure.
Configuration struct for a TC instance. This structure should be initialized by the tc_get_config_defaults function before being modified by the user application.
#include <tc.h>
Data Fields | |
union { | |
struct tc_16bit_config counter_16_bit | |
Struct for 16-bit specific timer configuration. More... | |
struct tc_32bit_config counter_32_bit | |
Struct for 32-bit specific timer configuration. More... | |
struct tc_8bit_config counter_8_bit | |
Struct for 8-bit specific timer configuration. More... | |
}; | |
Access the different counter size settings through this configuration member. More... | |
enum tc_clock_prescaler | clock_prescaler |
Specifies the prescaler value for GCLK_TC. More... | |
enum gclk_generator | clock_source |
GCLK generator used to clock the peripheral. More... | |
enum tc_count_direction | count_direction |
Specifies the direction for the TC to count. More... | |
enum tc_counter_size | counter_size |
Specifies either 8-, 16-, or 32-bit counter size. More... | |
bool | double_buffering_enabled |
Set to true to enable double buffering write. More... | |
bool | enable_capture_on_channel [NUMBER_OF_COMPARE_CAPTURE_CHANNELS] |
Specifies which channel(s) to enable channel capture operation on. More... | |
bool | enable_capture_on_IO [NUMBER_OF_COMPARE_CAPTURE_CHANNELS] |
Specifies which channel(s) to enable I/O capture operation on. More... | |
bool | oneshot |
When true , one-shot will stop the TC on next hardware or software re-trigger event or overflow/underflow. More... | |
struct tc_pwm_channel | pwm_channel [NUMBER_OF_COMPARE_CAPTURE_CHANNELS] |
Specifies the PWM channel for TC. More... | |
enum tc_reload_action | reload_action |
Specifies the reload or reset time of the counter and prescaler resynchronization on a re-trigger event for the TC. More... | |
bool | run_in_standby |
When true the module is enabled during standby. More... | |
enum tc_wave_generation | wave_generation |
Specifies which waveform generation mode to use. More... | |
uint8_t | waveform_invert_output |
Specifies which channel(s) to invert the waveform on. More... | |
union { ... } |
Access the different counter size settings through this configuration member.
enum tc_clock_prescaler tc_config::clock_prescaler |
Specifies the prescaler value for GCLK_TC.
Referenced by adp_example_tc_configure(), configure_tc(), configure_tc_alt(), configure_tc_def(), hw_timer_init(), HwTimerInit(), platform_create_hw_timer(), run_16bit_capture_and_compare_test(), tc_get_config_defaults(), tc_init(), and vPortSetupTimerInterrupt().
enum gclk_generator tc_config::clock_source |
GCLK generator used to clock the peripheral.
Referenced by adp_example_tc_configure(), configure_tc(), configure_tc_alt(), configure_tc_def(), hw_timer_init(), HwTimerInit(), init_xosc32k_fail_detector(), platform_create_hw_timer(), tc_get_config_defaults(), and tc_init().
enum tc_count_direction tc_config::count_direction |
Specifies the direction for the TC to count.
Referenced by configure_tc_alt(), configure_tc_def(), platform_create_hw_timer(), tc_get_config_defaults(), and tc_init().
struct tc_16bit_config tc_config::counter_16_bit |
Struct for 16-bit specific timer configuration.
Referenced by configure_tc(), hw_timer_init(), init_xosc32k_fail_detector(), run_16bit_capture_and_compare_test(), run_callback_test(), tc_get_config_defaults(), tc_init(), and test_event_gen_user_init().
struct tc_32bit_config tc_config::counter_32_bit |
Struct for 32-bit specific timer configuration.
Referenced by tc_init().
struct tc_8bit_config tc_config::counter_8_bit |
Struct for 8-bit specific timer configuration.
Referenced by adp_example_tc_configure(), configure_tc_alt(), configure_tc_def(), hw_timer_init(), and tc_init().
enum tc_counter_size tc_config::counter_size |
Specifies either 8-, 16-, or 32-bit counter size.
Referenced by adp_example_tc_configure(), configure_tc(), configure_tc_alt(), configure_tc_def(), hw_timer_init(), HwTimerInit(), platform_create_hw_timer(), run_reset_32bit_master_test(), tc_get_config_defaults(), tc_init(), and vPortSetupTimerInterrupt().
bool tc_config::double_buffering_enabled |
Set to true
to enable double buffering write.
When enabled any write through tc_set_top_value(), tc_set_compare_value() and will direct to the buffer register as buffered value, and the buffered value will be committed to effective register on UPDATE condition, if update is not locked.
Referenced by configure_tc_alt(), configure_tc_def(), and tc_get_config_defaults().
bool tc_config::enable_capture_on_channel[NUMBER_OF_COMPARE_CAPTURE_CHANNELS] |
Specifies which channel(s) to enable channel capture operation on.
Referenced by run_16bit_capture_and_compare_test(), tc_get_config_defaults(), and tc_init().
bool tc_config::enable_capture_on_IO[NUMBER_OF_COMPARE_CAPTURE_CHANNELS] |
Specifies which channel(s) to enable I/O capture operation on.
Referenced by tc_get_config_defaults().
bool tc_config::oneshot |
When true
, one-shot will stop the TC on next hardware or software re-trigger event or overflow/underflow.
Referenced by HwTimerInit(), platform_create_hw_timer(), tc_get_config_defaults(), and tc_init().
struct tc_pwm_channel tc_config::pwm_channel[NUMBER_OF_COMPARE_CAPTURE_CHANNELS] |
Specifies the PWM channel for TC.
Referenced by configure_tc(), configure_tc_alt(), configure_tc_def(), run_16bit_capture_and_compare_test(), tc_get_config_defaults(), and tc_init().
enum tc_reload_action tc_config::reload_action |
Specifies the reload or reset time of the counter and prescaler resynchronization on a re-trigger event for the TC.
Referenced by configure_tc_alt(), configure_tc_def(), tc_get_config_defaults(), and tc_init().
bool tc_config::run_in_standby |
When true
the module is enabled during standby.
Referenced by configure_tc_alt(), configure_tc_def(), tc_get_config_defaults(), tc_init(), and vPortSetupTimerInterrupt().
enum tc_wave_generation tc_config::wave_generation |
Specifies which waveform generation mode to use.
Referenced by configure_tc(), configure_tc_alt(), configure_tc_def(), init_xosc32k_fail_detector(), run_16bit_capture_and_compare_test(), run_callback_test(), tc_get_config_defaults(), tc_init(), and vPortSetupTimerInterrupt().
uint8_t tc_config::waveform_invert_output |
Specifies which channel(s) to invert the waveform on.
For SAM L21/L22/C20/C21, it's also used to invert I/O input pin.
Referenced by configure_tc_alt(), configure_tc_def(), tc_get_config_defaults(), and tc_init().