Other Parts Discussed in Thread: DRV8848
Hi,
I am new to motor driver development. I am trying to get the brushed DC motors spinning using FR5969 launchpad.
I connected DRV8848 boosterpack on launchpad and uploaded the following code:
//Setup nSleep(P1.2, AIN1, AIN2 pins) GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN2 | GPIO_PIN4 | GPIO_PIN5); //Turn on nSleep pin GPIO_setOutputHighOnPin(GPIO_PORT_P1, GPIO_PIN2); //Set nFault as input pin GPIO_setAsInputPin(GPIO_PORT_P3, GPIO_PIN0); //AIN1 = Low GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN5); while(1) {
//PWM Frequency = 10KHz, 50% duty cycle GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN4); __delay_cycles(800); }
I set the clock to 16MHz. When I upload the code, the motor isn't spinning and is making high pitch noise. It'd only start if I give a gentle PUSH. I tried changing the PWM frequency, but motor continues to make the different high pitched noise without spinning. I'd be grateful if you can help me understand the problem here.
When I connected the boosterpack to G2553 LDK and use the DRV8848 GUI, everything is working fine. I currently do not have an oscilloscope. So, I couldn't see the frequency generated on the pins.
Thanks
Teja