UC3-A3 Xplained Demo Application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include "gpio.h"
#include "board.h"
#include "pm.h"
#include "tc.h"
#include "sysclk.h"
#include "uc3-a3_xplained_demo.h"
Functions | |
int | main (void) |
Application main routine. More... | |
static void | pwm_timer_init (void) |
Initializes the TC subsystem ready to generate a LED PWM wave. More... | |
int main | ( | void | ) |
Application main routine.
References board_init(), cpu_irq_enable, irq_initialize_vectors, pwm_timer_init(), sysclk_init(), touch_handler(), and touch_init().
|
static |
Initializes the TC subsystem ready to generate a LED PWM wave.
Initializes the on-chip TC module in PWM generation mode, and configures the board LED as an output so that the LED brightness can be adjusted.
Channel selection.
Software trigger effect on TIOB.
External event effect on TIOB.
RC compare effect on TIOB.
RB compare effect on TIOB.
Software trigger effect on TIOA.
External event effect on TIOA.
RC compare effect on TIOA.
RA compare effect on TIOA.
Waveform selection
External event trigger enable.
External event selection (non-zero for Channel B to work)
External event edge selection.
Counter disable when RC compare.
Counter clock stopped with RC compare.
Burst signal selection.
Clock inversion selection.
Internal source clock 5, fPBA/128.
References tc_waveform_opt_t::channel, gpio_enable_module_pin(), sysclk_enable_peripheral_clock(), TC_CLOCK_SOURCE_TC5, TC_EVT_EFFECT_CLEAR, TC_EVT_EFFECT_NOOP, TC_EVT_EFFECT_SET, tc_init_waveform(), TC_SEL_NO_EDGE, tc_start(), TC_WAVEFORM_SEL_UP_MODE_RC_TRIGGER, tc_write_rb(), and tc_write_rc().
Referenced by main().