K82 : FLASH_PflashSetProtection & FLASH_PflashGetProtection

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

K82 : FLASH_PflashSetProtection & FLASH_PflashGetProtection

390 Views
EugeneHiihtaja
Senior Contributor I

Hello !

Can it be so that those API is not work properly ?

"

if (config->ftfxConfig[0].flashDesc.feature.hasProtControl)
{
if (config->ftfxConfig[0].flashDesc.feature.ProtRegBits >= 32)
{
*kFPROTL = protectStatus->protl;
if (protectStatus->protl != *kFPROTL)
{
return kStatus_FTFx_CommandFailure;
}
}

"

ProtRegBits need to be set to 32 but no any code in SDK is not exists to do it ? It has value 0 ?

It should be set here FLASH_Init(...) but this is not visible.

Rregards,

Eugene

0 Kudos
3 Replies

299 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Eugene,

    Actually, FLASH_PflashSetProtection API is used to set the protection bit, write the Program Flash Protection Registers

pastedImage_18.png

It is 4Bytes, just 32bit.

ProtRegBits can be set by yourself in the code, you totally can define it.

Wish it helps you!

If you still have question about it, please kindly let me know.

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

299 Views
EugeneHiihtaja
Senior Contributor I

Hi Kerry !

Yes, I have modified it by myself. But it is clear defect in SDK and have sense to improve it at some point.

Regards,

Eugene

0 Kudos

299 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Eugene,

   Thank you for your updated information.

   This variable normally need to be configured in the main code before you call the according API, so this point is not the SDK bug.

   Any way, next time, when the SDK do the improvement, I will suggest it.

 


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos