Added current state saving to FRAM