1 | /** |
---|
2 | * @file bsp.h |
---|
3 | * @ingroup bfin_tll6527m |
---|
4 | * @brief Global BSP definitions. |
---|
5 | * |
---|
6 | * This include file contains all board IO definitions for TLL6527M. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * COPYRIGHT (c) 2010 by ECE Northeastern University. |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef _BSP_H |
---|
18 | #define _BSP_H |
---|
19 | |
---|
20 | #ifndef ASM |
---|
21 | |
---|
22 | #include <bspopts.h> |
---|
23 | #include <bsp/default-initial-extension.h> |
---|
24 | |
---|
25 | #include <rtems.h> |
---|
26 | #include <rtems/console.h> |
---|
27 | #include <rtems/clockdrv.h> |
---|
28 | #include <rtems/score/bfin.h> |
---|
29 | #include <rtems/bfin/bf52x.h> |
---|
30 | #include <bf52x.h> |
---|
31 | |
---|
32 | #ifdef __cplusplus |
---|
33 | extern "C" { |
---|
34 | #endif |
---|
35 | |
---|
36 | /** |
---|
37 | * @defgroup bfin_tll6527m TLL6527M Support |
---|
38 | * @ingroup bsp_bfin |
---|
39 | * @brief TLL6527M Support Package |
---|
40 | * @{ |
---|
41 | */ |
---|
42 | |
---|
43 | /* |
---|
44 | * PLL and clock setup values: |
---|
45 | */ |
---|
46 | |
---|
47 | /* |
---|
48 | * PLL configuration for TLL6527M |
---|
49 | * |
---|
50 | * XTL = 27 MHz |
---|
51 | * CLKIN = 13 MHz |
---|
52 | * VCO = 391 MHz |
---|
53 | * CCLK = 391 MHz |
---|
54 | * SCLK = 130 MHz |
---|
55 | */ |
---|
56 | |
---|
57 | /** |
---|
58 | * @name PLL Configuration |
---|
59 | * @{ |
---|
60 | */ |
---|
61 | |
---|
62 | #define PLL_CSEL 0x0000 ///< @brief CCLK = VCO */ |
---|
63 | #define PLL_SSEL 0x0003 ///< @brief SCLK = CCLK/3 */ |
---|
64 | #define PLL_MSEL 0x3A00 ///< @brief VCO = 29xCLKIN */ |
---|
65 | #define PLL_DF 0x0001 ///< @brief CLKIN = XTL/2 */ |
---|
66 | |
---|
67 | /** @} */ |
---|
68 | |
---|
69 | /** |
---|
70 | * @name Clock setup values |
---|
71 | * @{ |
---|
72 | */ |
---|
73 | |
---|
74 | #define CLKIN (25000000) ///< @brief Input clock to the PLL */ |
---|
75 | #define CCLK (600000000) ///< @brief CORE CLOCK */ |
---|
76 | #define SCLK (100000000) ///< @brief SYSTEM CLOCK */ |
---|
77 | |
---|
78 | /** @} */ |
---|
79 | |
---|
80 | /** |
---|
81 | * @name UART setup values |
---|
82 | * @{ |
---|
83 | */ |
---|
84 | |
---|
85 | #define BAUDRATE 57600 ///< @brief Console Baudrate */ |
---|
86 | #define WORD_5BITS 0x00 ///< @brief 5 bits word */ |
---|
87 | #define WORD_6BITS 0x01 ///< @brief 6 bits word */ |
---|
88 | #define WORD_7BITS 0x02 ///< @brief 7 bits word */ |
---|
89 | #define WORD_8BITS 0x03 ///< @brief 8 bits word */ |
---|
90 | #define EVEN_PARITY 0x18 ///< @brief Enable EVEN parity */ |
---|
91 | #define ODD_PARITY 0x08 ///< @brief Enable ODD parity */ |
---|
92 | #define TWO_STP_BIT 0x04 ///< @brief 2 stop bits */ |
---|
93 | |
---|
94 | /** @} */ |
---|
95 | |
---|
96 | /** |
---|
97 | * @brief Install an interrupt handler |
---|
98 | * |
---|
99 | * This method installs an interrupt handle. |
---|
100 | * |
---|
101 | * @param[in] handler is the isr routine |
---|
102 | * @param[in] vector is the vector number |
---|
103 | * @param[in] type indicates whether RTEMS or RAW intr |
---|
104 | * |
---|
105 | * @return returns old vector |
---|
106 | */ |
---|
107 | rtems_isr_entry set_vector( |
---|
108 | rtems_isr_entry handler, |
---|
109 | rtems_vector_number vector, |
---|
110 | int type |
---|
111 | ); |
---|
112 | |
---|
113 | /* |
---|
114 | * Internal BSP methods that are used across file boundaries |
---|
115 | */ |
---|
116 | void Init_RTC(void); |
---|
117 | |
---|
118 | /* |
---|
119 | * Prototype for methods in .S files that are referenced from C. |
---|
120 | */ |
---|
121 | void bfin_null_isr(void); |
---|
122 | |
---|
123 | /** @} */ |
---|
124 | |
---|
125 | #ifdef __cplusplus |
---|
126 | } |
---|
127 | #endif |
---|
128 | |
---|
129 | #endif /* !ASM */ |
---|
130 | |
---|
131 | #endif |
---|