This is the main application file. More...
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_t * | App_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 | |
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.
#define FIRMWARE_PROTOCOL_ID 0x1000 |
Definition at line 36 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_DAB_OFF 0x5500 |
Definition at line 44 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_DAB_ON 0x5501 |
Definition at line 43 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_DAB_ON_REV 0x5502 |
Definition at line 42 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_FAN_SPEED 0xCCCC |
Definition at line 46 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_FREQ_CHANGE 0xBBBB |
Definition at line 45 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_ILOOP_REF_SET 0xDDDD |
Definition at line 49 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_P2S_PHASE_TARGET 0xEE02 |
Definition at line 54 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_PHASE_CHANGE 0xEE01 |
Definition at line 53 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_PLOOP_REF_SET 0xDDDF |
Definition at line 51 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_VLOOP_REF_SET 0xDDDE |
Definition at line 50 of file PBV_dab_frame_map.c.
#define PBV_CMD_ID_VLOOPREV_REF_SET 0xDDDC |
Definition at line 48 of file PBV_dab_frame_map.c.
#define PBV_LOG_ID 0x300 |
Definition at line 38 of file PBV_dab_frame_map.c.
#define PBV_TX_PROTOCOL_ID 0x404 |
Definition at line 37 of file PBV_dab_frame_map.c.
PBV_Datatype_TX_t * App_PB_DAB_Get_TX_ASCII_ptr | ( | void | ) |
This function can be used to send log messages from other files.
Definition at line 208 of file PBV_dab_frame_map.c.
void App_PBV_DAB_Init | ( | void | ) |
Public Functions Definitions
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.
void App_PBV_DAB_Process_Rx_Data | ( | uint16_t * | data | ) |
data | pointer 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.
void App_PBV_DAB_Task_10ms | ( | 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.
void App_PBV_DAB_Task_1s | ( | void | ) |
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.
void protocolID | ( | uint16_t | protocol_ID, |
uint16_t | length, | ||
uint8_t * | data | ||
) |
protocal_ID | indicates the protocol ID for the PBV |
length | length of the data |
data | pointer to the data |
This function defines the PBV protocol ID for specific data received.
Definition at line 369 of file PBV_dab_frame_map.c.