watchdog, yield and ethernet library

Hi !

I've made a server with an arduino DUE and a home made ethernet card using a W5500 working with ethernet lib.
There is a hardware watchdog on the ethernet card and, unfortunately, when transactions are too slow, the watchdog is not trigger'd and the system boot occurs. There is no issue when I disconnect the watchdog, but it's needed.

I spend some time to understand the ethernet lib, I found the socketSend() function, and it's not clear for me if (or where) a time out is managed. client.print() can take a long time when no acknowledge comes.
As yield() is used in the waiting loop in socketSend(), I wish to include a watchdog trigger inside.

Should I juste add that in my code (without to fear "colateral effects") ?

void yield()
{
  trigwd();
}

Later I will bufferise all HTTP transactions and out them in background. Not a simple job, there is many clients for http, udp, ntp working at the same time.

thx

Later I will bufferise all HTTP transactions and out them in background. Not a simple job, there is many clients for http, udp, ntp working at the same time.

Are you sure you’ve chosen the right hardware? Sounds to me as if a Linux based board (e.g. Raspberry Pi) would have been a better choice. Remember the WizNet chip is able to handle 4 sockets (aka connections) at most.

pylon:
Are you sure you've chosen the right hardware? Sounds to me as if a Linux based board (e.g. Raspberry Pi) would have been a better choice. Remember the WizNet chip is able to handle 4 sockets (aka connections) at most.

Thx for your interest, W5500 handle 8 sockets and my system consumption is about 350mW (a little too much). I don't know if that is possible with a linux based system. When the software will be stabilized, I'll design a board with an STM32L for lower power (the goal is under 150mW).
No infos about yield ?

As for the sam platform yield() is defined as:

void yield(void) __attribute__ ((weak, alias("__empty")));

You may implement your own version and that one should be used by the linker.

pylon:
As for the sam platform yield() is defined as:

void yield(void) __attribute__ ((weak, alias("__empty")));

You may implement your own version and that one should be used by the linker.

thx, it's working

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.