GPIO module on KL05Z

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

GPIO module on KL05Z

604 Views
nguyennhatminh
Contributor IV

Hi guys,

I have a FRDM-KL05Z board. I wish to work on GPIO mode to turn on and off some led.

But i don't know how to configure GPIO. I have check the driver on QSP but I can't find.

Please help me,

Thank you,

Minh.

Labels (1)
4 Replies

361 Views
nguyennhatminh
Contributor IV

Thank you Jorge Gonzalez:smileyhappy:

0 Kudos

361 Views
nguyennhatminh
Contributor IV

Hi Jorge Gonzalez,

Thank you very much for your reply,

int main (void)

{
#if(defined(CW))
 sysinit();
#endif
   gpio_init();   
   printf("\nRunning the Blink project.\n");
 while(1)
 {
 Delay(20000);
 LED1_TOGGLE;
 Delay(20000);
 LED2_TOGGLE;
 Delay(20000);
 LED3_TOGGLE;
   }
}
/********************************************************************/

I have tried to find gpio_Init() function, but i can't get it.

I want to see how to configure this function.

If It's possible, please help me on this component.

Thank,

Minh.

0 Kudos

361 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hi:

That function is in freedom_gpio.c. The function contains macros, so it is better if you open the whole project in CodeWarrior, place the cursor over the macro, function, variable, etc, and press F3. This will take you to the definition of that piece of code.


Regards!
Jorge Gonzalez

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

361 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

You will find a collection of sample codes in the next product link, under "Lab and Test Software". Inside there is a sample project called LED_BLINK for CodeWarrior, IAR and KEIL, and it contains guides to use the examples.

FRDM-KL05Z: Freescale Freedom Development Platform for the Kinetis KL05 and KL04 MCUs

Please download the package and if you face any problem please do not hesitate to ask :smileyhappy:


Regards!
Jorge Gonzalez

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

0 Kudos