1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # the DBGU and USARTs are 'almost' indentical'
4 set DBGU_CR
[expr {$AT91C_BASE_DBGU + 0x00000000}]
5 set DBGU_MR
[expr {$AT91C_BASE_DBGU + 0x00000004}]
6 set DBGU_IER
[expr {$AT91C_BASE_DBGU + 0x00000008}]
7 set DBGU_IDR
[expr {$AT91C_BASE_DBGU + 0x0000000C}]
8 set DBGU_IMR
[expr {$AT91C_BASE_DBGU + 0x00000010}]
9 set DBGU_CSR
[expr {$AT91C_BASE_DBGU + 0x00000014}]
10 set DBGU_RHR
[expr {$AT91C_BASE_DBGU + 0x00000018}]
11 set DBGU_THR
[expr {$AT91C_BASE_DBGU + 0x0000001C}]
12 set DBGU_BRGR
[expr {$AT91C_BASE_DBGU + 0x00000020}]
17 set DBGU_CIDR
[expr {$AT91C_BASE_DBGU + 0x00000040}]
18 set DBGU_EXID
[expr {$AT91C_BASE_DBGU + 0x00000044}]
19 set DBGU_FNTR
[expr {$AT91C_BASE_DBGU + 0x00000048}]
24 set USx_IER
0x00000008
25 set USx_IDR
0x0000000C
26 set USx_IMR
0x00000010
27 set USx_CSR
0x00000014
28 set USx_RHR
0x00000018
29 set USx_THR
0x0000001C
30 set USx_BRGR
0x00000020
31 set USx_RTOR
0x00000024
32 set USx_TTGR
0x00000028
33 set USx_FIDI
0x00000040
34 set USx_NER
0x00000044
37 # Create all the uarts that exist..
38 # we blow up if there are >9
41 proc show_mmr_USx_MR_helper
{ NAME ADDR VAL
} {
42 # First - just print it
44 set x
[show_normalize_bitfield
$VAL 3 0]
46 echo
"\tNormal operation"
48 echo
[format "\tNon Normal operation mode: 0x%02x" $x]
51 set x
[show_normalize_bitfield
$VAL 11 9]
59 set $x [expr {$x & 6}]
62 6 { set s
"Multidrop Mode" }
66 echo
[format "\tParity: %s " $s]
68 set x
[expr {5 + [show_normalize_bitfield
$VAL 7 6]}]
69 echo
[format "\tDatabits: %d" $x]
71 set x
[show_normalize_bitfield
$VAL 13 12]
73 0 { echo
"\tStop bits: 1" }
74 1 { echo
"\tStop bits: 1.5" }
75 2 { echo
"\tStop bits: 2" }
76 3 { echo
"\tStop bits: Illegal/Reserved" }
80 # For every possbile usart...
81 foreach WHO
{ US0 US1 US2 US3 US4 US5 US6 US7 US8 US9
} {
82 set n AT91C_BASE_
[set WHO
]
85 # Only if it exists on the chip
86 if [ info exists
$n ] {
87 # Hence: $n - is like AT91C_BASE_USx
88 # For every sub-register
89 foreach REG
{CR MR IER IDR IMR CSR RHR THR BRGR RTOR TTGR FIDI NER IF
} {
91 set vn
[set WHO
]_
[set REG
]
94 set vv
[expr "$$n + [set USx_[set REG]]"]
95 # And VV is the address in memory of that register
98 # make that VN a GLOBAL so others can find it
102 # Create a command for this specific register.
103 proc show_
$vn { } "show_mmr32_reg $vn"
105 # Add this command to the Device(as a whole) command
106 set str
"$str\nshow_$vn"
108 # Now - create the DEVICE(as a whole) command
114 # The Debug Uart is special..
118 # For every sub-register
119 foreach REG
{DBGU_CR DBGU_MR DBGU_IER DBGU_IDR DBGU_IMR
120 DBGU_CSR DBGU_RHR DBGU_THR DBGU_BRGR DBGU_CIDR DBGU_EXID DBGU_FNTR
} {
122 # Create a command for this specific register.
123 proc show_
$REG { } "show_mmr32_reg $REG"
125 # Add this command to the Device(as a whole) command
126 set str
"$str\nshow_$REG"
129 # Now - create the DEVICE(as a whole) command
130 proc show_DBGU
{ } $str
134 proc show_DBGU_MR_helper
{ NAME ADDR VAL
} { show_mmr_USx_MR_helper
$NAME $ADDR $VAL }
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)