program flash write protection

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

program flash write protection

1,750 次查看
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 项奖励
回复
1 回复

1,699 次查看
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 项奖励
回复