HI:NXP Technical support
I think I'm having difficulties with the configuration of ADC_ETC and would like to seek your help.I want to use ADC_ETC to measure the current of a BLDC motor.My motor driver chip is the TI DRV8316C.I configured my PWM in SignedCenterAligned mode.Referring to the example in the diagram below, I set the PWM to trigger output at the VAL0 value.
However, when I actually read the SOA current, I found that it was a fixed value. After troubleshooting, I discovered a phase difference between SOA and the PWM signal.
In fact, I did achieve the effect I wanted, as shown in the diagram below.

However, when I actually read the SOA current, I found that it was a fixed value. After troubleshooting, I discovered a phase difference between SOA and the PWM signal.
Currently, I am reading the ADC at position 1, but it should be read at position 2.

Referring to the Center Aligned PWM example diagram, I believe setting the PWM to trigger at the VAL1 value would be effective.So I modified my code.
I changed PWM_OutputTriggerEnable(PWM1, kPWM_Module_1, kPWM_ValueRegister_0, true); to PWM_OutputTriggerEnable(PWM1, kPWM_Module_1, kPWM_ValueRegister_1, true);.
But it didn't works.
I'm certain that the value of this register has been correctly modified.

I don't know why this is happening, so I would like to seek your help. Thank you very much.
i.MX-RT1170