How to protect flash on MKL17Z256VLH4?

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

How to protect flash on MKL17Z256VLH4?

1,171件の閲覧回数
pcpro178
Contributor III

Can anyone tell me if this would be a proper implementation for protecting the program flash from JTAG reads?  The functions used here are taken straight from the Kinetis SDK v2.0 API Reference Manual (KSDK20APIRM).  It's got some good information on individual API functions, but not much on wider implementation.

flash_protection_state_t protectionState;
stat = FLASH_IsProtected(&Config, 0, 0x40000UL, &protectionState);
stat = (kStatus_FLASH_Success == stat) ? kStatus_Success : kStatus_Fail;

pstat.valueLow32b = (pflash_protection_status_low_t)UINT32_MAX;
if ((kStatus_FLASH_Success == stat) && (kFLASH_ProtectionStateProtected != protectionState))
stat = FLASH_PflashSetProtection(&Config, &pstat);

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

1,036件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Jim,

   Actually, this is very simple.

   In your application project, you just need to modify the flash configuration field in the flash address 0x400.

   Please tell me what the IDE you are using, then I will give you an example for your reference.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信