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.

TMS470M how get time between edge interrupts

Other Parts Discussed in Thread: HALCOGEN

Hi,

I want to get time between edge interrupts in microseconds.

hetGetTimestamp always returns 0.
Code generated in HalCoGen 3.06 and debugging in CCS 5.4 WCAP Data Field not changed over time.

Input pulses are shaped:

I tried the function edgeGetCounter(edge0), but the array FIFO1 are put only approximately the same values. How does it work this function?

Example my code:

notification.c file


void edgeNotification(uint32 edge)
{
unsigned long tc;
if(edge==edge0)
{
tc = edgeGetCounter(edge0);
prev_tc-=tc;
prev_tc=-prev_tc;
FIFO1[++jkl]=prev_tc;
prev_tc=tc;
}
}

I used TMS470M HDK Board and configured HET Global Timing Configuration in HalCoGen:

Please help me get time between edge interrupts.

Regards,
Roman