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.

TMS320F28335: parameter

Part Number: TMS320F28335
Other Parts Discussed in Thread: TMS320F28374S

Hallo,

I would like to trigger the ADC on every rising and falling edge of an external pin with a fixed delay between the rising and falling edge (in the middle).

Can Capture be used to trigger the ADC in between the rising and falling edges ? If not can this be done with 28379 ?

Thanks a lot,

Erol

  • Part Number: TMS320F28374S

    https://e2e.ti.com/p/addpost?rt=719671

     Hello,

    With f28335  I would like to trigger the ADC on every rising and falling edge of an external pin with a fixed delay between the rising and falling edge (in the middle). 

     Can Capture be used to trigger the ADC in between the rising and falling edges ?

    Basically I would like to trigger on the rising and falling edge of a few pulses (with various widths), use capture to measure the pulse widths , trigger ADC in the middle between the rising and falling edge of each pulses in order to measure the voltage in the middle of each pulse. If 28335 can not do it, can f28379 

     

    Thanks a lot,

    Erol

  • Hi Erol,

    F28335 has an external ADCSOC pin where ADC conversions can be triggered externally.  F28379 can also be triggered externally through any GPIOs using the crossbar.  Trigger only happens on the rising edge though for both the F28335 and F28379 devices.

    Regards,

    Joseph

  • Erol,

    You cannot generate an SOC from the capture module, but there is a method which might work for you on F28379.

    What you could do is configure a spare PWM module which is connected to an external SYNC input via a GPIO pin to operate in up-count mode at some arbitrary (but pretty high) frequency. Assuming you have already measured the pulse width using a CAP module and know the delay you want, you configure the PWM timer SYNC action to load a value much larger than the PWM period into the PWM counter, and set CMPC (or CMPD) to be this value plus the delay you want. On F28379 you can trigger an SOC from either of these comparators.

    The rising edge of the incoming pulse will force the SYNC action to load the timer count to the new (large) value, the counter counts up from there and triggers the ADC SOC on passing through CMPC. Afterwards, the counter will just wrap around on terminal count and go back to its harmless counting.

    If you had asked the question a few months from now there would have been an even better solution involving the CLB. That block has user configurable logic and timers, so you could get it do this pretty easily. All that's needed is the user tooling which we'll release in a few months. The PWM solution above could be an interim fix for you, then change over to the CLB method later if needed.

    I hope this helps.

    Regards,

    Richard

  • Hi Joseph,

    Thanks a lot for the quick answer !

  • Richard Poley said:

    Erol,

    You cannot generate an SOC from the capture module, but there is a method which might work for you on F28379.

    What you could do is configure a spare PWM module which is connected to an external SYNC input via a GPIO pin to operate in up-count mode at some arbitrary (but pretty high) frequency. Assuming you have already measured the pulse width using a CAP module and know the delay you want, you configure the PWM timer SYNC action to load a value much larger than the PWM period into the PWM counter, and set CMPC (or CMPD) to be this value plus the delay you want. On F28379 you can trigger an SOC from either of these comparators.

    The rising edge of the incoming pulse will force the SYNC action to load the timer count to the new (large) value, the counter counts up from there and triggers the ADC SOC on passing through CMPC. Afterwards, the counter will just wrap around on terminal count and go back to its harmless counting.

    If you had asked the question a few months from now there would have been an even better solution involving the CLB. That block has user configurable logic and timers, so you could get it do this pretty easily. All that's needed is the user tooling which we'll release in a few months. The PWM solution above could be an interim fix for you, then change over to the CLB method later if needed.

    I hope this helps.

    Regards,

    Richard

  • Hi Richard,

    Thank you very much for the quick answer !

    I was trying to use an older (more familiar to me) processor to analyze a particular solution for a task even though the team here has been designing the PCB with 28379. I'll now get quickly to 379 and try what you recommended and then the other solution.

    Thanks a lot again !

    Best,

    Erol