[U-Boot-Users] Watchdog timer reset

Wolfgang Denk wd at denx.de
Thu May 12 15:35:16 CEST 2005


In message <9b7ca657050512050554c9e1dd at mail.gmail.com> you wrote:
>
> I'd really appreciate it if you could point me to a file or a function
> to take a look.

watchdog_reset() for example?

Try running something like

	$ cd u-boot
	$ find * -type f | xargs egrep watchdog
or	$ find * -type f | xargs egrep watchdog_reset

> :P sorry for trying an easy way out, but if you happen to know good
> place to start, dont hesitate (please) :)

See above - this is obviosly  hardware  dependent,  but  looking  for
watchdog_reset() in cpu/*/cpu.c might be helpful...

> Okay, its basically using alarm() to produce SIGALRM every 10 seconds.
> (assuming alarm() takes second as an argument) And using signal() we
> are calling runme() function everytime it is woken up by SIGALRM.
> Natually, runme() will do whatever it needs to do, and sets another
> alarm before it ends. Not shown in the code, is probably a block read
> so it keeps the program running.
> Hopefully this makes more sense than a code :P

No, it does not. As mentioned before, there are no signals  or  tasks
or  similar in U-Boot. Everything is strictly single-tasking. I'm not
sure waht you want, but you can problaby do something like 

	for  (;;) {
		/* do something */
		usleep (10 * CFG_HZ);
	}

in C, but I don't understand what that would give you.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Gods don't like people not doing much work. People  who  aren't  busy
all the time might start to _think_.  - Terry Pratchett, _Small Gods_




More information about the U-Boot mailing list