1 /*This file is prepared for Doxygen automatic documentation generation.*/
\r
2 /*! \file *********************************************************************
\r
4 * \brief AT32UC3A EVK1100 board header file.
\r
6 * This file contains definitions and services related to the features of the
\r
9 * - Compiler: IAR EWAVR32 and GNU GCC for AVR32
\r
10 * - Supported devices: All AVR32 AT32UC3A devices can be used.
\r
13 * \author Atmel Corporation: http://www.atmel.com \n
\r
14 * Support and FAQ: http://support.atmel.no/
\r
16 ******************************************************************************/
\r
18 /* Copyright (c) 2007, Atmel Corporation All rights reserved.
\r
20 * Redistribution and use in source and binary forms, with or without
\r
21 * modification, are permitted provided that the following conditions are met:
\r
23 * 1. Redistributions of source code must retain the above copyright notice,
\r
24 * this list of conditions and the following disclaimer.
\r
26 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
27 * this list of conditions and the following disclaimer in the documentation
\r
28 * and/or other materials provided with the distribution.
\r
30 * 3. The name of ATMEL may not be used to endorse or promote products derived
\r
31 * from this software without specific prior written permission.
\r
33 * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
\r
34 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
35 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
\r
36 * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
\r
37 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
\r
38 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
\r
39 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
\r
40 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
41 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
\r
42 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
49 #include "compiler.h"
\r
51 #ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
\r
53 #endif // __AVR32_ABI_COMPILER__
\r
56 /*! \name Oscillator Definitions
\r
60 // RCOsc has no custom calibration by default. Set the following definition to
\r
61 // the appropriate value if a custom RCOsc calibration has been applied to your
\r
63 //#define FRCOSC 115200 //!< RCOsc frequency: Hz.
\r
65 #define FOSC32 32768 //!< Osc32 frequency: Hz.
\r
66 #define OSC32_STARTUP 3 //!< Osc32 startup time: RCOsc periods.
\r
68 #define FOSC0 12000000 //!< Osc0 frequency: Hz.
\r
69 #define OSC0_STARTUP 3 //!< Osc0 startup time: RCOsc periods.
\r
71 // Osc1 crystal is not mounted by default. Set the following definitions to the
\r
72 // appropriate values if a custom Osc1 crystal is mounted on your board.
\r
73 //#define FOSC1 12000000 //!< Osc1 frequency: Hz.
\r
74 //#define OSC1_STARTUP 3 //!< Osc1 startup time: RCOsc periods.
\r
79 /*! \name SDRAM Definitions
\r
83 //! Part header file of used SDRAM(s).
\r
84 #define SDRAM_PART_HDR "MT48LC16M16A2TG7E/mt48lc16m16a2tg7e.h"
\r
86 //! Data bus width to use the SDRAM(s) with (16 or 32 bits; always 16 bits on
\r
88 #define SDRAM_DBW 16
\r
93 /*! \name USB Definitions
\r
97 //! Multiplexed pin used for USB_ID: AVR32_USBB_USB_ID_x_x.
\r
98 //! To be selected according to the AVR32_USBB_USB_ID_x_x_PIN and
\r
99 //! AVR32_USBB_USB_ID_x_x_FUNCTION definitions from <avr32/uc3axxxx.h>.
\r
100 #define USB_ID AVR32_USBB_USB_ID_0_0
\r
102 //! Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.
\r
103 //! To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and
\r
104 //! AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3axxxx.h>.
\r
105 #ifdef EVK1100_REVA
\r
106 # define USB_VBOF AVR32_USBB_USB_VBOF_0_0
\r
108 # define USB_VBOF AVR32_USBB_USB_VBOF_0_1
\r
111 //! Active level of the USB_VBOF output pin.
\r
112 #ifdef EVK1100_REVA
\r
113 # define USB_VBOF_ACTIVE_LEVEL HIGH
\r
115 # define USB_VBOF_ACTIVE_LEVEL LOW
\r
118 //! USB overcurrent detection pin.
\r
119 #ifdef EVK1100_REVA
\r
120 # define USB_OVERCURRENT_DETECT_PIN AVR32_PIN_PB18
\r
122 # define USB_OVERCURRENT_DETECT_PIN AVR32_PIN_PX33
\r
128 //! GPIO connection of the MAC PHY PWR_DOWN/INT signal.
\r
129 #ifdef EVK1100_REVA
\r
130 # define MACB_INTERRUPT_PIN AVR32_PIN_PX12
\r
132 # define MACB_INTERRUPT_PIN AVR32_PIN_PA24
\r
136 //! Number of LEDs.
\r
137 #define LED_COUNT 8
\r
139 /*! \name GPIO Connections of LEDs
\r
142 #ifdef EVK1100_REVA
\r
143 # define LED0_GPIO AVR32_PIN_PX13
\r
144 # define LED1_GPIO AVR32_PIN_PX14
\r
145 # define LED2_GPIO AVR32_PIN_PX15
\r
146 # define LED3_GPIO AVR32_PIN_PX16
\r
147 # define LED4_GPIO AVR32_PIN_PB19
\r
148 # define LED5_GPIO AVR32_PIN_PB20
\r
149 # define LED6_GPIO AVR32_PIN_PB21
\r
150 # define LED7_GPIO AVR32_PIN_PB22
\r
152 # define LED0_GPIO AVR32_PIN_PB27
\r
153 # define LED1_GPIO AVR32_PIN_PB28
\r
154 # define LED2_GPIO AVR32_PIN_PB29
\r
155 # define LED3_GPIO AVR32_PIN_PB30
\r
156 # define LED4_GPIO AVR32_PIN_PB19
\r
157 # define LED5_GPIO AVR32_PIN_PB20
\r
158 # define LED6_GPIO AVR32_PIN_PB21
\r
159 # define LED7_GPIO AVR32_PIN_PB22
\r
163 /*! \name PWM Channels of LEDs
\r
166 #define LED0_PWM (-1)
\r
167 #define LED1_PWM (-1)
\r
168 #define LED2_PWM (-1)
\r
169 #define LED3_PWM (-1)
\r
176 /*! \name PWM Functions of LEDs
\r
179 #define LED0_PWM_FUNCTION (-1)
\r
180 #define LED1_PWM_FUNCTION (-1)
\r
181 #define LED2_PWM_FUNCTION (-1)
\r
182 #define LED3_PWM_FUNCTION (-1)
\r
183 #define LED4_PWM_FUNCTION AVR32_PWM_PWM_0_FUNCTION
\r
184 #define LED5_PWM_FUNCTION AVR32_PWM_PWM_1_FUNCTION
\r
185 #define LED6_PWM_FUNCTION AVR32_PWM_PWM_2_FUNCTION
\r
186 #define LED7_PWM_FUNCTION AVR32_PWM_PWM_3_FUNCTION
\r
189 /*! \name Color Identifiers of LEDs to Use with LED Functions
\r
192 #ifdef EVK1100_REVA
\r
193 # define LED_MONO0_GREEN LED4
\r
194 # define LED_MONO1_GREEN LED5
\r
195 # define LED_MONO2_GREEN LED6
\r
196 # define LED_MONO3_GREEN LED7
\r
197 # define LED_BI0_GREEN LED1
\r
198 # define LED_BI0_RED LED0
\r
199 # define LED_BI1_GREEN LED3
\r
200 # define LED_BI1_RED LED2
\r
202 # define LED_MONO0_GREEN LED0
\r
203 # define LED_MONO1_GREEN LED1
\r
204 # define LED_MONO2_GREEN LED2
\r
205 # define LED_MONO3_GREEN LED3
\r
206 # define LED_BI0_GREEN LED5
\r
207 # define LED_BI0_RED LED4
\r
208 # define LED_BI1_GREEN LED7
\r
209 # define LED_BI1_RED LED6
\r
214 /*! \name GPIO Connections of Push Buttons
\r
217 #ifdef EVK1100_REVA
\r
218 # define GPIO_PUSH_BUTTON_0 AVR32_PIN_PB28
\r
219 # define GPIO_PUSH_BUTTON_1 AVR32_PIN_PB29
\r
220 # define GPIO_PUSH_BUTTON_2 AVR32_PIN_PB27
\r
222 # define GPIO_PUSH_BUTTON_0 AVR32_PIN_PX16
\r
223 # define GPIO_PUSH_BUTTON_1 AVR32_PIN_PX19
\r
224 # define GPIO_PUSH_BUTTON_2 AVR32_PIN_PX22
\r
229 /*! \name GPIO Connections of the Joystick
\r
232 #define GPIO_JOYSTICK_PUSH AVR32_PIN_PA20
\r
233 #define GPIO_JOYSTICK_LEFT AVR32_PIN_PA25
\r
234 #define GPIO_JOYSTICK_RIGHT AVR32_PIN_PA28
\r
235 #define GPIO_JOYSTICK_UP AVR32_PIN_PA26
\r
236 #define GPIO_JOYSTICK_DOWN AVR32_PIN_PA27
\r
240 /*! \name ADC Connection of the Potentiometer
\r
243 #define ADC_POTENTIOMETER_CHANNEL 1
\r
244 #define ADC_POTENTIOMETER_PIN AVR32_ADC_AD_1_PIN
\r
245 #define ADC_POTENTIOMETER_FUNCTION AVR32_ADC_AD_1_FUNCTION
\r
249 /*! \name ADC Connection of the Temperature Sensor
\r
252 #define ADC_TEMPERATURE_CHANNEL 0
\r
253 #define ADC_TEMPERATURE_PIN AVR32_ADC_AD_0_PIN
\r
254 #define ADC_TEMPERATURE_FUNCTION AVR32_ADC_AD_0_FUNCTION
\r
258 /*! \name ADC Connection of the Light Sensor
\r
261 #define ADC_LIGHT_CHANNEL 2
\r
262 #define ADC_LIGHT_PIN AVR32_ADC_AD_2_PIN
\r
263 #define ADC_LIGHT_FUNCTION AVR32_ADC_AD_2_FUNCTION
\r
267 /*! \name SPI Connections of the DIP204 LCD
\r
270 #define DIP204_SPI (&AVR32_SPI1)
\r
271 #define DIP204_SPI_CS 2
\r
272 #define DIP204_SPI_SCK_PIN AVR32_SPI1_SCK_0_PIN
\r
273 #define DIP204_SPI_SCK_FUNCTION AVR32_SPI1_SCK_0_FUNCTION
\r
274 #define DIP204_SPI_MISO_PIN AVR32_SPI1_MISO_0_PIN
\r
275 #define DIP204_SPI_MISO_FUNCTION AVR32_SPI1_MISO_0_FUNCTION
\r
276 #define DIP204_SPI_MOSI_PIN AVR32_SPI1_MOSI_0_PIN
\r
277 #define DIP204_SPI_MOSI_FUNCTION AVR32_SPI1_MOSI_0_FUNCTION
\r
278 #define DIP204_SPI_NPCS_PIN AVR32_SPI1_NPCS_2_PIN
\r
279 #define DIP204_SPI_NPCS_FUNCTION AVR32_SPI1_NPCS_2_FUNCTION
\r
282 /*! \name GPIO and PWM Connections of the DIP204 LCD Backlight
\r
285 #define DIP204_BACKLIGHT_PIN AVR32_PIN_PB18
\r
286 #define DIP204_PWM_CHANNEL 6
\r
287 #define DIP204_PWM_PIN AVR32_PWM_PWM_6_PIN
\r
288 #define DIP204_PWM_FUNCTION AVR32_PWM_PWM_6_FUNCTION
\r
292 /*! \name SPI Connections of the AT45DBX Data Flash Memory
\r
295 #define AT45DBX_SPI (&AVR32_SPI1)
\r
296 #define AT45DBX_SPI_SCK_PIN AVR32_SPI1_SCK_0_PIN
\r
297 #define AT45DBX_SPI_SCK_FUNCTION AVR32_SPI1_SCK_0_FUNCTION
\r
298 #define AT45DBX_SPI_MISO_PIN AVR32_SPI1_MISO_0_PIN
\r
299 #define AT45DBX_SPI_MISO_FUNCTION AVR32_SPI1_MISO_0_FUNCTION
\r
300 #define AT45DBX_SPI_MOSI_PIN AVR32_SPI1_MOSI_0_PIN
\r
301 #define AT45DBX_SPI_MOSI_FUNCTION AVR32_SPI1_MOSI_0_FUNCTION
\r
302 #define AT45DBX_SPI_NPCS0_PIN AVR32_SPI1_NPCS_0_PIN
\r
303 #define AT45DBX_SPI_NPCS0_FUNCTION AVR32_SPI1_NPCS_0_FUNCTION
\r
307 /*! \name GPIO and SPI Connections of the SD/MMC Connector
\r
310 #define SD_MMC_CARD_DETECT_PIN AVR32_PIN_PA02
\r
311 #define SD_MMC_WRITE_PROTECT_PIN AVR32_PIN_PA07
\r
312 #define SD_MMC_SPI (&AVR32_SPI1)
\r
313 #define SD_MMC_SPI_CS 1
\r
314 #define SD_MMC_SPI_SCK_PIN AVR32_SPI1_SCK_0_PIN
\r
315 #define SD_MMC_SPI_SCK_FUNCTION AVR32_SPI1_SCK_0_FUNCTION
\r
316 #define SD_MMC_SPI_MISO_PIN AVR32_SPI1_MISO_0_PIN
\r
317 #define SD_MMC_SPI_MISO_FUNCTION AVR32_SPI1_MISO_0_FUNCTION
\r
318 #define SD_MMC_SPI_MOSI_PIN AVR32_SPI1_MOSI_0_PIN
\r
319 #define SD_MMC_SPI_MOSI_FUNCTION AVR32_SPI1_MOSI_0_FUNCTION
\r
320 #define SD_MMC_SPI_NPCS_PIN AVR32_SPI1_NPCS_1_PIN
\r
321 #define SD_MMC_SPI_NPCS_FUNCTION AVR32_SPI1_NPCS_1_FUNCTION
\r
325 #endif // _EVK1100_H_
\r