s32k144 nvmodule
I am working with Flex NVM of s32k144. Currently I am only able to write data to NVM in block size of 8bytes, Is there a way to write the data byte by byte?
Every time before writing to the NVM I am doing erase operation of the block, is it necessary to erase the block before writing the data? I tried to write data without erasing, but I am getting the error code "E_FTFE_ERR_MGSTAT0" .
Hi,
Yes, it needs to be erased, because the programming operation can only change NVM bits from the erase state (1) to the programmed state (0), otherwise the error flag (MGSTAT0) is set. The smallest portion that can be erased is a sector (2k). You cannot write data in single bytes, it must be a phrase (8 bytes).
Regards,
Daniel