PWM Output with K60 Demo Board and MQX

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PWM Output with K60 Demo Board and MQX

1,913 次查看
danieldelatorre
Contributor IV

Guys,

I'm currently using Freescale's MCU MK60FX512VLQ12 ARM Cortex-M4 with the MQX RTOS v4.0.1 and I'm trying to figure out how to properly control a PWM output.  I'm trying to install the PWM device driver using MQX I/O API run time libraries although I do not see anything anywhere that shows me how to do a PWM signal.  I get the feeling that I may have to use a custom HW timer to do this, although I'm not entirely sure.  Can anyone provide any guidance in getting a PWM signal out of my MCU and using MQX 4.0.1? Thanks!

Daniel

0 项奖励
回复
8 回复数

1,471 次查看
DavidS
NXP Employee
NXP Employee

HI Daniel,

Correct that Processor Expert is integrated with CodeWarrior.

But it is also a standalone tool that can generate code for IAR, Keil, GCC, etc.

It is free.

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PE_DRIVER_SUITE&tid=PEH

Regards,

DAvid

0 项奖励
回复

1,471 次查看
danieldelatorre
Contributor IV

So I have figured out how to get Processor Expert and decided to go with a PWM_LDD.  I added the pwm component after going to file-->Processor Expert MQX-Lite Project.  After configuring my pwm signal I right clicked on ProcessorExpert.pe and generated the code.  I'm trying to figure out where to put the generated code... Below is an illustration of the generated code.

I will either have to put the generated code in my project directory or in the MQX RTOS' BSP directory or the generated code will be split in two and have to go into both.  I'm currently interfacing with the MQX RTOS via static libraries,i.e., bsp.a, psp.a, rtcs.a, etc. hence why the RTOS code is in its own directory.  Although part of me thinks that maybe I have to put all of the generated code in the project directory and not mess with the RTOS directory.  Any help on where I should put the generated code?

Untitled.png

Thanks!

0 项奖励
回复

1,471 次查看
danieldelatorre
Contributor IV

There is one other thing that I should probably mention is that I'm not using Code Warrior, instead I'm using IAR Embedded Workbench. People keep reference the FSL_MQX_in_CW_10_x.pdf although it is tightly coupled with Codewarrior.

0 项奖励
回复

1,471 次查看
danieldelatorre
Contributor IV

Thanks for the response, I just now downloading it.

0 项奖励
回复

1,471 次查看
vfilip
NXP Employee
NXP Employee

Hello,

there also exists IAR eclipse plugin - http://eclipse-update.iar.com/

In case you install it into PEx DriverSuiteyou should be able to generate PEx code, build and debug you project in eclipse.

Best regards

Vojtech Filip

Processor Expert Support Team

0 项奖励
回复

1,471 次查看
DavidS
NXP Employee
NXP Employee

Hi Daniel,

Please have a look at the following demo:

C:\Freescale\Freescale_MQX_4_0_2\demo\pe_demo

It uses a Processor Expert component for the PWM operation.

All MQX BSP's are PE capable.  So have a look at the following PDF to see how to enable the PE in the BSP:

C:\Freescale\Freescale_MQX_4_0_2_GA\doc\tools\cw\Howto_SetupKinetisClock_UsingPE.pdf

Then when you look through the pe_demo source code in the comments, it explains how the MQX application can access the PE component(s) that are added into the BSP.

Hope this helps.

Regards,

David

0 项奖励
回复

1,471 次查看
danieldelatorre
Contributor IV

I'm currently looking into using Processor Expert although it seems to be tightly integrated into code warrior.  Unfortunately I'm using IAR embedded workbench and I'm not seeing how I can use PE with IAR.  I will keep looking to see how I can use both.

0 项奖励
回复

1,471 次查看
danieldelatorre
Contributor IV

Will do thanks. I will reply back to this post once I figure this out.

0 项奖励
回复