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.

TMS320F280049C: how to capture the 2nd rising edge using eCAP

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Dear all

I want to use eCAP to implement the actions:

1) capture the 2nd rising then interrupt, and trigger two synchronous ADCs.

2) start a timer of 5us, the falling edge clear the count of timer.

3) the timer will generator an interrupt after time is up.

thanks!

BR

jjl3

  • Hi jjl3,

    It sounds like you'll need to configure ADC, eCAP, CPUTIMER, peripherals to have all these work together. eCAP can only help with generating an interrupt on the second rising edge. Everything else must be done either through ADC or CPUTIMER configurations.

    capture the 2nd rising then interrupt,

    Please refer to our SDK for eCAP/ADC/CPUTIMER examples. We have a specific eCAP example that show case generating interrupts on edges, in  your case it would be the second edge.

    The location of a generic example show casing interrupt generation on captured edges is located here: C:\ti\c2000\C2000Ware_x_xx_xx_xx\driverlib\f28004x\examples\ecap

    nd trigger two synchronous ADCs.

    To trigger two ADCs, these are the following triggers:

    It sounds like you'll need to use software to trigger the SOC for the ADCs.

    2) start a timer of 5us, the falling edge clear the count of timer.

    Starting a timer, when does it get triggered to start? In the interrupt routine you can clear the counter of the timer.

    the timer will generator an interrupt after time is up.

    Best,

    Ryan Ma

  • Dear Ma

    this timer will get triggered by 2nd rising edge.

    please see the picture I uploaded in last thread.

    The counter value of the timer will be cleared on each falling edge, and once there is no falling edge any more, and the time is up(5us), the timer will produce an interrupt.

  • Hi jjl3,

    Please refer to our ecap examples to learn more on how to configure the ecap to do what you're describing.

    Best,

    Ryan Ma