Hi Koorosh,
SRAM ECC code is generated on RAM writes.
Out of POR, the SRAM content including the ECC code is not defined.
You should therefore avoid reading RAM data before they are initialized, the ECC error detection/correction is enabled on SRAM out of reset.
When a Flash phrase is erased, the corresponding Flash ECC code is also erased (all 1s) which is valid state, it can be read.
The ECC code is generated and programmed along with the Flash data during programming.
There are the following Flash commands that can be used to verify that the Flash is correctly erased or programmed:
Read 1s Block, Read 1s Section, Read 1s All Blocks, Program Check
S32K1xx RM rev.11 Section 36.5.10 Margin read commands.
BR, Daniel