Restart after POWER_OFF detection


Maybe someone know solution on how to detect module restart reason: power OFF or just software/exception reset?
I want to know, is module RTC time valid or not, but how i can see, in new devices (latest firmware?) wavecom use the worst available solution: after continuous power off clock starting from some saved time, NOT FROM DAFAULT, NOT FROM LAST SETUP. And so no way to know if time valid or not, now way to know if power loss occurred.
Any suggestions?

void adl_main ( adl_InitType_e InitType )


Not so simple. On software reset by AT+CFUN=1 InitType also contains POWER_ON value. Useless.

ADL_MEM_UNINIT sounds promising, but what is it? Can’t find any SDK references.

Just edited and added ADL_MEM_UNINIT.

It’s quite new, so make sure you have an appropriate version of SDK - See: viewtopic.php?f=19&t=4194&p=16570&hilit=ADL_MEM_UNINIT#p16570

Thanks for advice. Waiting for new SDK release.

You don’t need to wait for a new release - releases with this facility are already available for download!

I use OpenAT SDK 3.22 for Q24 series (v 6.57h firmware included) available now from dl section. Nothing about UNINIT option in this version.

I wasn’t aware, which forum I’am posting to. In Q24 case, you 'll have to detect it by yourselves.

Subscribe to AT+CFUN (or any other reset) command. In callback function flag its execution into flash, unsubscribe from AT+CFUN command and resubmit it to Wavecom Core software.

On power up / reset you will still have InitType and also set/cleared flag in flash.

Didn’t test, but it should work.

Ah yes - it looks like 3.22 is the last available for Q24?

To be certain that you could detect wheter a reset was due to software or a power cycle, you would have to trap every possible source of a software reset - not sure that’s feasible…?

Should. In some cases. Too complex and unreliable solution. Not good-looking, if you know what I mean.