Microchip® Advanced Software Framework

evk1101.h File Reference
#include "compiler.h"
#include "led.h"

Macros

#define LED_COUNT   4
 Number of LEDs. More...
 
Oscillator Definitions
#define FOSC32   32768
 Osc32 frequency: Hz. More...
 
#define OSC32_STARTUP   AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC
 Osc32 startup time: RCOsc periods. More...
 
#define FOSC0   12000000
 Osc0 frequency: Hz. More...
 
#define OSC0_STARTUP   AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC
 Osc0 startup time: RCOsc periods. More...
 
Board-specific configuration parameters

The following definitions must be provided by the board code for all working oscillators on the board.

#define BOARD_OSC0_HZ   12000000
 Clock frequency of OSC0 in Hz. More...
 
#define BOARD_OSC0_STARTUP_US   17000
 Startup time of OSC0 in microseconds. More...
 
#define BOARD_OSC0_IS_XTAL   true
 OSC0 uses a crystal, not an external clock. More...
 
#define BOARD_OSC32_HZ   32768
 Clock frequency of OSC32 in Hz. More...
 
#define BOARD_OSC32_STARTUP_US   71000
 Startup time of OSC32 in microseconds. More...
 
#define BOARD_OSC32_IS_XTAL   true
 OSC32 uses a crystal, not an external clock. More...
 
USB Definitions
#define USB_ID   AVR32_USBB_USB_ID_0_0
 Multiplexed pin used for USB_ID: AVR32_USBB_USB_ID_x_x. More...
 
#define USB_VBOF   AVR32_USBB_USB_VBOF_0_0
 Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x. More...
 
#define USB_VBOF_ACTIVE_LEVEL   LOW
 Active level of the USB_VBOF output pin. More...
 
#define USB_OVERCURRENT_DETECT_PIN   AVR32_PIN_PA20
 USB overcurrent detection pin. More...
 
GPIO Connections of LEDs
#define LED0_GPIO   AVR32_PIN_PA07
 
#define LED1_GPIO   AVR32_PIN_PA08
 
#define LED2_GPIO   AVR32_PIN_PA21
 
#define LED3_GPIO   AVR32_PIN_PA22
 
PWM Channels of LEDs
#define LED0_PWM   0
 
#define LED1_PWM   1
 
#define LED2_PWM   2
 
#define LED3_PWM   6
 
PWM Functions of LEDs
#define LED0_PWM_FUNCTION   AVR32_PWM_0_0_FUNCTION
 
#define LED1_PWM_FUNCTION   AVR32_PWM_1_0_FUNCTION
 
#define LED2_PWM_FUNCTION   AVR32_PWM_2_0_FUNCTION
 
#define LED3_PWM_FUNCTION   AVR32_PWM_6_0_FUNCTION
 
Color Identifiers of LEDs to Use with LED Functions
#define LED_MONO0_GREEN   LED0
 
#define LED_MONO1_GREEN   LED1
 
#define LED_MONO2_GREEN   LED2
 
#define LED_MONO3_GREEN   LED3
 
GPIO Connections of Push Buttons
#define GPIO_PUSH_BUTTON_0   AVR32_PIN_PB02
 
#define GPIO_PUSH_BUTTON_0_PRESSED   0
 
#define GPIO_PUSH_BUTTON_1   AVR32_PIN_PB03
 
#define GPIO_PUSH_BUTTON_1_PRESSED   0
 
GPIO Connections of the Joystick
#define GPIO_JOYSTICK_PUSH   AVR32_PIN_PA13
 
#define GPIO_JOYSTICK_PUSH_PRESSED   0
 
#define GPIO_JOYSTICK_LEFT   AVR32_PIN_PB06
 
#define GPIO_JOYSTICK_LEFT_PRESSED   0
 
#define GPIO_JOYSTICK_RIGHT   AVR32_PIN_PB09
 
#define GPIO_JOYSTICK_RIGHT_PRESSED   0
 
#define GPIO_JOYSTICK_UP   AVR32_PIN_PB07
 
#define GPIO_JOYSTICK_UP_PRESSED   0
 
#define GPIO_JOYSTICK_DOWN   AVR32_PIN_PB08
 
#define GPIO_JOYSTICK_DOWN_PRESSED   0
 
ADC Connection of the Temperature Sensor
#define ADC_TEMPERATURE_CHANNEL   7
 
#define ADC_TEMPERATURE_PIN   AVR32_ADC_AD_7_PIN
 
