1 # the DBGU and USARTs are 'almost' indentical'
2 set DBGU_CR
[expr $AT91C_BASE_DBGU + 0x00000000]
3 set DBGU_MR
[expr $AT91C_BASE_DBGU + 0x00000004]
4 set DBGU_IER
[expr $AT91C_BASE_DBGU + 0x00000008]
5 set DBGU_IDR
[expr $AT91C_BASE_DBGU + 0x0000000C]
6 set DBGU_IMR
[expr $AT91C_BASE_DBGU + 0x00000010]
7 set DBGU_CSR
[expr $AT91C_BASE_DBGU + 0x00000014]
8 set DBGU_RHR
[expr $AT91C_BASE_DBGU + 0x00000018]
9 set DBGU_THR
[expr $AT91C_BASE_DBGU + 0x0000001C]
10 set DBGU_BRGR
[expr $AT91C_BASE_DBGU + 0x00000020]
15 set DBGU_CIDR
[expr $AT91C_BASE_DBGU + 0x00000040]
16 set DBGU_EXID
[expr $AT91C_BASE_DBGU + 0x00000044]
17 set DBGU_FNTR
[expr $AT91C_BASE_DBGU + 0x00000048]
22 set USx_IER
0x00000008
23 set USx_IDR
0x0000000C
24 set USx_IMR
0x00000010
25 set USx_CSR
0x00000014
26 set USx_RHR
0x00000018
27 set USx_THR
0x0000001C
28 set USx_BRGR
0x00000020
29 set USx_RTOR
0x00000024
30 set USx_TTGR
0x00000028
31 set USx_FIDI
0x00000040
32 set USx_NER
0x00000044
35 # Create all the uarts that exist..
36 # we blow up if there are >9
39 proc show_mmr_USx_MR_helper
{ NAME ADDR VAL
} {
40 # First - just print it
42 set x
[show_normalize_bitfield
$VAL 3 0]
44 puts "\tNormal operation"
46 puts [format "\tNon Normal operation mode: 0x%02x" $x]
49 set x
[show_normalize_bitfield
$VAL 11 9]
60 6 { set s
"Multidrop Mode" }
64 puts [format "\tParity: %s " $s]
66 set x
[expr 5 + [show_normalize_bitfield
$VAL 7 6]]
67 puts [format "\tDatabits: %d" $x]
69 set x
[show_normalize_bitfield
$VAL 13 12]
71 0 { puts "\tStop bits: 1" }
72 1 { puts "\tStop bits: 1.5" }
73 2 { puts "\tStop bits: 2" }
74 3 { puts "\tStop bits: Illegal/Reserved" }
78 # For every possbile usart...
79 foreach WHO
{ US0 US1 US2 US3 US4 US5 US6 US7 US8 US9
} {
80 set n AT91C_BASE_
[set WHO
]
83 # Only if it exists on the chip
84 if [ info exists
$n ] {
85 # Hence: $n - is like AT91C_BASE_USx
86 # For every sub-register
87 foreach REG
{CR MR IER IDR IMR CSR RHR THR BRGR RTOR TTGR FIDI NER IF
} {
89 set vn
[set WHO
]_
[set REG
]
92 set vv
[expr $$n + [set USx_
[set REG
]]]
93 # And VV is the address in memory of that register
96 # make that VN a GLOBAL so others can find it
100 # Create a command for this specific register.
101 proc show_
$vn { } "show_mmr32_reg $vn"
103 # Add this command to the Device(as a whole) command
104 set str
"$str\nshow_$vn"
106 # Now - create the DEVICE(as a whole) command
112 # The Debug Uart is special..
116 # For every sub-register
117 foreach REG
{DBGU_CR DBGU_MR DBGU_IER DBGU_IDR DBGU_IMR
118 DBGU_CSR DBGU_RHR DBGU_THR DBGU_BRGR DBGU_CIDR DBGU_EXID DBGU_FNTR
} {
120 # Create a command for this specific register.
121 proc show_
$REG { } "show_mmr32_reg $REG"
123 # Add this command to the Device(as a whole) command
124 set str
"$str\nshow_$REG"
127 # Now - create the DEVICE(as a whole) command
128 proc show_DBGU
{ } $str
132 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)