source: rtems/c/src/lib/libbsp/bfin/eZKit533/include/bsp.h @ a052181

4.115
Last change on this file since a052181 was a052181, checked in by Sebastian Huber <sebastian.huber@…>, on 11/14/12 at 08:59:10

score: Add RTEMS_FATAL_SOURCE_EXIT

Include <bsp/default-initial-extension.h> in all BSPs. Call
rtems_fatal() with RTEMS_FATAL_SOURCE_EXIT as source and the exit()
status code as fatal code in every bsp_cleanup(). Move previous
bsp_cleanup() code into bsp_fatal_extension().

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all board IO definitions for eZKit533.
4 *
5 *  Copyright (c) 2006 by Atos Automacao Industrial Ltda.
6 *             written by Alain Schaefer <alain.schaefer@easc.ch>
7 *                    and Antonio Giovanini <antonio@atos.com.br>
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 */
13
14
15#ifndef _BSP_H
16#define _BSP_H
17
18#include <libcpu/bf533.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <bspopts.h>
25#include <bsp/default-initial-extension.h>
26
27#include <rtems.h>
28#include <rtems/console.h>
29#include <rtems/clockdrv.h>
30#include <rtems/score/bfin.h>
31#include <rtems/bfin/bf533.h>
32
33/*
34 * PLL and clock setup values:
35 */
36
37/*
38 *  PLL configuration for ezkit533
39 *
40 *  XTL   =  27 MHz
41 *  CLKIN =  13 MHz
42 *  VCO   = 391 MHz
43 *  CCLK  = 391 MHz
44 *  SCLK  = 130 MHz
45 */
46
47#define PLL_CSEL    0x0000      /* CCLK = VCO      */
48#define PLL_SSEL    0x0003      /* SCLK = CCLK/3   */
49#define PLL_MSEL    0x3A00      /* VCO = 29xCLKIN  */
50#define PLL_DF      0x0001      /* CLKIN = XTL/2   */
51
52#define CCLK        391000000   /* CORE CLOCK     */
53#define SCLK        130000000   /* SYSTEM CLOCK   */
54
55/*
56 * UART setup values
57 */
58#define BAUDRATE    57600       /* Console Baudrate   */
59#define WORD_5BITS  0x00        /* 5 bits word        */
60#define WORD_6BITS  0x01        /* 6 bits word        */
61#define WORD_7BITS  0x02        /* 7 bits word        */
62#define WORD_8BITS  0x03        /* 8 bits word        */
63#define EVEN_PARITY 0x18        /* Enable EVEN parity */
64#define ODD_PARITY  0x08        /* Enable ODD parity  */
65#define TWO_STP_BIT 0x04        /* 2 stop bits        */
66
67/*
68 * Ezkit flash ports
69 */
70#define FlashA_PortB_Dir  0x20270007L
71#define FlashA_PortB_Data 0x20270005L
72
73/*
74 * Blackfin environment memory map
75 */
76#define L1_DATA_SRAM_A 0xff800000L
77
78#define FIFOLENGTH 0x100
79
80/*
81 *  Simple spin delay in microsecond units for device drivers.
82 *  This is very dependent on the clock speed of the target.
83 */
84
85#define rtems_bsp_delay( microseconds ) \
86  { \
87  }
88
89/* Constants */
90
91#define RAM_START 0
92#define RAM_END   0x100000
93
94/* functions */
95
96/*
97 * Helper Function to use the EzKits LEDS.
98 * Can be used by the Application.
99 */
100void setLED (uint8_t value);
101
102/*
103 * Helper Function to use the EzKits LEDS
104 */
105uint8_t getLED (void);
106
107rtems_isr_entry set_vector(                     /* returns old vector */
108  rtems_isr_entry     handler,                  /* isr routine        */
109  rtems_vector_number vector,                   /* vector number      */
110  int                 type                      /* RTEMS or RAW intr  */
111);
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif
Note: See TracBrowser for help on using the repository browser.