Write to Flash Stop Timers!


#1

Hi all,

when write flash is in progress (adl_flhWrite) all timers stop ! Only when the process finish, the timers run again ! Why ?
In my application i write large blocks in flash and timers still stopped all the time ! What can i do to solve this problem ?

Hegler


#2

Hello,

Do you mean, that the timers stop completly and not counting the elapsed time or just not trigger events for the OAT application during the write-phase?

Cheers,
tom


#3

The RTC certainly doesn’t stop, but your timer-triggered callbacks can’t be run: you’re in a single thread application, so they’re saved for when your current callback (the one calling adl_flhWrite()) returns.

If that’s a problem for you, you need to cut your writing in smaller chunks, and tweak your application so that these flash writes happen in several, shorter callbacks (e.g. do them in response to a cyclic timer event).

Unfortunately, that will force you to change the way you store your stuff in flash, since you can’t write a single flash object in several steps. Consider A&D storage, or a binary format change (there’s a 32KB limit on flash object sizes anyway).