diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-06-11 17:33:43 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-06-11 17:33:43 -0600 |
commit | 8fa720361678a7409724c13a99fcb19826cc3e78 (patch) | |
tree | 8ed434aee449010eaa904c192f4a27d03bb04b90 | |
parent | 2e1dc146169bc98f8c72b2c3c2e783814968df35 (diff) | |
download | nuttx-8fa720361678a7409724c13a99fcb19826cc3e78.tar.gz nuttx-8fa720361678a7409724c13a99fcb19826cc3e78.tar.bz2 nuttx-8fa720361678a7409724c13a99fcb19826cc3e78.zip |
Changes for a clean build of configs/sam4s-xplained
20 files changed, 303 insertions, 287 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 72bd995be..853d6ac97 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -4951,4 +4951,4 @@ definitinos (2013-6-11). * arch/arm/src/sam34/sam4s_periphclks.h: Add macros to manage SAM4S peripheral clocks (2013-6-11). - + * configs/sam4s-xplained: Configuratino builds error-free (2013-6-11). diff --git a/nuttx/arch/arm/include/sam34/chip.h b/nuttx/arch/arm/include/sam34/chip.h index 57b181963..d40952d7a 100644 --- a/nuttx/arch/arm/include/sam34/chip.h +++ b/nuttx/arch/arm/include/sam34/chip.h @@ -54,10 +54,10 @@ /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (256*1024) /* 256KB */ -# define CONFIG_SAM34_SRAM0_SIZE (32*1024) /* 32KB */ -# define CONFIG_SAM34_SRAM1_SIZE (16*1024) /* 16KB */ -# define CONFIG_SAM34_NFCSRAM_SIZE (4*1024) /* 4KB */ +# define SAM34_FLASH_SIZE (256*1024) /* 256KB */ +# define SAM34_SRAM0_SIZE (32*1024) /* 32KB */ +# define SAM34_SRAM1_SIZE (16*1024) /* 16KB */ +# define SAM34_NFCSRAM_SIZE (4*1024) /* 4KB */ /* Peripherals */ @@ -123,10 +123,10 @@ /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (128*1024) /* 128KB */ -# define CONFIG_SAM34_SRAM0_SIZE (32*1024) /* 32KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (128*1024) /* 128KB */ +# define SAM34_SRAM0_SIZE (32*1024) /* 32KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -143,10 +143,10 @@ /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (256*1024) /* 256KB */ -# define CONFIG_SAM34_SRAM0_SIZE (32*1024) /* 32KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (256*1024) /* 256KB */ +# define SAM34_SRAM0_SIZE (32*1024) /* 32KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -163,10 +163,10 @@ /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (128*1024) /* 128KB */ -# define CONFIG_SAM34_SRAM0_SIZE (32*1024) /* 32KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (128*1024) /* 128KB */ +# define SAM34_SRAM0_SIZE (32*1024) /* 32KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -183,10 +183,10 @@ /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (256*1024) /* 256KB */ -# define CONFIG_SAM34_SRAM0_SIZE (32*1024) /* 32KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (256*1024) /* 256KB */ +# define SAM34_SRAM0_SIZE (32*1024) /* 32KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -220,10 +220,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4SD32C) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (2*1024*1024) /* 2x1MB */ -# define CONFIG_SAM34_SRAM0_SIZE (160*1024) /* 160KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (2*1024*1024) /* 2x1MB */ +# define SAM34_SRAM0_SIZE (160*1024) /* 160KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -238,10 +238,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4SD32B) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (2*1024*1024) /* 2x1MB */ -# define CONFIG_SAM34_SRAM0_SIZE (160*1024) /* 160KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (2*1024*1024) /* 2x1MB */ +# define SAM34_SRAM0_SIZE (160*1024) /* 160KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -256,10 +256,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4SD16C) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (1024*1024) /* 2x512KB */ -# define CONFIG_SAM34_SRAM0_SIZE (160*1024) /* 160KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (1024*1024) /* 2x512KB */ +# define SAM34_SRAM0_SIZE (160*1024) /* 160KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -274,10 +274,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4SD16B) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (1024*1024) /* 2x512KB */ -# define CONFIG_SAM34_SRAM0_SIZE (160*1024) /* 160KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (1024*1024) /* 2x512KB */ +# define SAM34_SRAM0_SIZE (160*1024) /* 160KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -292,10 +292,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4SA16C) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (1024*1024) /* 1MB */ -# define CONFIG_SAM34_SRAM0_SIZE (160*1024) /* 160KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (1024*1024) /* 1MB */ +# define SAM34_SRAM0_SIZE (160*1024) /* 160KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -310,10 +310,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4SA16B) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (1024*1024) /* 1MB */ -# define CONFIG_SAM34_SRAM0_SIZE (160*1024) /* 160KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (1024*1024) /* 1MB */ +# define SAM34_SRAM0_SIZE (160*1024) /* 160KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -328,10 +328,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4S16C) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (1024*1024) /* 1MB */ -# define CONFIG_SAM34_SRAM0_SIZE (128*1024) /* 128KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (1024*1024) /* 1MB */ +# define SAM34_SRAM0_SIZE (128*1024) /* 128KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -346,10 +346,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4S16B) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (1024*1024) /* 1MB */ -# define CONFIG_SAM34_SRAM0_SIZE (128*1024) /* 128KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (1024*1024) /* 1MB */ +# define SAM34_SRAM0_SIZE (128*1024) /* 128KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -364,10 +364,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4S8C) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (512*1024) /* 512KB */ -# define CONFIG_SAM34_SRAM0_SIZE (128*1024) /* 128KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (512*1024) /* 512KB */ +# define SAM34_SRAM0_SIZE (128*1024) /* 128KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ @@ -382,10 +382,10 @@ #elif defined(CONFIG_ARCH_CHIP_ATSAM4S8B) /* Internal memory */ -# define CONFIG_SAM34_FLASH_SIZE (512*1024) /* 512KB */ -# define CONFIG_SAM34_SRAM0_SIZE (128*1024) /* 128KB */ -# define CONFIG_SAM34_SRAM1_SIZE (0) /* None */ -# define CONFIG_SAM34_NFCSRAM_SIZE (0) /* None */ +# define SAM34_FLASH_SIZE (512*1024) /* 512KB */ +# define SAM34_SRAM0_SIZE (128*1024) /* 128KB */ +# define SAM34_SRAM1_SIZE (0) /* None */ +# define SAM34_NFCSRAM_SIZE (0) /* None */ /* Peripherals */ diff --git a/nuttx/arch/arm/src/sam34/chip/sam3u_memorymap.h b/nuttx/arch/arm/src/sam34/chip/sam3u_memorymap.h index f39336400..e1b9822b2 100644 --- a/nuttx/arch/arm/src/sam34/chip/sam3u_memorymap.h +++ b/nuttx/arch/arm/src/sam34/chip/sam3u_memorymap.h @@ -114,11 +114,11 @@ #define SAM_UART0_BASE 0x400e0600 /* 0x400e0600-0x400e073f: UART 0 */ #define SAM_CHIPID_BASE 0x400e0740 /* 0x400e0740-0x400e07ff: CHIP ID */ #define SAM_EEFC_BASE 0x400e0800 /* 0x400e0800-0x400e0bff: Enhanced Embedded Flash Controllers*/ -# define SAM_EEFCN_BASE(n) (0x400e0800+((n)<<9)) +# define SAM_EEFCN_BASE(n) (0x400e0800 + ((n) << 9)) # define SAM_EEFC0_BASE 0x400e0800 /* 0x400e0800-0x400e09ff: Enhanced Embedded Flash Controller 0 */ # define SAM_EEFC1_BASE 0x400e0a00 /* 0x400e0a00-0x400e0bff: Enhanced Embedded Flash Controller 1 */ #define SAM_PIO_BASE 0x400e0c00 /* 0x400e0c00-0x400e11ff: Parallel I/O Controllers */ -# define SAM_PION_BASE(n) (0x400e0c00+((n)<<9)) +# define SAM_PION_BASE(n) (0x400e0c00 + ((n) << 9)) # define SAM_PIOA_BASE 0x400e0c00 /* 0x400e0c00-0x400e0dff: Parallel I/O Controller A */ # define SAM_PIOB_BASE 0x400e0e00 /* 0x400e0e00-0x400e0fff: Parallel I/O Controller B */ # define SAM_PIOC_BASE 0x400e1000 /* 0x400e1000-0x400e11ff: Parallel I/O Controller C */ diff --git a/nuttx/arch/arm/src/sam34/chip/sam4s_memorymap.h b/nuttx/arch/arm/src/sam34/chip/sam4s_memorymap.h index f3f2bce22..406b01dd9 100644 --- a/nuttx/arch/arm/src/sam34/chip/sam4s_memorymap.h +++ b/nuttx/arch/arm/src/sam34/chip/sam4s_memorymap.h @@ -64,9 +64,9 @@ /* 0x00c00000-0x1fffffff: Reserved */ /* Internal SRAM memory region */ +#define SAM_INTSRAM0_BASE 0x20000000 /* For SAM3U compatibility */ #define SAM_BBSRAM_BASE 0x22000000 /* 0x22000000-0x23ffffff: 32MB bit-band region */ /* 0x24000000-0x3fffffff: Undefined */ - /* Peripherals address region */ #define SAM_HSMCI_BASE 0x40000000 /* 0x40000000-0x400003ff: High Speed Multimedia Card Interface */ @@ -113,6 +113,7 @@ # define SAM_EEFC0_BASE 0x400e0a00 /* 0x400e0a00-0x400e0bff: Enhanced Embedded Flash Controller 0 */ # define SAM_EEFC1_BASE 0x400e0c00 /* 0x400e0c00-0x400e0dff: Enhanced Embedded Flash Controller 1 */ #define SAM_PIO_BASE 0x400e0e00 /* 0x400e0e00-0x400e13ff: Parallel I/O Controllers */ +# define SAM_PION_BASE(n) (0x400e0e00 + ((n) << 9)) # define SAM_PIOA_BASE 0x400e0e00 /* 0x400e0e00-0x400e0fff: Parallel I/O Controller A */ # define SAM_PIOB_BASE 0x400e1000 /* 0x400e1000-0x400e11ff: Parallel I/O Controller B */ # define SAM_PIOC_BASE 0x400e1200 /* 0x400e1200-0x400e13ff: Parallel I/O Controller C */ diff --git a/nuttx/arch/arm/src/sam34/chip/sam4s_pinmap.h b/nuttx/arch/arm/src/sam34/chip/sam4s_pinmap.h index 589ffd270..cb6d7eb18 100644 --- a/nuttx/arch/arm/src/sam34/chip/sam4s_pinmap.h +++ b/nuttx/arch/arm/src/sam34/chip/sam4s_pinmap.h @@ -71,212 +71,212 @@ /* 12-bit Analog-to-Digital Conververt (ADC) */ -#define GPIO_ADC0_AD0 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN17) -#define GPIO_ADC0_AD1 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN18) -#define GPIO_ADC0_AD2 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN19) -#define GPIO_ADC0_AD3 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN20) -#define GPIO_ADC0_AD4 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN0) -#define GPIO_ADC0_AD5 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN1) -#define GPIO_ADC0_AD6 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN2) -#define GPIO_ADC0_AD7 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN3) -#define GPIO_ADC0_AD8 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN21) -#define GPIO_ADC0_AD9 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN22) -#define GPIO_ADC0_AD10 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN13) -#define GPIO_ADC0_AD11 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN15) -#define GPIO_ADC0_AD12 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN12) -#define GPIO_ADC0_AD13 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN29) -#define GPIO_ADC0_AD14 (GPIO_INPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN30) -#define GPIO_ADC0_ADTRG (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN8) +#define GPIO_ADC0_AD0 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN17) +#define GPIO_ADC0_AD1 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN18) +#define GPIO_ADC0_AD2 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN19) +#define GPIO_ADC0_AD3 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN20) +#define GPIO_ADC0_AD4 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN0) +#define GPIO_ADC0_AD5 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN1) +#define GPIO_ADC0_AD6 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN2) +#define GPIO_ADC0_AD7 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN3) +#define GPIO_ADC0_AD8 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN21) +#define GPIO_ADC0_AD9 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN22) +#define GPIO_ADC0_AD10 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN13) +#define GPIO_ADC0_AD11 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN15) +#define GPIO_ADC0_AD12 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN12) +#define GPIO_ADC0_AD13 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN29) +#define GPIO_ADC0_AD14 (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN30) +#define GPIO_ADC0_ADTRG (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN8) /* Digital-to-Analog Convert (DAC) */ -#define GPIO_DAC0 (GPIO_OUTPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN13) -#define GPIO_DAC1 (GPIO_OUTPUT | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN14) -#define GPIO_DAC_DATRG (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN2) +#define GPIO_DAC0 (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN13) +#define GPIO_DAC1 (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN14) +#define GPIO_DAC_DATRG (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN2) /* High-Speed Multimedia Card Interface (HSMCI) */ -#define GPIO_MCI_CK (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN29) -#define GPIO_MCI_DA (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN28) -#define GPIO_MCI_DAT0 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN30) -#define GPIO_MCI_DAT1 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN31) -#define GPIO_MCI_DAT2 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN26) -#define GPIO_MCI_DAT3 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN27) +#define GPIO_MCI_CK (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN29) +#define GPIO_MCI_DA (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN28) +#define GPIO_MCI_DAT0 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN30) +#define GPIO_MCI_DAT1 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN31) +#define GPIO_MCI_DAT2 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN26) +#define GPIO_MCI_DAT3 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN27) /* Programmable Clock Output */ -#define GPIO_PCK0_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN6) -#define GPIO_PCK0_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN13) -#define GPIO_PCK1_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN17) -#define GPIO_PCK1_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN21) -#define GPIO_PCK2_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN18) -#define GPIO_PCK2_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN31) -#define GPIO_PCK2_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN3) +#define GPIO_PCK0_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN6) +#define GPIO_PCK0_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN13) +#define GPIO_PCK1_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN17) +#define GPIO_PCK1_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN21) +#define GPIO_PCK2_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN18) +#define GPIO_PCK2_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN31) +#define GPIO_PCK2_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN3) /* Pulse Width Modulation (PWM) */ -#define GPIO_PWM0_FI (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN9) -#define GPIO_PWM0_H_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN0) -#define GPIO_PWM0_H_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN0) -#define GPIO_PWM0_H_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN11) -#define GPIO_PWM0_H_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN23) -#define GPIO_PWM0_H_5 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN18) -#define GPIO_PWM0_L_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN19) -#define GPIO_PWM0_L_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN5) -#define GPIO_PWM0_L_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN0) -#define GPIO_PWM0_L_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN13) -#define GPIO_PWM1_H_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN1) -#define GPIO_PWM1_H_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN1) -#define GPIO_PWM1_H_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN12) -#define GPIO_PWM1_H_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN24) -#define GPIO_PWM1_H_5 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN19) -#define GPIO_PWM1_L_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN15) -#define GPIO_PWM1_L_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN12) -#define GPIO_PWM1_L_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN20) -#define GPIO_PWM1_L_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN1) -#define GPIO_PWM2_H_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN2) -#define GPIO_PWM2_H_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN13) -#define GPIO_PWM2_H_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN25) -#define GPIO_PWM2_H_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN4) -#define GPIO_PWM2_H_5 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN20) -#define GPIO_PWM2_L_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN30) -#define GPIO_PWM2_L_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN13) -#define GPIO_PWM2_L_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN2) -#define GPIO_PWM2_L_4 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN16) -#define GPIO_PWM3_H_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN14) -#define GPIO_PWM3_H_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN7) -#define GPIO_PWM3_H_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN14) -#define GPIO_PWM3_H_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN21) -#define GPIO_PWM3_H_5 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN17) -#define GPIO_PWM3_L_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN22) -#define GPIO_PWM3_L_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN3) -#define GPIO_PWM3_L_3 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN15) +#define GPIO_PWM0_FI (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN9) +#define GPIO_PWM0_H_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN0) +#define GPIO_PWM0_H_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN0) +#define GPIO_PWM0_H_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN11) +#define GPIO_PWM0_H_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN23) +#define GPIO_PWM0_H_5 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN18) +#define GPIO_PWM0_L_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN19) +#define GPIO_PWM0_L_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN5) +#define GPIO_PWM0_L_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN0) +#define GPIO_PWM0_L_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN13) +#define GPIO_PWM1_H_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN1) +#define GPIO_PWM1_H_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN1) +#define GPIO_PWM1_H_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN12) +#define GPIO_PWM1_H_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN24) +#define GPIO_PWM1_H_5 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN19) +#define GPIO_PWM1_L_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN15) +#define GPIO_PWM1_L_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN12) +#define GPIO_PWM1_L_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN20) +#define GPIO_PWM1_L_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN1) +#define GPIO_PWM2_H_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN2) +#define GPIO_PWM2_H_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN13) +#define GPIO_PWM2_H_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN25) +#define GPIO_PWM2_H_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN4) +#define GPIO_PWM2_H_5 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN20) +#define GPIO_PWM2_L_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN30) +#define GPIO_PWM2_L_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN13) +#define GPIO_PWM2_L_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN2) +#define GPIO_PWM2_L_4 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN16) +#define GPIO_PWM3_H_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN14) +#define GPIO_PWM3_H_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN7) +#define GPIO_PWM3_H_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN14) +#define GPIO_PWM3_H_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN21) +#define GPIO_PWM3_H_5 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN17) +#define GPIO_PWM3_L_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN22) +#define GPIO_PWM3_L_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN3) +#define GPIO_PWM3_L_3 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN15) /* Static Memory Controller (SMC) */ -#define GPIO_SMC_A0 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN18) -#define GPIO_SMC_A1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN19) -#define GPIO_SMC_A2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN20) -#define GPIO_SMC_A3 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN21) -#define GPIO_SMC_A4 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN22) -#define GPIO_SMC_A5 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN23) -#define GPIO_SMC_A6 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN24) -#define GPIO_SMC_A7 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN25) -#define GPIO_SMC_A8 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN26) -#define GPIO_SMC_A9 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN27) -#define GPIO_SMC_A10 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN28) -#define GPIO_SMC_A11 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN29) -#define GPIO_SMC_A12 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN30) -#define GPIO_SMC_A13 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN31) -#define GPIO_SMC_A14 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN18) -#define GPIO_SMC_A15 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN19) -#define GPIO_SMC_A16 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN20) -#define GPIO_SMC_A17 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN0) -#define GPIO_SMC_A18 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN1) -#define GPIO_SMC_A19 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN23) -#define GPIO_SMC_A20 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN24) -#define GPIO_SMC_A21 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN16) -#define GPIO_SMC_A22 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN17) -#define GPIO_SMC_A23 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN25) -#define GPIO_SMC_D0 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN0) -#define GPIO_SMC_D1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN1) -#define GPIO_SMC_D2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN2) -#define GPIO_SMC_D3 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN3) -#define GPIO_SMC_D4 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN4) -#define GPIO_SMC_D5 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN5) -#define GPIO_SMC_D6 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN6) -#define GPIO_SMC_D7 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN7) -#define GPIO_SMC_NANDALE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN16) -#define GPIO_SMC_NANDCLE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN17) -#define GPIO_SMC_NANDOE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN9) -#define GPIO_SMC_NANDWE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN10) -#define GPIO_SMC_NCS0 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN14) -#define GPIO_SMC_NCS1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN15) -#define GPIO_SMC_NCS2 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN22) -#define GPIO_SMC_NCS3 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN12) -#define GPIO_SMC_NRD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN11) -#define GPIO_SMC_NWAIT (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN13) -#define GPIO_SMC_NWE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN8) +#define GPIO_SMC_A0 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN18) +#define GPIO_SMC_A1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN19) +#define GPIO_SMC_A2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN20) +#define GPIO_SMC_A3 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN21) +#define GPIO_SMC_A4 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN22) +#define GPIO_SMC_A5 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN23) +#define GPIO_SMC_A6 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN24) +#define GPIO_SMC_A7 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN25) +#define GPIO_SMC_A8 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN26) +#define GPIO_SMC_A9 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN27) +#define GPIO_SMC_A10 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN28) +#define GPIO_SMC_A11 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN29) +#define GPIO_SMC_A12 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN30) +#define GPIO_SMC_A13 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN31) +#define GPIO_SMC_A14 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN18) +#define GPIO_SMC_A15 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN19) +#define GPIO_SMC_A16 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN20) +#define GPIO_SMC_A17 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN0) +#define GPIO_SMC_A18 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN1) +#define GPIO_SMC_A19 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN23) +#define GPIO_SMC_A20 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN24) +#define GPIO_SMC_A21 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN16) +#define GPIO_SMC_A22 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN17) +#define GPIO_SMC_A23 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN25) +#define GPIO_SMC_D0 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN0) +#define GPIO_SMC_D1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN1) +#define GPIO_SMC_D2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN2) +#define GPIO_SMC_D3 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN3) +#define GPIO_SMC_D4 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN4) +#define GPIO_SMC_D5 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN5) +#define GPIO_SMC_D6 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN6) +#define GPIO_SMC_D7 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN7) +#define GPIO_SMC_NANDALE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN16) +#define GPIO_SMC_NANDCLE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN17) +#define GPIO_SMC_NANDOE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN9) +#define GPIO_SMC_NANDWE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN10) +#define GPIO_SMC_NCS0 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN14) +#define GPIO_SMC_NCS1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN15) +#define GPIO_SMC_NCS2 (GPIO_PERIPHC | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN22) +#define GPIO_SMC_NCS3 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN12) +#define GPIO_SMC_NRD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN11) +#define GPIO_SMC_NWAIT (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN13) +#define GPIO_SMC_NWE (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN8) /* Serial Peripheral Interface (SPI) */ -#define GPIO_SPI0_MISO (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN12) -#define GPIO_SPI0_MOSI (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN13) -#define GPIO_SPI0_NPCS0 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN11) -#define GPIO_SPI0_NPCS1_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN31) -#define GPIO_SPI0_NPCS1_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN14) -#define GPIO_SPI0_NPCS1_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN9) -#define GPIO_SPI0_NPCS1_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN4) -#define GPIO_SPI0_NPCS2_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN10) -#define GPIO_SPI0_NPCS2_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN30) -#define GPIO_SPI0_NPCS2_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN2) -#define GPIO_SPI0_NPCS3_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN22) -#define GPIO_SPI0_NPCS3_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN3) -#define GPIO_SPI0_NPCS3_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN5) -#define GPIO_SPI0_SPCK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN14) +#define GPIO_SPI0_MISO (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN12) +#define GPIO_SPI0_MOSI (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN13) +#define GPIO_SPI0_NPCS0 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN11) +#define GPIO_SPI0_NPCS1_1 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN31) +#define GPIO_SPI0_NPCS1_2 (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN14) +#define GPIO_SPI0_NPCS1_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN9) +#define GPIO_SPI0_NPCS1_4 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN4) +#define GPIO_SPI0_NPCS2_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN10) +#define GPIO_SPI0_NPCS2_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN30) +#define GPIO_SPI0_NPCS2_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN2) +#define GPIO_SPI0_NPCS3_1 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN22) +#define GPIO_SPI0_NPCS3_2 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN3) +#define GPIO_SPI0_NPCS3_3 (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN5) +#define GPIO_SPI0_SPCK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN14) /* Synchronous Serial Controller (SSC) */ -#define GPIO_SSC_RD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN18) -#define GPIO_SSC_RF (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN20) -#define GPIO_SSC_RK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN19) -#define GPIO_SSC_TD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN17) -#define GPIO_SSC_TF (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN15) -#define GPIO_SSC_TK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN16) +#define GPIO_SSC_RD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN18) +#define GPIO_SSC_RF (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN20) +#define GPIO_SSC_RK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN19) +#define GPIO_SSC_TD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN17) +#define GPIO_SSC_TF (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN15) +#define GPIO_SSC_TK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN16) /* Timer/Counters (TC) */ -#define GPIO_TC0_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN4) -#define GPIO_TC0_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN0) -#define GPIO_TC0_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN1) -#define GPIO_TC1_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN28) -#define GPIO_TC1_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN15) -#define GPIO_TC1_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN16) -#define GPIO_TC2_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN29) -#define GPIO_TC2_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN26) -#define GPIO_TC2_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN27) -#define GPIO_TC3_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN25) -#define GPIO_TC3_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN23) -#define GPIO_TC3_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN24) -#define GPIO_TC4_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN28) -#define GPIO_TC4_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN26) -#define GPIO_TC4_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN27) -#define GPIO_TC5_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN31) -#define GPIO_TC5_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN29) -#define GPIO_TC5_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOC | GPIO_PIN30) +#define GPIO_TC0_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN4) +#define GPIO_TC0_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN0) +#define GPIO_TC0_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN1) +#define GPIO_TC1_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN28) +#define GPIO_TC1_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN15) +#define GPIO_TC1_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN16) +#define GPIO_TC2_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN29) +#define GPIO_TC2_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN26) +#define GPIO_TC2_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN27) +#define GPIO_TC3_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN25) +#define GPIO_TC3_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN23) +#define GPIO_TC3_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN24) +#define GPIO_TC4_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN28) +#define GPIO_TC4_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN26) +#define GPIO_TC4_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN27) +#define GPIO_TC5_TCLK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN31) +#define GPIO_TC5_TIOA (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN29) +#define GPIO_TC5_TIOB (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOC | GPIO_PIN30) /* Two Wire Interface (TWI) */ -#define GPIO_TWI0_CK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN4) -#define GPIO_TWI0_D (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN3) -#define GPIO_TWI1_CK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN5) -#define GPIO_TWI1_D (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN4) +#define GPIO_TWI0_CK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN4) +#define GPIO_TWI0_D (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN3) +#define GPIO_TWI1_CK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN5) +#define GPIO_TWI1_D (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN4) /* Universal Asynchronous Receiver Transceiver (UART) */ -#define GPIO_UART0_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN9) -#define GPIO_UART0_TXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN10) -#define GPIO_UART1_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN2) -#define GPIO_UART1_TXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOB | GPIO_PIN3) +#define GPIO_UART0_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN9) +#define GPIO_UART0_TXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN10) +#define GPIO_UART1_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN2) +#define GPIO_UART1_TXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOB | GPIO_PIN3) /* Universal Synchronous Asynchronous Receiver Transmitter (USART) */ -#define GPIO_USART0_CTS (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN8) -#define GPIO_USART0_RTS (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN7) -#define GPIO_USART0_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN5) -#define GPIO_USART0_SCK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN2) -#define GPIO_USART0_TXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN6) - -#define GPIO_USART1_CTS (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN25) -#define GPIO_USART1_DCD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN26) -#define GPIO_USART1_DSR (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN28) -#define GPIO_USART1_DTR (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN27) -#define GPIO_USART1_RI (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN29) - -#define GPIO_USART1_RTS (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN24) -#define GPIO_USART1_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN21) -#define GPIO_USART1_SCK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN23) -#define GPIO_USART1_TXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | PIO_PORT_PIOA | GPIO_PIN22) +#define GPIO_USART0_CTS (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN8) +#define GPIO_USART0_RTS (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN7) +#define GPIO_USART0_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN5) +#define GPIO_USART0_SCK (GPIO_PERIPHB | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN2) +#define GPIO_USART0_TXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN6) + +#define GPIO_USART1_CTS (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN25) +#define GPIO_USART1_DCD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN26) +#define GPIO_USART1_DSR (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN28) +#define GPIO_USART1_DTR (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN27) +#define GPIO_USART1_RI (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN29) + +#define GPIO_USART1_RTS (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN24) +#define GPIO_USART1_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN21) +#define GPIO_USART1_SCK (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN23) +#define GPIO_USART1_TXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | GPIO_PIN22) /************************************************************************************ * Public Types diff --git a/nuttx/arch/arm/src/sam34/sam3u_clockconfig.c b/nuttx/arch/arm/src/sam34/sam3u_clockconfig.c index 1a911b7a3..efa0a3fc6 100644 --- a/nuttx/arch/arm/src/sam34/sam3u_clockconfig.c +++ b/nuttx/arch/arm/src/sam34/sam3u_clockconfig.c @@ -66,9 +66,14 @@ #define BOARD_CKGR_MOR (PMC_CKGR_MOR_KEY | BOARD_CKGR_MOR_MOSCXTST | \ PMC_CKGR_MOR_MOSCRCEN | PMC_CKGR_MOR_MOSCXTEN) -#define BOARD_CKGR_PLLAR (PMC_CKGR_PLLAR_ONE | BOARD_CKGR_PLLAR_MUL | \ +#if defined(CONFIG_ARCH_CHIP_SAM3U) +# define BOARD_CKGR_PLLAR (PMC_CKGR_PLLAR_ONE | BOARD_CKGR_PLLAR_MUL | \ BOARD_CKGR_PLLAR_STMODE | BOARD_CKGR_PLLAR_COUNT | \ BOARD_CKGR_PLLAR_DIV) +#elif defined(CONFIG_ARCH_CHIP_SAM4S) +# define BOARD_CKGR_PLLAR (PMC_CKGR_PLLAR_ONE | BOARD_CKGR_PLLAR_MUL | \ + BOARD_CKGR_PLLAR_COUNT | BOARD_CKGR_PLLAR_DIV) +#endif #define BOARD_PMC_MCKR_FAST (BOARD_PMC_MCKR_PRES | PMC_MCKR_CSS_MAIN) #define BOARD_PMC_MCKR (BOARD_PMC_MCKR_PRES | BOARD_PMC_MCKR_CSS) diff --git a/nuttx/arch/arm/src/sam34/sam3u_gpio.c b/nuttx/arch/arm/src/sam34/sam3u_gpio.c index e9ded34af..a59878a3d 100644 --- a/nuttx/arch/arm/src/sam34/sam3u_gpio.c +++ b/nuttx/arch/arm/src/sam34/sam3u_gpio.c @@ -53,7 +53,14 @@ #include "chip.h" #include "sam_gpio.h" -#include "chip/sam3u_pio.h" + +#if defined(CONFIG_ARCH_CHIP_SAM3U) +# include "chip/sam3u_pio.h" +#elif defined(CONFIG_ARCH_CHIP_SAM4S) +# include "chip/sam4s_pio.h" +#else +# error Unrecognized SAM architecture +#endif /**************************************************************************** * Definitions diff --git a/nuttx/arch/arm/src/sam34/sam4s_periphclks.h b/nuttx/arch/arm/src/sam34/sam4s_periphclks.h index d3e7be326..071d475eb 100644 --- a/nuttx/arch/arm/src/sam34/sam4s_periphclks.h +++ b/nuttx/arch/arm/src/sam34/sam4s_periphclks.h @@ -43,7 +43,7 @@ #include <nuttx/config.h> #include <stdint.h> #include <arch/irq.h> -#include "chip/sam4s_pmc.h" +#include "chip/sam3u_pmc.h" /************************************************************************************ * Pre-processor Definitions diff --git a/nuttx/arch/arm/src/sam34/sam_allocateheap.c b/nuttx/arch/arm/src/sam34/sam_allocateheap.c index 390234b71..2c350d860 100644 --- a/nuttx/arch/arm/src/sam34/sam_allocateheap.c +++ b/nuttx/arch/arm/src/sam34/sam_allocateheap.c @@ -57,7 +57,7 @@ * Private Definitions ****************************************************************************/ -#if CONFIG_MM_REGIONS < 2 +#if CONFIG_MM_REGIONS < 2 && SAM34_SRAM1_SIZE > 0 # warning "CONFIG_MM_REGIONS < 2: SRAM1 not included in HEAP" #endif @@ -71,11 +71,11 @@ # define CONFIG_MM_REGIONS 2 #endif -#if CONFIG_DRAM_END > (SAM_INTSRAM0_BASE+CONFIG_SAM34_SRAM0_SIZE) +#if CONFIG_DRAM_END > (SAM_INTSRAM0_BASE+SAM34_SRAM0_SIZE) # error "CONFIG_DRAM_END is beyond the end of SRAM0" # undef CONFIG_DRAM_END -# define CONFIG_DRAM_END (SAM_INTSRAM0_BASE+CONFIG_SAM34_SRAM0_SIZE) -#elif CONFIG_DRAM_END < (SAM_INTSRAM0_BASE+CONFIG_SAM34_SRAM0_SIZE) +# define CONFIG_DRAM_END (SAM_INTSRAM0_BASE+SAM34_SRAM0_SIZE) +#elif CONFIG_DRAM_END < (SAM_INTSRAM0_BASE+SAM34_SRAM0_SIZE) # warning "CONFIG_DRAM_END is before end of SRAM0... not all of SRAM0 used" #endif @@ -224,25 +224,25 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size) #if CONFIG_MM_REGIONS > 1 void up_addregion(void) { -#if CONFIG_SAM34_SRAM1_SIZE > 0 +#if SAM34_SRAM1_SIZE > 0 /* Allow user access to the heap memory */ - sam_mpu_uheap(SAM_INTSRAM1_BASE, CONFIG_SAM34_SRAM1_SIZE); + sam_mpu_uheap(SAM_INTSRAM1_BASE, SAM34_SRAM1_SIZE); /* Add the region */ - kumm_addregion((FAR void*)SAM_INTSRAM1_BASE, CONFIG_SAM34_SRAM1_SIZE); + kumm_addregion((FAR void*)SAM_INTSRAM1_BASE, SAM34_SRAM1_SIZE); -#if CONFIG_MM_REGIONS > 2 && CONFIG_SAM34_NFCSRAM_SIZE > 0 +#if CONFIG_MM_REGIONS > 2 && SAM34_NFCSRAM_SIZE > 0 /* Allow user access to the heap memory */ - sam_mpu_uheap(SAM_NFCSRAM_BASE, CONFIG_SAM34_NFCSRAM_SIZE); + sam_mpu_uheap(SAM_NFCSRAM_BASE, SAM34_NFCSRAM_SIZE); /* Add the region */ - kumm_addregion((FAR void*)SAM_NFCSRAM_BASE, CONFIG_SAM34_NFCSRAM_SIZE); + kumm_addregion((FAR void*)SAM_NFCSRAM_BASE, SAM34_NFCSRAM_SIZE); -#endif /* CONFIG_MM_REGIONS > 2 && CONFIG_SAM34_NFCSRAM_SIZE > 0 */ -#endif /* CONFIG_SAM34_SRAM1_SIZE > 0 */ +#endif /* CONFIG_MM_REGIONS > 2 && SAM34_NFCSRAM_SIZE > 0 */ +#endif /* SAM34_SRAM1_SIZE > 0 */ } #endif /* CONFIG_MM_REGIONS > 1 */ diff --git a/nuttx/arch/arm/src/sam34/sam_gpio.h b/nuttx/arch/arm/src/sam34/sam_gpio.h index 861a5e504..fd4e88fd1 100644 --- a/nuttx/arch/arm/src/sam34/sam_gpio.h +++ b/nuttx/arch/arm/src/sam34/sam_gpio.h @@ -51,7 +51,7 @@ # include "sam3u_gpio.h" #elif defined(CONFIG_ARCH_CHIP_SAM4L) # include "sam4l_gpio.h" -#elif defined(CONFIG_ARCH_CHIP_SAMSL) +#elif defined(CONFIG_ARCH_CHIP_SAM4S) # include "sam4s_gpio.h" #else # error Unrecognized SAM architecture diff --git a/nuttx/arch/arm/src/sam34/sam_lowputc.c b/nuttx/arch/arm/src/sam34/sam_lowputc.c index b206a2d94..6a3d2c888 100644 --- a/nuttx/arch/arm/src/sam34/sam_lowputc.c +++ b/nuttx/arch/arm/src/sam34/sam_lowputc.c @@ -152,7 +152,7 @@ #if defined(CONFIG_ARCH_CHIP_SAM3U) || defined(CONFIG_ARCH_CHIP_SAM4S) # define SAM_MR_USCLKS UART_MR_USCLKS_MCK /* Source = Main clock */ -# define SAM_USART_CLOCK SAM_MCK_FREQUENCY /* Frequency of the main clock */ +# define SAM_USART_CLOCK BOARD_MCK_FREQUENCY /* Frequency of the main clock */ #elif defined(CONFIG_ARCH_CHIP_SAM4L) # define SAM_MR_USCLKS UART_MR_USCLKS_USART /* Source = USART_CLK (undefined) */ # define SAM_USART_CLOCK BOARD_PBA_FREQUENCY /* PBA frequency is undivided */ diff --git a/nuttx/arch/arm/src/sam34/sam_serial.c b/nuttx/arch/arm/src/sam34/sam_serial.c index 03a90006f..2afc302e5 100644 --- a/nuttx/arch/arm/src/sam34/sam_serial.c +++ b/nuttx/arch/arm/src/sam34/sam_serial.c @@ -316,7 +316,7 @@ #if defined(CONFIG_ARCH_CHIP_SAM3U) || defined(CONFIG_ARCH_CHIP_SAM4S) # define SAM_MR_USCLKS UART_MR_USCLKS_MCK /* Source = Main clock */ -# define SAM_USART_CLOCK SAM_MCK_FREQUENCY /* Frequency of the main clock */ +# define SAM_USART_CLOCK BOARD_MCK_FREQUENCY /* Frequency of the main clock */ #elif defined(CONFIG_ARCH_CHIP_SAM4L) # define SAM_MR_USCLKS UART_MR_USCLKS_USART /* Source = USART_CLK (undefined) */ # define SAM_USART_CLOCK BOARD_PBA_FREQUENCY /* PBA frequency is undivided */ diff --git a/nuttx/arch/arm/src/sam34/sam_spi.c b/nuttx/arch/arm/src/sam34/sam_spi.c index b1dae4e34..70550462d 100644 --- a/nuttx/arch/arm/src/sam34/sam_spi.c +++ b/nuttx/arch/arm/src/sam34/sam_spi.c @@ -73,9 +73,9 @@ */ #if defined(CONFIG_ARCH_CHIP_SAM3U) -# define SAM_SPI_CLOCK SAM_MCK_FREQUENCY /* Frequency of the main clock */ +# define SAM_SPI_CLOCK BOARD_MCK_FREQUENCY /* Frequency of the main clock */ #elif defined(CONFIG_ARCH_CHIP_SAM4L) -# define SAM_SPI_CLOCK BOARD_PBB_FREQUENCY /* PBA frequency */ +# define SAM_SPI_CLOCK BOARD_PBB_FREQUENCY /* PBB frequency */ #else # error Unrecognized SAM architecture #endif diff --git a/nuttx/arch/arm/src/sam34/sam_timerisr.c b/nuttx/arch/arm/src/sam34/sam_timerisr.c index 06466eed7..572b04626 100644 --- a/nuttx/arch/arm/src/sam34/sam_timerisr.c +++ b/nuttx/arch/arm/src/sam34/sam_timerisr.c @@ -63,7 +63,7 @@ */ #if defined(CONFIG_ARCH_CHIP_SAM3U) -# define SAM_SYSTICK_CLOCK SAM_MCK_FREQUENCY /* Frequency of the main clock */ +# define SAM_SYSTICK_CLOCK BOARD_MCK_FREQUENCY /* Frequency of the main clock */ #elif defined(CONFIG_ARCH_CHIP_SAM4L) || defined(CONFIG_ARCH_CHIP_SAM4S) # define SAM_SYSTICK_CLOCK BOARD_CPU_FREQUENCY /* CPU frequency */ #else diff --git a/nuttx/configs/sam3u-ek/include/board.h b/nuttx/configs/sam3u-ek/include/board.h index 4c46ca724..78c197f73 100644 --- a/nuttx/configs/sam3u-ek/include/board.h +++ b/nuttx/configs/sam3u-ek/include/board.h @@ -76,14 +76,14 @@ /* USB UTMI PLL start-up time */ -#define BOARD_CKGR_UCKR_UPLLCOUNT (3 << PMC_CKGR_UCKR_UPLLCOUNT_SHIFT) +#define BOARD_CKGR_UCKR_UPLLCOUNT (3 << PMC_CKGR_UCKR_UPLLCOUNT_SHIFT) /* Resulting frequencies */ -#define SAM_MAINOSC_FREQUENCY (12000000) -#define SAM_MCK_FREQUENCY (48000000) -#define SAM_PLLA_FREQUENCY (96000000) -#define SAM_CPU_FREQUENCY (48000000) +#define BOARD_MAINOSC_FREQUENCY (12000000) +#define BOARD_MCK_FREQUENCY (48000000) +#define BOARD_PLLA_FREQUENCY (96000000) +#define BOARD_CPU_FREQUENCY (48000000) /* HSMCI clocking * diff --git a/nuttx/configs/sam4s-xplained/README.txt b/nuttx/configs/sam4s-xplained/README.txt index 234b813fb..17863d7d3 100644 --- a/nuttx/configs/sam4s-xplained/README.txt +++ b/nuttx/configs/sam4s-xplained/README.txt @@ -7,7 +7,8 @@ README The SAM4S Xplained features: - - 12MHz crystal (no 32.768KHz crystal)S + - 120 MHz Cortex-M4 with MPU + - 12MHz crystal (no 32.768KHz crystal) - Segger J-Link JTAG emulator on-board for program and debug - MICRO USB A/B connector for USB connectivity - IS66WV51216DBLL ISSI SRAM 8Mb 512K x 16 55ns PSRAM 2.5v-3.6v diff --git a/nuttx/configs/sam4s-xplained/include/board.h b/nuttx/configs/sam4s-xplained/include/board.h index 7f60109c9..8c81e0b92 100644 --- a/nuttx/configs/sam4s-xplained/include/board.h +++ b/nuttx/configs/sam4s-xplained/include/board.h @@ -72,35 +72,37 @@ /* Clocking *************************************************************************/ /* After power-on reset, the sam3u device is running on a 4MHz internal RC. These - * definitions will configure clocking with MCK = 48MHz, PLLA = 96, and CPU=48MHz. + * definitions will configure clocking with MCK = 48MHz, PLLA = 96, and CPU=120MHz. */ /* Main oscillator register settings */ #define BOARD_CKGR_MOR_MOSCXTST (63 << PMC_CKGR_MOR_MOSCXTST_SHIFT) /* Start-up Time */ -/* PLLA configuration */ +/* PLLA configuration: + * + * Source: 12MHz crystall at 12MHz + * PLLdiv: 10 + * PLLmul: 1 (bypassed) + * Fpll: (12MHz * 10) / 1 = 120MHz + */ -#define BOARD_CKGR_PLLAR_MUL (7 << PMC_CKGR_PLLAR_MUL_SHIFT) -#define BOARD_CKGR_PLLAR_STMODE PMC_CKGR_PLLAR_STMODE_FAST -#define BOARD_CKGR_PLLAR_COUNT (63 << PMC_CKGR_PLLAR_COUNT_SHIFT) +#define BOARD_MAINOSC_FREQUENCY (12000000) +#define BOARD_CKGR_PLLAR_MUL (9 << PMC_CKGR_PLLAR_MUL_SHIFT) #define BOARD_CKGR_PLLAR_DIV PMC_CKGR_PLLAR_DIV_BYPASS +#define BOARD_CKGR_PLLAR_COUNT (63 << PMC_CKGR_PLLAR_COUNT_SHIFT) +#define BOARD_PLLA_FREQUENCY (10*BOARD_MAINOSC_FREQUENCY) /* PMC master clock register settings */ #define BOARD_PMC_MCKR_CSS PMC_MCKR_CSS_PLLA -#define BOARD_PMC_MCKR_PRES PMC_MCKR_PRES_DIV2 +#define BOARD_PMC_MCKR_PRES PMC_MCKR_PRES_DIV1 +#define BOARD_MCK_FREQUENCY (BOARD_PLLA_FREQUENCY/1) +#define BOARD_CPU_FREQUENCY (BOARD_PLLA_FREQUENCY/1) /* USB UTMI PLL start-up time */ -#define BOARD_CKGR_UCKR_UPLLCOUNT (3 << PMC_CKGR_UCKR_UPLLCOUNT_SHIFT) - -/* Resulting frequencies */ - -#define SAM_MAINOSC_FREQUENCY (12000000) -#define SAM_MCK_FREQUENCY (48000000) -#define SAM_PLLA_FREQUENCY (96000000) -#define SAM_CPU_FREQUENCY (48000000) +#define BOARD_CKGR_UCKR_UPLLCOUNT (3 << PMC_CKGR_UCKR_UPLLCOUNT_SHIFT) /* HSMCI clocking * diff --git a/nuttx/configs/sam4s-xplained/ostest/defconfig b/nuttx/configs/sam4s-xplained/ostest/defconfig index 5a42798ef..1202cc855 100644 --- a/nuttx/configs/sam4s-xplained/ostest/defconfig +++ b/nuttx/configs/sam4s-xplained/ostest/defconfig @@ -193,7 +193,7 @@ CONFIG_ARCH_HAVE_RAMVECTORS=y CONFIG_BOARD_LOOPSPERMSEC=4768 # CONFIG_ARCH_CALIBRATION is not set CONFIG_DRAM_START=0x20000000 -CONFIG_DRAM_SIZE=32768 +CONFIG_DRAM_SIZE=131072 CONFIG_ARCH_HAVE_INTERRUPTSTACK=y CONFIG_ARCH_INTERRUPTSTACK=0 diff --git a/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h b/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h index ce806ae5e..f9ea61858 100644 --- a/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h +++ b/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h @@ -87,10 +87,10 @@ */ -#define GPIO_D9 (GPIO_OUTPUT | GPIO_PULL_UP | GPIO_OUTPUT_SET | \ - GPIO_PORTC | GPIO_PIN10) -#define GPIO_D10 (GPIO_OUTPUT | GPIO_PULL_UP | GPIO_OUTPUT_SET | \ - GPIO_PORTC | GPIO_PIN17) +#define GPIO_D9 (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \ + GPIO_PORT_PIOC | GPIO_PIN10) +#define GPIO_D10 (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \ + GPIO_PORT_PIOC | GPIO_PIN17) /* Mechanical buttons: * @@ -101,9 +101,9 @@ * PA5 BP2 */ -#define GPIO_BP2 (GPIO_INPUT | GPIO_PULL_UP | GPIO_GLITCH_FILTER | \ - GPIO_PORTA | GPIO_PIN5) -#define IRQ_BP2 SAM_IRQ_PA5 +#define GPIO_BP2 (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | \ + GPIO_PORT_PIOA | GPIO_PIN5) +#define IRQ_BP2 SAM_IRQ_PA5 /************************************************************************************ * Public Types diff --git a/nuttx/configs/sam4s-xplained/src/sam_autoleds.c b/nuttx/configs/sam4s-xplained/src/sam_autoleds.c index ff38947ee..9b912e4ff 100644 --- a/nuttx/configs/sam4s-xplained/src/sam_autoleds.c +++ b/nuttx/configs/sam4s-xplained/src/sam_autoleds.c @@ -46,7 +46,7 @@ #include <arch/board/board.h> #include "chip.h" -#include "sam_gpip.h" +#include "sam_gpio.h" #include "sam4s-xplained.h" #ifdef CONFIG_ARCH_LEDS |