How to turn on LED with MQX on KSDK KDS

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

How to turn on LED with MQX on KSDK KDS

1,154 Views
yarannan
Contributor III

I am pretty new to the OS and development tool, and now i have a simple demo hello_world project running.

I would like to simply turn on LED, on one of the task. I added two lines of codes below to the hello_demo

but it doesnt work. I assumed that I didnt import or use gpio driver correctly. Anyone has idea?

I am doing MQX project with KSDK1.1.0 on KDS2.0.on TWR-K60D100M

//Two line of code

GPIO_DRV_Init(NULL, ledPins);

GPIO_DRV_ClearPinOutput(BOARD_GPIO_LED_BLUE);

 

Thanks,

 

Yaran

Labels (1)
3 Replies

525 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Yaran Nan:

The next documents in community should help:

Writing my first KSDK Application in KDS - Hello World and Toggle LED with GPIO Interrupt

How To: Create a New MQX RTOS for KSDK Project in KDS

The first one is not using MQX, but it will show you how to use the GPIO driver.


Regards!,
Jorge Gonzalez

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

525 Views
nickerb
Contributor I

Is this still true--is the preferred way to handle GPIO in KSDK 1.2 / KDS 3.0 / MQX 4.2 to ignore the lwgpio MQX library and instead use the KSDK FSL GPIO library?

0 Kudos

525 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello nick erb:

MQX v4.2 is part of the classic/legacy MQX releases and it is not integrated with KSDK. In case of using KSDK then "MQX for KSDK" is used and the legacy MQX drivers such as lwgpio are not available, instead you use the KSDK drivers.

I know this may be a little confusing if you are just getting your attention to KSDK. Please check these posts that help clarifying:

MQX Roadmap

How To: Porting MQX RTOS v4.x to MQX RTOS for KSDK v1.2

:smileyinfo: Just notice the roadmap has not been updated to reflect the latest version of KSDK, which is v1.2 and also that MQX v4.2 was released already.

Regards!

Jorge Gonzalez

0 Kudos