PWM in MCF5441X

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PWM in MCF5441X

Jump to solution
1,128 Views
t_k
Contributor II

is there a simple example for using the PWM for a MCF5441X within MQX?

I was surprised to not see it mentioned in any of the MQX documents.

thanks,

Travis

1 Solution
584 Views
c0170
Senior Contributor III

Hello Travis,

there's no official PWM driver, answer to your question find in following threads which might help you to implement your own driver or with help of Processor Expert:

https://community.freescale.com/thread/94086

https://community.freescale.com/thread/138114

PWM driver for MCF5225x - Freescale Forums

There might be more posts regarding PWM and MQX. This is just a highlight :smileywink:

Regards,

MartinK

View solution in original post

0 Kudos
5 Replies
585 Views
c0170
Senior Contributor III

Hello Travis,

there's no official PWM driver, answer to your question find in following threads which might help you to implement your own driver or with help of Processor Expert:

https://community.freescale.com/thread/94086

https://community.freescale.com/thread/138114

PWM driver for MCF5225x - Freescale Forums

There might be more posts regarding PWM and MQX. This is just a highlight :smileywink:

Regards,

MartinK

0 Kudos
584 Views
stevejanisch
Contributor IV

Hello Martin:

I have a question for you and Freescale.  There is a document entitled "Motor Control Using MQX on MCF5441x" - http://cache.freescale.com/files/netcomm/doc/ref_manual/MCF5441XMRCTRDVD.pdf?fpsp=1.

The documents mentions that the MCF5441x is built to drive motors, and that MQX "has an integrated motor control drive" that specifically "services integrated peripherals: PWM, ADC, and Timers"

So with all that, how can there be no official PWM driver?

0 Kudos
584 Views
c0170
Senior Contributor III

Hello Steve Janisch,

what I understand from motor control applications, it needs  to have "as fast as it is possible" response, therefore controlling PWM or ADC should happen outside of MQX. There probably exists the demo for MCF5441x which provides drivers to control a motor drive.

Regards,

c0170

0 Kudos
584 Views
stevejanisch
Contributor IV

I appreciate your comments.  :smileyhappy:

That's what I understand too -- especially in light of such Application Notes such as AN4254.  But (and this might wrong on my part) how I understood the mcPWM module is that you can command it from an outside thread and it sort of acts independently. So you would command and close the loop within a servo thread within MQX and then command the PWM driver for a certain frequency or counts.  In this light it would be very useful to have some sort of programming guideline to how the module works and how to command it.

I'm not sure if you have seen the other discussion thread I started on this (due to my newbie status with the community forums).

https://community.freescale.com/message/324466#324466

I am working with an Application Note AN4429 that sort of implies my aforementioned assumption of how the module is to work.  What I lack is a true understanding of how the PWM module should work and some basic example code.  As mentioned in the other thread I attempted this with Processor Expert (without MQX) but it generated somewhat conflicting  code.  If a demo exists for setting this up I have not found it -- of course that doesn't mean one doesn't exist which is why I keep writing in the hopes that someone does know something.

0 Kudos
583 Views
stevejanisch
Contributor IV

Note to anyone following this thread... for now I am concentrating on just getting the mcPWM module working without MQX.  Putting all my notes in the thread https://community.freescale.com/thread/306288 until I am a bit further along and can port to MQX.