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.

code modification for DRV8312GUI_Main.c

Other Parts Discussed in Thread: DRV8312

Hi,

I have a DRV8312-C2 Kit and I am running the motor that came with the Kit using DRV8312GUI_Main.c.

Can somebody tell me, how do i modify the code to get 100% duty cycle for the PWMxB signals (the signals fed to the RESET_X input of the DRV8312)? I posted a question regarding current waveform  DRV8312 issue on Motor Driver Forum and was asked to modify the PWMxB signals. 

Below are some other questions:

Looking at the BLDCPWM_Macro(),  

1. what is the function of the variables Tmp and Tmp2?

2. What does half mean in EPwm1Regs.CMPA.half.CMPA = (int16)(Tmp>>15)?

Thanks!