How microchip-pic-avr-examples/dspic33ck-power-dcdc-dual-active-bridge-development-platform works
This repository is firmware for a dsPIC33C digitally controlled Dual Active Bridge converter, supporting forward and reverse power flow. The principal workflow is Power Board Visualizer commands and references reaching the controller, which regulates the converter using sampled feedback and PWM control; fault handling and telemetry support that operation. The README documents GUI control over CANFD, while excerpts show control-loop calculations and UART protocol handling. Many runtime files are unsampled, so edges that their contents would need to establish are omitted.
Main entry points: pwrctrl_isr_extension.c Control Loop ISR · pwrctrl_dcdt.c Controller Setup · PBV_interface.c PBV Interface · PBV_UART.c PBV UART Transport
Components 21
Power Control
- Power Controller
dspic33ck-dab.X/sources/pwrctrl/pwrctrl.c - Control Loop ISR
dspic33ck-dab.X/sources/pwrctrl/pwrctrl_isr_extension.c - Power Control State
dspic33ck-dab.X/sources/pwrctrl/pwrctrl_sm.c - Controller Setup
dspic33ck-dab.X/sources/pwrctrl/dcdt/pwrctrl_dcdt.c - DAB Compensators
dspic33ck-dab.X/dcdt/dab_psio/dcdt_generated_code/dab_psio_dcdt.h - Forward Coefficients
dspic33ck-dab.X/dcdt/dab_pspo/dcdt_generated_code/dab_pspo_dcdt.h - Reverse Coefficients
dspic33ck-dab.X/dcdt/dab_sppo/dcdt_generated_code/dab_sppo_dcdt.h - PWM Control
dspic33ck-dab.X/sources/pwrctrl/pwrctrl_pwm.c
Communications
- PBV Interface
dspic33ck-dab.X/sources/comm/PBV_interface.c - PBV CAN Transport
dspic33ck-dab.X/sources/comm/PBV_CAN.c - PBV UART Transport
dspic33ck-dab.X/sources/comm/PBV_UART.c - DAB Frame Map
dspic33ck-dab.X/sources/comm/PBV_dab_frame_map.c
Sensing And Faults
- Isolated Voltage Sense
dspic33ck-dab.X/sources/device/dev_iso_voltage_sense.c - Fault Evaluation
dspic33ck-dab.X/sources/fault/fault_common.c - Fault Controller
dspic33ck-dab.X/sources/fault/fault.c
Device Platform
- ADC Peripheral
dspic33ck-dab.X/mcc_generated_files/adc/adc1.h - PWM Peripheral
dspic33ck-dab.X/mcc_generated_files/pwm_hs/pwm.h - UART Peripheral
dspic33ck-dab.X/mcc_generated_files/uart/uart1.h - CRC Peripheral
dspic33ck-dab.X/mcc_generated_files/crc/crc.h
Other components
- Power Board Visualizer
- DAB Power Board
Connections 16
- Power Board Visualizer → DAB Power Board: sends CANFD commands
- PBV UART Transport → UART Peripheral: uses UART
dspic33ck-dab.X/sources/comm/PBV_UART.c - PBV UART Transport → CRC Peripheral: uses CRC
dspic33ck-dab.X/sources/comm/PBV_UART.c - Controller Setup → DAB Compensators: includes controllers
- Controller Setup → Forward Coefficients: includes coefficients
- Controller Setup → Reverse Coefficients: includes coefficients
- Control Loop ISR → ADC Peripheral: reads conversions
dspic33ck-dab.X/sources/pwrctrl/pwrctrl_isr_extension.c - Control Loop ISR → DAB Compensators: updates loops
dspic33ck-dab.X/sources/pwrctrl/pwrctrl_isr_extension.c - Isolated Voltage Sense → Fault Evaluation: initializes fault object
dspic33ck-dab.X/sources/device/dev_iso_voltage_sense.c - Fault Evaluation → Fault Controller: supports fault handling
- Power Controller → Power Control State: runs control
- Control Loop ISR → PWM Control: updates modulation
- PWM Control → PWM Peripheral: drives outputs
- PBV Interface → PBV CAN Transport: routes transport
- PBV Interface → PBV UART Transport: routes transport
- PBV Interface → DAB Frame Map: maps messages