You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing with st-link jtag and looked at USB packets when ST utility worked with it.
I found that it enters SWD mode with USB packet data 0xF2 0x30 0xA3.
This corresponds to STLINK_DEBUG_COMMAND,STLINK_SWD_ENTER,STLINK_DEBUG_ENTER_SWD defines from stlink-common.h file. I confirm that this sequence is working on my ST-LINK V2.
But in the stlink-usb.c file in the function _stlink_usb_enter_swd_mode I see next lines:
cmd[i++] = STLINK_DEBUG_COMMAND;
cmd[i++] = STLINK_DEBUG_ENTER;
cmd[i++] = STLINK_DEBUG_ENTER_SWD;
The above lines correspond to sequence 0xF2 0x20 0xA3.
I looked at OpenOCD sources for the same stuff: http://sourceforge.net/p/openocd/code/ci/master/tree/src/jtag/drivers/stlink_usb.c
And it looks like second byte is changed from 0x20 to 0x30 and corresponds to V1 API and V2 API respectively. Someone needs to update the code to work with two API versions.
The text was updated successfully, but these errors were encountered:
I was playing with st-link jtag and looked at USB packets when ST utility worked with it.
I found that it enters SWD mode with USB packet data 0xF2 0x30 0xA3.
This corresponds to STLINK_DEBUG_COMMAND,STLINK_SWD_ENTER,STLINK_DEBUG_ENTER_SWD defines from stlink-common.h file. I confirm that this sequence is working on my ST-LINK V2.
But in the stlink-usb.c file in the function _stlink_usb_enter_swd_mode I see next lines:
cmd[i++] = STLINK_DEBUG_COMMAND;
cmd[i++] = STLINK_DEBUG_ENTER;
cmd[i++] = STLINK_DEBUG_ENTER_SWD;
The above lines correspond to sequence 0xF2 0x20 0xA3.
I looked at OpenOCD sources for the same stuff: http://sourceforge.net/p/openocd/code/ci/master/tree/src/jtag/drivers/stlink_usb.c
And it looks like second byte is changed from 0x20 to 0x30 and corresponds to V1 API and V2 API respectively. Someone needs to update the code to work with two API versions.
The text was updated successfully, but these errors were encountered: