How weiyx15/pwm_rectifier works
Project type and purpose
• This is an embedded, real-time, bare-metal control application running on the TI TMS320F28335 DSP.
• Purpose: implement and experiment with PWM-based rectifier control (SVPWM, ADC-SOC triggering, EPWM deadband, filtering).
File structure
• Top level: example folders (“Example_2833xAdcSoc”, “Example_2833xEPwmDeadBand”, “SVPWM”, etc.) each containing a single .c demo.
• No OS directory—firmware runs directly on the DSP.
• Core modules scattered as separate examples: ADC SOC setup, EPWM deadband, different SVPWM algorithms, filtering, test harness.
• README confirms device (TMS320F28335) and project context (university course work).
Main components to highlight
a. Hardware platform
• TMS320F28335 CPU core
• On-chip peripherals: ADC modules, ePWM modules, timers, interrupt controller, GPIO
• External power electronics (rectifier bridge, sensors, filters)
b. Software modules
• ADC_SOC: configures ADC to sample voltages/currents, raises end-of-conversion interrupt
• Control algorithm (SVPWM): reads ADC data, computes duty cycles
• EPWM driver: programs ePWM registers (compare modules, dead-band insertion)
• SVPWM_filter: optional filtering stage on reference or feedback signals
• Test harness (testSVPWM): validation application
c. Interrupt & data flow
• ADC SOC interrupt → Control ISR → EPWM update → output to power stage
d. Configuration & startup
• System init (clock, PLL) → Peripheral init (ADC, ePWM, GPIO) → Main loop or idle
Relationships and interactions
• EPWM outputs going to external power-converter stage.
• Real-time ISR context around ADC → Control → PWM chain.
• A debug/UART block if present (not in file tree, but common in this DSP).
Architectural patterns & design principles
• Interrupt-driven, data-flow architecture
• Separation of concerns:
• Peripherals configuration (init code)
• Sensor acquisition (ADC driver)
• Control math (SVPWM core)
• Actuator update (ePWM driver)
• Modular code organization: each example folder illustrates one piece of functionality.