Safe poweroff for Win CE

I designed a custom carrier board based on Colibri Evaluation Board and the suggestion given here.

From the hardware point of view everything works fine and I can pull LOW a dedicated GPIO to completely power off the carrier board (and the module).

I wonder if, from Win CE and application point of view, it’s safe to drive low the pin without worrying about a possible “dirty” poweroff.

Could someone confirm this, please?

Dear @vix
A surprise power-off is safe in many situations, but not always. WinCE does access the flash memory only when triggered by the user application in the following situations:

  1. The user application requests to flush the registry
  2. The user application writes data to the ConfigBlock
  3. The user application writes/modifies files on any flash drive (\SD Card, \USB HD\ or \Flashdisk\

Impact:

  • (1) and (2) are rare operations, and typically triggered by user interactions.
  • (3) can be more of an issue. Even though using a TFAT file system helps a lot, we have no control over the firmware inside a flash drive.
    You can finish all OS writes by dismounting the flash drive. However, any write operation is reported to the OS as finished as soon as the data arrives in the flash drive’s cache.
    If you want to cover the worst case situation, I recommend to wait for 1-2 seconds after the OS dismounted the flash drives in order to give the flash drive firmware time to program the cached data into the actual flash.