Use eCapture to capture PWM signal

Jeff Liu_20693
Jeff Liu_20693 Altair Community Member
edited June 2022 in Community Q&A

Hi,

I want to use eCapture to get rising edge of a PWM signal which produce by F28069M, here is the set up:

1. Produce a 15Hz signal by ePWM, and output to GPIO0,

2. Use eCap to detect rising edge, and Mux pin set to GPIO11, connect to a "plot" block,

3. Connect GPIO0(Pin 40) and GPIO11(Pin 75) by physical wiring,

4. Tools→Code Gen→Compile→Download, and Go

and there is nothing in "plot" block, is there anything wrong with these set up?

p.s. I've checked ePWM output with oscilloscope(RTB2004), the frequency which I set is correct.

Thanks.

Best Answer

  • Girish Karamadi_21849
    Girish Karamadi_21849 New Altair Community Member
    edited June 2022 Answer ✓

    Hi,

    The procedure you followed works on the target. In order to read the signal on pins you would need to run the diagram in HIL .

    1. Create a compound block of the logic.

    2. Select the compound block .

    3. Click on Tools>>Codegen>> Select the option shown below

     4. Click on Compile and quit.

    image 

    5. Place the target interface block from Embedded>>Piccolo>> Target Interface>> Target Interface.

    image

    6. Select the "run in real time" option from system>> System Properties.

    7. Run the diagram "green button". 

    Attached the modified diagram.

    Regards,

    Girish

Answers

  • Girish Karamadi_21849
    Girish Karamadi_21849 New Altair Community Member
    edited June 2022 Answer ✓

    Hi,

    The procedure you followed works on the target. In order to read the signal on pins you would need to run the diagram in HIL .

    1. Create a compound block of the logic.

    2. Select the compound block .

    3. Click on Tools>>Codegen>> Select the option shown below

     4. Click on Compile and quit.

    image 

    5. Place the target interface block from Embedded>>Piccolo>> Target Interface>> Target Interface.

    image

    6. Select the "run in real time" option from system>> System Properties.

    7. Run the diagram "green button". 

    Attached the modified diagram.

    Regards,

    Girish