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.

Does the CC3200 support 4 PWM channels?

Other Parts Discussed in Thread: CC3200

I'm a bit confused by this page: 

  http://processors.wiki.ti.com/index.php/CC32xx_PWM

which seems to suggest that only three of the four GPT channels can be used simultaneously as PWM outputs.

The datasheet doesn't show any recommended multiplexing configurations with 4 PWMs so I would like to confirm whether this is supported or not. 

Thanks!

  • Hello Robb,

    The Timer A  timer output TIMERA2 would correspond with GT_PWM04.  This is not available.

    On the LaunchPad you have access to the three PWM(05-07) (J64, J1, J2) connected to the LEDs and GT_PWM0 (J21).  These are on P4.  You also have access to GT_PWM02 on P4 (J17) and GT_PWM03 (J8).

    Thanks,

  • Sorry to be dense about this, but I still don't understand how many independent PWM channels are supported...

    The datasheet references:

    – 4 General-Purpose Timers with 16-Bit Pulse Width Modulation (PWM) Mode

    I've found some suggestions that one of these timers is not available - perhaps this is only a limitation on the launchpad?

    Are there other PWM sources available in addition to the four GPT channels? Do these alternative PWM channels have similar performance?

    Thanks...

  • Hello Robb,

    Let me clarify if I can.  You are comfortably familiar with the fact that the 3 PWM that are used for the LEDs on the LaunchPad are:

    • PIN_64 for TIMERPWM5 (GT_PWM05) -> J64
    • PIN_01 for TIMERPWM6 (GT_PWM06) -> J01
    • PIN_02 for TIMERPWM7 (GT_PWM07) -> J02

    If so, then apply the same logic to:

    • PIN_21 for TIMERPWM0   (GT_PWM0 )  -> J21
    • PIN_17 for TIMERPWM02 (GT_PWM02) -> J17
    • PIN_19 for TIMERPWM03 (GT_PWM03) -> J08

    All the above 6 PWM out of a possible 8 PWM outputs are available for you to use on the LaunchPad.  Only one part of the Timer A of TIMERA2 is not available which leaves you with 7 PWMs.  It looks like the missing PWM is a limitation of the CC3200 device itself.  

    Read the Datasheet for all the printouts for the CC3200 http://www.ti.com/lit/pdf/swas032

    Read the Technical Reference Manual http://processors.wiki.ti.com/index.php/CC32xx_Technical_Reference_Manual for a better understanding of the Timers and PWM configuration.  

    You can find all the pin connections in the CC3200 LaunchPad User Guide http://www.ti.com/lit/pdf/swru372

    Thanks,

    *NOTE:  GT_PWM01 also seems to be absent from the datasheet which would leave you with 6 individual PWMs.

  • Greenja - Thank you for the information and the link to the Tech Ref manual. I feel like I'm closer to understanding, but still not completely up to speed on configuring the independent PWM channels...

    In Section 9 of the tech ref, it states:

    ... "The General-Purpose Timer Module (GPTM) contains four 16/32-bit GPTM blocks..."

    ..."each GPTM block (has) two free-running up/down counters (referred to as Timer A and Timer B)"

    Later the document describes how to use the timer to synthesize PWM signals by comparing the counter values to threshold levels (9.3.2.4) stored in the GPTMTnPMR registers (where n=A or n=B for the two timers) (9.5.1.15/16).

    So I see how we could create 8 PWM signals max. Looking through Table 3-1, I find:

    pin 1: GT_PWM06

    pin 2: GT_PWM07

    pin 17: PWM0

    pin 19: GT_PWM03

    pin 21: GT_PWM02

    pin 64: GT_PWM05

    These are the same pins you point out, so I think see where this comes from now -- and the remaining two outputs might be available in a different package sometime in the future I suppose. 

    So, I guess I will be able to have six independent PWM outputs after all -- remaining questions would be:

    1. How do I map between registers and PWM pins? Table 9-8 gives offsets, but how do I address the four blocks? Also, should I assume block1-timerA is PWM0, 1B=pwm1, 2A=pwm2, 2B=pwm3, etc..?

    If TIMERA2 is on block 2 of four, would this be the missing PWM01 or PWM04? 

    2. Some of the pins are muxed with the JTAG (17 and 19) -- I'm guessing that these are the two I should not use if I want four independent outputs? Using 1,2,21,64 seems to compete with an I2C bus, but I think I can use pins 3 and 4 as long as I'm willing to give up the camera.

    Thanks again for all your help!

  • PWM01 would probably be TimerB of TimerA0.

    You should be able to use the JTAG pins since the two wire JTAG is used with the USB emulator.  I am not sure on that one.

    For mapping the PWM, the same MAP_  functions can be used that maps the others.  Look at the PWM example code and then add the MAP_ for PWM0 or PWM03.

    Thanks,

  • Hi Robb,

    I am closing the thread, if issue still exist please open a new thread and add a link to this one for reference.

    Best regards,

    Naveen