#define ADC_TEMPERATURE_FUNCTION   AVR32_ADC_AD_7_FUNCTION
 
ADC Connection of the Light Sensor
#define ADC_LIGHT_CHANNEL   6
 
#define ADC_LIGHT_PIN   AVR32_ADC_AD_6_PIN
 
#define ADC_LIGHT_FUNCTION   AVR32_ADC_AD_6_FUNCTION
 
ADC Connections of the Accelerometer
#define ADC_ACC_X_CHANNEL   1
 
#define ADC_ACC_X_PIN   AVR32_ADC_AD_1_PIN
 
#define ADC_ACC_X_FUNCTION   AVR32_ADC_AD_1_FUNCTION
 
#define ADC_ACC_Y_CHANNEL   2
 
#define ADC_ACC_Y_PIN   AVR32_ADC_AD_2_PIN
 
#define ADC_ACC_Y_FUNCTION   AVR32_ADC_AD_2_FUNCTION
 
#define ADC_ACC_Z_CHANNEL   3
 
#define ADC_ACC_Z_PIN   AVR32_ADC_AD_3_PIN
 
#define ADC_ACC_Z_FUNCTION   AVR32_ADC_AD_3_FUNCTION
 
PWM Connections of Audio
#define AUDIO_LOW_PWM_CHANNEL   5
 
#define AUDIO_LOW_PWM_PIN   AVR32_PWM_5_0_PIN
 
#define AUDIO_LOW_PWM_FUNCTION   AVR32_PWM_5_0_FUNCTION
 
#define AUDIO_HIGH_PWM_CHANNEL   6
 
#define AUDIO_HIGH_PWM_PIN   AVR32_PWM_6_1_PIN
 
#define AUDIO_HIGH_PWM_FUNCTION   AVR32_PWM_6_1_FUNCTION
 
SPI Connections of the AT45DBX Data Flash Memory
#define AT45DBX_SPI   (&AVR32_SPI)
 
#define AT45DBX_SPI_NPCS   0
 
#define AT45DBX_SPI_SCK_PIN   AVR32_SPI_SCK_0_0_PIN
 
#define AT45DBX_SPI_SCK_FUNCTION   AVR32_SPI_SCK_0_0_FUNCTION
 
#define AT45DBX_SPI_MISO_PIN   AVR32_SPI_MISO_0_0_PIN
 
#define AT45DBX_SPI_MISO_FUNCTION   AVR32_SPI_MISO_0_0_FUNCTION
 
#define AT45DBX_SPI_MOSI_PIN   AVR32_SPI_MOSI_0_0_PIN
 
#define AT45DBX_SPI_MOSI_FUNCTION   AVR32_SPI_MOSI_0_0_FUNCTION
 
#define AT45DBX_SPI_NPCS0_PIN   AVR32_SPI_NPCS_0_0_PIN
 
#define AT45DBX_SPI_NPCS0_FUNCTION   AVR32_SPI_NPCS_0_0_FUNCTION
 
GPIO and SPI Connections of the SD/MMC Connector
#define SD_MMC_SPI_MEM_CNT   1
 
#define SD_MMC_0_CD_GPIO   AVR32_PIN_PB00
 
#define SD_MMC_0_CD_DETECT_VALUE   1
 
#define SD_MMC_0_WP_GPIO   AVR32_PIN_PB01
 
#define SD_MMC_0_WP_DETECT_VALUE   0
 
#define SD_MMC_SPI_0_CS   1
 
#define SD_MMC_CARD_DETECT_PIN   SD_MMC_0_CD_GPIO
 
#define SD_MMC_WRITE_PROTECT_PIN   SD_MMC_0_WP_GPIO
 
#define SD_MMC_SPI_NPCS   SD_MMC_SPI_0_CS
 
#define SD_MMC_SPI   (&AVR32_SPI)
 
#define SD_MMC_SPI_SCK_PIN   AVR32_SPI_SCK_0_0_PIN
 
#define SD_MMC_SPI_SCK_FUNCTION   AVR32_SPI_SCK_0_0_FUNCTION
 
#define SD_MMC_SPI_MISO_PIN   AVR32_SPI_MISO_0_0_PIN
 
#define SD_MMC_SPI_MISO_FUNCTION   AVR32_SPI_MISO_0_0_FUNCTION
 
#define SD_MMC_SPI_MOSI_PIN   AVR32_SPI_MOSI_0_0_PIN
 
#define SD_MMC_SPI_MOSI_FUNCTION   AVR32_SPI_MOSI_0_0_FUNCTION
 
