8 years, 9 months ago.

PWM output for LEDs on FRDM-K64F

Hi everybody!

I am a beginner, so please be don't laugh ...

I try dimming the leds on FRDM-K64F platform, with the PwmOut_HelloWorld example. Instead of getting a gradually increasing luminosity, I get a flashing red led ... and this happens even if I change the LED from red to blue or green. I tried also the other examples in the handbook and I got the same results.

I got some hint from a previous question: Which FRDM-kl46z pinouts are inputs and outputs? Port assignments? The answer directed me to:

https://developer.mbed.org/teams/SDK-Development/code/mbed-src/file/9655231f5786/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/PeripheralPins.c

In the list of PWM enabled pins in the PeripheralPins.c file I didn't find the LED pins. Did I interpret incorrectly the .c file? Is this a hardware limitation, or could it be modified by software? Is there some workaround?

Thank you! Victor

Question relating to:

Oooops! I now realize that the .c file mentioned in my question doesnt refer to FRDM-K64F, but to FRDM-KL46Z.

Is there a similar description file for K64F?

Thenks!

posted by Victor Grigoras 11 Jun 2015

1 Answer

8 years, 9 months ago.

Hello! Try to create an new program using as template "RGB LED example for the Freescale freedom platform" (from the dropdown box in the 'create new..' dialog...) an nice example of pwm use.(smooth alternating red/green) ;-)

Accepted Answer

Hi Tibi!

Thanks for your sugestion. Unfortunatelly, it works fine on FRDM-KL25Z, but it doesnt on my FRDM-K64F :(

I begin to think it's a hardware limitation.

Best regards, Victor

posted by Victor Grigoras 11 Jun 2015