Hi All,
I am developing a wince OS updating utility. This utility need to update the
device OS (Windows CE) reading the NK.bin from the device SD card and update
the device flash with new OS. When the device booted with ram image the
utility is work as expected and update the device OS as expected. But when
the device boots with flash image, the utility fails. In this occasion the
device flash deleted success fully but flash writing procedure fails.
Can anyone help me on this situation?
My device is PXA270 and flash is Intel StrataFlash® Embedded Memory (P30)
Family.

Thank in advance.
Sira

Re: Wince OS update Utility by Bruce

Bruce
Mon Sep 24 10:15:05 CDT 2007

You can't simultaneously write and read from flash. I suspect that not
all of the blocks erased. To update the flash with an image running XIP is
delicate at best. You will need to keep anything and everything that is
running XIP from running while you do the update.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"Sire Buwa" <SireBuwa@discussions.microsoft.com> wrote in message
news:B530B917-1972-435D-9B00-B81F1A58AB67@microsoft.com...
> Hi All,
> I am developing a wince OS updating utility. This utility need to update
> the
> device OS (Windows CE) reading the NK.bin from the device SD card and
> update
> the device flash with new OS. When the device booted with ram image the
> utility is work as expected and update the device OS as expected. But when
> the device boots with flash image, the utility fails. In this occasion the
> device flash deleted success fully but flash writing procedure fails.
> Can anyone help me on this situation?
> My device is PXA270 and flash is Intel StrataFlash® Embedded Memory (P30)
> Family.
>
> Thank in advance.
> Sira
>
>



Re: Wince OS update Utility by SireBuwa

SireBuwa
Tue Sep 25 08:52:05 CDT 2007

Hi Bruce Eitman,

Thank you very much. But I need to do above task. I disable all the
interrupts so the context switching is not happened. Do you have any idea to
do above task. IS there are a way to switch XIP stuff to device's ram ?

Thanks in advance
Sira Buwa.

"Bruce Eitman [eMVP]" wrote:

> You can't simultaneously write and read from flash. I suspect that not
> all of the blocks erased. To update the flash with an image running XIP is
> delicate at best. You will need to keep anything and everything that is
> running XIP from running while you do the update.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
> "Sire Buwa" <SireBuwa@discussions.microsoft.com> wrote in message
> news:B530B917-1972-435D-9B00-B81F1A58AB67@microsoft.com...
> > Hi All,
> > I am developing a wince OS updating utility. This utility need to update
> > the
> > device OS (Windows CE) reading the NK.bin from the device SD card and
> > update
> > the device flash with new OS. When the device booted with ram image the
> > utility is work as expected and update the device OS as expected. But when
> > the device boots with flash image, the utility fails. In this occasion the
> > device flash deleted success fully but flash writing procedure fails.
> > Can anyone help me on this situation?
> > My device is PXA270 and flash is Intel StrataFlash® Embedded Memory (P30)
> > Family.
> >
> > Thank in advance.
> > Sira
> >
> >
>
>
>

Re: Wince OS update Utility by Valter

Valter
Tue Sep 25 08:56:11 CDT 2007

=?Utf-8?B?U2lyZSBCdXdh?= <SireBuwa@discussions.microsoft.com> wrote
in news:E28A03D9-69F7-4718-A43B-02C5B46E0565@microsoft.com:

> Hi Bruce Eitman,
>
> Thank you very much. But I need to do above task. I disable all
> the interrupts so the context switching is not happened. Do you
> have any idea to do above task. IS there are a way to switch XIP
> stuff to device's ram ?

Disabling interrupt is necessary, but you should also check that your
own writing code is running from RAM and not from the flash. You may
add the upgrade application in the FILES section of your bib file or
set the compressed flag for it.
If you are using intel's P30 flash I think that you should unlock each
block before you can erase it.

--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)

Re: Wince OS update Utility by Dean

Dean
Tue Sep 25 12:12:42 CDT 2007

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.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Valter Minute" <v_a_l_t_e_r.m_i_n_u_t_e@g_m_a_i_l.com> wrote in message
news:Xns99B6A21D2370EVALTERMINUTE@207.46.248.16...
> =?Utf-8?B?U2lyZSBCdXdh?= <SireBuwa@discussions.microsoft.com> wrote
> in news:E28A03D9-69F7-4718-A43B-02C5B46E0565@microsoft.com:
>
>> Hi Bruce Eitman,
>>
>> Thank you very much. But I need to do above task. I disable all
>> the interrupts so the context switching is not happened. Do you
>> have any idea to do above task. IS there are a way to switch XIP
>> stuff to device's ram ?
>
> Disabling interrupt is necessary, but you should also check that your
> own writing code is running from RAM and not from the flash. You may
> add the upgrade application in the FILES section of your bib file or
> set the compressed flag for it.
> If you are using intel's P30 flash I think that you should unlock each
> block before you can erase it.
>
> --
> Valter Minute
> (the reply address of this message is invalid)
> (l'indirizzo di reply di questo messaggio non è valido)



Re: Wince OS update Utility by Valter

Valter
Tue Sep 25 16:31:18 CDT 2007

"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)

Re: Wince OS update Utility by SireBuwa

SireBuwa
Mon Oct 01 00:32:01 CDT 2007

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)
>

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)
>>