Detection of Flash Erase Sector Size?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Detection of Flash Erase Sector Size?

4,907 次查看
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
标签 (1)
0 项奖励
回复
3 回复数

1,230 次查看
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 项奖励
回复

1,230 次查看
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 项奖励
回复

1,230 次查看
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 项奖励
回复