Board.h

00001 /*----------------------------------------------------------------------------
00002 *         ATMEL Microcontroller Software Support  -  ROUSSET  -
00003 *----------------------------------------------------------------------------
00004 * The software is delivered "AS IS" without warranty or condition of any
00005 * kind, either express, implied or statutory. This includes without
00006 * limitation any warranty or condition with respect to merchantability or
00007 * fitness for any particular purpose, or against the infringements of
00008 * intellectual property rights of others.
00009 *----------------------------------------------------------------------------
00010 * File Name           : Board.h
00011 * Object              : AT91SAM7S Evaluation Board Features Definition File.
00012 *
00013 * Creation            : JPP   16/Jun/2004
00014 * V 1.0 21/Feb/05 JPP : Define __ramfunc
00015 * V 1.1 21/Feb/05 JPP : add Lib definition
00016 * V 1.2 22/Feb/05 JPP : Add DBGU inline definition
00017 *----------------------------------------------------------------------------
00018 */
00019 #ifndef Board_h
00020 #define Board_h
00021 
00022 #include "AT91SAM7S64.h"
00023 #define __inline static inline
00024 #include "lib_AT91SAM7S64.h"
00025 
00026 #define __ramfunc
00027 
00028 #define AT91C_US_ASYNC_MODE ( AT91C_US_USMODE_NORMAL + AT91C_US_NBSTOP_1_BIT + AT91C_US_PAR_NONE + AT91C_US_CHRL_8_BITS + AT91C_US_CLKS_CLOCK )
00029 
00030 #define true    -1
00031 #define false   0
00032 
00033 /*-------------------------------*/
00034 /* SAM7Board Memories Definition */
00035 /*-------------------------------*/
00036 // The AT91SAM7S64 embeds a 16-Kbyte SRAM bank, and 64 K-Byte Flash
00037 
00038 #define  INT_SARM           0x00200000
00039 #define  INT_SARM_REMAP     0x00000000
00040 
00041 #define  INT_FLASH          0x00000000
00042 #define  INT_FLASH_REMAP    0x01000000
00043 
00044 #define  FLASH_PAGE_NB      512
00045 #define  FLASH_PAGE_LOCK    32
00046 #define  FLASH_PAGE_SIZE    128
00047 
00048 /*-----------------*/
00049 /* Leds Definition */
00050 /*-----------------*/
00051 /*                                 PIO   Flash    PA    PB   PIN */
00052 #define LED1            (1<<0)  /* PA0 / PGMEN0 & PWM0 TIOA0  48 */
00053 #define LED2            (1<<1)  /* PA1 / PGMEN1 & PWM1 TIOB0  47 */
00054 #define LED3            (1<<2)  /* PA2          & PWM2 SCK0   44 */
00055 #define LED4            (1<<3)  /* PA3          & TWD  NPCS3  43 */
00056 #define NB_LEB                  4
00057 
00058 #define LED_MASK        (LED1|LED2|LED3|LED4)
00059 
00060 /*-------------------------*/
00061 /* Push Buttons Definition */
00062 /*-------------------------*/
00063 /*                                 PIO    Flash    PA    PB   PIN */
00064 #define SW1_MASK        (1<<19) /* PA19 / PGMD7  & RK   FIQ     13 */
00065 #define SW2_MASK        (1<<20) /* PA20 / PGMD8  & RF   IRQ0    16 */
00066 #define SW3_MASK        (1<<15) /* PA15 / PGM3   & TF   TIOA1   20 */
00067 #define SW4_MASK        (1<<14) /* PA14 / PGMD2  & SPCK PWM3    21 */
00068 #define SW_MASK         (SW1_MASK|SW2_MASK|SW3_MASK|SW4_MASK)
00069 
00070 
00071 #define SW1     (1<<19) // PA19
00072 #define SW2     (1<<20) // PA20
00073 #define SW3     (1<<15) // PA15
00074 #define SW4     (1<<14) // PA14
00075 
00076 /*------------------*/
00077 /* USART Definition */
00078 /*------------------*/
00079 /* SUB-D 9 points J3 DBGU*/
00080 #define DBGU_RXD                AT91C_PA9_DRXD    /* JP11 must be close */
00081 #define DBGU_TXD                AT91C_PA10_DTXD   /* JP12 must be close */
00082 #define AT91C_DBGU_BAUD    115200   // Baud rate
00083 
00084 #define US_RXD_PIN              AT91C_PA5_RXD0    /* JP9 must be close */
00085 #define US_TXD_PIN              AT91C_PA6_TXD0    /* JP7 must be close */
00086 #define US_RTS_PIN              AT91C_PA7_RTS0    /* JP8 must be close */
00087 #define US_CTS_PIN              AT91C_PA8_CTS0    /* JP6 must be close */
00088 
00089 /*--------------*/
00090 /* Master Clock */
00091 /*--------------*/
00092 
00093 #define EXT_OC          18432000   // Exetrnal ocilator MAINCK
00094 #define MCK             47923200   // MCK (PLLRC div by 2)
00095 #define MCKKHz          (MCK/1000) //
00096 
00097 #endif /* Board_h */

Generated on Wed Feb 24 13:37:02 2010 for Python-on-a-chip by  doxygen 1.5.9