Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches

This is the main application file. More...

+ Collaboration diagram for PBV Data DAB App:

Files

file  PBV_DAB_frame_map.h
 app PBV DAB Frame map file Example
 

Functions

void App_PBV_DAB_Init ()
 This function initializes the local pbv objects. these objects are then passed on to the app_PBV_init function to initialize the CAN/UART objects.
 
void App_PBV_DAB_Task_10ms (void)
 10ms PBV task to be execution
 
void App_PBV_DAB_Task_1s (void)
 1 second PBV task to be execution
 
PBV_Datatype_TX_tApp_PB_DAB_Get_TX_ASCII_ptr (void)
 This function can be used to send log messages from other files.
 
void App_PBV_DAB_Process_Rx_Data (uint16_t *data)
 process received data
 
void protocolID (uint16_t protocol_ID, uint16_t length, uint8_t *data)
 default callback
 
#define FIRMWARE_PROTOCOL_ID   0x1000
 Firmware ID.
 
#define PBV_TX_PROTOCOL_ID   0x404
 ID on which data is transmitted by dsPIC33.
 
#define PBV_LOG_ID   0x300
 ID on which log data is sent.
 
#define PBV_CMD_ID_DAB_ON_REV   0x5502
 turn DAB on - REVERSED discharge mode
 
#define PBV_CMD_ID_DAB_ON   0x5501
 turn DAB on
 
#define PBV_CMD_ID_DAB_OFF   0x5500
 turn DAB off
 
#define PBV_CMD_ID_FREQ_CHANGE   0xBBBB
 change DAB switching frequency
 
#define PBV_CMD_ID_FAN_SPEED   0xCCCC
 set fan speed
 
#define PBV_CMD_ID_VLOOPREV_REF_SET   0xDDDC
 set voltage loop reference reverse mode
 
#define PBV_CMD_ID_ILOOP_REF_SET   0xDDDD
 set current loop reference
 
#define PBV_CMD_ID_VLOOP_REF_SET   0xDDDE
 set voltage loop reference
 
#define PBV_CMD_ID_PLOOP_REF_SET   0xDDDF
 set voltage loop reference
 
#define PBV_CMD_ID_PHASE_CHANGE   0xEE01
 set control phase
 
#define PBV_CMD_ID_P2S_PHASE_TARGET   0xEE02
 set control phase
 

Detailed Description

This is the main application file. Here there are tasks that run at different frequencies checking for any received messages and triggering sending of messages.

Macro Definition Documentation

◆ FIRMWARE_PROTOCOL_ID

#define FIRMWARE_PROTOCOL_ID   0x1000

Definition at line 36 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_DAB_OFF

#define PBV_CMD_ID_DAB_OFF   0x5500

Definition at line 44 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_DAB_ON

#define PBV_CMD_ID_DAB_ON   0x5501

Definition at line 43 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_DAB_ON_REV

#define PBV_CMD_ID_DAB_ON_REV   0x5502

Definition at line 42 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_FAN_SPEED

#define PBV_CMD_ID_FAN_SPEED   0xCCCC

Definition at line 46 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_FREQ_CHANGE

#define PBV_CMD_ID_FREQ_CHANGE   0xBBBB

Definition at line 45 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_ILOOP_REF_SET

#define PBV_CMD_ID_ILOOP_REF_SET   0xDDDD

Definition at line 49 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_P2S_PHASE_TARGET

#define PBV_CMD_ID_P2S_PHASE_TARGET   0xEE02

Definition at line 54 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_PHASE_CHANGE

#define PBV_CMD_ID_PHASE_CHANGE   0xEE01

Definition at line 53 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_PLOOP_REF_SET

#define PBV_CMD_ID_PLOOP_REF_SET   0xDDDF

Definition at line 51 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_VLOOP_REF_SET

#define PBV_CMD_ID_VLOOP_REF_SET   0xDDDE

Definition at line 50 of file PBV_dab_frame_map.c.

◆ PBV_CMD_ID_VLOOPREV_REF_SET

#define PBV_CMD_ID_VLOOPREV_REF_SET   0xDDDC

Definition at line 48 of file PBV_dab_frame_map.c.

◆ PBV_LOG_ID

#define PBV_LOG_ID   0x300

Definition at line 38 of file PBV_dab_frame_map.c.

◆ PBV_TX_PROTOCOL_ID

#define PBV_TX_PROTOCOL_ID   0x404

Definition at line 37 of file PBV_dab_frame_map.c.

Function Documentation

◆ App_PB_DAB_Get_TX_ASCII_ptr()

PBV_Datatype_TX_t * App_PB_DAB_Get_TX_ASCII_ptr ( void  )
Returns
PBV_Datatype_TX_t *

This function can be used to send log messages from other files.

Definition at line 208 of file PBV_dab_frame_map.c.

◆ App_PBV_DAB_Init()

void App_PBV_DAB_Init ( void  )

Public Functions Definitions

Returns
void

This function initializes the local pbv objects. these objects are then passed on to the app_PBV_init function to initialize the CAN/UART objects. RX object just needs state change.

Definition at line 99 of file PBV_dab_frame_map.c.

+ Here is the call graph for this function:

◆ App_PBV_DAB_Process_Rx_Data()

void App_PBV_DAB_Process_Rx_Data ( uint16_t *  data)
Parameters
datapointer to received data

This function transfer the data coming from the Power Board Visualizer to the MCU to process the action taken by the user in the Dual active Bridge Board.

Definition at line 271 of file PBV_dab_frame_map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ App_PBV_DAB_Task_10ms()

void App_PBV_DAB_Task_10ms ( void  )
Returns
void

This is high frequency task to simulate sending of high frequency numeric data. Also to check if there are any messages received, must be done at a high enough rate to ensure that the messages are not dropped.

Definition at line 125 of file PBV_dab_frame_map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ App_PBV_DAB_Task_1s()

void App_PBV_DAB_Task_1s ( void  )
Parameters
void

This is a slow task simulating the low speed sending of ascii data it sends the firmware id, and the switches to the log id.

< reinit to new id

Definition at line 154 of file PBV_dab_frame_map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ protocolID()

void protocolID ( uint16_t  protocol_ID,
uint16_t  length,
uint8_t *  data 
)
Parameters
protocal_IDindicates the protocol ID for the PBV
lengthlength of the data
datapointer to the data

This function defines the PBV protocol ID for specific data received.

Note
This function defines the PBV protocol ID for specific data received.

Definition at line 369 of file PBV_dab_frame_map.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: