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.

TMS320F28377S: eCAP noise, false reading

Expert 1225 points

Part Number: TMS320F28377S

Hello,

I am using eCAP to get the duty cycle of input PWM signal. (50Hz)

However in my Motor Control Application there is some switching noise that probably corrupts eCAP reading.

What I see on a scope is some nano-second gliches of amplitude 1V, sometimes 2V, but not sure if this are what really is on the uC pin or this is induced in scope probe (so false measurement)

Nontheless I am getting wrong readings from eCAP when start switching (3-phase inverter).

Is there a way to cope with this on the software/eCAP configuration level?

I will try in a mean time add some filtering on PCB but I would prefer to fix it in SW.

As my signal i want to measure is low freq and those gliches are of ns or sub-ns duration.

Regards,

Adam

  • Hello Adam,

    You can use GPIO input qualification for the pin you're using for the eCAP's input. Please refer to the GPIO chapter in the reference manual for more information:

  • Thanks.

    but using input qualification can I still use pin as a ecap? As I want to measure the duty cycle. So ecap will measure the time starting with rising edge, then if input qual detect it is noise ecap will reset and when input qual detect it is valid sample then the ecap show the timings regarding to the first rising edge or it starts counting from the end of input qual sampling?

  • but using input qualification can I still use pin as a ecap?

    Yes, this GPIO configuration is independent of the peripheral configuration.

    So ecap will measure the time starting with rising edge, then if input qual detect it is noise ecap will reset and when input qual detect it is valid sample then the ecap show the timings regarding to the first rising edge or it starts counting from the end of input qual sampling?

    If you refer to the GPIO chapter in the device reference manual, you can see that qualification essentially makes sure the input remains stable for a certain number of cycles before allowing the input read into the peripheral to change. Therefore, it will read the correct timing, but the value will not be ready immediately once the signal transitions have completed (i.e. the timings will be obtained on a delay based on if/how long your qualification window is). I highly recommend reading the section 7.4 Input Qualification, as there are different types of qualification and the type you want to use will depend on what you're trying to achieve. There are also diagrams to help show how qualification works.