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.

CCS/TMS570LS3137-EP: TMS570LS3137-EP Input capture is not working

Part Number: TMS570LS3137-EP
Other Parts Discussed in Thread: HALCOGEN,

Tool/software: Code Composer Studio

Hello Team,

In my project, we are using TMS570LS3137-EP MCU a using ccs v8.0.0.00016 and halcogen version 4.6.00 i have generated code for PWM for 3 channel's and input capture for 3 input channels.

code flow,

1. het is initialized.

2. we monitored pwm signal is generating fine. @ pin no's NHET1[04],NHET1[31],NHET1[29]

3. Generated PWM signal is looped back to input capture pin of NHET1[27],NHET1[25],NHET1[23].

4. calling capGetSignal . read period it shows 0. but in pin side signal is looped.

problem is input capture is not working .....

guide me to solve this issue.

Below i have attached halcogen cobfiguration.

thanks and regards,

Anand Kumar  

  • Hi,

      Not sure what is wrong. By default, the HalcoGen has the below pins (e.g. 0, 2, 4) for capture. Can you do an experiment if these pins are capturing the PWM inputs?

  • Hello Charles,

    thanks for your reply.

    In my final board connection, i have configured input capture for NHET1[2],NHET2[4],NHET2[6] is working fine.

    but i am generating PWM over NHET1[04]=500Hz,NHET1[29]=1000KHz,NHET1[31]=2000KHz.

    we have made loopback as below,

    PWM             Input capture

    =====================

    NHET1[04]-----> NHET1[02]  

    NHET1[29]-----> NHET2[04] 

    NHET1[31]-----> NHET2[06] 

    NHET1[04] generating 500Hz but at capturing at NHET1[02]  is 498.98Hz with previous post . same thing for remaining channels

    why it is supporting only for NHET pin 0,2,4,6,24,26,28,30? why cant other pins

    Thanks and Regards,

    Anand Kumar.

      

  • Hi,

      It should work with NHET1[27,25,23]. Can you send your entire CCS project along with the HalcoGen files (.dil and .hcg)? You can export the project from CCS under "File" -> "Export"...

  • Hello Charles,

    i have attache below the project file. Thanks in advance charles. i have configured Input Capture pin 27,25,23 and PWM generation pin 4,29,31 .

    8688.PWM_InputCapture.zip

    Thanks and Regards,

    Anand Kumar 

  • Hi Anand,

      I think I know what is going now. I will post later my findings. 

  • Hi Ananad,

      The way the HET program is designed in the HalcoGen is that it utilizes a feature called the HR Share. Please refer to the TRM for more detail. To briefly explain in simple term, each pin in the NHET has a HR structure. The HR structure has a HR counter. An even HR structure and an odd HR structure will share the same pin and that pin must be an even pin for capturing the duty cycle and the period of the pin. Without the HR structure enabled, you would have to use two pins instead of one pin to capture both the duty cycle and the period. This capability allows you to free up the odd pin for general purpose I/O. With that said, in order to do input capture that will measure the period and the duty cycle of an pin, you must only use the even pin instead of an odd pin and also turn on the HR share feature. Please see below configuration.

      In your board level loopback, you will connect your PWM to pin 26 instead of 27 and to pin 24 instead of 25. You can use pin 27 and pin 25 for general purpose I/O.

  • Hi charles, 

    Thanks for your clear explanation. I have understood that, i have to enable the HR share feature and have to use even pin for input capture.

    behalf of that , in my custom board it is possible to given NHET1[16] as a input capture  and i have enabled HR share feature too...

    but input capture is not working on NHET1[16]. why is it?

    Thanks and Regards,

    Anand Kumar.

  • Hi Anand,

      I just tried NHET1[16] and it was working for me. Did you configure NHET1[17:16} for HR Share like below?

  • Hi Charles,

    Thanks for ur support.

    Regards,

    Anand Kuamr