Need Help Initializing GPIO pins with KE06Z SDK.

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help Initializing GPIO pins with KE06Z SDK.

313 Views
tcwong
Contributor III

Hello,

I'm pretty new to this and trying to make a "Blinky" code run, but can't find any example codes for a KE06 series microprocessor. I'm currently having trouble with setting pins as output. I understand how every pin is related to a bit but I'm confused as to how to apply this into code. If anybody could help (give advice or give an example blinky code) it would be greatly appreciated. Thank you.

3 Replies

216 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Tyler Wong ,

   Please go to this link:

Welcome | MCUXpresso SDK Builder 

   Select development board as FRDM-KE06, then generate the code and download it.

pastedImage_2.png

After you get the SDK_2.6.0_FRDM-KE06Z, you can unzip it, and refer to the doc document (Getting Started with MCUXpresso SDK.pdf)run the SDK code.

 The gpio code can be found in the folder:

  \SDK_2.6.0_FRDM-KE06Z\boards\frdmke06z\driver_examples\gpio_1

Please try it on your side.

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

216 Views
tcwong
Contributor III

I just have a quick question. Let's say instead of trying to blink the on board LED and instead blink an external LED linked to GPIO A Bit 7 for pin PTA7, how would I initialize that pin? Also, would the other lead of the led be connected to ground or the 3.3v pin. Thank you.

0 Kudos

216 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Tyler Wong,

  If you want to configure GPIOA bit 7, PTA7 as the output GPIO pin.

  1. Check your hardware design about this pin.

     What's your LED circuit, if your led circuit is low to light your led, then you need to output the low signal to PTA7.

Vice versa.

  2. Software side

   You need to configure the the PTA7 as output pin, and output low or high.

Related register is:

 GPIOX_PDDR, GPIO_PDOR.

More details, please refer to the reference manual for KE06.

BTW, if you use it as GPIO, don't use the higher ALT function for PTA7:

pastedImage_1.png

Actually, you totally can refer to the official code and modify that code to PTA7.

Please try it, if you still have question, just let me know.

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------