Tool/software: Code Composer Studio
Hello there!
working on a totem-pole PFC project with UCD3138,
I am having trouble setting up the front-end DAC ramp.
My issue is that the DAC value which I read from the DACSTAT register does not increase, and instead stays stuck at its initial load value (the beginning of the ramp).
Besides, the RAMP_BUSY flag stays at '1'.
Here is an extract of the code I use :
FeCtrl0Regs.EADCDAC.bit.DAC_VALUE = 100; // ramp start value
FeCtrl0Regs.RAMPDACEND.bit.RAMP_DAC_VALUE = 1000; // ramp stop value
FeCtrl0Regs.DACSTEP.all = (10 << 10) + (0 << 9); // ramp step value
FeCtrl0Regs.RAMPCYCLE.bit.SWITCH_CYC_PER_STEP = 0; // 1 switching cycles per step
LoopMuxRegs.FECTRL2MUX.bit.DPWM2_A_TRIG_EN = 1;
FeCtrl0Regs.RAMPCTRL.bit.RAMP_EN = 1;
FeCtrl0Regs.RAMPCTRL.bit.FIRMWARE_START = 1;
Can someone kindly help me find the reason to that issue ?
Thanks a lot!