This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Project 11a - Trigger adjustment

Other Parts Discussed in Thread: MOTORWARE

Hello,

I am reading through project lab 11a and stumbled over a line of code that I don't understand. Specifically, this is line 777 in proj_lab11a.c of MotorWare 16:

In the main ISR, the function runSetTrigger() is called to set the ADC SoC to the correct point in the PWM period. Why is runSetTrigger() not called if the winding resistance is being calibrated (gMotorVars.Flag_enableRsRecalc)? Shouldn't the correct SoC be determined whenever the current controller is running?

I'd appreciate any insight into this.

Thank you!

  • you don't need to use overmodulation during RsRecalc, which is just injecting a DC value through a + IdRef_A value

    "In the main ISR, the function runSetTrigger() is called to set the ADC SoC to the correct point in the PWM period."
    It is also used to decide which of the 3 currents to use in the feedback calculations. See HAL_setTrigger