This is an automated email from Gerrit.

Ulf Wetzker ([email protected]) just uploaded a new patch set 
to Gerrit, which you can find at http://openocd.zylin.com/1422

-- gerrit

commit 0e3209ede4cc1064481651bd8a288bfb797a0c77
Author: Ulf Wetzker <[email protected]>
Date:   Mon May 27 12:58:46 2013 +0200

    flash/nor/at91sam3: fixed lock region size
    
    According to the "AT91SAM ARM-based Flash MCU SAM3S Series datasheet"
    (http://www.atmel.com/Images/doc11090s.pdf) p. 30 the lock region
    size for the at91sam3sd9 family is 32 kbyte.
    
    This fix is only based on the datasheet due to missing hardware.
    
    Change-Id: Ic47b0642e4f11a60de477eaa0167038103b8ff15
    Signed-off-by: Ulf Wetzker <[email protected]>

diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c
index d6dedae..9c7aa6c 100644
--- a/src/flash/nor/at91sam3.c
+++ b/src/flash/nor/at91sam3.c
@@ -73,6 +73,11 @@
 /* at91sam3s series (has always one flash bank) */
 #define FLASH_BANK_BASE_S   0x00400000
 
+/* at91sam3sd series (has always two flash banks) */
+#define FLASH_BANK0_BASE_SD FLASH_BANK_BASE_S
+#define FLASH_BANK1_BASE_512K_SD (FLASH_BANK0_BASE_SD+(512*1024/2))
+
+
 /* at91sam3n series (has always one flash bank) */
 #define FLASH_BANK_BASE_N   0x00400000
 
@@ -82,9 +87,6 @@
 #define        FLASH_BANK1_BASE_256K_AX        0x000A0000
 #define        FLASH_BANK1_BASE_512K_AX        0x000C0000
 
-#define FLASH_BANK0_BASE_SD FLASH_BANK_BASE_S
-#define FLASH_BANK1_BASE_512K_SD (FLASH_BANK0_BASE_SD+(512*1024/2))
-
 #define         AT91C_EFC_FCMD_GETD                 (0x0)      /* (EFC) Get 
Flash Descriptor */
 #define         AT91C_EFC_FCMD_WP                   (0x1)      /* (EFC) Write 
Page */
 #define         AT91C_EFC_FCMD_WPL                  (0x2)      /* (EFC) Write 
Page and Lock */
@@ -749,7 +751,7 @@ static const struct sam3_chip_details all_sam3_details[] = {
                                .present = 1,
                                .size_bytes =  256 * 1024,
                                .nsectors   =  16,
-                               .sector_size = 16384,
+                               .sector_size = 32768,
                                .page_size   = 256,
                          },
 /*                     .bank[1] = { */
@@ -764,7 +766,7 @@ static const struct sam3_chip_details all_sam3_details[] = {
                                .present = 1,
                                .size_bytes =  256 * 1024,
                                .nsectors   =  16,
-                               .sector_size = 16384,
+                               .sector_size = 32768,
                                .page_size   = 256,
                        },
                },

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to