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);
Hello Kui Wu,
The RM shows only an example.
I understand that you have S32K146 with 1MB total_program_flash_size (0x00000000 - 0x000FFFFF).
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).
Regards,
Daniel