WinCE中掉电如何处理?

发布于 2024-08-23 09:21:35 字数 258 浏览 10 评论 0原文

我有一个通过以太网 (PoE) 供电的 WinCE 设备,我想防止潜在断电(例如用户拔掉插头)后文件系统损坏。

附带说明一下,我已经在使用 TexFAT,它应该可以防止 FS 损坏。虽然后者确实有助于减少 FS 损坏(相对于使用普通的旧 FAT),但它并不能完全防止某些损坏时不时发生...因此,我正在考虑使用小型可充电备用电池,这将使 WinCE有足够的时间彻底关闭。现在,我找不到有关关闭过程的任何信息:如何触发它、需要多长时间等等……MSDN 在这个主题上相当安静。有什么想法吗?

I've got a WinCE device powered over ethernet (PoE) and I want to prevent File-System corruption following a potential power loss, e.g. user pulling the plug.

As a side note, I'm already using TexFAT which is supposed to prevent FS corruptions. While the later certainly does help reducing FS corruptions (over using plain old FAT), it doesn't entirely prevent some to still occur from time to time... So, I'm considering using a small rechargeable backup battery that would give WinCE enough time to cleanly shut down. Now, I can't find any info on the shutdown process: how to trigger it, how long it takes, and so on... MSDN is pretty quiet on this topic. Any idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁吢 2024-08-30 09:21:35

断电顺序完全取决于平台。
以下答案与 Windows CE 6 相关。对于以前版本的 CE 可能有所不同。
如果您包含 电源管理器系统中的组件,则序列是加减:

  • 将 go to D4 发送到所有可进行电源管理并报告支持此状态的驱动程序。否则,驱动程序将获得其支持的最低功耗状态。
  • XXX_PowerDown 被调用,但在 Windows CE 6 中并不常用。
  • 如果您有基于 Hive 的注册表并且启用了注册表刷新线程,则在两者之间刷新注册表。 您应该在像您这样的脆弱系统中禁用此功能
  • OEMPowerOff
  • 设备已关闭

刚刚找到 Bruce Eitman 发表的一篇关于 挂起时发生。他说得比我好。
暂停序列是您在断电之前要做的事情。

The powerdown sequence is totally platform dependent.
The following answer is relevant to Windows CE 6. It may be different for previous versions of CE.
If you include the power manager component in your system, then the sequence is plus minus this:

  • Send go to D4 to all the drivers that are powermanageable and that reported they support this state. Otherwise, the driver gets the lowest powerstate it supports.
  • XXX_PowerDown is called, but it is not commonly used in Windows CE 6.
  • In between the registry is flushed in case you have a Hive Based registry and you enabled the registry flush thread. You should disable this in a fragile system such as yours
  • OEMPowerOff
  • device down

Just found a post by Bruce Eitman on what happens when Suspending. He puts it better than I do.
The Suspend sequence is what you'd do before loosing power.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文