Good idea, put this into a file "init.tcl" and execute it and it. It get us a bit further, but the second reset also occures.
% source "C:/Data/BDM/CMR/Dumps/init.tcl"
USBDM DLL Version = 4.12.1.262
BDM List:
0 - USBDM-JS16-SWD_SER-0001 : USBDM HCS08,HCS12,CFV1,ARM-SWD BDM
Found 1 devices
:setTarget HCS12
Opening USBDM-JS16-SWD_SER-0001
BDM Version = HW=97, SW=4C
BDM status => Wait, No-connection, Vpp-Off, Vdd-External, RSTO=0, Reset, CFVx-running
:pinSet PIN_BKGD_LOW|PIN_RESET_LOW|
BDM status => Wait, No-connection, Vpp-Off, Vdd-External, RSTO=1, Reset, CFVx-running
:pinSet PIN_BKGD_LOW|PIN_RESET_3STATE|
BDM status => Wait, No-connection, Vpp-Off, Vdd-External, RSTO=0, Reset, CFVx-running
:pinSet - all released
:connect
BDM status => Ackn, Speed-sync, Vpp-Off, Vdd-External, RSTO=1, No Reset, CFVx-running
Speed = 4000 kHz (1920 ticks, sync=32.0 us)
POWER => Vdd-External
Target status reg => (0xC0) = ENBDM, BDACT,
BDM status => Ackn, Speed-sync, Vpp-Off, Vdd-External, RSTO=1, No Reset, CFVx-running
Speed = 3996 kHz (1922 ticks, sync=32.0 us)
I've then modified (simplyfied?) your script a little bit to just contain:
settarget HCS12
openbdm
pinSet rst=0 bkgd=0
dialogue "Power cycle needed" "Please cycle target power and click OK to continue" OK|I_Excl
pinSet rst=3 bkgd=0
pinSet
connect
gs
rw 0x001A 0x1
The result is that it seems the chip go into special mode for a short time and if timing is good (varies), "gs" indicates that BDM is fully enabled and active.and i can read a single address from Register-Space (took Device-ID for test here):
Target status reg => (0xC0) = ENBDM, BDACT,
:rw =>
0x0000001A : 0115
But as you see timing is so tight that most reads will fall after the 2nd reset into normal mode.