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.

Stellaris launchpad 6 PWM channel example



I just bought a stellaris launchpad and I want to use 6 PWM channels. Do you have an example that helps me to understand how to do this? An application note would be great.

 

Thanks for any help

 

Sean

  • if we assume that you actually want to do something w/these PWM signals - should not you first survey your board - and determine if 6 PWM type GPIO are routed to the edge connectors? 

    If not - you can create a somewhat less robust PWM - via the use of the more prevalent Timers - configured into PWM mode.  We've found these to be hugely adequate - although they are not full-fledged PWM Generators - and "sync'ing" is not likely to be as precise.  Believe your odds of finding 6 Timer pins so routed - exceeds that of your PWM pins...

    There are code examples w/in the "Examples" folder included w/in StellarisWare.  SW-DRL-UG has code as well. 

    While the desire to jump into "deep water" beckons - often getting a single PWM signal to behave properly is a better goal.  You thus have a simple model - which proves to be far easier to extend than getting all 6 channels - up/running - from scratch...

  • Unfortunately you'll be waiting for a while.  The LM4F120H5QR chip on the launchpad doesn't have PWM generators so you'll need to approximate it like cb1 said and use timers configured in PWM mode.

  • Hi,

    look at this example here: http://www.multiwii.com/forum/viewtopic.php?f=22&t=2376&start=30#p27336

    Should be good for 8 PWM channels with 24-bit resolution each.

    aBUGSworstnightmare

  • Greetings our esteemed Bug:

    Do realize that neither PWM Generators on LX4F120 (lunchpad) - nor your link - exist - based upon my (moments ago) twice click upon your link!

    Request from poster (vendor employee) was to use his "purchased" board - as LX4F120 is so crippled (not a single PWM Generator present) he is reduced to timer generated PWM - as suggested by this reporter in immediate, follow-up post to OP...

    Suspect that any "appeal" of lunchpad (i.e. price) would relegate "add on/external - 8 channel, 24 bit res. PWM" to, "never-never land." 

    Note that many/most NRND M3's are loitered w/full-fledged PWM Generators - pity that cripple was "selected" for M4 launch/lunch-pad...  (but price was right...)

  • Here's the link again: http://www.multiwii.com/forum/viewtopic.php?f=22&t=2376&start=30#p27336

    You need to scroll down the page a little bit to find the code snippet.

    P.S. also fixed the link above.

  • Update: upon 3rd try - just now - famed link now does appear.  (have not reviewed for content...)

    And - once again - link is "dead" w/in No. America.  Do you not agree that 24 bit, 8 Ch device is "bit much" for such ap?

  • Hi cb1,

    strange! Here's what I get when clicking the link:

    Don't know what's going on there!

    Nevertheless: Anybody interested in this PWM code needs to go to http://www.multiwii.com/forum/ --> scroll down the page and click on BOARDS in the 32bit section of the forum --> choose page 4 of the thread named Stellaris Cortex M4F (preorder for september, 4.99$)

    Yep! I'm with you: 24-bit resolution on 8 channels is a 'bit much'; but: It seems to be possible (although I haven't tested it yet myself). 

    One should use a scope to verify it.

    P.S. A 11bit or 12bit PWM resolution is enough when 'dealing' with digital sevos i.e.