Reading dc motor encoder data

hi,
I am using these 4 motors (12V 330 rpm) -

and failing to read encoder data.

here is my gpio setup -

import Jetson.GPIO as GPIO
GPIO.setmode(GPIO.TEGRA_SOC)
ENC1 = 'SPI2_SCK' # A phase output of C1 encoder
ENC2 = 'LCD_TE' # C2 encoder B phase output
GPIO.setup(ENC1, GPIO.IN)
GPIO.setup(ENC2, GPIO.IN)

for both pins, whenever calling GPIO.input(ENC1) or GPIO.input(ENC2) I keep getting a constant value of 1, regardless of motor speed/direction.

any advice would be appreciated.
thanks, a.

hello avidan2012,

you may configure the pin as PWM for motor controls,
please also check similar discussion thread, Topic 49025 for reference.
thanks

will look into that. just to make sure, I am successfully controlling the motors using adafruit’s featherwing board. my issue is with reading the encoders data. will try to find an answer in the topic you ve mentioned.