blink led frdm-k22f

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

blink led frdm-k22f

3,334件の閲覧回数
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 件の賞賛
返信
2 返答(返信)

2,072件の閲覧回数
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 件の賞賛
返信

2,072件の閲覧回数
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 件の賞賛
返信