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.

TMS570LS3137: Input capture for consecutive channel was not working. Het2[0] & Het2[1] was not working properly

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Hi Support team,

we are facing issue on input capture. We are trying to use the consecutive pins for the input capture. eg: Het2[0] & Het[1] the data update from the buffer was invalid.

If we use alternative pins like Het[0] & Het[2], it was working. is there any options to use the consecutive pins for input capture.

thanks in advance.

  • Hi,

    The N1HET supports high resolution (HR) mode and standard mode. But only one instruction with HR mode enabled is allowed per high resolution pin. 

    For example, if you capture a PWM period and a PWM pulse width (high or low) of the input PWM signal at pin 0, two PCNT instructions are needed, but only one PCNT can use HR mode. To solve this issue, you can enable the HR share bit for pin 0 and pin 1 (HETHRSH register). After HR share features is enabled, the pin 0 can use both NHET HR structure of pin 0 and the NHET HR structure of pin 1.

    The HR share is enabled in HalCoGen generated code. NHET HR structures of pin N (even number) and pin N+1 (odd number) are used for pin N. The Pin N+1 can not used as NHET pin. This is why N2HET2[1] doesn't work in your setup.

  • Hi TI Support,

    thanks for the reply.

    1. What shall be the resolution if we use low resolution option in HET(input capture)

    2. Can we use the next pin for other purpose like PWM,IO. (example: if we use Het[0] for input capture with high resolution disabled and Het[1] need to be used for other purpose)

  • Hello,

    1. For low resolution, the measurement is rounded up to LRP. For high resolution, is resolution is one HRP.

    2. Yes, HET[1] can be used as GIO. In this case, only the HR structure of HET[1] is used for capturing the signal at HET[0] pin.