3.2.14.4 DIAG_GPIO_OutputMonitoring

Returns the status of the IO_PORTS_OUTPUT_MONITOR diagnostic

This function verifies the Output Monitoring Test on a selected GPIO.

It performs the following operations:

1. Sets the direction of the GPIO pin under test to output.

2. Sets the direction of the secondary GPIO pin to input.

3. Drives the state of the GPIO pin under test to HIGH/LOW as specified by the input parameter.

4. After every write to an I/O port pin, the function compares the secondary input pin with what the main output pin was supposed to drive.

DIAG_TEST_STATUS 
DIAG_GPIO_OutputMonitoring
(
     DIAG_GPIO_PORT_INDEX output_port, 
     DIAG_GPIO_PORT_PIN output_pin, 
     DIAG_GPIO_PORT_INDEX input_port, 
     DIAG_GPIO_PORT_PIN input_pin, 
     DIAG_GPIO_PIN_STATE state
);

Diagnostic verifies the following faults do not exist

  • No output / High Impedance Output

Operating Mode

  • Interface can be used at POST and ‘On Demand’
Precondition
  • none

Parameters

  • output_port - port containing output pin
  • input_port - port containing input pin
  • input_pin - pin used for reading
  • state - state to which the ouput is to be driven

Returns

  • DIAG_STATUS