Part Number: TM4C1294KCPDT
Other Parts Discussed in Thread: INA240, TIDA-00778, UCC27714
Hi Bob,
Bob Crosby said:While the switches are good at isolation, they are not perfect. To avoid analog input pins which are not being used by the ADC from creating noise on the analog multiplexer, the additional isolation circuit was added.
Disabling the comparator XOR output barrier Co1,2,3 configuring for Analog/HW peripheral direction allowed guessing 90v++ surge entered the I/O pad. Needless to say blew fuses but was part of troubleshooting a much larger issue of PWM gate drivers failures. Such failure lead to high voltage being created in motor phases and POR'd the MCU each and every time the peak rose just above 90v. It was assumed the surge was entering GPIO I/O pad via comparator (Cn-/+) inputs.
Can you elaborate on why the XOR gates in the comparator are not configured by GPIOPinTypeComparatorOutput() for HW peripheral, e.g. DEN bit are being cleared versus setting AFSEL bits REG-10 (0x420)? Also how could configuring Analog / HW for the output somehow circumvent the (Cn-/+) input isolation barrier you earlier described and allow 90v surge to enter and destroy the comparator outputs?
All our Tivaware driver libraries (gpio.c) have GPIOPinTypeComparatorOutput() configured (Output) direction clearing DEN bits REG- 2 (0x400), not setting AFSEL bits. Perhaps the change was made here some time ago yet it is opposite to what section 22.2 datasheet states the AFSEL bit should be set.
Perhaps it is not a peripheral as datasheet section 22.2 claims and is actually Special Analog? Ralf may have answered part of this question earlier via consult with (Amit) but that too seems a vague answer in the resolved context you provided.