Skip to content
Snippets Groups Projects
Commit e69b9429 authored by Olivier Schonken's avatar Olivier Schonken Committed by Freddie Chopin
Browse files

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: default avatarOlivier Schonken <olivier.schonken@gmail.com>
Reviewed-on: http://openocd.zylin.com/897


Tested-by: jenkins
Reviewed-by: default avatarFreddie Chopin <freddie.chopin@gmail.com>
parent 6d1ea5a7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment