Best external watchdog interval



We have a modem design which uses Q2687RD inside. We only use Airprime Q2687RD modules and all other companents are our own desing. We want to add an external watchdog companent to our device.

Acoourding to software/firmware download, we try to decide what the interval of this watchdog should be. For instance, if it is 15 seconds, will it be enough for DOTA both type 1 and 2? You know on DOTA, i first download the file from FTP and save on A&D memory. Then module restarts with the new firmware/software. I try to decide the best interval for a watchdog so that i can operate firmware/software and other long-responsed tasks.

For Instance, when i execute AT+WOPEN=6,1028 , then module restarts itself and waits until its operation completes. And this takes about 10 seconds. So this means that i need a watchdog whose interval is more than 10 seconds. Like this, i must measure how much time a dota operation takes after adl_install.

I wonder if you use external watchdog in your design and what kind of watchdog is it if you have? What is its time interval?


I have found that an application file DOTA (not including a Firmware DOTA) install takes 26 seconds for approx. 700k application file. I have my watchdog set for 32 seconds to be safe. Not sure how long a Firmware install takes.


Hello tomridl,
Downloading a firmware file(R7.46, around 1.2MB) takes about 1 minute. This shows i must set my watchdog more than 1 minute. Can anything take longer than a firmware download?


You need to be careful about putting a timeout on downloading. If the module gets into area with especially poor radio coverage, this will seriously drop.

adl_adInstall() does not seem to be affected by watchdog, at least from my experience, so you can skip considering time to install from calculations. Anyway, when you issue this command, control is taken away from you.


He was referring to an external watchdog, for example, an additional microcontroller that communicates with the modem via UART or SPI or a watchdog chip that is reset via a GPIO pulse. If the communication stops, the external watchdog resets the unit. When an install of new firmware is being done, there is no comms possible, however it is still possible while the modem is downloading the firmware update, so the watchdog will be reset.

I’ve found that reformating the A&D memory (AT+WOPEN=6,X) takes quite a long time if you are using a large portion of your memory for A&D, but I don’t know the exact time. This can also only be done with the application stopped, so you may never need to do it apart from initial programming.


Yes, we are going to use an external watchdog as tomridl said. So adl_adInstall() will also be effected by watchdog. So i need to take care of this.
I have done some tests and we decided to use a watchdog 1.5 minutes interval.
An other question… Which pin of your module do you apply your watchdog pin? Reset pin of your module or ON/OFF pin of your module?


In my application, remove power completely by shutting down my power supply. However, you should use the reset line as the ON/OFF line is only used after a CPOF is issued by the modem to power off the modem, and to power on the modem. So pulling this line low does not force a reset. If you just want to force a reset, you should hook up to the reset line as suggested in the PTS (i.e. though a transistor). Alternatively, you can place a low resistance FET in your power supply line and perform a complete power cycle, but I think reset is better.


Hi tomridl,
We have tried both ON/OFF pin and reset pin.
As you mentioned, in order to use ON/OFF pin i must first execute AT+CPOF command. Otherwise module will not be reset. There is a possibility that our open at software may get stuck and we may not perform CPOF. Then our watchdog would be useless.
Reset pin is a preferred way to reset module. However, there are still some companents(like internal power managment unit, rf unit) on power while performing reset through reset pin. So actually, this wouldnt be the same as powering off/on the modem. This is still a good choice but we will probably preffer removing power completly like you do in your application.
I want to know if you have some logic which performs hardreset(removing power) by watchdog in your open at application. And if yes, have you ever experienced any issue like memory curroption or anything? I am asking this because we have plan to perform a hardreset onpurpose by watchdog once a day.


There have been reports on this forum of cases where only a power cycle would clear an issue - a reset was not sufficient.

Always be sure that your application attempts to shut down cleanly before you remove power.


Very true. You should always issue a AT+CPOF or AT+CFUN=0 before performing a power reset, otherwise you may have to run through a flash clean-up procedure when powering on again. I have been guilty of not always doing this :blush:


Also, if you don’t de-register from the network cleanly, it may “blacklist” your device as (potentially) faulty - especially if this happens frequently…


AT+CFUN=0 or AT+CFUN=4 perform an IMSI detach. Am I correct in assuming that this is a clean de-registration?


Falling into blacklist…This is something that i am really afraid of.
Accourding to this, i am told to apply gprs deattach first, then gsm deattach, module power off and then reset.
wip_bearerStopwip_bearerCloseAT+CFUN=4AT+CFUN=0 or AT+CPOF or both Reset

Finally, whenever i am going to perform a hardreset (or soft), i will first deattach from gprs/gsm.


I think AT+CPOF or AT+CFUN=0 should be sufficient.


Sounds good to me :slight_smile: