blink led frdm-k22f

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

blink led frdm-k22f

2,199 Views
briancavanagh
Contributor III

Hi All,

I'm using KDS to write code for the FRDM-K22F board.  

I was hoping to write code with the bare minimum of files so I feel more in control of using KDS without help from the online mbed examples.

What I used as an example was the code I can drag+drop into the mbed (Online), which does work.

The attached shows a very simple example of the code to flash the RED LED (RGB) on the board.  When I review the code there's an include "mbed.h" that I don't see in any of the files.

In the end, here's what I would like to accomplish:

1.  Using KDS, start a new project

2.  Add the correct "Include Files".

3.  Write the code to Blink the red led.

I'm trying to always use KDS and become familiar with the tool.

Thanks,

Brian

#

0 Kudos
2 Replies

937 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Brian,

There is a simliar example(flash the RED LED) in SDK_2.1_FRDM-K22F.

led_output SDK_2.1_FRDM-K22F.png

You can debug the FRDM-K22F using onboard debug interface. Please refer: GDB Debugging with Kinetis Design Studio

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

937 Views
BlackNight
NXP Employee
NXP Employee

Hi Brian,

it all depends how deep you want to go into the bits and settings.

Basically you need:

  1. create a project for your device
  2. Turn on the peripheral clocks
  3. Mux (multiplex) the pins for GPIO functions
  4. Configure the pins as output pins
  5. toggle the pin voltage level

I list you below a few tutorials and pointers. They are for other boards, but can be easily adopted for the FRDM-K22F.

I hope this helps,

Erich

0 Kudos