A vehicle electronic module receives vehicle bus messages from a vehicle
communication bus interface. The vehicle bus messages may include vehicle
status data. The electronic module may determine whether a memory safety
condition has been met based on the vehicle status data. The electronic
module may delay reading or writing data, such as diagnostic data, into a
non-volatile memory until the memory safety condition is reached. The
data is read from or stored in the non-volatile memory with reduce risk
of corrupted data.