Programming Kinetis K22F

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

Programming Kinetis K22F

Jump to solution
933 Views
alexvergara
Contributor I

I have a K22FN512 on a custom board.  Development was done in mBed on a FRDM-K22F.  I have attempted to load through the mBed as a programmer to the 10-pin SWD header with no luck.  Now with a P&E Micro Multilink Universal and MCUXpresso v10.2.0 I have also attempted to just erase the chip but get:

PEmicro GDB Launch Failure : The GDB Server was not able to establish a connection to the target processor. Please check your connections and power. Verify that the launch settings in the Debug Configuration are accurate.

However, with a logic analyzer I see the reset pulled down, activity on clk and dio, the reset is released, and then more activity.  But I still get the debugger failing.

Thanks

-Alex

Labels (1)
1 Solution
729 Views
mjbcswitzerland
Specialist V

Alex

Check the pin PTA4 (EZP_CS_b) is not pulled low in your HW design since it will start the K22F in EzPort mode (like a serial flash device for programming) and not allow the debugger (alternative programming method) to work.

Regards

Mark

uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)
Kinetis: http://www.utasker.com/kinetis.html

View solution in original post

3 Replies
730 Views
mjbcswitzerland
Specialist V

Alex

Check the pin PTA4 (EZP_CS_b) is not pulled low in your HW design since it will start the K22F in EzPort mode (like a serial flash device for programming) and not allow the debugger (alternative programming method) to work.

Regards

Mark

uTasker developer and supporter (+5'000 hours experience on +60 Kinetis derivatives in +80 product developments)
Kinetis: http://www.utasker.com/kinetis.html

729 Views
alexvergara
Contributor I

That was it.  I can erase the chip now.  Thanks!

I still cant use mBed as a programmer for some reason, but using the PEMicro Multilink I can load dummy projects.  

When I do the drag and drop of the .bin file into the MBED drive, I get a SWD ERROR in the fail.txt file.

Is there a Kinetis Dummy's page?  

0 Kudos
729 Views
mjbcswitzerland
Specialist V

Alex

Just use the uTasker project's serial loader to build yourself an integrated loader (eg. USB-MSD) for your board and then you can save the mbed loader.

Regards

Mark


Kinetis: http://www.utasker.com/kinetis.html
Kinetis K22:
- http://www.utasker.com/kinetis/FRDM-K22F.html
- http://www.utasker.com/kinetis/TWR-K22F120M.html
- http://www.utasker.com/kinetis/BLAZE_K22.html
- http://www.utasker.com/kinetis/tinyK22.html
Serial Loader: http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.pdf

Free Open Source solution: https://github.com/uTasker/uTasker-Kinetis
Working project in 15 minutes video: https://youtu.be/K8ScSgpgQ6M

0 Kudos