summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/uC5282/README
blob: 5609b0eb66b5909e3dd6d423eb38fc1f0fd99510 (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#
#  $Id$
#

Description: Arcturus Networks uC DIMM ColdFire 5282 
============
 CPU: MCF5282, 64MHz
 RAM: 16M
SRAM: 64k (BSP places FEC buffer descriptors here)
 ROM: 4M

This is a credit-card sized board in a DIMM format. It is part of a family
which includes Dragonball and Coldfire CPUs, with a standardized DIMM-based bus. 

ACKNOWLEDGEMENTS:
=================
This BSP is based on the work of:
    D. Peter Siddons
    Till Straumann
    Brett Swimley
    Jay Monkman

TODO:
=====
The bsp relies on the Arcturus monitor to set up DRAM and all chip selects. 
This seems OK to me, but others may find it lame.....

I/O pin restrictions make simultaneous operation of I2C, CAN and UART2
impossible.  The BSP configures UART2 to use the CAN pins and leaves
the I2C pins available for use.
 
BSP NAME:           uC5282
BOARD:              Arcturus Netrworks uCdimm 5282
BUS:                Arcturus DIMM bus, A24/D16, plus peripherals.
CPU FAMILY:         ColdFire 5282
CPU:                MCF5282
COPROCESSORS:       N/A

DEBUG MONITOR:      Arcturus bootloader

PERIPHERALS
===========
TIMERS:             Four PIT (RTEMS clock is PIT3), Four Timers
  RESOLUTION:       1 microsecond 
SERIAL PORTS:       Internal UART 0, 1 and 2
REAL-TIME CLOCK:    none
DMA:                none
VIDEO:              none
SCSI:               none
NETWORKING:         Internal 10/100Mbs FEC, 100 Mb/s, full/half-duplex

DRIVER INFORMATION
==================
CLOCK DRIVER:       PIT3
IOSUPP DRIVER:      none
SHMSUPP:            none
TIMER DRIVER:       TIMER3
TTY DRIVER:         UART0, 1 and 2

STDIO
=====
PORT:               UART0 Terminal
ELECTRICAL:         RS-232
BAUD:               9600
BITS PER CHARACTER: 8
PARITY:             None
STOP BITS:          1

Downloading the image to the board.
===================================
The bootable image is generated by the make-exe target in the bsp makefile. It
generates a simple stripped binary file which is downloaded over the ethernet
port into RAM then executed or programmed into flash memory.

1) Power up the uC5282 board. A dump of some memory maps is produced
   followed by a prompt.

2) (first time only)
   Set the uC5282 board Internet configuration:
        setenv IPADDR0 www.xxx.yyy.zzz  (Your board's address)
        setenv NETMASK ppp.qqq.rrr.sss  (Your local network address mask)
        setenv HOSTNAME somename        (Your board's name)

3) Type 'tftp<CR>'
   This forces the network link to half-duplex.  If your network link is
   locked at full duplex you'll have to find another port!
   The RTEMS network driver can be forced to 100 Mbs/full-duplex by setting
   the bootstrap environment variable IPADDR0_100FULL to Y.  The driver can
   be forced to 10 Mbs/half-duplex by setting the bootstrap environment
   variable IPADDR0_10HALF to Y.

4) Run 'tftp' on your host machine:
        tftp> binary
        tftp> connect www.xxx.yyy.zzz   (Your ucDIMM's address)
        tftp> put someFile.exe          (someFile.boot for the EPICS build system)

5) When the file has downloaded press the <ESC> key to terminate
   the uCDIMM tftp command.

6) Type 'goram<CR>' to start the downloaded program, or type 'program<CR>'
to burn the code onto the uCDIMM flash.

Clock Speed Determination Algorithm
===================================
Till Straumann submitted a patch to provide more dynamic clock speed
selection. 

Currently, the uC5282 BSP requires relinking the application with a
special linker flag in order to make it work with 80MHz boards (breaking
run-time compatibility with 64MHz variants).

The change aims adds support for run-time guessing/setting of
the system-clock frequency:

1) If uCbootloader environment variable SYS_CLOCK_SPEED is set to a
non-zero number then the BSP assumes this number to specify the clock
frequency in Hz.

