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.

PM_Sensorless pwm interrupt management

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

i have a question about the pwm interrupt management in the following project:

controlSUITE\development_kits\DRV830x-HC-C2-KIT_v104\PM_Sensorless

For me, it looks like that the MainISR function and the SOCs for measuring the currents and the voltages are all triggered by CNT_zero event of pwm counter.

In MainISR the measured values are needed to calculate pwm duty cycle. How can you be sure that the adc result registers has been updated with the new measured values before you begin to use them for calculation? Did you calculated the number of cycles that are needed to measure and the number of cycles that are needed to come to the part of code where they are needed?

Thanks for your support!

Best regards,

Felix

  • I know the old motor projects (2xMOTOR, old HVKIT projects) had this issue, but I thought this was fixed in more recent projects that were in controlSUITE. Like you said the interrupt was triggered by the ePWM CMP event instead of by the ADC results ready interrupt.

    I'll see if someone can look into this, but YES, you want to have the control interrupt trigger off the ADC conversions done interrupt!