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.

capGetSignal

Other Parts Discussed in Thread: HALCOGEN

I need to be able to determine when a square wave coming into our board stops. I used the capGetSignal() function as created by HALCoGen and was successful in reading period and duty cycle. I had hoped that when the waveform stopped, this data would go to zero, and make my job simple. However, after reading up on the module a little, I can see why it simply retains the last known values, and doesn't go to zero. I tried experimenting with the WCAP instruction, and seeing if perhaps a timestamp would be associated with that data, and use that for my determination, but I was unsuccessful. I am new to HERCULES so if anyone has a suggestion, it would be greatly appreciated.

  • David,

    First of all, you need to come up a definition of "the waveform stopped" in your application. It could be that there is no rising/falling edge in certain amount of time. It would be very simple if you only measure a single pulse. Otherwise, you need to set up a "time-out" condition.

    Thanks and regards,

    Zhaohong

  • Hi Zhaohong,

    Thanks for responding to my post. I need to ensure that a square wave coming in maintains fidelity, and act on it if there are issues, especially if the input clamps high or low (waveform stops). The capGetSignal() is perfect for ensuring the waveform specifics, as just using rising/falling edges won't ensure fidelity. The problem with the function is that it cannot 'reset' its values as it is clearly driven by rising/falling edges, so the data remains constant. After some experimenting, I found that the hetGetTimestamp() function could be used, as it won't be updated if there is no event (rising or falling edge) on the input., and the timestamp remains constant. I could use this to determine if the input is clamped. Of course, HALCoGen appears to set up the instruction for the capGetSignal() function with the event encoding of 'always', not gated by rising/falling edge even though the capture polarity is set. I'm sure there are other ways to set up a timeout for the input.

    Regards,

    Dave

  • Dave,

    In order to better understand how Halcogen functions can be used in your application, I have passed your post to Halcogen team. In the meantime, I would suggest you spending some time on the TRM to understand how NHET works.

    Thanks and regards,

    Zhaohong

  • I had submitted a support request to TI based on my findings of using HALCoGen. Text was:

    I want to use capGetSignal() so I set up HR share then the capture pin. No matter which cap polarity I pick, the "Control" word below always shows a Capture Condition code of 00 (always), never gated with rising/fall edge.