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.

External Trigger to NHET



Question:  I am going to setup an NHET Timer pin to output a pulse of fixed duration.  I want the trigger to be either internal (software invoked), or based upon an external event.  The question I have is can the NHET output pulse be triggered by some other external event - for example, a falling edge on a GPIO pin?

If so, are there any examples out there?

Thanks,

Joe

  • Hi Joe,

    If you want the NHET to be triggered by another IP  (like the GIO module) then you'll have to make this connection through the CPU.

    There is an 'nDIS' input from the GIO to the NHET to disable the NHET drive in case of a fault but that's kind of a hard-coded behavior.

    What you can do from inside the NHET is to sense on of the NHET pins as an input and trigger an output pin from the same NHET based on this.

    The Branch instruction has conditions which are based on pin events,  so you can conditionally branch on say the rising edge of some pin.   When you detect the edge you want you can branch to some code that writes a value into the instruction that you want to use to produce your output pulse.   PWCNT might be what you want if you want to generate a one-shot based on the pin event.

    Best Regards,

    Anthony