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.

MCU-PLUS-SDK-AM263PX: EQEP Frequency measurement

Part Number: MCU-PLUS-SDK-AM263PX
Other Parts Discussed in Thread: LP-AM263P, SYSCONFIG

Tool/software:

Hello,

I am currently working on LP-AM263P. I want to measure frequency. When I try to compile "eqep_frequency_measurement" example, it did not work as i expected.

My questions are:

1) In example, EQEP0 is using in sysconfig and also I have to connect some pins to each other to measure frequency but EQEP0 is not on J25 pin1. 






2) If I change EPWM frequency from sysconfig, example is still measuring 10kHz but I set frequency to 20kHz and I can see that it is 20kHz on Oscilloscope. How can I measure different frequency values?

Best Regards.
BK

  • Hi BK,

    EQEP0 should be on J24 Pin 1, it looks like the note in SDK documentation is incorrect. I will report that issue and get it resolved.

    2) If I change EPWM frequency from sysconfig, example is still measuring 10kHz but I set frequency to 20kHz and I can see that it is 20kHz on Oscilloscope. How can I measure different frequency values?

    I was able to re-create this myself and with a bit more testing I have concerns about the way this example is operating as a whole. I need to debug this further.

    Best Regards,

    Ralph Jacobi

  • Hi BK,

    I'm going to have to check with a SW expert about how this example is supposed to function.

    On one hand if I update the targeted PWM values in the eqep_frequency_measurement.c file, I am getting the correct result now.

    However on the other hand if I disconnect the PWM, I still get the correct result, and that's definitely not right, so I have concerns about how the example has been structured.

    Best Regards,

    Ralph Jacobi

  • Hi Ralph,

    In my project, I have 3 different epwm with different frequencies and all have isr callback. I tested them and they are working as expected. After this point, I just connect each one by one to right eqep pin and tested on eqep example but it did not measure any frequency correctly.


    On one hand if I update the targeted PWM values in the eqep_frequency_measurement.c file, I am getting the correct result now.

    I have a concern about this feature. Why should I give PWM frequency value to eqep? I just want to measure frequency and I have to tell my pwm frequency value to eqep to measure correct value as an user. This is not make sense for me. 

    However on the other hand if I disconnect the PWM, I still get the correct result, and that's definitely not right, so I have concerns about how the example has been structured.

    As you said that I realized while debugging this code and this example is not working as expected. I am waiting for your feedback.

    Best Regards,
    BK

  • Hi Basri,

    I'm checking with the SW team on this further, I can at least say its a known bug that should be resolved for next release but looking to see what needs to be done to get it working for you.

    Best Regards,

    Ralph Jacobi

  • Hello Basri,

    I still have not gotten feedback from the SW team yet - how much of a priority is this for you to get resolved?

    Best Regards,

    Ralph Jacobi

  • Hi Ralph,

    I do not want to rush process for you but this is an important requirement for my demo product. Therefore, I need a solution as soon as possible.

    Best Regards,
    BK

  • Hello Basri,

    It looks like this will need to be resolved as part of the bug fix flow for the SDK and we won't have a solution from the software team for a few months. I may try and work out a solution on my end next week but I am not sure if I will have the time to dive into the example that deeply.

    Best Regards,

    Ralph Jacobi