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.

Problem getting counter value with HLC interrupt

Part Number: TMS320F28379D


Hello everyone,

I want to create a program that will decode SENT protocol frame by using CLB. The fact is that I have an input signal which look like a PWM signal. This signal corresponds to a value defined by the time between 2 falling edges.

To get my value, I use a HLC interrupt that occurs on a falling edge (this part works perfectly). In my function, I want to read the counter value, but I never have the good value. I have an input signal that is supposed to be equal to 55. But when I use the debug, I see that the value that I get is 0 or 1 if I use the FIFO to get my value, or a random value between 0 et 55 if I use the CLB_getRegister function in my interrupt function.

Here is a simulation of the signals that I have, with a generated input signal similar to my reel input signal:

Here, the OUT signal corresponds to FSM0_OUT, which detects falling edges, and is used as event0 to generates the interupt.

Thanking you in advance!