]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/AtmelFiles/target/sama5d2/board_sama5d2-vb-bga196.h
Add SAMA5D2 Xplained IAR demo.
[freertos] / FreeRTOS / Demo / CORTEX_A5_SAMA5D2x_Xplained_IAR / AtmelFiles / target / sama5d2 / board_sama5d2-vb-bga196.h
diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/AtmelFiles/target/sama5d2/board_sama5d2-vb-bga196.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/AtmelFiles/target/sama5d2/board_sama5d2-vb-bga196.h
new file mode 100644 (file)
index 0000000..1126e3c
--- /dev/null
@@ -0,0 +1,185 @@
+/**\r
+ * \page sama5d2_xult_board_desc sama5d2-XULT - Board Description\r
+ *\r
+ * \section Purpose\r
+ *\r
+ * This file is dedicated to describe the sama5d2-XULT board.\r
+ *\r
+ * \section Contents\r
+ *\r
+ *  - sama5d2-XULT\r
+ *  - For sama5d2-XULT information, see \subpage sama5d2_xult_board_info.\r
+ *  - For operating frequency information, see \subpage sama5d2_xult_opfreq.\r
+ *  - For using portable PIO definitions, see \subpage sama5d2_xult_piodef.\r
+ *  - For on-board memories, see \subpage sama5d2_xult_mem.\r
+ *  - Several USB definitions are included here, see \subpage sama5d2_xult_usb.\r
+ *  - For External components, see \subpage sama5d2_xult_extcomp.\r
+ *  - For Individual chip definition, see \subpage sama5d2_xult_chipdef.\r
+ *\r
+ * To get more software details and the full list of parameters related to the\r
+ * sama5d2-XULT board configuration, please have a look at the source file:\r
+ * \ref board.h\n\r
+ *\r
+ * \section Usage\r
+ *\r
+ *  - The code for booting the board is provided by board_cstartup_xxx.c and\r
+ *    board_lowlevel.c.\r
+ *  - For using board PIOs, board characteristics (clock, etc.) and external\r
+ *    components, see board.h.\r
+ *  - For manipulating memories, see board_memories.h.\r
+ *\r
+ * This file can be used as a template and modified to fit a custom board, with\r
+ * specific PIOs usage or memory connections.\r
+ */\r
+\r
+/**\r
+ *  \file board.h\r
+ *\r
+ *  Definition of sama5d2-xb\r
+ *  characteristics, sama5d2-dependant PIOs and external components interfacing.\r
+ */\r
+\r
+#ifndef _BOARD_D2_H\r
+#define _BOARD_D2_H\r
+\r
+/*----------------------------------------------------------------------------\r
+ *        Headers\r
+ *----------------------------------------------------------------------------*/\r
+\r
+#include "chip.h"\r
+\r
+#include "board_lowlevel.h"\r
+#include "board_memories.h"\r
+\r
+/*----------------------------------------------------------------------------\r
+ *        HW BOARD Definitions\r
+ *----------------------------------------------------------------------------*/\r
+\r
+/**\r
+ * \page sama5d2_vb_board_info "sama5d2-vb - Board informations"\r
+ * This page lists several definition related to the board description.\r
+ *\r
+ * \section Definitions\r
+ * - \ref BOARD_NAME\r
+ */\r
+\r
+/** Name of the board */\r
+#define BOARD_NAME "sama5d2-vb-bga196"\r
+\r
+/*----------------------------------------------------------------------------*/\r
+/**\r
+ *  \page sama5d2_xult_opfreq "sama5d2-XULT - Operating frequencies"\r
+ *  This page lists several definition related to the board operating frequency\r
+ *  (when using the initialization done by board_lowlevel.c).\r
+ */\r
+\r
+/** Frequency of the board slow clock oscillator */\r
+#define BOARD_SLOW_CLOCK_EXT_OSC 32768\r
+\r
+/** Frequency of the board main clock oscillator */\r
+#define BOARD_MAIN_CLOCK_EXT_OSC 12000000\r
+\r
+/** \def Board PIT tick resolution */\r
+#define BOARD_TIMER_RESOLUTION   1000\r
+\r
+/* =================== PIN CONSOLE definition ================== */\r
+\r
+/** CONSOLE pin definition, Use only UART */\r
+#define PINS_CONSOLE            PINS_UART0_IOS1\r
+#define CONSOLE_PER_ADD         UART0\r
+#define CONSOLE_ID              ID_UART0\r
+#define CONSOLE_BAUDRATE        57600\r
+#define CONSOLE_DRIVER          DRV_UART\r
+\r
+/* =================== PIN LED definition ====================== */\r
+\r
+/* RGB LED index */\r
+#define LED_RED   0    /* led red shared with SDMMC0 (eMMC) card detect used only by RomBoot */\r
+#define LED_GREEN 1\r
+#define LED_BLUE  2\r
+\r
+/** LED #0 pin definition (Red). */\r
+#define PIN_LED_0       { PIO_GROUP_D, PIO_PD21, PIO_OUTPUT_0, PIO_OPENDRAIN }\r
+\r
+/** LED #1 pin definition (Green). */\r
+#define PIN_LED_1       { PIO_GROUP_D, PIO_PD22, PIO_OUTPUT_0, PIO_OPENDRAIN }\r
+\r
+/** List of all LEDs definitions. */\r
+#define PINS_LEDS       { PIN_LED_0, PIN_LED_1 }\r
+\r
+/* =================== PIN PUSH BUTTON definition ============== */\r
+\r
+#define PIO_CFG_PB  (PIO_PULLUP | PIO_DEBOUNCE)\r
+\r
+#define PIN_PUSHBUTTON_1 { PIO_GROUP_D, PIO_PD19, PIO_INPUT, PIO_CFG_PB }\r
+\r
+#define PIN_PUSHBUTTON_2 { PIO_GROUP_D, PIO_PD20, PIO_INPUT, PIO_CFG_PB }\r
+\r
+/** List of all push button definitions. */\r
+#define PINS_PUSHBUTTONS { PIN_PUSHBUTTON_1, PIN_PUSHBUTTON_2 }\r
+\r
+/** Push button index. */\r
+#define PUSHBUTTON_BP1 0\r
+#define PUSHBUTTON_BP2 1\r
+\r
+/* ================== PIN USB definition ======================= */\r
+\r
+/** USB VBus pin */\r
+#define PIN_USB_VBUS      {\\r
+       { PIO_GROUP_A, PIO_PA31, PIO_INPUT, PIO_DEFAULT },\\r
+}\r
+/** USB OverCurrent detection*/\r
+#define PIN_USB_OVCUR     {\\r
+       { PIO_GROUP_A, PIO_PA29, PIO_INPUT, PIO_DEFAULT },\\r
+}\r
+/** USB Power Enable A, Active high */\r
+#define PIN_USB_POWER_ENA {\\r
+       { PIO_GROUP_B, PIO_PB9, PIO_OUTPUT_0, PIO_DEFAULT },\\r
+}\r
+/** USB Power Enable B, Active high  */\r
+#define PIN_USB_POWER_ENB {\\r
+       { PIO_GROUP_B, PIO_PB10, PIO_OUTPUT_0, PIO_DEFAULT },\\r
+}\r
+\r
+/* ================= PIN LCD IRQ definition ===================== */\r
+\r
+#define PIO_CFG_LCD_IRQ  (PIO_PULLUP | PIO_IT_FALL_EDGE)\r
+\r
+#define PIN_QT1070_IRQ {\\r
+       { PIO_GROUP_B, PIO_PB7, PIO_INPUT, PIO_CFG_LCD_IRQ },\\r
+}\r
+#define PIN_MXT336S_IRQ {\\r
+       { PIO_GROUP_B, PIO_PB8, PIO_INPUT, PIO_CFG_LCD_IRQ },\\r
+}\r
+#define PIN_MXT768E_IRQ        {\\r
+       { PIO_GROUP_B, PIO_PB8, PIO_INPUT, PIO_CFG_LCD_IRQ },\\r
+}\r
+\r
+/* =================== PIN ISC definition ======================= */\r
+\r
+#define PIN_ISC_RST    {\\r
+       { PIO_GROUP_B, PIO_PB11, PIO_OUTPUT_1, PIO_DEFAULT },\\r
+}\r
+#define PIN_ISC_PWD    {\\r
+       { PIO_GROUP_B, PIO_PB12, PIO_OUTPUT_1, PIO_DEFAULT  },\\r
+}\r
+\r
+/* =================== PIN SDMMC definition ===================== */\r
+\r
+#define SDMMC0_PINS  { PINS_SDMMC0_4B_IOS1, PIN_SDMMC0_CK_IOS1,\\r
+                       PIN_SDMMC0_CD_IOS1, PIN_SDMMC0_RSTN_IOS1,\\r
+                       PIN_SDMMC0_WP_IOS1 }\r
+\r
+/* =================== PIN CAN definition ======================= */\r
+/* CAN0 {PC1; PC2} is wired to the J18 connector via an AT6561 transceiver. */\r
+\r
+#define CAN0_PINS          PINS_CAN0_IOS0\r
+\r
+/* =================== NANDFLASH device definition =================== */\r
+\r
+#define BOARD_NANDFLASH_PINS      PINS_NFC_IOS1\r
+#define BOARD_NANDFLASH_ADDR      EBI_CS3_ADDR\r
+#define BOARD_NANDFLASH_CS        3\r
+#define BOARD_NANDFLASH_BUS_WIDTH 8\r
+\r
+#endif /* #ifndef _BOARD_D2_H */\r