s32k seires P-Flash protect question

cancel
Showing results for 
Search instead for 
Did you mean: 

s32k seires P-Flash protect question

Jump to solution
150 Views
Contributor III

Hello. I'm trying to understand FPROT Register.

 

kmh48301_0-1600048440079.png

RM 825P

In NVM Normal mode : ~~ << I don't understand this part.

 

1. Does this mean that protection is only to be able to protect 'erase'?

but I think this doesn't make sense.

because of this

kmh48301_1-1600048577694.png

 

2. "currently unprotected
memory can be protected, but currently protected memory cannot be unprotected."

It sounds like once I protect some register, the protected register  will be protected

forever..(unless I do mass erase).

 

I can't test all flash commands due to its risk.

so I can't help but guessing many things..

 

 

3. If I protect some region in Flash, the memory monitor shows protected region as '0'?

 

 

4. hopfully, if you don't mind, Could you please show me the code and memory monitor

handling Flash Protection?

 

 

Thanks

Best regards,

Phillip

Labels (1)
0 Kudos
1 Solution
118 Views
NXP TechSupport
NXP TechSupport

Hi Phillip,

No, the FPROT register bits cannot be changed from protected (0) to unprotected (1).

 

Regards,

Daniel

 

View solution in original post

0 Kudos
3 Replies
119 Views
NXP TechSupport
NXP TechSupport

Hi Phillip,

No, the FPROT register bits cannot be changed from protected (0) to unprotected (1).

 

Regards,

Daniel

 

View solution in original post

0 Kudos
142 Views
NXP TechSupport
NXP TechSupport

Hello Phillip,

1. The FTFC module on S32K is always in NVM Normal mode.

danielmartynek_0-1600093444819.png

If a region is protected, it cannot be erased or programmed (except for mass erase) but it can be read.

 

2.

Yes, that's correct, it can be changed from Unprotected to Protected only.

 

3.

The debugger and all the other masters on the bus can read protected flash regions.

 

4.

If you want to protect the first region, which is 16kB on S32K144 (0x0000 - 0x4000), you need to clear FPROT3[0] (36.5.1 Flash protection).

You can changed the Flash Configuration Field in the startup_S32K144.S file so that the flash can be protected out of system reset.

danielmartynek_1-1600093876805.png

 

Regards,

Daniel

 

 

 

0 Kudos
137 Views
Contributor III

Hi

Thanks for replying

 

but not sure yet about protection

 

So If I protect some region through startup.s file, is there no way to change

to unprotect currently protected region?

 

kmh48301_0-1600125099191.png

(0x40020013 is fprot register address)

But when I change the register's value, it is possible to change from protect

to unprotect..

 

thanks

Best regards,

Phillip

0 Kudos