GPIO Configuration Problem on NVIDIA Jetson AGX Xavier

Dear ALL,
I am a new user of NVIDIA jetson AGX Xavier. I am trying to configure GPIO pin number 22 for blinking one LED.
The code I have taken from here https://github.com/gaosiy/JetsonXavierGPIO.

While running the executable file i am getting 3.3 V on pin number 22 and the LED is lit. Unfortunately from the second loop, i am getting 1.6 V when the gpioSetValue is on and 1.4 V when gpioSetValue is OFF. I am supposed to get 3.3 V every time when gpioSetValue is on and 0 V when the gpioSetValue is OFF. I tried to use pin number 15 also, but the result is the same. Is my GPIO pin got damaged??

It would be highly appreciated if someone help me to solve this problem?

Best Regards
Anayat

please also refer to below for reference, thanks