Hi,
Thank you so much for your interest in our products and for using our community.
I must admit that your request is a bit strange, since normally the amplitude of an external PWM signal is known and at the same time it tends to be fixed.
However, you can implement a GPIO interrupt to start the eMIOS, acting as time base and perform an Analogue data capturing like in AN13767 (4.2.4 section).
Hope it helps you.
Have a nice day!