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.

Explicit control of N2HET pins

I am running an N2HET program to drive a couple of motors and the program works fine.

However in case of exception elsewhere in my host program, I want to shutdown the N2HET program and force the driving N2HET pins to a safe state.

Any ideas on how to achieve this? Can I use the N2HET pins as forced GPIOs after I shut the N2HET program? Also how do I ensure that the N2HET is completely shut off?

  • Hi,
    Yes, you can force the HET pins into GIO mode after you shut off N2HET program. You just clear the 'TO' bit in the HETGCR register to shut off the N2HET program. Please also refer to your device specific datasheet and TRM for the below feature to see if it is useful to you. It can automatically place the HET pins in tri-state responding to an external event.

    7.4.6 Disabling N2HET Outputs
    Some applications require the N2HET outputs to be disabled under some fault condition. The N2HET
    module provides this capability via the "Pin Disable" input signal. This signal, when driven low, causes the
    N2HET outputs identified by a programmable register (HETPINDIS) to be tri-stated. See the device
    specific technical reference manual for more details on the "N2HET Pin Disable" feature.
    GIOA[5] is connected to the "Pin Disable" input for N2HET1, and GIOB[2] is connected to the "Pin
    Disable" input for N2HET2.
  • Thanks, this is exactly what I had in mind. Referred to the TRM and I think it will work.