Both the CNT_UD and CNT_DG pins support inverting polarity feature based on CNT_CFG.CDGINV and CNT_CFG.CUDINV bits. But their functionality varies based on the mode of the counter.
In case of Quadrature encoder mode, counter direction gets reversed by enabling the polarity inverter of either the CNT_UD pin or the CNT_DG pin. Inverting both pins does not alter the behavior.
In terms of Binary Encounter mode, inverting the polarity of CNT_UD pin only, or inverting both the CNT_UD or CNT_DG pins, results in reversing the counter direction.
In up/down counter mode, GP counter uses the CNT_CFG.CUDINV bit to select an active edge.
In direction counter mode, GP counter uses the CNT_CFG.CUDINV bit to select the polarity of CNT_UD pin which determines whether the counter increments or decrements at every active edge of the CNT_DG input pin.
In timed direction mode, GP counter uses the CNT_CFG.CUDINV bit to select the polarity of CNT_UD pin which determines whether the counter increments or decrements at each SCLK0 cycle. Similarly , it uses CNT_CFG.CDGINV bit to select the polarity of CNT_DG pin, which is used to gate the clock.