]> git.sur5r.net Git - freertos/blob - Demo/AVR32_UC3/BOARDS/EVK1100/evk1100_revA.h
13ec2e8ad30efbf762fc44251a1413c300edb132
[freertos] / Demo / AVR32_UC3 / BOARDS / EVK1100 / evk1100_revA.h
1 /* This header file is part of the ATMEL AVR32-SoftwareFramework-AT32UC3-1.5.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. A.\r
10  *\r
11  * To use this board, define BOARD=EVK1100 and EVK1100_REVA.\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_REVA_H_\r
54 #define _EVK1100_REVA_H_\r
55 \r
56 #include "compiler.h"\r
57 \r
58 #ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.\r
59 #  include "led.h"\r
60 #endif  // __AVR32_ABI_COMPILER__\r
61 \r
62 \r
63 /*! \name Oscillator Definitions\r
64  */\r
65 //! @{\r
66 \r
67 // RCOsc has no custom calibration by default. Set the following definition to\r
68 // the appropriate value if a custom RCOsc calibration has been applied to your\r
69 // part.\r
70 //#define FRCOSC          AVR32_PM_RCOSC_FREQUENCY              //!< RCOsc frequency: Hz.\r
71 \r
72 #define FOSC32          32768                                 //!< Osc32 frequency: Hz.\r
73 #define OSC32_STARTUP   AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC //!< Osc32 startup time: RCOsc periods.\r
74 \r
75 #define FOSC0           12000000                              //!< Osc0 frequency: Hz.\r
76 #define OSC0_STARTUP    AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC  //!< Osc0 startup time: RCOsc periods.\r
77 \r
78 // Osc1 crystal is not mounted by default. Set the following definitions to the\r
79 // appropriate values if a custom Osc1 crystal is mounted on your board.\r
80 //#define FOSC1           12000000                              //!< Osc1 frequency: Hz.\r
81 //#define OSC1_STARTUP    AVR32_PM_OSCCTRL1_STARTUP_2048_RCOSC  //!< Osc1 startup time: RCOsc periods.\r
82 \r
83 //! @}\r
84 \r
85 \r
86 /*! \name SDRAM Definitions\r
87  */\r
88 //! @{\r
89 \r
90 //! Part header file of used SDRAM(s).\r
91 #define SDRAM_PART_HDR  "MT48LC16M16A2TG7E/mt48lc16m16a2tg7e.h"\r
92 \r
93 //! Data bus width to use the SDRAM(s) with (16 or 32 bits; always 16 bits on\r
94 //! UC3).\r
95 #define SDRAM_DBW       16\r
96 \r
97 //! @}\r
98 \r
99 \r
100 /*! \name USB Definitions\r
101  */\r
102 //! @{\r
103 \r
104 //! Multiplexed pin used for USB_ID: AVR32_USBB_USB_ID_x_x.\r
105 //! To be selected according to the AVR32_USBB_USB_ID_x_x_PIN and\r
106 //! AVR32_USBB_USB_ID_x_x_FUNCTION definitions from <avr32/uc3axxxx.h>.\r
107 #define USB_ID                      AVR32_USBB_USB_ID_0_0\r
108 \r
109 //! Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.\r
110 //! To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and\r
111 //! AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3axxxx.h>.\r
112 #define USB_VBOF                    AVR32_USBB_USB_VBOF_0_0\r
113 \r
114 //! Active level of the USB_VBOF output pin.\r
115 #define USB_VBOF_ACTIVE_LEVEL       HIGH\r
116 \r
117 //! USB overcurrent detection pin.\r
118 #define USB_OVERCURRENT_DETECT_PIN  AVR32_PIN_PB18\r
119 \r
120 //! @}\r
121 \r
122 \r
123 //! GPIO connection of the MAC PHY PWR_DOWN/INT signal.\r
124 #define MACB_INTERRUPT_PIN  AVR32_PIN_PX12\r
125 \r
126 \r
127 //! Number of LEDs.\r
128 #define LED_COUNT   8\r
129 \r
130 /*! \name GPIO Connections of LEDs\r
131  */\r
132 //! @{\r
133 #define LED0_GPIO   AVR32_PIN_PX13\r
134 #define LED1_GPIO   AVR32_PIN_PX14\r
135 #define LED2_GPIO   AVR32_PIN_PX15\r
136 #define LED3_GPIO   AVR32_PIN_PX16\r
137 #define LED4_GPIO   AVR32_PIN_PB19\r
138 #define LED5_GPIO   AVR32_PIN_PB20\r
139 #define LED6_GPIO   AVR32_PIN_PB21\r
140 #define LED7_GPIO   AVR32_PIN_PB22\r
141 //! @}\r
142 \r
143 /*! \name PWM Channels of LEDs\r
144  */\r
145 //! @{\r
146 #define LED0_PWM    (-1)\r
147 #define LED1_PWM    (-1)\r
148 #define LED2_PWM    (-1)\r
149 #define LED3_PWM    (-1)\r
150 #define LED4_PWM      0\r
151 #define LED5_PWM      1\r
152 #define LED6_PWM      2\r
153 #define LED7_PWM      3\r
154 //! @}\r
155 \r
156 /*! \name PWM Functions of LEDs\r
157  */\r
158 //! @{\r
159 #define LED0_PWM_FUNCTION   (-1)\r
160 #define LED1_PWM_FUNCTION   (-1)\r
161 #define LED2_PWM_FUNCTION   (-1)\r
162 #define LED3_PWM_FUNCTION   (-1)\r
163 #define LED4_PWM_FUNCTION   AVR32_PWM_0_FUNCTION\r
164 #define LED5_PWM_FUNCTION   AVR32_PWM_1_FUNCTION\r
165 #define LED6_PWM_FUNCTION   AVR32_PWM_2_FUNCTION\r
166 #define LED7_PWM_FUNCTION   AVR32_PWM_3_FUNCTION\r
167 //! @}\r
168 \r
169 /*! \name Color Identifiers of LEDs to Use with LED Functions\r
170  */\r
171 //! @{\r
172 #define LED_MONO0_GREEN   LED4\r
173 #define LED_MONO1_GREEN   LED5\r
174 #define LED_MONO2_GREEN   LED6\r
175 #define LED_MONO3_GREEN   LED7\r
176 #define LED_BI0_GREEN     LED1\r
177 #define LED_BI0_RED       LED0\r
178 #define LED_BI1_GREEN     LED3\r
179 #define LED_BI1_RED       LED2\r
180 //! @}\r
181 \r
182 \r
183 /*! \name GPIO Connections of Push Buttons\r
184  */\r
185 //! @{\r
186 #define GPIO_PUSH_BUTTON_0            AVR32_PIN_PB28\r
187 #define GPIO_PUSH_BUTTON_0_PRESSED    0\r
188 #define GPIO_PUSH_BUTTON_1            AVR32_PIN_PB29\r
189 #define GPIO_PUSH_BUTTON_1_PRESSED    0\r
190 #define GPIO_PUSH_BUTTON_2            AVR32_PIN_PB27\r
191 #define GPIO_PUSH_BUTTON_2_PRESSED    0\r
192 //! @}\r
193 \r
194 \r
195 /*! \name GPIO Connections of the Joystick\r
196  */\r
197 //! @{\r
198 #define GPIO_JOYSTICK_PUSH            AVR32_PIN_PA20\r
199 #define GPIO_JOYSTICK_PUSH_PRESSED    0\r
200 #define GPIO_JOYSTICK_LEFT            AVR32_PIN_PA25\r
201 #define GPIO_JOYSTICK_LEFT_PRESSED    0\r
202 #define GPIO_JOYSTICK_RIGHT           AVR32_PIN_PA28\r
203 #define GPIO_JOYSTICK_RIGHT_PRESSED   0\r
204 #define GPIO_JOYSTICK_UP              AVR32_PIN_PA26\r
205 #define GPIO_JOYSTICK_UP_PRESSED      0\r
206 #define GPIO_JOYSTICK_DOWN            AVR32_PIN_PA27\r
207 #define GPIO_JOYSTICK_DOWN_PRESSED    0\r
208 //! @}\r
209 \r
210 \r
211 /*! \name ADC Connection of the Potentiometer\r
212  */\r
213 //! @{\r
214 #define ADC_POTENTIOMETER_CHANNEL   1\r
215 #define ADC_POTENTIOMETER_PIN       AVR32_ADC_AD_1_PIN\r
216 #define ADC_POTENTIOMETER_FUNCTION  AVR32_ADC_AD_1_FUNCTION\r
217 //! @}\r
218 \r
219 \r
220 /*! \name ADC Connection of the Temperature Sensor\r
221  */\r
222 //! @{\r
223 #define ADC_TEMPERATURE_CHANNEL     0\r
224 #define ADC_TEMPERATURE_PIN         AVR32_ADC_AD_0_PIN\r
225 #define ADC_TEMPERATURE_FUNCTION    AVR32_ADC_AD_0_FUNCTION\r
226 //! @}\r
227 \r
228 \r
229 /*! \name ADC Connection of the Light Sensor\r
230  */\r
231 //! @{\r
232 #define ADC_LIGHT_CHANNEL           2\r
233 #define ADC_LIGHT_PIN               AVR32_ADC_AD_2_PIN\r
234 #define ADC_LIGHT_FUNCTION          AVR32_ADC_AD_2_FUNCTION\r
235 //! @}\r
236 \r
237 \r
238 /*! \name SPI Connections of the DIP204 LCD\r
239  */\r
240 //! @{\r
241 #define DIP204_SPI                  (&AVR32_SPI1)\r
242 #define DIP204_SPI_NPCS             2\r
243 #define DIP204_SPI_SCK_PIN          AVR32_SPI1_SCK_0_0_PIN\r
244 #define DIP204_SPI_SCK_FUNCTION     AVR32_SPI1_SCK_0_0_FUNCTION\r
245 #define DIP204_SPI_MISO_PIN         AVR32_SPI1_MISO_0_0_PIN\r
246 #define DIP204_SPI_MISO_FUNCTION    AVR32_SPI1_MISO_0_0_FUNCTION\r
247 #define DIP204_SPI_MOSI_PIN         AVR32_SPI1_MOSI_0_0_PIN\r
248 #define DIP204_SPI_MOSI_FUNCTION    AVR32_SPI1_MOSI_0_0_FUNCTION\r
249 #define DIP204_SPI_NPCS_PIN         AVR32_SPI1_NPCS_2_0_PIN\r
250 #define DIP204_SPI_NPCS_FUNCTION    AVR32_SPI1_NPCS_2_0_FUNCTION\r
251 //! @}\r
252 \r
253 /*! \name GPIO and PWM Connections of the DIP204 LCD Backlight\r
254  */\r
255 //! @{\r
256 #define DIP204_BACKLIGHT_PIN        AVR32_PIN_PB18\r
257 #define DIP204_PWM_CHANNEL          6\r
258 #define DIP204_PWM_PIN              AVR32_PWM_6_PIN\r
259 #define DIP204_PWM_FUNCTION         AVR32_PWM_6_FUNCTION\r
260 //! @}\r
261 \r
262 \r
263 /*! \name SPI Connections of the AT45DBX Data Flash Memory\r
264  */\r
265 //! @{\r
266 #define AT45DBX_SPI                 (&AVR32_SPI1)\r
267 #define AT45DBX_SPI_NPCS            0\r
268 #define AT45DBX_SPI_SCK_PIN         AVR32_SPI1_SCK_0_0_PIN\r
269 #define AT45DBX_SPI_SCK_FUNCTION    AVR32_SPI1_SCK_0_0_FUNCTION\r
270 #define AT45DBX_SPI_MISO_PIN        AVR32_SPI1_MISO_0_0_PIN\r
271 #define AT45DBX_SPI_MISO_FUNCTION   AVR32_SPI1_MISO_0_0_FUNCTION\r
272 #define AT45DBX_SPI_MOSI_PIN        AVR32_SPI1_MOSI_0_0_PIN\r
273 #define AT45DBX_SPI_MOSI_FUNCTION   AVR32_SPI1_MOSI_0_0_FUNCTION\r
274 #define AT45DBX_SPI_NPCS0_PIN       AVR32_SPI1_NPCS_0_0_PIN\r
275 #define AT45DBX_SPI_NPCS0_FUNCTION  AVR32_SPI1_NPCS_0_0_FUNCTION\r
276 //! @}\r
277 \r
278 \r
279 /*! \name GPIO and SPI Connections of the SD/MMC Connector\r
280  */\r
281 //! @{\r
282 #define SD_MMC_CARD_DETECT_PIN      AVR32_PIN_PA02\r
283 #define SD_MMC_WRITE_PROTECT_PIN    AVR32_PIN_PA07\r
284 #define SD_MMC_SPI                  (&AVR32_SPI1)\r
285 #define SD_MMC_SPI_NPCS             1\r
286 #define SD_MMC_SPI_SCK_PIN          AVR32_SPI1_SCK_0_0_PIN\r
287 #define SD_MMC_SPI_SCK_FUNCTION     AVR32_SPI1_SCK_0_0_FUNCTION\r
288 #define SD_MMC_SPI_MISO_PIN         AVR32_SPI1_MISO_0_0_PIN\r
289 #define SD_MMC_SPI_MISO_FUNCTION    AVR32_SPI1_MISO_0_0_FUNCTION\r
290 #define SD_MMC_SPI_MOSI_PIN         AVR32_SPI1_MOSI_0_0_PIN\r
291 #define SD_MMC_SPI_MOSI_FUNCTION    AVR32_SPI1_MOSI_0_0_FUNCTION\r
292 #define SD_MMC_SPI_NPCS_PIN         AVR32_SPI1_NPCS_1_0_PIN\r
293 #define SD_MMC_SPI_NPCS_FUNCTION    AVR32_SPI1_NPCS_1_0_FUNCTION\r
294 //! @}\r
295 \r
296 \r
297 /*! \name TWI Connections of the Spare TWI Connector\r
298  */\r
299 //! @{\r
300 #define SPARE_TWI                   (&AVR32_TWI)\r
301 #define SPARE_TWI_SCL_PIN           AVR32_TWI_SCL_0_0_PIN\r
302 #define SPARE_TWI_SCL_FUNCTION      AVR32_TWI_SCL_0_0_FUNCTION\r
303 #define SPARE_TWI_SDA_PIN           AVR32_TWI_SDA_0_0_PIN\r
304 #define SPARE_TWI_SDA_FUNCTION      AVR32_TWI_SDA_0_0_FUNCTION\r
305 //! @}\r
306 \r
307 \r
308 /*! \name SPI Connections of the Spare SPI Connector\r
309  */\r
310 //! @{\r
311 #define SPARE_SPI                   (&AVR32_SPI0)\r
312 #define SPARE_SPI_NPCS              0\r
313 #define SPARE_SPI_SCK_PIN           AVR32_SPI0_SCK_0_0_PIN\r
314 #define SPARE_SPI_SCK_FUNCTION      AVR32_SPI0_SCK_0_0_FUNCTION\r
315 #define SPARE_SPI_MISO_PIN          AVR32_SPI0_MISO_0_0_PIN\r
316 #define SPARE_SPI_MISO_FUNCTION     AVR32_SPI0_MISO_0_0_FUNCTION\r
317 #define SPARE_SPI_MOSI_PIN          AVR32_SPI0_MOSI_0_0_PIN\r
318 #define SPARE_SPI_MOSI_FUNCTION     AVR32_SPI0_MOSI_0_0_FUNCTION\r
319 #define SPARE_SPI_NPCS_PIN          AVR32_SPI0_NPCS_0_0_PIN\r
320 #define SPARE_SPI_NPCS_FUNCTION     AVR32_SPI0_NPCS_0_0_FUNCTION\r
321 //! @}\r
322 \r
323 \r
324 #endif  // _EVK1100_REVA_H_\r