Hi,
https://www.nxp.com/docs/en/application-note/AN12522.pdf
It mentions Modified Hamming Code scheme with 40-bit check base .... which is general topic for study.
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K14x-SRAM-ECC-Injection/ta-p/1129181
Best regards,
Ladislav