#define SD_MMC_SPI_NPCS_PIN   AVR32_SPI_NPCS_1_0_PIN
 
#define SD_MMC_SPI_NPCS_FUNCTION   AVR32_SPI_NPCS_1_0_FUNCTION
 
USART connection to the UC3B board controller
#define USART   (&AVR32_USART1)
 
#define USART_RXD_PIN   AVR32_USART1_RXD_0_0_PIN
 
#define USART_RXD_FUNCTION   AVR32_USART1_RXD_0_0_FUNCTION
 
#define USART_TXD_PIN   AVR32_USART1_TXD_0_0_PIN
 
#define USART_TXD_FUNCTION   AVR32_USART1_TXD_0_0_FUNCTION
 
#define USART_IRQ   AVR32_USART1_IRQ
 
#define USART_IRQ_GROUP   AVR32_USART1_IRQ_GROUP
 
#define USART_SYSCLK   SYSCLK_USART1
 
TWI Connections of the Spare TWI Connector
#define SPARE_TWI   (&AVR32_TWI)
 
#define SPARE_TWI_SCL_PIN   AVR32_TWI_SCL_0_0_PIN
 
#define SPARE_TWI_SCL_FUNCTION   AVR32_TWI_SCL_0_0_FUNCTION
 
#define SPARE_TWI_SDA_PIN   AVR32_TWI_SDA_0_0_PIN
 
#define SPARE_TWI_SDA_FUNCTION   AVR32_TWI_SDA_0_0_FUNCTION
 
SPI Connections of the Spare SPI Connector
#define SPARE_SPI   (&AVR32_SPI)
 
#define SPARE_SPI_NPCS   2
 
#define SPARE_SPI_SCK_PIN   AVR32_SPI_SCK_0_0_PIN
 
#define SPARE_SPI_SCK_FUNCTION   AVR32_SPI_SCK_0_0_FUNCTION
 
#define SPARE_SPI_MISO_PIN   AVR32_SPI_MISO_0_0_PIN
 
#define SPARE_SPI_MISO_FUNCTION   AVR32_SPI_MISO_0_0_FUNCTION
 
#define SPARE_SPI_MOSI_PIN   AVR32_SPI_MOSI_0_0_PIN
 
#define SPARE_SPI_MOSI_FUNCTION   AVR32_SPI_MOSI_0_0_FUNCTION
 
#define SPARE_SPI_NPCS_PIN   AVR32_SPI_NPCS_2_0_PIN
 
#define SPARE_SPI_NPCS_FUNCTION   AVR32_SPI_NPCS_2_0_FUNCTION
 

#define ADC_ACC_X_CHANNEL   1
#define ADC_ACC_X_FUNCTION   AVR32_ADC_AD_1_FUNCTION
#define ADC_ACC_X_PIN   AVR32_ADC_AD_1_PIN
#define ADC_ACC_Y_CHANNEL   2
#define ADC_ACC_Y_FUNCTION   AVR32_ADC_AD_2_FUNCTION
#define ADC_ACC_Y_PIN   AVR32_ADC_AD_2_PIN
#define ADC_ACC_Z_CHANNEL   3
#define ADC_ACC_Z_FUNCTION   AVR32_ADC_AD_3_FUNCTION
#define ADC_ACC_Z_PIN   AVR32_ADC_AD_3_PIN
#define ADC_LIGHT_CHANNEL   6
#define ADC_LIGHT_FUNCTION   AVR32_ADC_AD_6_FUNCTION
#define ADC_LIGHT_PIN   AVR32_ADC_AD_6_PIN
#define ADC_TEMPERATURE_CHANNEL   7
#define ADC_TEMPERATURE_FUNCTION   AVR32_ADC_AD_7_FUNCTION
#define ADC_TEMPERATURE_PIN   AVR32_ADC_AD_7_PIN
#define AT45DBX_SPI   (&AVR32_SPI)
#define AT45DBX_SPI_MISO_FUNCTION   AVR32_SPI_MISO_0_0_FUNCTION

Referenced by board_init().

#define AT45DBX_SPI_MISO_PIN   AVR32_SPI_MISO_0_0_PIN

Referenced by board_init().

#define AT45DBX_SPI_MOSI_FUNCTION   AVR32_SPI_MOSI_0_0_FUNCTION

Referenced by board_init().

#define AT45DBX_SPI_MOSI_PIN   AVR32_SPI_MOSI_0_0_PIN

Referenced by board_init().

