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.

How to monitor the artificial ramp waveform on UCD3138 EAP pin

Other Parts Discussed in Thread: UCD3138

Hello,

Can the artificial ramp generated by FrontEnd module be monitored on external pins(e.g. EAP) by oscilloscope?

I found the COMPRAMP0 module can do this way, as the following figure shown.

The COMPRAMP0 module generated an artificial ramp and output it on AD06 pin.

If I want to use FrontEnd module to do the same thing, how to configure it?

If it can't, how to check whether the artificial ramp is correct if I want to design a slope compensation

in peak current mode by UCD3138?

Thanks.

Regards,

Hyde

  • Hello, Hyde,

    DAC of analog comparators can go out and so you can monitor the slope. Unfortunately, DAC of FE can't go out. But we do have a document to calculate the ramp. Tell me your email, and I will forward it to you.

    regards,
    Sean
  • There are a couple of ways to do it in software because you can see the ramp with by reading from the DACSTAT register:

    1. configure an unused DPWM with a pretty fast switching frequency, say around 2 MHz, and put the DACSTAT value out on the DPWM.
    a. You can use this code for the basic stuff:
    Dpwm1Regs.DPWMEV2.all = FeCtrl1Regs.DACSTAT.all + (80*4);
    Dpwm1Regs.DPWMEV2.all = FeCtrl1Regs.DACSTAT.all + (80*4);
    Dpwm1Regs.DPWMEV2.all = FeCtrl1Regs.DACSTAT.all + (80*4);
    .....

    the 80*4 is to keep the minimum pulse width out of the update window. It should be OK for the 3138. Some other devices you may need to go higher. This doesn't work well for the PSFB, because I think all the DPWMs are being used, but you can study it in isolation.

    You can either put a filter on the DPWM output, or look at the length of the individual pulses

    2. Save DACSTAT in an array:
    The best way to do this is to also save the DPWM status in an array- that way you can see the DAC ramp relative to the DPWM signals
    Here's the code I used:

    dac_values[0] = FeCtrl1Regs.DACSTAT.all; dpwm_values[0] = MiscAnalogRegs.GLBIOREAD.all;
    dac_values[1] = FeCtrl1Regs.DACSTAT.all; dpwm_values[1] = MiscAnalogRegs.GLBIOREAD.all;
    dac_values[2] = FeCtrl1Regs.DACSTAT.all; dpwm_values[2] = MiscAnalogRegs.GLBIOREAD.all;
    .....

    the code is inline rather than in a loop because it is faster that way.
    Especially with the second one, you probably want to trigger it with an event, like the start of a cycle, so you can see what it does.
  • Got it! Thanks for your help! Ian, Sean

    Regards,
    Hyde