I am trying to program flash on the FRDM-K22F board, using a Segger Jlink and Segger JFlash.
I have identified the target as MK22FN512xxx12. I've tried using both JTAG and SWD interface. I varied speed from 100 to 4k. I am able to connect to the processor. When I try to erase device, I get the following errors.
Failed to download RAMCode
Failed to prepare for programming
Failed to erase sectors.
Am I missing something obvious?
Thanks for any help.
I have removed jumpers J10 and J13.
Erasing MK22FN512XXX12 via JTAG-Interface@1000kHz
Erase Thread started.
Device "MK22FN512XXX12" selected.
TotalIRLen = 4, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP
Scanning AP map to find all available APs
AP: Stopped AP scan as end of AP map has been reached
AP: AHB-AP (IDR: 0x24770011)
AP: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP: Core found
AP: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
ROMTbl @ E00FF000
ROMTbl: E000E000, CID: B105E00D, PID: 000BB000 SCS
ROMTbl: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
Debugger initialized successfully.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Failed to read back RAMCode for verification.
Failed to prepare for programming.
Failed to download RAMCode!
Erase Thread exited