diff options
author | nightwalker-87 <15526941+Nightwalker-87@users.noreply.github.com> | 2024-02-01 00:01:58 +0100 |
---|---|---|
committer | nightwalker-87 <15526941+Nightwalker-87@users.noreply.github.com> | 2024-02-01 00:01:58 +0100 |
commit | 40948aa3de78778f51af02d795327ac20fa385d3 (patch) | |
tree | b2c46fa5d48d1c12a3b1f95f93917bbba6405a2e /src/stlink-lib/commands.h | |
parent | e662da00ca294c874655c65cffae3edde97343e5 (diff) | |
parent | 133c2564dee478ed2fcf634ae217441ac723b3e3 (diff) |
Merge remote-tracking branch 'origin/develop'v1.8.0origin/mastermasterfor-upstream
Diffstat (limited to 'src/stlink-lib/commands.h')
-rw-r--r-- | src/stlink-lib/commands.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/src/stlink-lib/commands.h b/src/stlink-lib/commands.h index dac82b8..64cecce 100644 --- a/src/stlink-lib/commands.h +++ b/src/stlink-lib/commands.h @@ -1,8 +1,23 @@ -#ifndef STLINK_COMMANDS_H_ -#define STLINK_COMMANDS_H_ +/* + * File: commands.h + * + * stlink commands + */ + +#ifndef COMMANDS_H +#define COMMANDS_H + +enum stlink_commands { + STLINK_GET_VERSION = 0xF1, + STLINK_DEBUG_COMMAND = 0xF2, + STLINK_DFU_COMMAND = 0xF3, + STLINK_GET_CURRENT_MODE = 0xF5, + STLINK_GET_TARGET_VOLTAGE = 0xF7, + STLINK_GET_VERSION_APIV3 = 0xFB +}; enum stlink_debug_commands { - STLINK_DEBUG_ENTER_JTAG = 0x00, + STLINK_DEBUG_ENTER_JTAG_RESET = 0x00, STLINK_DEBUG_GETSTATUS = 0x01, STLINK_DEBUG_FORCEDEBUG = 0x02, STLINK_DEBUG_APIV1_RESETSYS = 0x03, @@ -29,11 +44,20 @@ enum stlink_debug_commands { STLINK_DEBUG_APIV2_READDEBUGREG = 0x36, STLINK_DEBUG_APIV2_READALLREGS = 0x3A, STLINK_DEBUG_APIV2_GETLASTRWSTATUS = 0x3B, + STLINK_DEBUG_APIV2_DRIVE_NRST = 0x3C, STLINK_DEBUG_APIV2_GETLASTRWSTATUS2 = 0x3E, STLINK_DEBUG_APIV2_START_TRACE_RX = 0x40, STLINK_DEBUG_APIV2_STOP_TRACE_RX = 0x41, STLINK_DEBUG_APIV2_GET_TRACE_NB = 0x42, - STLINK_DEBUG_ENTER_SWD = 0xa3 + STLINK_DEBUG_APIV2_SWD_SET_FREQ = 0x43, + STLINK_DEBUG_APIV3_SET_COM_FREQ = 0x61, + STLINK_DEBUG_APIV3_GET_COM_FREQ = 0x62, + STLINK_DEBUG_ENTER_SWD = 0xa3, + STLINK_DEBUG_ENTER_JTAG_NO_RESET = 0xa4, +}; + +enum stlink_dfu_commands { + STLINK_DFU_EXIT = 0x07 }; -#endif // STLINK_COMMANDS_H_ +#endif // COMMANDS_H |