Detection of Flash Erase Sector Size?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Detection of Flash Erase Sector Size?

5,509件の閲覧回数
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,832件の閲覧回数
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,832件の閲覧回数
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,832件の閲覧回数
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 件の賞賛
返信