#define AT45DBX_SPI_NPCS   0
#define AT45DBX_SPI_NPCS0_FUNCTION   AVR32_SPI_NPCS_0_0_FUNCTION
#define AT45DBX_SPI_NPCS0_PIN   AVR32_SPI_NPCS_0_0_PIN
#define AT45DBX_SPI_SCK_FUNCTION   AVR32_SPI_SCK_0_0_FUNCTION

Referenced by board_init().

#define AT45DBX_SPI_SCK_PIN   AVR32_SPI_SCK_0_0_PIN

Referenced by board_init().

#define AUDIO_HIGH_PWM_CHANNEL   6
#define AUDIO_HIGH_PWM_FUNCTION   AVR32_PWM_6_1_FUNCTION
#define AUDIO_HIGH_PWM_PIN   AVR32_PWM_6_1_PIN
#define AUDIO_LOW_PWM_CHANNEL   5
#define AUDIO_LOW_PWM_FUNCTION   AVR32_PWM_5_0_FUNCTION
#define AUDIO_LOW_PWM_PIN   AVR32_PWM_5_0_PIN
#define FOSC0   12000000

Osc0 frequency: Hz.

#define FOSC32   32768

Osc32 frequency: Hz.

#define GPIO_JOYSTICK_DOWN   AVR32_PIN_PB08

Referenced by board_init().

#define GPIO_JOYSTICK_DOWN_PRESSED   0
#define GPIO_JOYSTICK_LEFT   AVR32_PIN_PB06

Referenced by board_init().

#define GPIO_JOYSTICK_LEFT_PRESSED   0
#define GPIO_JOYSTICK_PUSH   AVR32_PIN_PA13

Referenced by board_init().

#define GPIO_JOYSTICK_PUSH_PRESSED   0
#define GPIO_JOYSTICK_RIGHT   AVR32_PIN_PB09
#define GPIO_JOYSTICK_RIGHT_PRESSED   0
#define GPIO_JOYSTICK_UP   AVR32_PIN_PB07

Referenced by board_init().

#define GPIO_JOYSTICK_UP_PRESSED   0
#define GPIO_PUSH_BUTTON_0   AVR32_PIN_PB02

Referenced by board_init().

#define GPIO_PUSH_BUTTON_0_PRESSED   0
#define GPIO_PUSH_BUTTON_1   AVR32_PIN_PB03

Referenced by board_init().

#define GPIO_PUSH_BUTTON_1_PRESSED   0
#define LED0_GPIO   AVR32_PIN_PA07

Referenced by board_init().

#define LED0_PWM   0
#define LED0_PWM_FUNCTION   AVR32_PWM_0_0_FUNCTION
#define LED1_GPIO   AVR32_PIN_PA08

Referenced by board_init().

#define LED1_PWM   1
#define LED1_PWM_FUNCTION   AVR32_PWM_1_0_FUNCTION
#define LED2_GPIO   AVR32_PIN_PA21

Referenced by board_init().

#define LED2_PWM   2
#define LED2_PWM_FUNCTION   AVR32_PWM_2_0_FUNCTION
#define LED3_GPIO   AVR32_PIN_PA22

Referenced by board_init().

#define LED3_PWM   6
#define LED3_PWM_FUNCTION   AVR32_PWM_6_0_FUNCTION
#define LED_COUNT   4
#define LED_MONO0_GREEN   LED0
#define LED_MONO1_GREEN   LED1
#define LED_MONO2_GREEN   LED2
#define LED_MONO3_GREEN   LED3
#define OSC0_STARTUP   AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC

Osc0 startup time: RCOsc periods.

#define OSC32_STARTUP   AVR32_PM_OSCCTRL32_STARTUP_8192_RCOSC

Osc32 startup time: RCOsc periods.

#define SD_MMC_0_CD_DETECT_VALUE   1
#define SD_MMC_0_CD_GPIO   AVR32_PIN_PB00
#define SD_MMC_0_WP_DETECT_VALUE   0
#define SD_MMC_0_WP_GPIO   AVR32_PIN_PB01
#define SD_MMC_CARD_DETECT_PIN   SD_MMC_0_CD_GPIO
#define SD_MMC_SPI   (&AVR32_SPI)

Referenced by memories_initialization().

#define SD_MMC_SPI_0_CS   1
#define SD_MMC_SPI_MEM_CNT   1

Referenced by board_init().

#define SD_MMC_SPI_MISO_FUNCTION   AVR32_SPI_MISO_0_0_FUNCTION

