How do you run a standalone application on the FRDM-K22F board?

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

How do you run a standalone application on the FRDM-K22F board?

1,350 Views
brendanmerna
Contributor IV

I've been working with Kinetis and the FRDM-K22F board for a few weeks now. Using the jlink debugger I've been able to create and run a project within Kinetis and test it.

I know have a project that's working although I'm having an issue running an application without using the jlink debugger interface. I've built a release version and I've try to load my .bin file into it, but it never seems to run. Pressing the reset button doesn't seem to help. The UART terminal where I have some instructions being sent to never shows anything.

I've also loaded mbed firmware on to it and tried to run the file, but that also doesn't seem to work.

Any ideas on this?

Labels (1)
11 Replies

1,026 Views
brendanmerna
Contributor IV

Hey Kerry,

I'm going to try to go through all my steps. 

1.) I downloaded the OpenSDA firmware from SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace  for the FRDM-K22F board. This downloads as 01_OpenSDA_FRDM-K22F.bin.
2.) I load this on to the board by restarting the board into bootloader and than copying the 01_OpenSDA_FRDM-K22F.bin file into the Bootloader.

pastedImage_2.png

3.) When the FRDM-K22F board enumerates the three colored LED is blinking various colors and some demo application are displayed over UART when you press keys. It shows as FRDM-K22FJ(D:) on the computer.

4.) I send the file you attached (FRDM-K22F_OOBE_1v0.bin) to the the board. Power cycle. The red LED in the center of the board turns on. Program does not appear to be running.

*Note: I just tried to run through this again and forgot to switch back to Windows 7 PC. Bricked my last board. Ordering some more or trying to see if I can get through those recovery steps.

Either way any thoughts?

0 Kudos

1,026 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Brendan,

    You must change the bootloader from the win7.

    But don't worry, you can try again your bricked board in the win 7, the board won't really be bricked.

    Please also install the JLINK driver in your win7, change JLINK firmware, send app firmare, you need to make sure it works in win7 at first, then change it to the win10.


Have a great day,
Kerry

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

0 Kudos

1,026 Views
brendanmerna
Contributor IV

Hey Kerry,

Sorry it took me awhile. I was unable to recover the boards, but I have a few new ones. I still have been unable to get a program to run itself without the debugger.

Is there different firmware that needs to be copied on the drive to run standalone programs? Or should it be okay to load the JLINK debugger firmware on there, copy a .bin file generated from building the project in eclipse, and then copying that built .bin file on to the enumerated device (FRDM-K22F D:\).

-Brendan

0 Kudos

1,026 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Brendan Merna,

   What the PC os you are using now?

  Please try it on the win7, just as mentioned before, I have download the .bin to the FRDM-K22 board, and it works.

   Now, you can try to use the IDE to download the code on your side again. For example: iar, mdk, kds.

   About the code, you can download the the ksdk2.1-frdmk22:

Welcome to Kinetis Expert | Kinetis Expert

  Associate the IDE, and download the code to your board, then power off and power on the board again, to check whether the program is working, you can test the gpio code.


Have a great day,
Kerry

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

0 Kudos

1,026 Views
brendanmerna
Contributor IV

I've been able to copy the  .bin file that you sent and it seems to work. I'm curious on how you generated the .bin file. Did you use kinetis? What were your settings?

My program works in the debugger. I'm not sure why it wouldn't work because I load it onto the micro.

0 Kudos

1,026 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Brendan Merna,

   Do you mean you can work with JLINK firmware 01_OpenSDA_FRDM-K22F.bin now?

   01_OpenSDA_FRDM-K22F.bin is provided by the JLINK, not I generated it, it is on board debugger firmware.

   You said: My program works in the debugger.  I'm not sure why it wouldn't work because I load it onto the micro.

    Could you give me more details about the wouldn't work?

   What wouldn't work? JLINK? You already can debug it. Or your app code won't work?

   If your app won't work, you need to check, you download the code to your flash or the RAM?


Have a great day,
Kerry

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

0 Kudos

1,026 Views
brendanmerna
Contributor IV

Kerry,

I got a new board and followed your all your steps. Currently on a windows 7 laptop. I ran the Erase function after connecting and it failed with this error. 

Do you know what I did wrong?

pastedImage_1.png

0 Kudos

1,026 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Brendan Merna,

   Please follow my step and try again:

1. open JLINK COMMAND window, do mass erase at first

pastedImage_1.png

Input: unlock kinetis

Do the mass erase at first.

2. Please use my attached .bin file, send it to your :FRDM-K22FJ device.

pastedImage_2.png

I have attached the FRDM-K22F_OOBE_1v0.bin file.

After you download it to your FRDM-K22 board, the LED will blinking.

If this bin can work, your problem will be caused by your code, you need to check your own code.


Have a great day,
Kerry

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

1,026 Views
brendanmerna
Contributor IV

Thanks for the response guys! Unfortunately I just bricked my board copying firmware .bin files onto the bootloader from a Windows 10 PC. Working on recovering it now with a multilink and I'll get back to trying out your suggestions when I get this back up and running.

-Brendan

0 Kudos

1,026 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Bredan Merna,

    Thank you for your information.

     If you are using the on board debugger, please also use the newest JLINK firmware which can be downloaded from this link:

SEGGER - The Embedded Experts - Downloads 

     You can find a win7 system, and copy the newest JLINK firmware to your board, the detail step is:

1. power off the board, press the reset button and hold on it, then power on your board.

   You will find your board is a device named as"BOOTLOADER", release the reset button.

2. Send "01_OpenSDA_FRDM-K22F.bin" to your "BOOTLOADER", and wait the sending is finish.

3. Power off the board, and power on the board again.

Now, change the board to your win10 PC, and try again.

Wish it helps you!

Have a great day,
Kerry

 

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

0 Kudos

1,026 Views
mjbcswitzerland
Specialist V

Hi

Check your board with some binaries from http://www.utasker.com/kinetis/FRDM-K22F.html

Check that you aren't running your debug project from SRAM - make sure it is in Flash. Verify the Flash configuration settings (for example disable NMI pin in case it is not pulled high at reset).

You can get complete working projects at the uTasker K22 Open Source project as reference and also simulate the K22 to identify issues. http://www.utasker.com/forum/index.php?topic=1721.msg7086#msg7086

Regards

Mark


Professional support for Kinetis: http://www.utasker.com/index.html
Remote desktop one-on-one coaching: http://www.utasker.com/services.html
Getting started to expert videos: https://www.youtube.com/results?search_query=utasker+shorts