forked from obe1line/stlink-trace
-
Notifications
You must be signed in to change notification settings - Fork 6
/
stlink-trace.h
48 lines (37 loc) · 1.04 KB
/
stlink-trace.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* stlink-trace.h
*
* Created on: 21/02/2013
* Author: Chris Storah
*
* Parts of the ST-Link code comes from the stlink project:
* https://github.com/texane/stlink
*
*/
#ifndef STLINK_TRACE_H_
#define STLINK_TRACE_H_
// Bus 002 Device 052: ID 0483:3748 SGS Thomson Microelectronics ST-LINK/V2
#define STLINKV2_VENDOR_ID 0x0483
#define STLINKV2_PRODUCT_ID 0x3748
#define DEBUG_LEVEL 3
#define DEBUG_COMMAND 0xF2
#define READ32 0x07
#define WRITE32 0x08
#define WRITE_DATA 0x35
#define READ_DATA 0x36
/*
* USB modes:
* DFU = Device Firmware Update
* MSD = Mass Storage Device
* DBG = Debug
*/
#define MODE_DFU 0x0000
#define MODE_MSD 0x0001
#define MODE_DBG 0x0002
#define STLINK_DEBUG_COMMAND 0xF2
#define STLINK_DFU_COMMAND 0xF3
#define STLINK_DFU_EXIT 0x07
//?? #define STLINK_DFU_ENTER 0x08
#define STLINK_DEBUG_FORCEDEBUG 0x02
#define STLINK_DEBUG_RESETSYS 0x03
#endif /* STLINK_TRACE_H_ */