I am trying to achieve a configuration in which I plan to use the following features on a S32K118
1.) EEPROM emulation with size set to 2kB
2.) DEPART set to 1001 to use 24kB of FlexNVM as EEPROM backup and 8 kB as DFLASH
3.) CSec enabled with 3 keys
4.) 256 kB of PFlash is used by the application code
The reference manual mentions the possibility of loading code into the FlexNVM section, however Section 5 of AN12003.pdf (Using S32K148 FlexNVM Memory) says
Any software driver that uses CSEc, EEPROM (writes only) or Flash controller commands must not be placed inFlexNVM’s PFlash.
In the event that my bootloader is placed in the FlexNVM,
1.) will I lose the secure boot options?
2.) will I lose the ability to write to EEPROM (in the bootloader code)?
3.) will I lose the ability to perform CSec operations (in the bootloasder code)?
Yes, you would not be able to execute EEPROM writes (2) and SCEc commands (3) from DFlash.
You should be able to use Strict Sequential Boot Mode (1) while the core stays in RESET.
But the secure boot is run on PFLASH block starting at address 0.