Hi Ke,
In that case, external connection is probably best way.
PWM signal slope will depend on load which you connect to PP1 pin. Simple connection to PAD5 should have minimal impact.
If you will use PAD5, please enable digital input buffer by DIEN_DIENAD5 bit.
Optionally you could enable port P interrupt and triggering ADC by “ADC0FLWCTL_TRIG = 1;” command inside Port P interrupt routine. However this approach adds additional overhead for CPU and increase delay between PWM edge and ADC trigger event. Enter into interrupt routine takes some time (several bus clock cycles) and this time delay isn’t deterministic because CPU have to finish current instruction prior enter into interrupt routine.
On other side, solution with port interrupt allows to you drive time between PWM edge and ADC trigger event by software. Solution with ETRIG0 needs external circuit (or some additional routing to timer module) for driving time delay between PWM edge and ADC trigger event.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------