This is an automated email from Gerrit. Freddie Chopin (freddie.cho...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/897
-- gerrit commit 942915f6553eae54e0b879d2fc5a2ce8e70cc62f Author: Olivier Schonken <olivier.schon...@gmail.com> Date: Wed Sep 12 21:56:50 2012 +0200 Modified Sector Erase for AT91SAM4S In FLASHD_ErasePages AT91C_EFC_FCMD_EPA is used to erase sectors. According to the datasheet FARG[15:2] defines the page from which the erase will start.This page must be modulo 4, 8, 16 or 32 according to the number of pages to erase. FARG[1:0] defines the number of pages to be erased. Previously (firstpage << 2) was used to conform to this, seems it should not be shifted... Changed it to (firstPage) | erasePages. Change-Id: I791cc7fc4faf056623ad5a6c7e860315306098a1 Signed-off-by: Olivier Schonken <olivier.schon...@gmail.com> diff --git a/src/flash/nor/at91sam4.c b/src/flash/nor/at91sam4.c index fd98b7f..ce3c1d1 100644 --- a/src/flash/nor/at91sam4.c +++ b/src/flash/nor/at91sam4.c @@ -722,10 +722,17 @@ static int FLASHD_ErasePages(struct sam4_bank_private *pPrivate, break; } + /* AT91C_EFC_FCMD_EPA + * According to the datasheet FARG[15:2] defines the page from which + * the erase will start.This page must be modulo 4, 8, 16 or 32 + * according to the number of pages to erase. FARG[1:0] defines the + * number of pages to be erased. Previously (firstpage << 2) was used + * to conform to this, seems it should not be shifted... + */ return EFC_PerformCommand(pPrivate, /* send Erase Page */ AT91C_EFC_FCMD_EPA, - (firstPage << 2) | erasePages, + (firstPage) | erasePages, status); } -- ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel