|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
main.c
1/*
2© [2024] Microchip Technology Inc. and its subsidiaries.
3
4 Subject to your compliance with these terms, you may use Microchip
5 software and any derivatives exclusively with Microchip products.
6 You are responsible for complying with 3rd party license terms
7 applicable to your use of 3rd party software (including open source
8 software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
9 NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
10 SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
11 MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
12 WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
13 INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
14 KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
15 MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
16 FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
17 TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
18 EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
19 THIS SOFTWARE.
20*/
21#include <xc.h> // include processor files - each processor file is guarded.
22#include <stdint.h> // include standard integer data types
23#include <stdbool.h> // include standard boolean data types
24#include <stddef.h> // include standard definition data types
25
26// MCC header files
27#include "system/system.h"
28#include "timer/sccp1.h"
29#include "system/pins.h"
30
31// Other header files
32#include "os/os.h"
33#include "device/device.h"
34#include "pwrctrl/pwrctrl.h"
35#include "fault/fault.h"
36#include "comm/PBV_DAB_frame_map.h"
37#include "driver/mcc_extension/mcc_custom_config.h"
38
39
40/*
41 Main application
42*/
43
44
45
53int main(void)
54{
55 SYSTEM_Initialize();
56 MCC_Custom_User_Config();
57
58 PwrCtrl_Initialize();
59 Fault_Initialize();
60
61 SCCP1_Timer_TimeoutCallbackRegister(&ControlLoop_Interrupt_CallBack);
62
63 OS_Init();
64 App_PBV_DAB_Init();
65 Dev_LED_Initialize();
66 Dev_Fan_Initialize();
67 Dev_Temp_Initialize();
68 OS_Scheduler_RunForever();
69
70 while(1)
71 {
72
73 }
74}
sccp1.h
This is the generated driver header file for the SCCP1-TIMER driver.
PBV_DAB_frame_map.h
app PBV DAB Frame map file Example
device.h
Contains h files that are part of device layer.
mcc_custom_config.h
Contain the MCC Custom peripheral configuration that is not supported by MCC Melody tool.
fault.h
Contains public fault functions.
App_PBV_DAB_Init
void App_PBV_DAB_Init()
This function initializes the local pbv objects. these objects are then passed on to the app_PBV_init...
Definition PBV_dab_frame_map.c:95
Dev_Fan_Initialize
void Dev_Fan_Initialize(void)
This function initializes the fan object.
Definition dev_fan.c:49
Dev_LED_Initialize
void Dev_LED_Initialize(void)
This function contains the LED initialization.
Definition dev_led.c:78
Dev_Temp_Initialize
void Dev_Temp_Initialize(void)
Initializes the temperature data structure.
Definition dev_temp.c:45
MCC_Custom_User_Config
void MCC_Custom_User_Config(void)
Contains custom peripheral initialization.
Definition mcc_custom_config.c:24
PwrCtrl_Initialize
void PwrCtrl_Initialize(void)
Initialize the power control parameters.
Definition pwrctrl.c:45
ControlLoop_Interrupt_CallBack
void ControlLoop_Interrupt_CallBack(void)
Executes the power converter control loop.
Definition pwrctrl_isr.c:46
Fault_Initialize
void Fault_Initialize(void)
Initialize the fault objects.
Definition fault.c:65
SYSTEM_Initialize
void SYSTEM_Initialize(void)
Initializes the System module.
Definition system.c:55
SCCP1_Timer_TimeoutCallbackRegister
void SCCP1_Timer_TimeoutCallbackRegister(void(*handler)(void))
This function can be used to override default callback and to define custom callback for SCCP1 Timeou...
Definition sccp1.c:176