40#include "system/pins.h"
41#include "secondary_core/sec_core_interface.h"
53#include "../mcc_generated_files/cmp/cmp1.h"
224 coreBuffer[6] = phase1_status + phase2_status + phase3_status +
HV_FLAG;
This is the generated driver header file for the DMA driver.
This is the generated driver types header file for the DMA driver.
This is the generated driver header file for the SEC_CORE1 driver.
static void DMA_Channel_updateCoreBuffers(uint16_t *coreBuffer)
static void DMA_Channel_doAcMonitor(void)
static void DMA_Channel_updateAdcBuffers(void)
static DRV_DMA_DATA_t selfDma
void DRV_DMA_getVinAverage(uint16_t *vinAvg)
static void DMA_Channel_resetAcMonitor(void)
static void DMA_Channel_updateStatusAndSendData(uint16_t *coreBuffer)
@ STATE_WAIT_VALID_VIN_SENSE_OFFSET
uint16_t * DRV_DMA_getCoreBuffer(void)
bool Drv_SPI_get_Connected_Flag(void)
void Drv_SPI_Reset_Timeout_Counter(uint16_t count)
uint16_t * Drv_SPI_get_Adr_Data_Obj(void)
bool Drv_SPI_Checksum(void)
This is the driver source file for spi builds upon mcc.
#define SPI_TIMEOUT_IN_100us_TICKS
void vacm_state_machine(struct VACM_s *vacm_obj)
void vacm_reset_phase_monitor_object(struct VACM_s *vacm_obj)
void vacm_reset_state_machine(struct VACM_s *vacm_obj)
#define OPAMP_BIAS_HIGH_LIMIT
#define OPAMP_BIAS_LOW_LIMIT
DMA_CHANNEL
Defines the DMA channles that are selected from the MCC Melody User Interface for the DMA transfers....
void DMA_ChannelCallback(enum DMA_CHANNEL channel)
This is the default callback with weak attribute. The user can override and implement the default cal...
static void DMA_ChannelEnable(enum DMA_CHANNEL channel)
This inline function enables the DMA channel.
bool SEC_CORE1_ProtocolWrite(enum SEC_CORE_PROTOCOLS protocolName, uint16_t *pData)
This routine writes data to mailbox.
#define HV_FLAG
Used when sending status word from primary to secondary core.
#define FCALL_AC_MONITOR
frequency at which AC monitor code is executed (in Hertz)
uint16_t vloop_ff
square of the average input voltage
int16_t * ptr_offset
rectified input voltage
uint16_t * ptr_adcbuf
Pointer to register or variable where the value is read from (e.g. ADCBUFx) or written to (e....
uint16_t avg
pointer to offset upon which sensed input voltage sits before it is digitized by the ADC
uint16_t rectified
previous reading of raw input voltage
uint16_t counter_reset
counter used for computing the average of the rectified input voltage
Main AC Monitor data object data type declaration.
VACM_STATUS_t status
AC monitor status flags.
VACM_AVGCALC_BUFFER_t avgcalc_buffer
used for store information needed at runtime for calculation of average of rectified input voltage
VACM_VIN_t vin
information related to input voltage