2) If 1) yields no non-zero frequency then the linker-provided symbol
_CPUClockSpeed is assumed to specify the clock frequency (in Hz). This
is the traditional behavior but the default value of _CPUClockSpeed
was changed from 64000000 to 0 (in order to let step 3) do it's work
by default).

3) If neither 1) nor 2) yield a non-zero frequency then assume a PLL
reference frequency (in Hz) as defined by the linker-provided symbol
'_PLLRefClockSpeed' (which defaults to 8000000) and compute the system
clock frequency from the divisor/multiplier settings in the SYNCR
register.

We have both, 64MHz and 80MHz variants and both use a PLL reference of
8MHz so that run-time heuristics + detection 3) work fine.

EPICS Bootstrap Information
===========================
The EPICS startup code uses the following environment variables.  If an
optional environment variable is missing the value in parentheses will be used.
All Internet addresses must be given in 'dotted-decimal' format.
HWADDR0    - Ethernet hardware address.
IPADDR0    - Internet address (192.168.0.2).
NETMASK    - Local network address mask (255.255.252.0).
HOSTNAME   - Internet host name (iocNobody).
GATEWAY    - Internet address of gateway machine (NULL).
SERVER     - Internet address of NFS server (192.168.0.1).
NAMESERVER - Internet address of DNS server (SERVER).
DOMAIN     - DNS domain name (precompiled value from CONFIG_SITE).
NTPSERVER  - Internet address of NTP server (SERVER).
BOOTFILE   - Path to executable (epics/iocNobody/bin/RTEMS-uC5282/myApp.boot).
CMDLINE    - Path to startup script (epics/iocBoot/iocNobody/st.cmd).
NFSMOUNT   - NFS information: www.xxx.yyy.zzz:/remote/path /localpath
             A : can also be used to separate the remote and local paths.
             If NFSMOUNT is not set, SERVER will be used as the NFS server,
             and the remote and local paths will be taken from the first
             component of CMDLINE.  If CMDLINE does not begin with a /
             then '/tftpboot' is prepended to the remote path.  This allows
             a remote TFTP and NFS server to be handled transaparently.


============================================================================

      Memory map as set up by dBUG bootstrap and BSP initialization

          +--------------------------------------------------+
0000 0000 |       16 MByte SDRAM                             | 00FF FFFF
0100 0000 |  ---------------------------------------------   |
          |    Address space for future SDRAM expansion      |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 0FFF FFFF
          +--------------------------------------------------+
1000 0000 | External 4 MByte flash memory                    |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 1FFF FFFF
          +--------------------------------------------------+
2000 0000 | 64 kByte on-chip SRAM (RAMBAR)                   |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 2FFF FFFF
          +--------------------------------------------------+
3000 0000 |  CS1* (devLib 'VME' A24 space)                   | 30FF FFFF
3100 0000 |  CS2* (devLib 'VME' A32 and A16 space)          x| 31FF FFFF
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 3FFF FFFF
          +--------------------------------------------------+
4000 0000 | Internal peripheral system (IPSBAR)              |
          .                                                  .
4400 0000 | Backdoor access to on-chip flash                 |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | 4FFF FFFF
          +--------------------------------------------------+
          .                                                  .
          .                                                  .
          .                                                  .
          +--------------------------------------------------+
f000 0000 | 512 kByte on-chip flash (FLASHBAR)               |
          .                                                  .
          .                                                  .
          .                                                  .
          |                                                  | fFFF FFFF
          +--------------------------------------------------+

x - Final 16-bit location of CS2* space is reserved for FPGA interrupt status.

============================================================================

      Interrupt map

External interrupt lines (priority is fixed between 3 and 4):
    IRQ7* - Ethernet Transceiver interrupts
    IRQ1* - FPGA ('VME') interrupts.
+-----+-----------------------------------------------------------------------+
|     |                                PRIORITY                               |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|LEVEL|    7   |    6   |    5   |    4   |    3   |    2   |    1   |    0   |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  7  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  6  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  5  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  4  | FEC RX | FEC TX |        |        |        |        |        |   PIT  |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  3  | UART 0 | UART 1 | UART 2 |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  2  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+
|  1  |        |        |        |        |        |        |        |        |
+-----+--------+--------+--------+--------+--------+--------+--------+--------+

============================================================================