Hi,
Thank you for your suggestions.
I made following changes w. r. t. to schematic attached refering to https://community.nxp.com/thread/518934.
1. Added 10K pullup resistor on NMI pin
2. Added 10K pullup resistor on SWD_DIO pin
3. Added the circuit as mentioned on link on Vout33.
I was able to program MK22FX512AVLQ12 once using FRDM K22F board, firmwared it as JLINK. But when tried multiple times it gives me following error while erasing the flash:
Executing flash operation 'Erase' (Erase flash) - Fri Nov 29 15:25:57 IST 2019
Checking MCU info...
Scanning for targets...
Executing flash action...
SEGGER J-Link Commander V6.42b (Compiled Feb 5 2019 17:33:07)
DLL version V6.42b, compiled Feb 5 2019 17:31:40
J-Link Command File read successfully.
Processing script file...
J-Link Commander will now exit on Error
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link OpenSDA 2 compiled May 27 2019 11:01:03
Hardware version: V1.00
S/N: 621000000
VTref=3.300V
Target connection not established yet but required for command.
Device "MK22FX512AXXX12" selected.
Connecting to target via SWD
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
****** Error: InitTarget(): PCode returned with error code -1
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
****** Error: InitTarget(): PCode returned with error code -1
Cannot connect to target.
Script processing completed.
Unable to perform operation!
Command failed with exit code 1
There is no change in the code which I am tring to debug with. What could be the possible reason for this? and Can you suggest some solution for the same?
Thanks and Regards,
Vaibhavi