Microchip® Advanced Software Framework

dac_task.c File Reference

DAC Management Task.

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

#include "compiler.h"
#include "gpio.h"
#include "dacifb.h"
#include "pdca.h"
#include "sinus.h"
#include "pevc.h"
#include "dac_task.h"
#include "scif_uc3c.h"
#include "sysclk.h"
#include "conf_demo.h"

Functions

void dac_task (void)
 DAC Task: More...
 
void dac_task_init (void)
 DAC Init function : More...
 
void init_gclk (void)
 
void init_pevc (void)
 
 ISR (pdca_int_handler, AVR32_PDCA_IRQ_GROUP1, 1)
 The PDCA interrupt handler. More...
 

Variables

volatile avr32_dacifb_t * dacifb = &AVR32_DACIFB0
 
dacifb_channel_opt_t dacifb_channel_opt
 
dacifb_opt_t dacifb_opt
 
volatile bool flag_dac = false
 
volatile avr32_pevc_t * ppevc = &AVR32_PEVC
 
uint16_t SIGNAL_TABLE [SIGNAL_NB_SAMPLES]
 

void dac_task ( void  )

DAC Task:

Referenced by main().

void init_gclk ( void  )
void init_pevc ( void  )
ISR ( pdca_int_handler  ,
AVR32_PDCA_IRQ_GROUP1  ,
 
)

The PDCA interrupt handler.

The handler reload the PDCA settings using the reload register. The interrupt will happen each time the buffer is transmitted to the DAC.

References DAC_PDCA_CHANNEL_DAC, flag_dac, pdca_reload_channel(), SIGNAL_NB_SAMPLES, and SIGNAL_TABLE.

volatile avr32_dacifb_t* dacifb = &AVR32_DACIFB0

Referenced by dac_task_init().

dacifb_channel_opt_t dacifb_channel_opt
Initial value:
= {
.auto_refresh_mode = false,
.trigger_mode = DACIFB_TRIGGER_MODE_EVENT,
.left_adjustment = false,
.data_shift = 0,
.data_round_enable = false
}
#define DACIFB_TRIGGER_MODE_EVENT
Definition: dacifb.h:78
dacifb_opt_t dacifb_opt
Initial value:
= {
.reference = DACIFB_REFERENCE_VDDANA,
.channel_selection = DACIFB_CHANNEL_SELECTION_A,
.low_power = false,
.dual = false
}
#define DACIFB_REFERENCE_VDDANA
Definition: dacifb.h:71
#define DACIFB_CHANNEL_SELECTION_A
Definition: dacifb.h:63
volatile bool flag_dac = false

Referenced by ISR().

volatile avr32_pevc_t* ppevc = &AVR32_PEVC
uint16_t SIGNAL_TABLE[SIGNAL_NB_SAMPLES]

Referenced by dac_task_init(), and ISR().