I have 3 HoverGames drones and I am trying to write the Bootloader and the Firmware using a JLink Mini (included in the kit). The process worked succesfully for the first 2 FMUs but fails at the third. Below you have the the JLink console output of the failing one.
The main problem (as I understand it) seems to be that the JLink cannot recognize the Cortex-M4 although this worked for the other 2 FMUs. Can you advise me what can I do ?
$ JLinkExe -log JLink.log
SEGGER J-Link Commander V7.94g (Compiled Jan 24 2024 15:54:29)
DLL version V7.94g, compiled Jan 24 2024 15:54:06
Connecting to J-Link via USB...O.K.
Firmware: J-Link EDU Mini V1 compiled Jan 24 2024 12:08:08
Hardware version: V1.00
J-Link uptime (since boot): 0d 01h 31m 59s
S/N: 801030387
License(s): FlashBP, GDB
USB speed mode: Full speed (12 MBit/s)
VTref=3.251V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: MK66FN2M0XXX18
Type '?' for selection dialog
Device>?
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MK66FN2M0XXX18" selected.
Connecting to target via SWD
InitTarget()
SWD selected. Executing JTAG -> SWD switching sequence.
Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Not an AHB-AP
Attach to CPU failed. Executing connect under reset.
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Not an AHB-AP
Could not find core in Coresight setup
InitTarget()
SWD selected. Executing JTAG -> SWD switching sequence.
Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Not an AHB-AP
Attach to CPU failed. Executing connect under reset.
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read CPUID register
AP[1]: Skipped. Not an AHB-AP
Could not find core in Coresight setup
Cannot connect to target.
J-Link>exit