title: Programming in presence of watchdog timer
body: <p>I am new to embedded systems programming, although I have done courses during studies, practical programming is still a bit further away.</p>
  
  <p>Here is the problem: I have to program a small system on NXP LPC2103 microcontroller (ARM 7 based), without an operating system. It has a watchdog timer which needs to be regularly updated. The system has a GPRS modem with TCP/IP stack embedded, and initializing this takes time longer than the watchdog needs to timeout. When I call the initialization function, the system resets.</p>
  
  <p>I spoke to a more experienced colleague and he suggested that I need to exit and reenter the same initialization function from the main function in which I bite the watchdog timer so long until the function finishes executing. The idea sounds good, but I would like to also hear some other experiences. Also, a reference (book or website) could be also useful, because I couldn't find anything specific to this.</p>
  
  <p>I wouldn't like to call watchdog timer from the initialization function, I don't find this good.</p>