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  [ 3 posts ] 
Author Message
 Post subject: SAM7S Flash Lock Bit Addressing
PostPosted: Wed Feb 24, 2010 1:21 pm 
Offline

Joined: Wed Aug 19, 2009 10:41 am
Posts: 2
Has anybody else come across a problem of addressing the correct lock bit using the PAGEN field of the MC_FCR?

Using the SAM-BA command line interface (the W and w commands) to set and clear the lock bits I have found that the lock bit address needs to be shifted 5 bits left in the PAGEN field in order to work correctly.

The attached file shows the output of a script sending commands to a SAM7S64 to set and clear lock bits. As can be seen the lowest 5 bits of the PAGEN field have no effect on the lock bit being addressed and similarly the top bit has no effect either. The address of the required lock bit must be placed in bits 5,6,7 & 8 of the PAGEN field (bits 13,14,15,16 of the MC_FCR).

I have not been able to upload the file (I keep getting extension not allowed errors, whatever extension I put on the file, which is plain text).

_________________
Tony Smith


Top
 Profile  
 
 Post subject: Re: SAM7S Flash Lock Bit Addressing
PostPosted: Sat Feb 27, 2010 5:41 pm 
Offline

Joined: Thu Feb 25, 2010 5:02 pm
Posts: 88
Instead of uploading the file can you copy the contents and paste it into a reply?

Also, I believe you can only set/clear one (1) lock bit at a time.

_________________
Duane P. Fridley, IEEE CSDP
Viable Bytes, Inc.


Top
 Profile  
 
 Post subject: Re: SAM7S Flash Lock Bit Addressing
PostPosted: Sat Feb 27, 2010 10:01 pm 
Offline

Joined: Wed Aug 19, 2009 10:41 am
Posts: 2
Thank you dfridley for your suggestion. I have received a response from Atmel which explains what I was seeing. It is not clear from the data sheet but to set or clear a lock bit one must put the address of a page within the region associated with that lock bit into the PAGEN field. On the SAM7S64 there are 32 pages in a lock region so the bottom 5 bits in the PAGEN field all set or clear the same lock bit.

_________________
Tony Smith


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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: