]> git.sur5r.net Git - freertos/blob - Demo/AVR32_UC3A_GCC/Atmel_SW_Framework/BOARDS/EVK1100/evk1100.h
efca9a2e86ba7785d8b447ea2f138fe7b4137e9d
[freertos] / Demo / AVR32_UC3A_GCC / Atmel_SW_Framework / BOARDS / EVK1100 / evk1100.h
1 /* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */\r
2
3 /*This file is prepared for Doxygen automatic documentation generation.*/\r
4 /*! \file *********************************************************************\r
5  *\r
6  * \brief AT32UC3A EVK1100 board header file.\r
7  *\r
8  * This file contains definitions and services related to the features of the\r
9  * EVK1100 board rev. B and C.\r
10  *\r
11  * To use this board, define BOARD=EVK1100.\r
12  *\r
13  * - Compiler:           IAR EWAVR32 and GNU GCC for AVR32\r
14  * - Supported devices:  All AVR32 AT32UC3A devices can be used.\r
15  * - AppNote:\r
16  *\r
17  * \author               Atmel Corporation: http://www.atmel.com \n\r
18  *                       Support and FAQ: http://support.atmel.no/\r
19  *\r
20  ******************************************************************************/\r
21 \r
22 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.\r
23  *\r
24  * Redistribution and use in source and binary forms, with or without\r
25  * modification, are permitted provided that the following conditions are met:\r
26  *\r
27  * 1. Redistributions of source code must retain the above copyright notice, this\r
28  * list of conditions and the following disclaimer.\r
29  *\r
30  * 2. Redistributions in binary form must reproduce the above copyright notice,\r
31  * this list of conditions and the following disclaimer in the documentation\r
32  * and/or other materials provided with the distribution.\r
33  *\r
34  * 3. The name of Atmel may not be used to endorse or promote products derived\r
35  * from this software without specific prior written permission.\r
36  *\r
37  * 4. This software may only be redistributed and used in connection with an Atmel\r
38  * AVR product.\r
39  *\r
40  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED\r
41  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
42  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE\r
43  * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR\r
44  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
45  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
46  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
47  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
48  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
49  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE\r
50  *\r
51  */\r
52 \r
53 #ifndef _EVK1100_H_\r
54 #define _EVK1100_H_\r
55 \r
56 #ifdef EVK1100_REVA\r
57 #  include "evk1100_revA.h"\r
58 #else\r
59 \r
60 #include "compiler.h"\r
61 \r
62 #ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.\r
63 #  include "led.h"\r
64 #endif  // __AVR32_ABI_COMPILER__\r
65 \r
66 \r
67 /*! \name Oscillator Definitions\r
68  */\r
69 //! @{\r
70 \r
71 // RCOsc has no custom calibration by default. Set the following definition to\r
72 // the appropriate value if a custom RCOsc calibration has been applied to your\r
73 // part.\r
74 //#define FRCOSC          AVR32_PM_RCOSC_FREQUENCY              //!< RCOsc frequency: Hz.\r
75 \r
76 #define FOSC32          32768                                 //!< Osc32 frequency: Hz.\r
77 #define OSC32_STARTUP   AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC //!< Osc32 startup time: RCOsc periods.\r
78 \r
79 #define FOSC0           12000000                              //!< Osc0 frequency: Hz.\r
80 #define OSC0_STARTUP    AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC  //!< Osc0 startup time: RCOsc periods.\r
81 \r
82 // Osc1 crystal is not mounted by default. Set the following definitions to the\r
83 // appropriate values if a custom Osc1 crystal is mounted on your board.\r
84 //#define FOSC1           12000000                              //!< Osc1 frequency: Hz.\r
85 //#define OSC1_STARTUP    AVR32_PM_OSCCTRL1_STARTUP_2048_RCOSC  //!< Osc1 startup time: RCOsc periods.\r
86 \r
87 //! @}\r
88 \r
89 \r
90 /*! \name SDRAM Definitions\r
91  */\r
92 //! @{\r
93 \r
94 //! Part header file of used SDRAM(s).\r
95 #define SDRAM_PART_HDR  "MT48LC16M16A2TG7E/mt48lc16m16a2tg7e.h"\r
96 \r
97 //! Data bus width to use the SDRAM(s) with (16 or 32 bits; always 16 bits on\r
98 //! UC3).\r
99 #define SDRAM_DBW       16\r
100 \r
101 //! @}\r
102 \r
103 \r
104 /*! \name USB Definitions\r
105  */\r
106 //! @{\r
107 \r
108 //! Multiplexed pin used for USB_ID: AVR32_USBB_USB_ID_x_x.\r
109 //! To be selected according to the AVR32_USBB_USB_ID_x_x_PIN and\r
110 //! AVR32_USBB_USB_ID_x_x_FUNCTION definitions from <avr32/uc3axxxx.h>.\r
111 #define USB_ID                      AVR32_USBB_USB_ID_0_0\r
112 \r
113 //! Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.\r
114 //! To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and\r
115 //! AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3axxxx.h>.\r
116 #define USB_VBOF                    AVR32_USBB_USB_VBOF_0_1\r
117 \r
118 //! Active level of the USB_VBOF output pin.\r
119 #define USB_VBOF_ACTIVE_LEVEL       LOW\r
120 \r
121 //! USB overcurrent detection pin.\r
122 #define USB_OVERCURRENT_DETECT_PIN  AVR32_PIN_PX33\r
123 \r
124 //! @}\r
125 \r
126 \r
127 //! GPIO connection of the MAC PHY PWR_DOWN/INT signal.\r
128 #define MACB_INTERRUPT_PIN  AVR32_PIN_PA24\r
129 \r
130 \r
131 //! Number of LEDs.\r
132 #define LED_COUNT   8\r
133 \r
134 /*! \name GPIO Connections of LEDs\r
135  */\r
136 //! @{\r
137 #define LED0_GPIO   AVR32_PIN_PB27\r
138 #define LED1_GPIO   AVR32_PIN_PB28\r
139 #define LED2_GPIO   AVR32_PIN_PB29\r
140 #define LED3_GPIO   AVR32_PIN_PB30\r
141 #define LED4_GPIO   AVR32_PIN_PB19\r
142 #define LED5_GPIO   AVR32_PIN_PB20\r
143 #define LED6_GPIO   AVR32_PIN_PB21\r
144 #define LED7_GPIO   AVR32_PIN_PB22\r
145 //! @}\r
146 \r
147 /*! \name PWM Channels of LEDs\r
148  */\r
149 //! @{\r
150 #define LED0_PWM    (-1)\r
151 #define LED1_PWM    (-1)\r
152 #define LED2_PWM    (-1)\r
153 #define LED3_PWM    (-1)\r
154 #define LED4_PWM      0\r
155 #define LED5_PWM      1\r
156 #define LED6_PWM      2\r
157 #define LED7_PWM      3\r
158 //! @}\r
159 \r
160 /*! \name PWM Functions of LEDs\r
161  */\r
162 //! @{\r
163 #define LED0_PWM_FUNCTION   (-1)\r
164 #define LED1_PWM_FUNCTION   (-1)\r
165 #define LED2_PWM_FUNCTION   (-1)\r
166 #define LED3_PWM_FUNCTION   (-1)\r
167 #define LED4_PWM_FUNCTION   AVR32_PWM_0_FUNCTION\r
168 #define LED5_PWM_FUNCTION   AVR32_PWM_1_FUNCTION\r
169 #define LED6_PWM_FUNCTION   AVR32_PWM_2_FUNCTION\r
170 #define LED7_PWM_FUNCTION   AVR32_PWM_3_FUNCTION\r
171 //! @}\r
172 \r
173 /*! \name Color Identifiers of LEDs to Use with LED Functions\r
174  */\r
175 //! @{\r
176 #define LED_MONO0_GREEN   LED0\r
177 #define LED_MONO1_GREEN   LED1\r
178 #define LED_MONO2_GREEN   LED2\r
179 #define LED_MONO3_GREEN   LED3\r
180 #define LED_BI0_GREEN     LED5\r
181 #define LED_BI0_RED       LED4\r
182 #define LED_BI1_GREEN     LED7\r
183 #define LED_BI1_RED       LED6\r
184 //! @}\r
185 \r
186 \r
187 /*! \name GPIO Connections of Push Buttons\r
188  */\r
189 //! @{\r
190 #define GPIO_PUSH_BUTTON_0            AVR32_PIN_PX16\r
191 #define GPIO_PUSH_BUTTON_0_PRESSED    0\r
192 #define GPIO_PUSH_BUTTON_1            AVR32_PIN_PX19\r
193 #define GPIO_PUSH_BUTTON_1_PRESSED    0\r
194 #define GPIO_PUSH_BUTTON_2            AVR32_PIN_PX22\r
195 #define GPIO_PUSH_BUTTON_2_PRESSED    0\r
196 //! @}\r
197 \r
198 \r
199 /*! \name GPIO Connections of the Joystick\r
200  */\r
201 //! @{\r
202 #define GPIO_JOYSTICK_PUSH            AVR32_PIN_PA20\r
203 #define GPIO_JOYSTICK_PUSH_PRESSED    0\r
204 #define GPIO_JOYSTICK_LEFT            AVR32_PIN_PA25\r
205 #define GPIO_JOYSTICK_LEFT_PRESSED    0\r
206 #define GPIO_JOYSTICK_RIGHT           AVR32_PIN_PA28\r
207 #define GPIO_JOYSTICK_RIGHT_PRESSED   0\r
208 #define GPIO_JOYSTICK_UP              AVR32_PIN_PA26\r
209 #define GPIO_JOYSTICK_UP_PRESSED      0\r
210 #define GPIO_JOYSTICK_DOWN            AVR32_PIN_PA27\r
211 #define GPIO_JOYSTICK_DOWN_PRESSED    0\r
212 //! @}\r
213 \r
214 \r
215 /*! \name ADC Connection of the Potentiometer\r
216  */\r
217 //! @{\r
218 #define ADC_POTENTIOMETER_CHANNEL   1\r
219 #define ADC_POTENTIOMETER_PIN       AVR32_ADC_AD_1_PIN\r
220 #define ADC_POTENTIOMETER_FUNCTION  AVR32_ADC_AD_1_FUNCTION\r
221 //! @}\r
222 \r
223 \r
224 /*! \name ADC Connection of the Temperature Sensor\r
225  */\r
226 //! @{\r
227 #define ADC_TEMPERATURE_CHANNEL     0\r
228 #define ADC_TEMPERATURE_PIN         AVR32_ADC_AD_0_PIN\r
229 #define ADC_TEMPERATURE_FUNCTION    AVR32_ADC_AD_0_FUNCTION\r
230 //! @}\r
231 \r
232 \r
233 /*! \name ADC Connection of the Light Sensor\r
234  */\r
235 //! @{\r
236 #define ADC_LIGHT_CHANNEL           2\r
237 #define ADC_LIGHT_PIN               AVR32_ADC_AD_2_PIN\r
238 #define ADC_LIGHT_FUNCTION          AVR32_ADC_AD_2_FUNCTION\r
239 //! @}\r
240 \r
241 \r
242 /*! \name SPI Connections of the DIP204 LCD\r
243  */\r
244 //! @{\r
245 #define DIP204_SPI                  (&AVR32_SPI1)\r
246 #define DIP204_SPI_NPCS             2\r
247 #define DIP204_SPI_SCK_PIN          AVR32_SPI1_SCK_0_0_PIN\r
248 #define DIP204_SPI_SCK_FUNCTION     AVR32_SPI1_SCK_0_0_FUNCTION\r
249 #define DIP204_SPI_MISO_PIN         AVR32_SPI1_MISO_0_0_PIN\r
250 #define DIP204_SPI_MISO_FUNCTION    AVR32_SPI1_MISO_0_0_FUNCTION\r
251 #define DIP204_SPI_MOSI_PIN         AVR32_SPI1_MOSI_0_0_PIN\r
252 #define DIP204_SPI_MOSI_FUNCTION    AVR32_SPI1_MOSI_0_0_FUNCTION\r
253 #define DIP204_SPI_NPCS_PIN         AVR32_SPI1_NPCS_2_0_PIN\r
254 #define DIP204_SPI_NPCS_FUNCTION    AVR32_SPI1_NPCS_2_0_FUNCTION\r
255 //! @}\r
256 \r
257 /*! \name GPIO and PWM Connections of the DIP204 LCD Backlight\r
258  */\r
259 //! @{\r
260 #define DIP204_BACKLIGHT_PIN        AVR32_PIN_PB18\r
261 #define DIP204_PWM_CHANNEL          6\r
262 #define DIP204_PWM_PIN              AVR32_PWM_6_PIN\r
263 #define DIP204_PWM_FUNCTION         AVR32_PWM_6_FUNCTION\r
264 //! @}\r
265 \r
266 \r
267 /*! \name SPI Connections of the AT45DBX Data Flash Memory\r
268  */\r
269 //! @{\r
270 #define AT45DBX_SPI                 (&AVR32_SPI1)\r
271 #define AT45DBX_SPI_NPCS            0\r
272 #define AT45DBX_SPI_SCK_PIN         AVR32_SPI1_SCK_0_0_PIN\r
273 #define AT45DBX_SPI_SCK_FUNCTION    AVR32_SPI1_SCK_0_0_FUNCTION\r
274 #define AT45DBX_SPI_MISO_PIN        AVR32_SPI1_MISO_0_0_PIN\r
275 #define AT45DBX_SPI_MISO_FUNCTION   AVR32_SPI1_MISO_0_0_FUNCTION\r
276 #define AT45DBX_SPI_MOSI_PIN        AVR32_SPI1_MOSI_0_0_PIN\r
277 #define AT45DBX_SPI_MOSI_FUNCTION   AVR32_SPI1_MOSI_0_0_FUNCTION\r
278 #define AT45DBX_SPI_NPCS0_PIN       AVR32_SPI1_NPCS_0_0_PIN\r
279 #define AT45DBX_SPI_NPCS0_FUNCTION  AVR32_SPI1_NPCS_0_0_FUNCTION\r
280 //! @}\r
281 \r
282 \r
283 /*! \name GPIO and SPI Connections of the SD/MMC Connector\r
284  */\r
285 //! @{\r
286 #define SD_MMC_CARD_DETECT_PIN      AVR32_PIN_PA02\r
287 #define SD_MMC_WRITE_PROTECT_PIN    AVR32_PIN_PA07\r
288 #define SD_MMC_SPI                  (&AVR32_SPI1)\r
289 #define SD_MMC_SPI_NPCS             1\r
290 #define SD_MMC_SPI_SCK_PIN          AVR32_SPI1_SCK_0_0_PIN\r
291 #define SD_MMC_SPI_SCK_FUNCTION     AVR32_SPI1_SCK_0_0_FUNCTION\r
292 #define SD_MMC_SPI_MISO_PIN         AVR32_SPI1_MISO_0_0_PIN\r
293 #define SD_MMC_SPI_MISO_FUNCTION    AVR32_SPI1_MISO_0_0_FUNCTION\r
294 #define SD_MMC_SPI_MOSI_PIN         AVR32_SPI1_MOSI_0_0_PIN\r
295 #define SD_MMC_SPI_MOSI_FUNCTION    AVR32_SPI1_MOSI_0_0_FUNCTION\r
296 #define SD_MMC_SPI_NPCS_PIN         AVR32_SPI1_NPCS_1_0_PIN\r
297 #define SD_MMC_SPI_NPCS_FUNCTION    AVR32_SPI1_NPCS_1_0_FUNCTION\r
298 //! @}\r
299 \r
300 \r
301 /*! \name TWI Connections of the Spare TWI Connector\r
302  */\r
303 //! @{\r
304 #define SPARE_TWI                   (&AVR32_TWI)\r
305 #define SPARE_TWI_SCL_PIN           AVR32_TWI_SCL_0_0_PIN\r
306 #define SPARE_TWI_SCL_FUNCTION      AVR32_TWI_SCL_0_0_FUNCTION\r
307 #define SPARE_TWI_SDA_PIN           AVR32_TWI_SDA_0_0_PIN\r
308 #define SPARE_TWI_SDA_FUNCTION      AVR32_TWI_SDA_0_0_FUNCTION\r
309 //! @}\r
310 \r
311 \r
312 /*! \name SPI Connections of the Spare SPI Connector\r
313  */\r
314 //! @{\r
315 #define SPARE_SPI                   (&AVR32_SPI0)\r
316 #define SPARE_SPI_NPCS              0\r
317 #define SPARE_SPI_SCK_PIN           AVR32_SPI0_SCK_0_0_PIN\r
318 #define SPARE_SPI_SCK_FUNCTION      AVR32_SPI0_SCK_0_0_FUNCTION\r
319 #define SPARE_SPI_MISO_PIN          AVR32_SPI0_MISO_0_0_PIN\r
320 #define SPARE_SPI_MISO_FUNCTION     AVR32_SPI0_MISO_0_0_FUNCTION\r
321 #define SPARE_SPI_MOSI_PIN          AVR32_SPI0_MOSI_0_0_PIN\r
322 #define SPARE_SPI_MOSI_FUNCTION     AVR32_SPI0_MOSI_0_0_FUNCTION\r
323 #define SPARE_SPI_NPCS_PIN          AVR32_SPI0_NPCS_0_0_PIN\r
324 #define SPARE_SPI_NPCS_FUNCTION     AVR32_SPI0_NPCS_0_0_FUNCTION\r
325 //! @}\r
326 \r
327 \r
328 #endif  // !EVK1100_REVA\r
329 \r
330 #endif  // _EVK1100_H_\r