Referenced by board_init().

#define SD_MMC_SPI_MISO_PIN   AVR32_SPI_MISO_0_0_PIN

Referenced by board_init().

#define SD_MMC_SPI_MOSI_FUNCTION   AVR32_SPI_MOSI_0_0_FUNCTION

Referenced by board_init().

#define SD_MMC_SPI_MOSI_PIN   AVR32_SPI_MOSI_0_0_PIN

Referenced by board_init().

#define SD_MMC_SPI_NPCS   SD_MMC_SPI_0_CS

Referenced by memories_initialization().

#define SD_MMC_SPI_NPCS_FUNCTION   AVR32_SPI_NPCS_1_0_FUNCTION

Referenced by board_init().

#define SD_MMC_SPI_NPCS_PIN   AVR32_SPI_NPCS_1_0_PIN

Referenced by board_init().

#define SD_MMC_SPI_SCK_FUNCTION   AVR32_SPI_SCK_0_0_FUNCTION

Referenced by board_init().

#define SD_MMC_SPI_SCK_PIN   AVR32_SPI_SCK_0_0_PIN

Referenced by board_init().

#define SD_MMC_WRITE_PROTECT_PIN   SD_MMC_0_WP_GPIO
#define SPARE_SPI   (&AVR32_SPI)
#define SPARE_SPI_MISO_FUNCTION   AVR32_SPI_MISO_0_0_FUNCTION
#define SPARE_SPI_MISO_PIN   AVR32_SPI_MISO_0_0_PIN
#define SPARE_SPI_MOSI_FUNCTION   AVR32_SPI_MOSI_0_0_FUNCTION
#define SPARE_SPI_MOSI_PIN   AVR32_SPI_MOSI_0_0_PIN
#define SPARE_SPI_NPCS   2
#define SPARE_SPI_NPCS_FUNCTION   AVR32_SPI_NPCS_2_0_FUNCTION
#define SPARE_SPI_NPCS_PIN   AVR32_SPI_NPCS_2_0_PIN
#define SPARE_SPI_SCK_FUNCTION   AVR32_SPI_SCK_0_0_FUNCTION
#define SPARE_SPI_SCK_PIN   AVR32_SPI_SCK_0_0_PIN
#define SPARE_TWI   (&AVR32_TWI)
#define SPARE_TWI_SCL_FUNCTION   AVR32_TWI_SCL_0_0_FUNCTION
#define SPARE_TWI_SCL_PIN   AVR32_TWI_SCL_0_0_PIN
#define SPARE_TWI_SDA_FUNCTION   AVR32_TWI_SDA_0_0_FUNCTION
#define SPARE_TWI_SDA_PIN   AVR32_TWI_SDA_0_0_PIN
#define USART   (&AVR32_USART1)
#define USART_IRQ   AVR32_USART1_IRQ

Referenced by uart_open().

#define USART_IRQ_GROUP   AVR32_USART1_IRQ_GROUP
#define USART_RXD_FUNCTION   AVR32_USART1_RXD_0_0_FUNCTION

Referenced by board_init().

#define USART_RXD_PIN   AVR32_USART1_RXD_0_0_PIN

Referenced by board_init().

#define USART_SYSCLK   SYSCLK_USART1

Referenced by uart_open().

#define USART_TXD_FUNCTION   AVR32_USART1_TXD_0_0_FUNCTION

Referenced by board_init().

#define USART_TXD_PIN   AVR32_USART1_TXD_0_0_PIN

Referenced by board_init().

#define USB_ID   AVR32_USBB_USB_ID_0_0

Multiplexed pin used for USB_ID: AVR32_USBB_USB_ID_x_x.

To be selected according to the AVR32_USBB_USB_ID_x_x_PIN and AVR32_USBB_USB_ID_x_x_FUNCTION definitions from <avr32/uc3bxxxx.h>.

#define USB_OVERCURRENT_DETECT_PIN   AVR32_PIN_PA20

USB overcurrent detection pin.

#define USB_VBOF   AVR32_USBB_USB_VBOF_0_0

Multiplexed pin used for USB_VBOF: AVR32_USBB_USB_VBOF_x_x.

To be selected according to the AVR32_USBB_USB_VBOF_x_x_PIN and AVR32_USBB_USB_VBOF_x_x_FUNCTION definitions from <avr32/uc3bxxxx.h>.

#define USB_VBOF_ACTIVE_LEVEL   LOW

Active level of the USB_VBOF output pin.