First of all, thank you for trying to help ! I appreciate !
I followed this tutorial:
The board is APM32F103VC so the external power can only be an USB connection (to the PC).
Using J-Link (command line) I can erase the chip but that’s all I can do. I tried both SWD and JTag connections but to no avail.
Here is the J-Link session (if it helps):
Please specify device / core. <Default>: APM32F103VC
Type ‘?’ for selection dialog
Device>APM32F103VC
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>j
Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
JTAGConf>
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device “APM32F103VC” selected.
Connecting to target via JTAG
InitTarget() start
Check if Flash is read protected.
InitTarget() end - Took 3.11ms
TotalIRLen = 9, IRPrint = 0×0011
JTAG chain detection found 2 devices:
#0 Id: 0×4BA00477, IRLen: 04, CoreSight JTAG-DP
#1 Id: 0×06414B47, IRLen: 05, APM32 Boundary Scan
DPv0 detected
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0×24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0×412FC231. Implementer code: 0×41 (ARM)
Found Cortex-M3 r2p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
[0][0]: E000E000 CID B105E00D PID 000BB000 SCS
[0][1]: E0001000 CID B105E00D PID 003BB002 DWT
[0][2]: E0002000 CID B105E00D PID 002BB003 FPB
[0][3]: E0000000 CID B105E00D PID 003BB001 ITM
[0][4]: E0040000 CID B105900D PID 003BB923 TPIU-Lite
[0][5]: E0041000 CID B105900D PID 003BB924 ETM-M3
Memory zones:
Zone: “Default” Description: Default access mode
Cortex-M3 identified.
J-Link>LoadFile C:\Users\XXXXX\eclipse-workspace\APM32F103VC_MINI_1\Debug\APM32F103VC_MINI_1.elf
‘loadfile’: Performing implicit reset & halt of MCU.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Downloading file [C:\Users\XXXXX\eclipse-workspace\APM32F103VC_MINI_1\Debug\APM32F103VC_MINI_1.elf]…
Writing target memory failed.
J-Link>