This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UCD3138: How to determine if EACD in FE is triggered.

Part Number: UCD3138


Tool/software:

void update_period(void)
{
		Dpwm1Regs.DPWMPRD.all = iv.switching_period; //new period for new frequency
		Dpwm1Regs.DPWMSAMPTRIG1.all = (Dpwm1Regs.DPWMFILTERDUTYREAD.all>>1)+Dpwm1Regs.DPWMEV1.all;
}

void init_dpwm1(void)
{
	Dpwm1Regs.DPWMCTRL0.bit.PWM_EN = 0;  //disable everything

	Dpwm1Regs.DPWMCTRL1.bit.GPIO_A_EN = 1; //turn off DPWM1A for now
	Dpwm1Regs.DPWMCTRL1.bit.GPIO_B_EN = 1; //turn off DPWM1B for now

    // Enable Current Limit and Set min duty cycle to verify.
    Dpwm1Regs.DPWMCTRL0.bit.CBC_PWM_AB_EN = 1;   // Enable cycle by cycle current limit.
    Dpwm1Regs.DPWMCTRL0.bit.CBC_ADV_CNT_EN=1; 	 //normal model 
    Dpwm1Regs.DPWMCTRL0.bit.BLANK_B_EN = 1;      // Enable blanking so we can see a min pulse for curr lim,
    Dpwm1Regs.DPWMCTRL0.bit.BLANK_A_EN = 1;		 // Enable blanking so we can see a min pulse for curr lim
    Dpwm1Regs.DPWMBLKBBEG.all =  ((SWITCH_FREQ_NUMERATOR/switching_frequency) << 4)-1280;
    Dpwm1Regs.DPWMBLKBEND.all = ((SWITCH_FREQ_NUMERATOR/switching_frequency) << 4);
    Dpwm1Regs.DPWMBLKABEG.all = 0;
    Dpwm1Regs.DPWMBLKAEND.all = 0x0500;

	Dpwm1Regs.DPWMFLTCTRL.bit.B_MAX_COUNT = 2;
	Dpwm1Regs.DPWMFLTCTRL.bit.A_MAX_COUNT = 2;
	Dpwm1Regs.DPWMFLTCTRL.bit.ALL_FAULT_EN = 1; 

	Dpwm1Regs.DPWMCTRL2.bit.SAMPLE_TRIG_1_EN = 1; //enable sample trigger1

	Dpwm1Regs.DPWMEV1.all = 290;
	Dpwm1Regs.DPWMEV2.all = 0;
	Dpwm1Regs.DPWMEV3.all = 290;
	Dpwm1Regs.DPWMEV4.all = ((SWITCH_FREQ_NUMERATOR/switching_frequency) << 4)-290;
	Dpwm1Regs.DPWMCTRL0.bit.PWM_MODE = 1; //Normal Mode
	Dpwm1Regs.DPWMCTRL2.bit.SAMPLE_TRIG1_OVERSAMPLE = 3; //8X oversampling.
	Dpwm1Regs.DPWMCTRL1.bit.EVENT_UP_SEL = 1; //update at end of period

	Dpwm1Regs.DPWMCTRL0.bit.CLA_EN = 1;
	Dpwm1Regs.DPWMCTRL0.bit.PWM_EN = 1; //enable OK here, because nothing will happen until DPWM and front end are globally enabled 
}

Hi everyone, I configured DPWM1 in the above code, and I want to implement triggering EADC at Filter Duty1/2. I should check which register in the memory debugger to confirm that DPWM1 actually triggers EADC for sampling. I sincerely hope you can help me.