How to setup PWM_LDD for FTM1_CH0 and FTM_CH1

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

How to setup PWM_LDD for FTM1_CH0 and FTM_CH1

Jump to solution
912 Views
isaotakashima
Contributor IV

Now I want to make the example project for the FRDM-KE02Z.

The FRDM-KE02Z has Tri-Color LED (Red, Green Blue), then I want to control luminance of the these LEDs by FTM1 and FTM2.

According to the FRDM-KE02Z schematic, the Red LED connected FTM2_CH1, the Green LED connected FTM1_CH0 and the Blue LED connected FTM1_CH1.

Therefore, I add two PWM_LDD from the Components Library.

I can setup PWM1:PWM_LDD for the Red LED(FTM2_CH1), however I cannot setup the PWM2:PWM_LDD for the Green LED(FTM1_CH0) and the Blue LED(FTM1_CH1).

Because I cannot add channel for the Blue LED(FTM1_CH1) in the PWM2:PWM_LDD.

I add the PWM3:PWM_LDD for the Blue LED, but I cannot use the FTM1.

I have a question, why we cannot select "high" for initial polarity?

In addition, I tried to add TU1:TimeUnit_LDD instead of PWM_LDD, but the TimeUnit_LDD cannot support PWM, it can support Capture or Compare mode.

Please reply about initial polarity and advise that how to setup PWM_LDD for FTM1_CH0 and FTM_CH1 as soon as possible.

Best regards,

Takashima

Tags (2)
1 Solution
474 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

The PWM_LDD component use the TimerUnit_LDD component (a reference component). Therefore you must add the PWM1 (first PWM_LDD) and create one TimerUnit_LDD (see the group Referenced_Components  - TU1 component). Select the FTM2 a other properties you need in the PWM1. When you add PWM2 component (second PWM_LDD component into your project) you must select creation of another TimerUnit_LDD component - another referenced component TU2 because you need to use another FTM device. When you add PWM3 (third PWM_LDD component) select the existing TU2 component (PWM2 and PWM3 share the same FTM1 device). You must set the period in the PWM3 as it is set in  PWM2 because these PWMs share the same timer (TU2 component).

See the screenshot below and also the attached project (created in KDS 2.0.0).

MEK02Z_PWM_LDD.png

Best Regards,

Marek Neuzil

View solution in original post

1 Reply
475 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

The PWM_LDD component use the TimerUnit_LDD component (a reference component). Therefore you must add the PWM1 (first PWM_LDD) and create one TimerUnit_LDD (see the group Referenced_Components  - TU1 component). Select the FTM2 a other properties you need in the PWM1. When you add PWM2 component (second PWM_LDD component into your project) you must select creation of another TimerUnit_LDD component - another referenced component TU2 because you need to use another FTM device. When you add PWM3 (third PWM_LDD component) select the existing TU2 component (PWM2 and PWM3 share the same FTM1 device). You must set the period in the PWM3 as it is set in  PWM2 because these PWMs share the same timer (TU2 component).

See the screenshot below and also the attached project (created in KDS 2.0.0).

MEK02Z_PWM_LDD.png

Best Regards,

Marek Neuzil