Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Sam-ba Unlocking regions of sam7x256
PostPosted: Wed Jan 27, 2010 5:11 pm 
Offline

Joined: Thu May 31, 2007 12:36 am
Posts: 19
I am not understanding how to unlock memory regions in sam7x.

Per data sheet:

• The Flash Command register must be written with the following value:

(0x5A << 24) | (lockPageNumber << 8 & PAGEN) | CLB

lockPageNumber is a page of the corresponding lock region.



OK, but the FCM register is laid out out as such per data sheet that
the PAGEN is bits 8 -17 so should the instruction be more like this:

(0x5A << 24) | (lockPageNumber << 8 & PAGEN<<8) | CLB

So are the first 4 bits the region and the rest the page?

Do I need to unlock every page in the region to unlock the region or just one page?




secondly;

Instead of programming this in code, couldn't I do this via sam-ba script file.

IF I run the sam-ba exe it prompts me to "unlock locked regions before programming". I tried to record the script file, but those commands it uses are not shown. I am already using a script file for production, so if I could figure out how sam-ba is doing this through its interface and then just do the same thing in my script it would be easier.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: