Re: Wince OS update Utility by Dean
Dean
Mon Oct 01 11:11:03 CDT 2007
The application is in RAM, the operating system is not. If you get an
interrupt, generate an exception, or make an OS call then you will be back
to running from flash. At that point, you can only hope that you are
running from cache, and you won't always be.
You can control interrupts by disabling them, you can ensure you don't make
OS calls. But you can't disable exceptions. You have to understand how
they could be generated and make sure you do nothing that might cause that
to occur (and using the stack is one task that can cause an exception).
--
Dean Ramsier - eMVP
BSQUARE Corporation
"Sire Buwa" <SireBuwa@discussions.microsoft.com> wrote in message
news:4D7DB1BF-7F0C-4B01-B2FF-68B6257A8833@microsoft.com...
> Hi All,
>
> Thanks in advance for all your help. At the moment the Flash erasing
> functionality works fine. But when I try to write to the flash after
> deleting
> the required field need to be updated the application stops responding.
>
> But as I mentioned early the same application run without any error when
> the
> OS image is RAM Image.
>
> At the moment the I manually copy the Application using Active sync. So
> the
> the Utility application is totally run on RAM.
>
> So is there any reason the Flash Erasing works OK and Flash Write fail ?
>
> Please help me.
> Sira...
>
>
>
>
> "Valter Minute" wrote:
>
>> "Dean Ramsier" <ramsiernospam@nospam.com> wrote in
>> news:e$gqyb5$HHA.748@TK2MSFTNGP04.phx.gbl:
>>
>> > And make sure no exceptions occur. That means no page faults,
>> > stack faults etc. Note that while you have interrupts off,
>> > nothing else (including the OS timer) will run. Keeping in mind
>> > that the operation can take several *seconds* to complete (the
>> > erase, anyway) the system can be disabled for quite a long time.
>> > To do this properly is a far more difficult task than what you
>> > probably have in mind.
>> >
>>
>> IIRC some flash memories (Intel's strata flash?) allows you to suspend
>> and then resume delete operations and this will allow you to re-enable
>> interrupts often. Obviously this will slow down the process and will
>> made also the task more complex.
>> You should consider also that an error during the upgrade operation
>> may leave the device in a "bricked" state unless you provide and
>> alternate OS image that can be booted or other upgrade mechanism.
>>
>> --
>> Valter Minute
>> (the reply address of this message is invalid)
>> (l'indirizzo di reply di questo messaggio non è valido)
>>