Detection of Flash Erase Sector Size?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detection of Flash Erase Sector Size?

4,452 Views
benstickrod
Contributor I
Is there any way to tell, in code, if the sector erase size of a part is 512 or 1024 bytes?  I know of at least one part in the B family that has a 1024 sector erase size and I need my bootloader to be compatible with 512 or 1024 byte parts.
 
Thanks,
Ben
Labels (1)
0 Kudos
Reply
3 Replies

775 Views
EMontanez
NXP Employee
NXP Employee
Ben,

The only way to keep this sector size is to make a table, which is not very efficient. Best bet is to use #defines and configure the sector size in the pre-compile stage.
0 Kudos
Reply

775 Views
mke_et
Contributor IV

You mean like a 'flash ID byte"?  I don't think there's a function for that.

 

But can't you ID the cpu?  I thought that was unique to each configuration, or am I wrong...

 

0 Kudos
Reply

775 Views
benstickrod
Contributor I
I can ID the micro, but I would need a list of micros that have 1024 byte sector sizes.  I was looking for something that I could use to tell what the size of the flash sector was without knowing what micro was being used.
 
Thanks,
Ben
0 Kudos
Reply