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.

F28M36H53C2: Piloting PWM using ADC input

Part Number: F28M36H53C2
Other Parts Discussed in Thread: CONTROLSUITE

Hello,

I hope that anybody can give me some quick advice from where to start my development.

I would like pilot my ePWMs based on the value of the output of and ADC. I had a bit of study on that and if my understand is correct I should put in place something using a combination of the analog comparator; the digital compartor and the trip zone in the ePWM module.

Now as far as I understood the GPIO pin of interest for this should be the one associated to GPIMUX2, namely GPIO193-GPIO197 + GPIO199.

But I don't understand if it is possible to use internally link some ADC output to this GPIO pins?

I am sure I am missing something any suggestion on this topic would be really appreciated.

Claudio

  • Claudio,

    You can start with the adc_soc example in controlSUITE at: ~\controlSUITE\device_support\f28m35x\v210\F28M35x_examples_Control\adc_soc\c28

    This has the EPWM running with ADC sampling.

    The epwm_dcevent_trip_comp will help with configuring a trip when monitoring with the comparator.

    -Tommy
  • Hello Tommy and thank you.

    I'll try to clarify my previous post, so that my concerns about how to configure the C28 will be clearer.

    What you are telling me is to use the COMPxOUT GPIO pins if I am not wrong. Unfortunately I can not use those pins because the they are not available on the board I am using, the balls of the DSP were not made available by the HW design.

    Now what I am trying to do is to implement some sort of protection on the duty cycle of my PWM based on the ADC result that is not overloading my C28 processor with cumbersome computation. I am using DMA to copy ADC values (if this can prevent some solution).

    Right now what I am doing is to implement outside a sort of signal that I will use to tripzone my ePWM as described in page 778 of SPRUHE8C.

    Thanks,

    Claudio

  • Claudio,

    Yes, the comparator will require access to the COMPxOUT pin. I am not sure if there is another low-processor method of monitoring the voltage level without some external circuitry.

    -Tommy
  • Thanks a lot for you explanations.
    I was able to pilot my ePWM duty cycle using an external comparator and in the next board release (already in progress) I have asked to connect the comparator output to some free pins.

    Thank you for you support.

    Claudio