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.
已解决! 转到解答。
Hi,
Thank you for your patient response.I have already resolved this issue.The key to the problem lies in the image below.
Trigger 1 is activated when the counter matches VAL 1, VAL 3, or VAL 5 register.I should configure it to be triggered by Trigger 1.Now I can collect ADC values according to my requirements.
Thank you very much for your patient response. Have a wonderful day!
Hi,
Thank you so much for your interest in our products and for using our community.
You can refer to the SDK examples evkbmimxrt1170_mc_bldc or evkbmimxrt1170_mc_pmsm_enc (v2.16.000).
Both examples perform the same eFlexPWM + ADC_ETC synchronization, almost equal to yours. The difference is that it uses a different compare value (val4) for ADC triggering.
Documentation comes in the SDK examples:
Hope it helps you.
Have a nice day!
Hi,
Thank you for your patient response.I have already resolved this issue.The key to the problem lies in the image below.
Trigger 1 is activated when the counter matches VAL 1, VAL 3, or VAL 5 register.I should configure it to be triggered by Trigger 1.Now I can collect ADC values according to my requirements.
Thank you very much for your patient response. Have a wonderful day!