Directly Controlling PWM Servo using Jetson Nano

I am planning to use a servo motor directly connected to a GPIO pin without a servo driver. Can someone please guide me on how to configure the pin and provide a sample program to control the servo motor using Jetson Nano?

Please refer to this thread to see if can help:
How to use servo and pwm motor libraries - Jetson & Embedded Systems / Jetson Nano - NVIDIA Developer Forums