Merged from external project:
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 10 May 2010 10:28:10 +0000 (10:28 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 10 May 2010 10:28:10 +0000 (10:28 +0000)
**********
r3558 | asterix | 2010-04-28 13:59:45 +0200 (mer, 28 apr 2010) | 1 line

Add support for flash sizes on all supported AT91SAM7 cpus.
**********

git-svn-id: https://src.develer.com/svnoss/bertos/branches/2.4@3633 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/arm/io/at91sam7.h

index 2783307faf27bf130e85c351eb57687c5d582c42..9a2e6db84b5f922cc9a9d147b06a2e2340fe2578 100644 (file)
 
 #endif
 
-#if CPU_ARM_AT91SAM7S256 || CPU_ARM_AT91SAM7X256
+#if CPU_ARM_AT91SAM7S64
+       #define FLASH_MEM_SIZE          0x10000UL ///< Internal flash memory size
+       #define FLASH_PAGE_SIZE_BYTES         128 ///< Size of cpu flash memory page in bytes
+       #define FLASH_BANKS_NUM                 1 ///< Number of flash banks
+       #define FLASH_SECTORS_NUM              16 ///< Number of flash sector
+       #define FLASH_PAGE_PER_SECTOR          32 ///< Number of page for sector
+
+#elif CPU_ARM_AT91SAM7S128 || CPU_ARM_AT91SAM7X128
+       #define FLASH_MEM_SIZE          0x20000UL ///< Internal flash memory size
+       #define FLASH_PAGE_SIZE_BYTES         256 ///< Size of cpu flash memory page in bytes
+       #define FLASH_BANKS_NUM                 1 ///< Number of flash banks
+       #define FLASH_SECTORS_NUM               8 ///< Number of flash sector
+       #define FLASH_PAGE_PER_SECTOR          64 ///< Number of page for sector
+
+#elif CPU_ARM_AT91SAM7S256 || CPU_ARM_AT91SAM7X256
        #define FLASH_MEM_SIZE          0x40000UL ///< Internal flash memory size
        #define FLASH_PAGE_SIZE_BYTES         256 ///< Size of cpu flash memory page in bytes
        #define FLASH_BANKS_NUM                 1 ///< Number of flash banks
        #define FLASH_SECTORS_NUM              16 ///< Number of flash sector
        #define FLASH_PAGE_PER_SECTOR          64 ///< Number of page for sector
 
+#elif CPU_ARM_AT91SAM7S512 || CPU_ARM_AT91SAM7X512
+       #define FLASH_MEM_SIZE          0x80000UL ///< Internal flash memory size
+       #define FLASH_PAGE_SIZE_BYTES         256 ///< Size of cpu flash memory page in bytes
+       #define FLASH_BANKS_NUM                 2 ///< Number of flash banks
+       #define FLASH_SECTORS_NUM              32 ///< Number of flash sector
+       #define FLASH_PAGE_PER_SECTOR          64 ///< Number of page for sector
+
 #else
        #error Memory size definition for selected ARM CPU
 #endif