Hi @yanis-waabi,
Thanks for your question.
You could find a Reference Software of the Automotive SW - S32G - gPTP Stack at Flexera, the package you have an example that has a function to initialize the PTP Stack

Also refers to the gPTP S32G User Manual that is included when you download the package, there you could see the prerequisites to run the example.
Let me know if you have more questions about this topic.