Use default configuration and LED doesn't light up.

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

Use default configuration and LED doesn't light up.

1,564 Views
hanchengyang
Contributor II

Hi everyone,

 

I am new to use MCUXpresso, I think it's time to get rid of Processor Expert.

I used the default configuration for FRDM-K64F, and I used GPIO driver attempting to light up the leds. But it didn't work.

Here is the configuration:

175890_175890.pngpastedImage_2.png

Here is the code generated by PinTool:

175891_175891.pngpastedImage_4.png

And at last the code I wrote:

175892_175892.pngpastedImage_5.png

All go normally, I can run step by step and it runs into the main no error, but led didn't light up.

 

Thanks

Labels (1)
0 Kudos
Reply
1 Reply

1,389 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Hancheng,

From the schematic of FRDM-K64 , configure the PTB21 to low(0) , the blue LED

can be light , use this code :

  1. GPIO_ClearPinsOutput(BOARD_LED_BLUE_GPIO,1<<BOARD_LED_BLUE_GPIO_PIN);

while in your code , you set this pin to high (1) :

pastedImage_1.png

So please change it ,then your project can work well .

Hope it helps !


Have a great day,
Alice Yang

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

0 Kudos
Reply