SAM D21 TCC RAMP2 DMA operation with circular buffer Example Application.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include "conf_example.h"
Macros | |
#define | TRIGGER_FLAGS (TCC_INTFLAG_OVF) |
Functions | |
static | COMPILER_ALIGNED (16) |
static void | config_dma_for_tcc_ramp2a (void) |
void | config_ramp2_dma (void) |
static void | configure_tcc_ramp2a_mode (void) |
static void | configure_trigger (void) |
void | trigger_generation (void) |
Variables | |
static enum status_code | stat = STATUS_OK |
static struct tcc_module | tcc_instance |
static struct dma_resource | tcc_ramp_a_dma_resource |
#define TRIGGER_FLAGS (TCC_INTFLAG_OVF) |
Referenced by trigger_generation().
|
static |
|
static |
References dma_descriptor_config::beat_size, dma_descriptor_config::block_transfer_count, dma_descriptor_config::destination_address, dma_add_descriptor(), dma_allocate(), DMA_BEAT_SIZE_WORD, dma_descriptor_create(), dma_descriptor_get_config_defaults(), dma_get_config_defaults(), dma_start_transfer_job(), DMA_TRIGGER_ACTION_BEAT, dma_descriptor_config::dst_increment_enable, dma_resource_config::peripheral_trigger, dma_descriptor_config::source_address, dma_descriptor_config::src_increment_enable, tcc_ramp_a_dma_resource, and dma_resource_config::trigger_action.
Referenced by config_ramp2_dma().
void config_ramp2_dma | ( | void | ) |
References config_dma_for_tcc_ramp2a(), configure_tcc_ramp2a_mode(), and configure_trigger().
Referenced by main().
|
static |
References tcc_counter_config::clock_prescaler, tcc_counter_config::clock_source, tcc_config::compare, tcc_config::counter, tcc_pins_config::enable_wave_out_pin, tcc_counter_config::period, tcc_config::pins, stat, tcc_enable(), tcc_enable_circular_buffer_compare(), tcc_enable_circular_buffer_top(), tcc_get_config_defaults(), tcc_init(), tcc_instance, TCC_RAMP_RAMP2A, tcc_set_double_buffer_compare_values(), tcc_set_double_buffer_top_values(), TCC_WAVE_GENERATION_SINGLE_SLOPE_PWM, tcc_match_wave_config::wave_generation, tcc_pins_config::wave_out_pin, tcc_pins_config::wave_out_pin_mux, tcc_match_wave_config::wave_polarity, and tcc_match_wave_config::wave_ramp.
Referenced by config_ramp2_dma().
|
static |
References port_config::direction, port_get_config_defaults(), PORT_PIN_DIR_OUTPUT, port_pin_set_config(), and port_pin_set_output_level().
Referenced by config_ramp2_dma().
void trigger_generation | ( | void | ) |
References tcc_module::hw, port_pin_toggle_output_level(), tcc_instance, and TRIGGER_FLAGS.
Referenced by main().
|
static |
Referenced by chk_mounted(), configure_tcc_ramp2a_mode(), and f_getfree().
|
static |
|
static |
Referenced by config_dma_for_tcc_ramp2a().