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.

MSP430G2553: Increase PWM frequency for insta-spin in TIDA-00274

Part Number: MSP430G2553
Other Parts Discussed in Thread: DRV8313, TIDA-00274

Customer is trying to use DRV8313 eval system to test a low inductance BLDC. Motor can run up to 25k rpm.  When running from DRV8313 eval board with its GUI, the motor has high pk-pk current ripple due to the low L/R constant (L = 0.1mH, R = 1.8 ohm). 

This could be addressed by operating the driver at a higher PWM frequency, closer to 200 kHz.

Can the insta-spin code that is part of the TIDA-00274 be modified to operate at such a PWM rate?  If so, can you help point to where in the code to make the timer modifications? 

  • Hi,

    1. I just see into the code, the CLK of Timer model is set to 16Mhz, which is the fastest clock speed that G2553 can reach.

    2. So if you increase the frequency of PWM, the resolution will decrease. Here is the code where define the frequency of PWM.

    void Init_Timer (void)
    {
    	TA1CCR0		= 400;							// Load the Reference Count
    	TA1CCTL2	= OUTMOD_6;
    	TA1CCR2		= (100-START_UP_DUTY) * 4;
    	TA1CTL		= TASSEL_2 + MC_3 + TACLR ;		//+ TAIE;	//Up-Down Mode , SMCLK , Timer Clear
    
    	TACCR0		= 400;							// Load the Reference Count
    	TACCTL0		= CCIE;
    	TACCTL2		= OUTMOD_6;
    	TACCR2		= 398;
    	TACTL		= TASSEL_2 + MC_3 + TACLR ;		//+ TAIE;	//Up-Down Mode , SMCLK , Timer Clear
    
    
    	WDTCTL 		= WDT_MDLY_32;
    	IE1 		|= WDTIE;                         // enable WDT interrupt
    	_EINT();                              // Enable interrupts
    }

    3. Because I am not familiar with BLDC motor control, and the algorithm is secrete, so I think you have the following choice:

    1. ask the SEM team for a more professional advice

    2. promote C2000 instead of MSP430

    Eason

**Attention** This is a public forum