Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 11 months ago.
Program does not execute on FRDM-K64F
Hi,
I am starting with FRDM-K64F board. The board is out of box so completely new. I flashed the firmware v2.26 in it as per instructions here - https://developer.mbed.org/handbook/Firmware-FRDM-K64F
Then I imported the sample program - https://developer.mbed.org/teams/NXP/code/Hello_FXOS8700Q/?platform=FRDM-K64F into my compiler. The program compiled well and I copied the bin file to the mass storage device MBED as usual. Status LED (Green) flashed rapidly to indicate file is being copied. However, on resetting the board with reset switch, nothing was seen on the serial terminal. The serial port and everything else is correct.
To keep it simple, I used the blinky program from here - https://developer.mbed.org/teams/mbed/code/mbed_blinky/ But on reset, nothing happens. Sometimes the red LED near the status LED blinks for a moment after reset.
I then tried writing a simple code to blink the RGB LED (Red LED) but no change. This was my code.
Basic sample code on FRDM-K64F
#include "mbed.h" DigitalOut rgb(PTB22); int main() { while (1) { rgb = 1; wait (0.5); rgb = 0; wait (0.5); } }
Here is the link to my code: https://developer.mbed.org/users/gopal_amlekar/code/test_blink_RGB/
I am using Google chrome on Ubuntu 16.04 64-bit but sure that shouldn't matter as long as code is getting compiled..? The board is probably rev B or D1 as both are mentioned on the board.
Any idea I am doing something wrong? Any suggestions to try out?
Thanks, Gopal
2 Answers
7 years, 11 months ago.
On page https://developer.mbed.org/platforms/FRDM-K64F/
"Your mbed Microcontroller can appear on your computer as a serial port. On Mac and Linux, this will happen by default. For Windows, you need to install a driver:"
Then you can use a correctly configured putty session ( or other client ) on your computer to monitor the operation of your K64F via printf statements.
wait (0.5); printf("here\r\n");
You can use printf to print out variable values ect., this can be a good debugging tool.
7 years, 11 months ago.
I have tried your blink application on my K64F board and it works correctly. The only difference is that I am using Windows 7.
Are you sure that you have the correct board selected in the compiler?
Does the RGB LED blink on your board Robin?
Thanks for the inputs. I realized the configuration error on Linux when I tried the Windows Tera term ! Yes I have selected the right board FRDM-K64F.
posted by 06 Jan 2017Yes the red LED was blinking.
Have you tried the other LEDs (green or blue), also you could try using the test points just above the LED itself to test if the voltage is correct or not.
posted by 06 Jan 2017Yes figured it out. Problem is with the RGB LED which seems to be not working. A scope on the testpoints shows square wave on all LED points but still the LED doesn't blink. Even at the LED pins, the voltages are correct. Which clearly shows the LED is faulty. Will replace it later.
Thanks a lot Robin !
I just have a minor doubt now. When the mbed is plugged out and in again, the bin files copied earlier do not show up in the MBED mass storage device. Is that correct behaviour? If so, what happens with all the earlier programs copied? Do they eat up space?
posted by 07 Jan 2017
Is there a FAIL.TXT in your mbed drive after (or even before) sending the bin file?
posted by Erik - 05 Jan 2017