How to toggle LED in KDS 2.0 with KSDK 1.1.0 and Processor Expert

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

How to toggle LED in KDS 2.0 with KSDK 1.1.0 and Processor Expert

How to toggle LED in KDS 2.0 with KSDK 1.1.0 and Processor Expert

The tutorial shows how to toggle LED with KSDK 1.1.0 in KDS 2.0 and Processor Expert using a Timer Output for FRDM-KL03Z.

Guide is prepared for red LED which is connected to Timer/PWM Module 0 (TPM0), channel 1.


21287_21287.png22.png


Create new project

Create new project in KDS 2.0 with KSDK 1.1.0

21295_21295.png1.png

Type the project name, choose board. e.g. FRDM-KL03Z, mark off options Kinetis SDK and Processor Expert

21296_21296.png2.png21297_21297.png3.png21298_21298.png4.png

Now, the structure looks like this:

21299_21299.png5.png

Set Processor Expert Settings

Now, go to Components Library, find fsl_tpm component and by double click add the component to Component View.

21294_21294.png6.png

Rename the component tpmTmr:fsl_tpm to e.g. RedLed.

21300_21300.png7.png21301_21301.png8.png

Double click on RedLed:fsl_tpm in Components View and see Component Inspector

Follow these steps:

21302_21302.png10.png

Set frequency and duty cycle.

21303_21303.png12.png

21304_21304.png13.png

21305_21305.png14.png

21306_21306.png16.png

Debug configuration

21307_21307.png17.png

21308_21308.png18.png

21309_21309.png19.png21310_21310.png20.png

21311_21311.png21.png

DONE!

21312_21312.jpgIMAG0706.jpg


Labels (1)
Comments

I try to repeat the project building for FRDM-K64Z and adding fsl_tpm component is rejected with error.Error.jpg

Could it be that this component is not supported by this device ?

Hello shaul dorf:

As explained by the errors the K64 does not have TPM module. Instead it has the FTM (FlexTimer), which is similar but with more advanced features. You can use it with fsl_ftm component.

The disadvantage is that none of the FTM channel output pins are connected to the RGB LEDs in the FRDM-K64F, so you cannot replicate the example of this post. Instead you can use a timer an toggle LED from the interrupt routine.

This video could also be useful:

Regards!

Jorge Gonzalez

Hello Jorge thanks,

Your video is exceled, and I used it :smileyhappy:

My intention was to use another component.

So I conclude that the only way to know which component are supported
for specific board is by error report am I right?

Shaul

Hi Shaul:

No, actually you should have the components filter activated for "Applicable to project", see the picture:

pastedImage_0.png

This way only the supported components are available.

Regards!

Jorge Gonzalez

No ratings
Version history
Last update:
‎03-23-2015 08:08 AM
Updated by: