Hi!
This is my first time to use three phase BLDC motor kit with DRV8312 and Piccolo MCU. http://www.ti.com/tool/drv8312-c2-kit
I have a problem.
When I insert a code to ti Example_2803xEPwmRealTimeInt.c
The code just copy “G PIO-34 - PIN FUNCTION = LED3 on controlCARD”.
And I look the DRV8312 map, I know GPIO0 can drive PWM_A. So I modify and insert it.
The code is
main{
...
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO0 = 1;
GpioDataRegs.GPASET.bit.GPIO31 = 1;
…
}
…
__interrupt void epwm1_timer_isr(void)
{
…
if (LEDcount==500) {
GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1; //turn on/off LED3 on the controlCARD
//(2012/10/15)Adding the following line to trigger a PWM1 signal to GPIO0
GpioDataRegs.GPATOGGLE.bit.GPIO0 = 1;
}
When I debug use the multimeter measure the signal. I can measure the BLDC output MOA has signal change, but PWM_A in J5 of the board has not change
How to use DRV8312 to drive the PWM_A channel in the J5 of board?
And how to set frequency?
Thanks!