SPRUJ52C june 2022 – july 2023 AM69 , AM69A , TDA4AH-Q1 , TDA4AP-Q1 , TDA4VH-Q1 , TDA4VP-Q1
// Code snippet for CAP mode Delta Time, Rising and Falling edge triggers
// Run Time ( e.g. CEVT1 triggered ISR call)
//==========================================
// Note: here Time-stamp directly represents the Duty cycle values.
DutyOnTime1 = ECAPxRegs.CAP2; // Fetch Time-Stamp captured at T2
DutyOffTime1 = ECAPxRegs.CAP3; // Fetch Time-Stamp captured at T3
DutyOnTime2 = ECAPxRegs.CAP4; // Fetch Time-Stamp captured at T4
DutyOffTime2 = ECAPxRegs.CAP1; // Fetch Time-Stamp captured at T1
Period1 = DutyOnTime1 + DutyOffTime1;
Period2 = DutyOnTime2 + DutyOffTime2;