MK22FN128 VS MK22FN512 Programming Issue

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

MK22FN128 VS MK22FN512 Programming Issue

1,124 Views
nathanz
Contributor III

Are there any fundamental differences between the MK22FN128 and the MK22FN512 in order to be able to program? I can detect the MK22FN128 chip & read the device ID(using USBDM), I can mass erase the MK22FN128, but I get the following error when programming: "Failed to read from target".

100074_100074.pngpastedImage_0.png

Note I have the "device security" set to unsecured and have tried a few mass erases to fix any issue with not being able to write/read flash. To test my hardware, I hot-aired on a MK22FN512 and made a new project for that. I am able to successfully program the MK22FN512 just fine. Seems like it may be an issue with the IDE/Programmer/device info in kinetis studios?

 

Note for the MK22FN128, there is no onboard voltage regulator, so if my understanding is correct, you have to feed 3.3V into pin7 (USBVDD, see datasheet page 7) as opposed to where this is an output pin on the MK22FN512. That is the only hardware difference i'm aware of. Note there is a mistake in the datasheet on the MK22FN128 in this regard since it references the vreg pin(pin 8) which does not exist on that model. I left pin 8 floating on the MK22FN128 since it was labeled as "NC" on page 54 of the datasheet. Below is the datasheets recommended pin strapping.

 

100075_100075.pngpastedImage_1.png

So unless there any unlisted magical boot pin differences between the 512 versus the 128 that are not listed, the issue seems to be somewhere at the programmer/kinetis studio level. Any ideas / help would be greatly appreciated!

Labels (1)
0 Kudos
Reply
2 Replies

694 Views
BlackNight
NXP Employee
NXP Employee

I would double verify that the correct device ID is used in the debug interface. Other than that, I would try to find out if it is a USBDM problem. Could you maybe try with a Segger J-Link or P&E Multilink if available?

Erich

0 Kudos
Reply

694 Views
nathanz
Contributor III

Hey Erich,

Many thanks for your reply. Sadly I tried checking that quite a few times before soldering on the MK22FN512. I built 2 pieces of hardware with the MK22FN128 and they both had the same issue referenced above. I am tempted to buy the UMultilink though it would be slightly unfortunate to sink a few 100 USD if it doesn't fix the issue.

I've successfully programmed the KL25Z64, KL25Z128, KL24Z68, & MK22FN512 via this method but something seems to be off about the MK22FN128.

0 Kudos
Reply