How to be unlocked flash memory sector

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

How to be unlocked flash memory sector

2,181 Views
Dipti_Pawar
Contributor I

Hello,

I have to flash application via bootloader.

Flash driver is not able to erase particular flash sectors as it has been protected by the user, we do not know from where it has been locked.

MPC5746CRM -> this is the board on which we are working.

Is there any way from software to unlock flash sectors?

What are the ways to protect flash memory?

0 Kudos
Reply
4 Replies

2,160 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I do not know how it was locked.

If you can access those region via debugger, then you should be able to erase them.

If not in such case area you are tying to program is set as OTP.

petervlna_0-1728458172474.png

If you cannot access that area at all, there is most probaly PASS module password protection set for that areas.

Please provide correct passwords for debug:

petervlna_1-1728458245994.png

respective password for each location in PASS_CIN registers.

petervlna_2-1728458311741.png

For more details please refer to the Security chapter in the reference manual Chapter 78 Password and Device Security Module (PASS)

best regards,

Peter

 

 

 

2,155 Views
Dipti_Pawar
Contributor I
Hello Peter,

Thanks for the quick support!

I am able to access and erase the memory area via debugger.
But at the time of flashing application via bootloader, flash driver is not able to erase memory area.
What could be the reason for this?
0 Kudos
Reply

2,139 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

OK, that points on area is protected by PASS password.

Your bootloader need first provide valid password to the area protested trough PASS module CIN registers.

Debugger access will invalidate this protection, that is why you see it accessible via debug.

Please refer to the chapter 78.5 Functional description of reference manual for more details.

and also AN:

https://www.nxp.com/docs/en/application-note/AN12092.pdf

best regards,

Peter

0 Kudos
Reply

2,075 Views
Dipti_Pawar
Contributor I
Hello Team,

Thanks for the support!
Issue got resolved.
Rout cause of the problem is watchdog routine functionality not a memory protection.
Watchdog trigger function was placed in pFlash memory instead of RAM, this was caused issue for erase memory routine.

0 Kudos
Reply