Hello,
I am bit new to the NXP ecosystem and would desperately require help.
I am using the S32K118 and have been trying to use D-Flash as non volatile memory, but I can't seem to make it work which ever way I try..
At first I tried to partition the FlexNVM to emulate EEEPROM, but that constantly gave me ACCERR. I tried to go over all the reason for it in the datasheet, but the only one I could think of was, that the function was written to P-Flash, but had to be in RAM ("The
Program Partition command must not be launched from flash memory, since flash
memory resources are not accessible during Program Partition command execution."). I couldn't get the function to RAM either, because then I ran in to some linker problems...
Since that didn't work I figured I'd try to just write manually to D-FLASH, but I get the MGSTAT error, which means it has not been cleared. When I tried to clear it, I get to HardFault... AI suggests that it might be the problem of not running the function from RAM again, but I can't get it to work as mentioned earilier...
I will add my files down below and would greatly appreciate any help.