All Forums
 Microsoft Windows CE
 CE Drivers
 proper bitsyXb shutdown?
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

sblary

6 Posts

Posted - 06 May 2010 :  07:09:47  Show Profile  Email Poster
Currently we are momentarily grounding the RQONOFF pin to suspend the BitsyXb before we remove power from the system.

One of our developers has the following questions:

"We currently do a lot of file operations, including several files in the internal FlashFX disk and on external CF, SD and USB memory devices.

"I'm concerned about the possibility that the poweroff function of the power management module, which is doing little more than cutting the power, could be corrupting the file systems on one or more of these storage areas if they're not being given a chance to close gracefully.

"Before issuing the shutdown command, the software is closing all of the files. But is there any caching on any of the file systems that needs to be dealt with? Is there some sort of graceful shutdown process I should tell Windows CE to go into in order to prevent damage to the file systems? I can't seem to find a definitive answer to this question and I was hoping one of you might be able to help me.


Any guidance you may offer is appreciated! Thanks!
Steve

twhite

133 Posts

Posted - 06 May 2010 :  09:41:07  Show Profile  Email Poster
sblary,

Could you please let us know which version of Windows CE you're using? Once we have that, we'll run your questions by our software engineering team.

Thanks!
Go to Top of Page

twhite

133 Posts

Posted - 06 May 2010 :  10:34:33  Show Profile  Email Poster
sblary,

You are definitely on the right track about being concerned with file corruption and avoiding it at all costs.

We have some areas on our forums that discuss this. Please take a look and let us know how well they work for you:
http://support.eurotech-inc.com/forums/topic.asp?topic_id=785 CE Power Management Functions
http://support.eurotech-inc.com/forums/topic.asp?topic_id=1292 SleepIntercept (RQONOFF Handling)

If you're trapping the RQONOFF interrupt using the BitsyXb, the string you should be monitoring would be "VDDPWROFF". For the Bitsy Plus, the string is "PWROFF".

Please let us know what else we can do to help...
Go to Top of Page

jthorne

4 Posts

Posted - 07 May 2010 :  12:24:57  Show Profile
Just a point of clarification: There's no external way to power off the device. Instead, the user interface menus in the software contain a "turn off" option, and when the user selects that option, the software first does all of its clean-up operations, then powers off the writer.

So my real question is this: What should I do during the clean-up operations?

Right now, it's closing all of the open files. By the time it issues the power-off command, there's not a single open file in the system.

My question is: Is that enough? Does CE or any of the drivers for the external storage mechanisms, such as SD cards or USB drives, cache any data that might get lost if I power off too quickly after closing the files? Is there anything more that I should check for before powering it off?

The example message threads aren't quite enough information. For example:

"SleepIntercept is a helper class that allows your application to do work after an RQONOFF (suspend) interrupt occurs and before the system actually goes to sleep."

Well, I know when it's going to sleep because I'm telling it when in the software. So when it says "do work" that's the part I'm unsure about. What work?
Go to Top of Page

twhite

133 Posts

Posted - 07 May 2010 :  14:55:11  Show Profile  Email Poster
At least one other thing to consider is flushing any registry changes...Take a look at topic 2932.
Go to Top of Page

sblary

6 Posts

Posted - 09 May 2010 :  08:08:33  Show Profile  Email Poster
Thanks for the prompt replies!

In our application we are closing all files *before* our application pulls the RQONOFF to ground.

We are still unclear as to the answer to the basic question:

"Is closing files sufficient to keep them from getting corrupt when powering off?"

Thanks!
Steve
Go to Top of Page

twhite

133 Posts

Posted - 12 May 2010 :  14:38:15  Show Profile  Email Poster
sblary,

According to our CE expert, he said that closing the files promptly immediately before shutdown should be the safest way to handle your shutdown. In fact, he said that my suggestion of flushing the registry isn't needed. Proper power conditioning, and, possible use of a Supercap to handle powerdown is recommended, too.

Good luck and keep in touch with this issue...
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000