Hi Anang,
I have help you create a project based on KDS and PE.
When I connect PTB6, XTAL pin to GND, the GPIO PDIR according bit(bit 15) =0

When I connect PTB6, XTAL pin to 3.3V or 5V, the GPIO PDIR according bit(bit 15) =1

So, the XTAL pin is working.
Please refer to my attached code.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------