Microchip® Advanced Software Framework

qs_tcc_faultx.c File Reference

SAM TCC - Timer Counter for Control Applications Callback Driver Quick Start (with Non-Recoverable Fault)

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include <conf_quick_start_faultx.h>
#include <string.h>

Functions

static void configure_eic (void)
 [callback_eic] More...
 
static void configure_event (void)
 [config_eic] More...
 
static void configure_tcc (void)
 [callback_funcs] More...
 
static void configure_tcc_callbacks (void)
 
static void eic_callback_to_clear_halt (void)
 [setup] More...
 
int main (void)
 [config_event] More...
 
static void tcc_callback_to_change_duty_cycle (struct tcc_module *const module_inst)
 [events_resource] More...
 

Variables

struct events_resource event_resource
 [module_inst] More...
 
struct tcc_module tcc_instance
 [additional_include] More...
 

static void configure_eic ( void  )
static

[callback_eic]

[config_eic]

[eic_chan_setup] [eic_setup_1]

[eic_setup_1] [eic_setup_2]

[eic_setup_2] [eic_setup_3]

[eic_setup_3] [eic_setup_4]

[eic_setup_4] [eic_chan_setup]

[eic_event_setup] [eic_event_setup_1]

[eic_event_setup_1] [eic_event_setup_2]

[eic_event_setup_2] [eic_event_setup_3]

[eic_event_setup_3] [eic_event_setup]

[eic_callback_setup] [eic_callback_setup_1]

[eic_callback_setup_1] [eic_callback_setup_2]

[eic_callback_setup_2] [eic_callback_setup]

References extint_chan_conf::detection_criteria, eic_callback_to_clear_halt(), EXTINT_CALLBACK_TYPE_DETECT, extint_chan_enable_callback(), extint_chan_get_config_defaults(), extint_chan_set_config(), EXTINT_DETECT_BOTH, extint_enable_events(), extint_register_callback(), extint_chan_conf::filter_input_signal, extint_events::generate_event_on_detect, extint_chan_conf::gpio_pin, and extint_chan_conf::gpio_pin_mux.

Referenced by main().

static void configure_event ( void  )
static

[config_eic]

[config_event]

[event_setup_1]

[event_setup_1]

[event_setup_2]

[event_setup_2]

[event_setup_3]

[event_setup_3]

[event_setup_4]

[event_setup_4]

[event_setup_5]

[event_setup_5]

References event_resource, events_allocate(), events_attach_user(), events_get_config_defaults(), EVENTS_PATH_ASYNCHRONOUS, events_config::generator, and events_config::path.

Referenced by main().

static void configure_tcc ( void  )
static

[callback_funcs]

[setup]

[setup_config]

[setup_config] [setup_config_defaults]

[setup_config_defaults]

[setup_change_config]

[setup_change_config] [setup_change_config_faults]

[setup_change_config_faults] [setup_change_config_pwm]

[setup_change_config_pwm]

[setup_set_config]

[setup_set_config]

[setup_events]

[setup_events]

[setup_change_events_faults]

[setup_change_events_faults]

[setup_events_enable]

[setup_events_enable]

[setup_enable]

[setup_enable]

References tcc_input_event_config::action, tcc_config::compare, CONF_PWM_CHANNEL, CONF_PWM_MODULE, CONF_PWM_OUT_MUX, CONF_PWM_OUT_PIN, CONF_PWM_OUTPUT, tcc_config::counter, tcc_pins_config::enable_wave_out_pin, tcc_events::input_config, tcc_match_wave_config::match, tcc_input_event_config::modify_action, tcc_wave_extension_config::non_recoverable_fault, tcc_events::on_input_event_perform_action, tcc_non_recoverable_fault_config::output, tcc_counter_config::period, tcc_config::pins, tcc_enable(), tcc_enable_events(), TCC_EVENT_ACTION_NON_RECOVERABLE_FAULT, TCC_FAULT_STATE_OUTPUT_1, tcc_get_config_defaults(), tcc_init(), tcc_instance, TCC_WAVE_GENERATION_SINGLE_SLOPE_PWM, tcc_config::wave_ext, tcc_match_wave_config::wave_generation, tcc_pins_config::wave_out_pin, and tcc_pins_config::wave_out_pin_mux.

Referenced by main().

static void configure_tcc_callbacks ( void  )
static

[setup_register_callback]

[setup_register_callback]

[setup_enable_callback]

[setup_enable_callback]

References CONF_PWM_CHANNEL, tcc_callback_to_change_duty_cycle(), tcc_enable_callback(), tcc_instance, and tcc_register_callback().

Referenced by main().

static void eic_callback_to_clear_halt ( void  )
static
int main ( void  )

[config_event]

[setup_init]

[setup_init]

[main]

[enable_global_interrupts]

[enable_global_interrupts]

[main_loop]

[main_loop]

[main]

References configure_eic(), configure_event(), configure_tcc(), configure_tcc_callbacks(), system_init(), and system_interrupt_enable_global().

static void tcc_callback_to_change_duty_cycle ( struct tcc_module *const  module_inst)
static

[events_resource]

[callback_funcs]

References CONF_PWM_CHANNEL, i, and tcc_set_compare_value().

Referenced by configure_tcc_callbacks().

struct events_resource event_resource

[module_inst]

[events_resource]

Referenced by configure_event().

struct tcc_module tcc_instance

[additional_include]

[additional_include] [module_inst]