How to shutdown Orin correctly when installed in a machine?

We are going to put the Orin dev kit in a machine with many microcontrollers. This is the only component with an OS on it and requires much longer than the uCs to startup, which is okay. However, when shutting down, we just cut power to the whole system with a switch. I am wondering if cutting off power to the Orin dev kit will reduce the lifetime of the part or impact system stability. What would be your suggestions regarding shutting down Orin in real-time systems?

Jetsons are a full computer even if physically small. Compare to this question: “Is it ok to pull the power plug from the wall on my home computer if the shutdown command is not convenient?”. The filesystem has cache, and depending on what is currently writing, or written but still cached, something is being damaged. Not necessarily the life of the eMMC, but at the least, data is damaged if the system is not flushed and read-only.

On a filesystem with a journal there are synchronous logs of what is to be written in combination with what has actually been flushed. In a proper shutdown the journal is empty. If there is some minimal problem, then something to be written is incomplete, and during startup, the journal will replay in reverse and remove the content which was buffered but not written. That data will be missing.

If the amount of data not written exceeds the journal size, then it is not possible to remove the changes. Should that amount of change have an effect on more than just one file, e.g., a directory is changing, then the filesystem can become corrupt and all future writes will further damage the filesystem and eventually destroy anything (or everything). How much of the operating system and other data are you willing to lose? Are you willing to risk the entire system being lost?

There are ways to force emergency sync, followed by forced entry to read-only mode. Once this is done, then you can “pull the power cord”. To automate this you would need some sort of power backup capable of detecting power loss, and quickly writing cached data, followed by forcing read-only mode.

You could greatly increase the journal size, but consider this just means you will lose more data upon removal of power. You would lose the operating system less often, but you could still lose everything. It just depends on what is going on at the moment of removing power.

I don’t know if a supercapacitor would be sufficient followed by emergency sync and forced read-only mode. I don’t know how much power and time would be required to sync and go read-only.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.