SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
// Code snippet for APWM mode Example 2
// Run Time (Note: Example execution of one run-time instant)
//============================================================
ECAP1Regs.CAP2 = 7000; // Set Duty cycle i.e., compare value = 7000
ECAP2Regs.CAP2 = 2000; // Set Duty cycle i.e., compare value = 2000
ECAP3Regs.CAP2 = 550; // Set Duty cycle i.e., compare value = 550
ECAP4Regs.CAP2 = 6500; // Set Duty cycle i.e., compare value = 6500