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.

TMS570LS1224: When PWM is disconnected, the HET capture gets stuck to the last non-zero value.

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

Goal:

I want to measure a PWM with a Hercule MCU.

Problem:

When using the HET capture functionality, I notice that when the PWM signal is disconnected or when the duty cycle is 0%, the HET capture gets stuck to the last non-zero value.
This is a problem because the PWM I'm trying to measure can sometimes stop completely.

 
How to reproduce:

1. On a Hercules devboard, connect with a wire the PWM[0] and the CAP[2] together.

2. Use halcogen to make sure PWM[0] is enabled and produce a PWM

3. Use halcogen to make sure CAP[2] is enabled and ready to read PWM

4. Use the following code to measure the PWM 5 times and after change the duty cycle to 0%

5. Before count > 5, use a breakpoint to check if everything behaves as expected


   

6. After count > 5, use a breakpoint to check if everything behaves as expected

As you can see the measured signal fails to detect the change.

Is it normal? If so, How can we add a timeout to notice the program that the PWM does not exist?


Thanks.