Add OpenULINK firmware
[openocd.git] / src / jtag / drivers / OpenULINK / include / io.h
1 /***************************************************************************
2 * Copyright (C) 2011 by Martin Schmoelzer *
3 * <martin.schmoelzer@student.tuwien.ac.at> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20
21 #ifndef __IO_H
22 #define __IO_H
23
24 #include "reg_ezusb.h"
25
26 /***************************************************************************
27 * JTAG Signals: *
28 ***************************************************************************
29 * TMS ....... Test Mode Select *
30 * TCK ....... Test Clock *
31 * TDI ....... Test Data Input (from device point of view, not JTAG *
32 * adapter point of view!) *
33 * TDO ....... Test Data Output (from device point of view, not JTAG *
34 * adapter point of view!) *
35 * TRST ...... Test Reset: Used to reset the TAP Finite State Machine *
36 * into the Test Logic Reset state *
37 * RTCK ...... Return Test Clock *
38 * OCDSE ..... Enable/Disable OCDS interface (Infineon specific) - shared *
39 * with /JEN *
40 * TRAP ...... Trap Condition (Infineon specific) - shared with TSTAT *
41 * BRKIN ..... Hardware Break-In (Infineon specific) *
42 * BRKOUT .... Hardware Break-Out (Infineon specific) *
43 * /JEN ...... JTAG-Enable (STMicroelectronics specific) - shared *
44 * with OCDSE *
45 * TSTAT ..... JTAG ISP Status (STMicroelectronics specific) - shared *
46 * with TRAP *
47 * RESET ..... Chip Reset (STMicroelectronics specific) *
48 * /TERR ..... JTAG ISP Error (STMicroelectronics specific) - shared *
49 * with BRKOUT *
50 ***************************************************************************/
51
52 /* PORT A */
53 #define PIN_U_OE OUTA0
54 // PA1 Not Connected
55 #define PIN_OE OUTA2
56 // PA3 Not Connected
57 #define PIN_RUN_LED OUTA4
58 #define PIN_TDO PINA5
59 #define PIN_BRKOUT PINA6
60 #define PIN_COM_LED OUTA7
61
62
63 /* PORT B */
64 #define PIN_TDI OUTB0
65 #define PIN_TMS OUTB1
66 #define PIN_TCK OUTB2
67 #define PIN_TRST OUTB3
68 #define PIN_BRKIN OUTB4
69 #define PIN_RESET OUTB5
70 #define PIN_OCDSE OUTB6
71 #define PIN_TRAP PINB7
72
73 /* JTAG Signals with direction 'OUT' on port B */
74 #define MASK_PORTB_DIRECTION_OUT (PIN_TDI | PIN_TMS | PIN_TCK | PIN_TRST | PIN_BRKIN | PIN_RESET | PIN_OCDSE)
75
76 /* PORT C */
77 #define PIN_RXD0 PINC0
78 #define PIN_TXD0 OUTC1
79 #define PIN_RESET_2 PINC2
80 // PC3 Not Connected
81 // PC4 Not Connected
82 #define PIN_RTCK PINC5
83 #define PIN_WR OUTC6
84 // PC7 Not Connected
85
86 /* LED Macros */
87 #define SET_RUN_LED() OUTA &= ~PIN_RUN_LED
88 #define CLEAR_RUN_LED() OUTA |= PIN_RUN_LED
89
90 #define SET_COM_LED() OUTA &= ~PIN_COM_LED
91 #define CLEAR_COM_LED() OUTA |= PIN_COM_LED
92
93 /* JTAG Pin Macros */
94 #define GET_TMS() (PINSB & PIN_TMS)
95 #define GET_TCK() (PINSB & PIN_TCK)
96
97 #define GET_TDO() (PINSA & PIN_TDO)
98 #define GET_BRKOUT() (PINSA & PIN_BRKOUT)
99 #define GET_TRAP() (PINSB & PIN_TRAP)
100 #define GET_RTCK() (PINSC & PIN_RTCK)
101
102 #define SET_TMS_HIGH() OUTB |= PIN_TMS
103 #define SET_TMS_LOW() OUTB &= ~PIN_TMS
104
105 #define SET_TCK_HIGH() OUTB |= PIN_TCK
106 #define SET_TCK_LOW() OUTB &= ~PIN_TCK
107
108 #define SET_TDI_HIGH() OUTB |= PIN_TDI
109 #define SET_TDI_LOW() OUTB &= ~PIN_TDI
110
111 /* TRST and RESET are low-active and inverted by hardware. SET_HIGH de-asserts
112 * the signal (enabling reset), SET_LOW asserts the signal (disabling reset) */
113 #define SET_TRST_HIGH() OUTB |= PIN_TRST
114 #define SET_TRST_LOW() OUTB &= ~PIN_TRST
115
116 #define SET_RESET_HIGH() OUTB |= PIN_RESET
117 #define SET_RESET_LOW() OUTB &= ~PIN_RESET
118
119 #define SET_OCDSE_HIGH() OUTB |= PIN_OCDSE
120 #define SET_OCDSE_LOW() OUTB &= ~PIN_OCDSE
121
122 #define SET_BRKIN_HIGH() OUTB |= PIN_BRKIN
123 #define SET_BRKIN_LOW() OUTB &= ~PIN_BRKIN
124
125 #endif

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)