program flash write protection

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

program flash write protection

575 Views
814420552
Contributor III

hello,

      The address total space is 512KB ,whether the description is wrong?  and why 512K Flash start address is not 0? 

      My device is 1MB  ,  1 M /8 = 32KB  so every region is 32 KB and called FLASH_DRV_SetPFlashProtection(0x20000000); 

      

      1. FLASH_DRV_Program(&flashSSDConfig, 0x8000-24, 24, sourceBuffer);        0x8000 is 32KB why this time write fail?

      2. FLASH_DRV_Program(&flashSSDConfig, 0x8000, 24, sourceBuffer);           

      

pastedImage_4.png

0 Kudos
1 Reply

524 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Kui Wu,

The RM shows only an example.


I understand that you have S32K146 with 1MB total_program_flash_size (0x00000000 - 0x000FFFFF).

 pastedImage_1.png

One region size is therefore 32kB, 0x7FFF

And because you call this:
FLASH_DRV_SetPFlashProtection(0x20000000);

All the regions are protected except for region 29 (0xE8000 - 0xF0000).

pastedImage_2.png

Regards,

Daniel

0 Kudos