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 as motor controller

Other Parts Discussed in Thread: MSP430G2553

I'm looking at switching over from Microchip products to the MSP430 series (MSP430G2553)  for a small motor control project I'm working on.  I see it has 6 PWM channels, but as I'm somewhat new to this device and the family, can someone confirm what sort of PWM peripheral features are available for this device?  I can't seem to find an extensive datasheet enough to describe the output characteristics of the timer/compare units.  In general, if someone could confirm that this product can put out six independent PWM signals for a BLDC motor control application, I'd appreciate it.  Thanks!

  • The answer is... it depends. Not all packages pinout all 6 Timer outputs that are available in the MSP430G2553 device.

    The G2553 has two independent TimerA_3 modules. So you have two groups of three PWM outputs. Each group of three would have to have the same frequency, although each output can have individually programmed duty cycle.

    Check out section 12.2 of the User's Guide: http://www.ti.com/lit/pdf/slau144

  • Have also a look into the TI Motor Drivers Forum, lost of MSP430 examples:

    http://e2e.ti.com/support/applications/motor_drivers/default.aspx

  • Brian Boorman said:
    Each group of three would have to have the same frequency, although each output can have individually programmed duty cycle.

    Also the available frequencies are limited to ACLK/SMCK or one of them divided by 2/4/8.
    If PWM frequency needs to be set to something else, each timer's CCR0 is needed to control the PWM frequency and cannot be used anymore as PWM output (it only can output a 50% DC signal of half the PWM frequency, or a 1 timer tick pulse once per PWM cycle.) leaving you with only 4 CCRs left for real PWM output.

  • Jens-Michael Gross said:
    Also the available frequencies are limited to ACLK/SMCK or one of them divided by 2/4/8.

    True, but SMCLK can be sourced from the DCO, and that can be tuned to a particular frequency that is a 1, 2, 4, or 8x multiple of the PWM frequency.

  • I think I understand now.  Basically, I have to choose a 28 or greater pin package to have all three outputs pinned out.  After that, I can only choose PWM frequencies that are factors of 2 from the internal frequencies scaled down by the number of counts in the timer registers (I'm assuming 16-bit counters?).  Other than that, I should be good to go.

    Thanks all for your contributions.  If I forgot something, feel free to chime in.

  • Well I think there may be an issue with the intended PWM frequency.  I was hoping to just use a 16-bit timer at full scale, but at 16MHz, that would be 244Hz, where I was intending to operate in the 15-150kHz range.  I noticed that Timer_A is fixed at 16-bit, but Timer_B can be used in 8-bit which would be much more appropriate.  However, The MSP430G2553 doesn't have a Timer_B peripheral.  Does anyone have a suggestion to a low-cost microcontroller that has the Timer_B peripheral or any suggestions on how to increase the PWM frequency into the desired range while maintaining all six outputs?

    Thanks!

  • Micah Erickson said:
    Does anyone have a suggestion to a low-cost microcontroller that has the Timer_B peripheral or any suggestions on how to increase the PWM frequency into the desired range while maintaining all six outputs?

    stm32f0xx series?

  • Ilmars said:
    stm32f0xx series?

    This TI site is not intend to use as an advertisement site for concurrent TI products!

    If looking for MCU products use TI search at: http://www.ti.com/lsds/ti/microcontroller/products.page

    Possible TI products could be; MSP430G2x55, MSP430FRxxxx or look to other series.

    Micah Erickson said:
    low-cost microcontroller

    Low-cost does not only mean Low-Chip-price!


  • Indeed, TimerB can be configured to a smaller counter size,. However, (almost) all occurrences of TimerB also come with 7 CCRs, so no need to limit the counter register size - you can use CCR0 for fine-tuning the PWM cycle and still have 6 PWM outputs left.
    Now having so many CCRs requires a CPU that has as many pins. Especially since usually there's another TimerA in these devices too. You won't find it the low-cost section.

    There's a wide range of MSPs available with many different combinations of modules. However, you can't have everything, and especially not in the low-cost line.
    If you need 6 PWM outputs with variable DC on a low-cost (G-series) MSP, all you can do is ticking the two timers with 16MHz and get 244hz PWM frequency. And 16 bit DC resolution. That's it.

**Attention** This is a public forum