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.

How many PWM outputs can MSP430F5529 support?

Other Parts Discussed in Thread: MSP430F5529

How many PWM outputs can the MSP430F5529 (the processor on the LaunchPad) support? How different duty cycles can be used?

  • Benjamin, 

    You would be able to get 14 PWM outputs with 4 different periods. 

    You would use the TX.0 CCR as the period base, and the rest of the channels as pwm compares. 

    TA0 - 4 CCR (1 for period and 3 for PWM)

    TA1 - 3 CCR(1 for period and 2 for PWM)

    TA2 - 3 CCR(1 for period and 2 for PWM) 

    TB0 - 7 CCR (1 for period and 6 for PWM)  

    Look at the example code for the 5529 for help on doing this: 

    http://www.ti.com/product/msp430f5529?keyMatch=msp430f5529&tisearch=Search-EN

    Let us know if you have any other questions!

    Jason

  • Iget it, thanks! The below line should be different as marked, correct?

    TA0 - 4 CCR (1 for period and 3 4 for PWM)

    We can use any TX.n for the period case, correct? Also, do we actually need to do anything with the period base pins?

    If I figured it out correctly, 11 timer-connected pins are available via the MSP430F5 LaunchPad (P1.2, P1.3, P1.4, P1.5, P2.0, P2.3, P2.4, P2.5, P3.5, P3.6, P7.4) and of these 10 are available for PWM since one of the P2.x are needed for the base period. Only five of these are defined for the BoosterPack pinout standard (P1.4, P1.5, P2.0, P2.4, P2.5) but we'll be making a custom shield so these don't apply to us.

    Ben

  • BenYL said:
    We can use any TX.n for the period case, correct?

    No. Tx.0 (CCR0) is used to set the period of the timer.

    BenYL said:
    TA0 - 4 CCR (1 for period and 3 4 for PWM)

    TA0 is a TIMER_A5, so has 5 CCR (1 for period, 4 used as PWM)

    For the 5529 device, your PWM outputs are available on:

    PIN Timer Output
    23 TA0.1
    24 TA0.2
    25 TA0.3
    26 TA0.4
    29 TA1.1
    30 TA1.2
    33 TA2.1
    34 TA2.2
    42 TB0.6
    43 TB0.5
    56 TB0.1
    57 TB0.2
    58 TB0.3
    59 TB0.5

    That's 14 available PWM outputs by my count. Note that the TX.0 outputs would be the frequency, but not modulated. Unless you have some need for those (i.e. you need a static 50% duty cycle clock) in your application, you can ignore them from an external-to-chip perspective.

    I am not sure of those 14 which are available on 5529 Launchpad connector pins (don't have schematic in front of me), but you can work that out from here....

  • Brian, the Txy.0 output can be used for either 1/2 PWM frequency (if set to toggle mode) with 50% duty cycle, or with full frequency but only 1 clock pulse duty cycle (or all but one clock pulse), when using any of the double-action modes.

  • Jens-Michael Gross said:

    Brian, the Txy.0 output can be used for either 1/2 PWM frequency (if set to toggle mode) with 50% duty cycle, or with full frequency but only 1 clock pulse duty cycle (or all but one clock pulse), when using any of the double-action modes.

    Jens-Michael,

    You are correct, but technically, there is no modulation so it is just a fixed frequency output. But if someone needed that as a reference in addition to the modulate-able outputs it is possible.

  • Brian, I just wanted to point out that the 50% DC will only be 1/2 the PWM frequency (one toggle each cycle), while the 1/1 PWM frequency output on CCR0 would have a duty cycle next to zero (one timer clock tick pulse length). Also, it won’t be exactly aligned to the PWM output, depending on clock polarity (one timer tick off).
    Yes, there is no modulation, so it can’t be called PWM. However, technically speaking, you also don’t have a PWM frequency for a DC of 0% or 100% (and therefore not even a duty cycle), as the output will then be a flat static voltage.
    Still people use it this way.

**Attention** This is a public forum