EPC9143 300 W 16th Brick DC/DC Module Reference Design
app_power_control_isr.c
1 /*
2  * File: app_power_control_isr.c
3  * Author: M91406
4  *
5  * Created on May 26, 2020, 7:32 PM
6  */
7 
8 
9 #include "config/hal.h"
10 #include "app_power_control.h"
11 
12 
26 void __attribute__((__interrupt__, auto_psv, context))_BUCK_VLOOP_Interrupt(void)
27 {
28  #ifdef DBGPIN1_Set
29  DBGPIN1_Set();
30  #endif
31 
32  buck.status.bits.adc_active = true;
33 
34  #if (PLANT_MEASUREMENT == false)
36  #else
38  #endif
39 
40  Nop(); // Debugging break point anchors
41  Nop();
42  Nop();
43 
44  // Clear the ADCANx interrupt flag
45  _BUCK_VLOOP_ISR_IF = 0;
46 
47  #ifdef DBGPIN1_Set
48  DBGPIN1_Clear();
49  #endif
50 
51 }
52 
53 // end of file
BUCK_CONVERTER_STATUS_s::adc_active
volatile bool adc_active
Bit #1: indicating that ADC has been started and samples are taken.
Definition: dev_buck_typedef.h:209
buck
volatile struct BUCK_CONVERTER_s buck
Global data object for a BUCK CONVERTER.
Definition: app_power_control.c:63
_BUCK_VLOOP_Interrupt
#define _BUCK_VLOOP_Interrupt
Interrupt vector function call label.
Definition: epc9143_r40_hwdescr.h:818
_BUCK_VLOOP_ISR_IF
#define _BUCK_VLOOP_ISR_IF
Interupt vector flag bit register bit.
Definition: epc9143_r40_hwdescr.h:820
BUCK_CONVERTER_s::status
volatile struct BUCK_CONVERTER_STATUS_s status
BUCK operation status bits.
Definition: dev_buck_typedef.h:502
BUCK_CONVERTER_s::v_loop
volatile struct BUCK_LOOP_SETTINGS_s v_loop
BUCK voltage control loop object.
Definition: dev_buck_typedef.h:512
BUCK_LOOP_SETTINGS_s::ctrl_Update
void(* ctrl_Update)(volatile struct NPNZ16b_s *)
Function pointer to UPDATE routine.
Definition: dev_buck_typedef.h:357
DBGPIN1_Clear
#define DBGPIN1_Clear()
Macro instruction to set a pin state to logic LOW.
Definition: epc9143_r40_hwdescr.h:202
DBGPIN1_Set
#define DBGPIN1_Set()
Macro instruction to set a pin state to logic HIGH.
Definition: epc9143_r40_hwdescr.h:201
BUCK_LOOP_SETTINGS_s::controller
volatile struct NPNZ16b_s * controller
pointer to control loop object data structure
Definition: dev_buck_typedef.h:353
v_loop
volatile struct NPNZ16b_s v_loop
External reference to user-defined NPNZ16b controller data object 'v_loop'.
Definition: v_loop.c:98
v_loop_PTermUpdate
void v_loop_PTermUpdate(volatile struct NPNZ16b_s *controller)
Prototype of the alternate Assembly P-Term control loop helping to call the v_loop P-Term controller ...