How to process data of a large buffer

Hi,
I’ve next situation:

.....
u8 buffer[1000];

/* fill buffer */
........

/* process buffer data */
for(i=0;i<1000;i++)
{
     buffer[i] += 67; 
}
......

Data processing loop makes WMP150 to reboot.

How can I process buffer data without system reboots?

Thanks in advance!

watchdog?

Thanks Jeroen.
I’ve read that are 2 kinds of watchdog in OpenAT but i don’t know what watchdog I should use.
Could you explain me? I’ve never used It before with OpenAT.

Thanks in advance

I can’t tell you the details since I don’t know them. But there is a hardware watchdog, which I guess is an IC / part of the sillicon which needs to be periodically “reloaded” in order not to reset the MCU (default 3 seconds if I recall correctly). This is done by openat itself if you don’t block, but when you process large amount of data you might get close to the expire time. So either you can try to set the expire time to a longer value or periodically reset it while processing data. Note that this while block the whole execution of the “application” context and the application might become less responsive (or lock it up at all, so don’t start processing immediately, but always wait for a startup delay, to at least be able to send an AT+WOPEN=0).

The application wachtdog is a watchdog implemented by openat, it can simply be (temporarily) disabled.

Alternatively you could (perhaps?) put the large work in a lower priority task and call adl_ctxSleep every now and then. But I don’t have much experience with the multiple task feature provided.

I’ve been reading watchdog documentation and I made some tests, but i don’t like my results. Now I’m going follow your seccond idea, try implementing a lower prioty task to separate main application from high duty processing.

Thanks Jeroen.