
Stefano you're right :),
I copy this method to main.c class and then call it, because when i call it from extern class it did not work
Does someone know how write function which will start hard. watchdog on mx23 controller ? I not very familiar with registry of this proc.
Thank you
2013/11/21 Stefano Babic sbabic@denx.de
Hi Bojan,
On 21/11/2013 09:09, Bojan Buić wrote:
I'm trying in board iMX233-OLinuXino-MICRO (
https://www.olimex.com/Products/OLinuXino/iMX233/iMX233-OLinuXino-MICRO/open... )
setup hardware watchdogin the uboot.
I checkout uboot code and recompile it(I found steps here : http://www.jann.cc/2013/02/07/u_boot_for_the_imx233_olinuxino.html).
I tried to call a function hw_watchdog_init from class: imx_watchdog.c (
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/watchdog/imx_watchdog.c;h=... )
in the code .
In this method, I uncomment line # define CONFIG_WATCHDOG_TIMEOUT_MSECS 128000 and I expected that the system will be restarted after, 128 seconds, but did not. I am sure that this method(hw_watchdog_init) is called because before and after i write debug messages to console
Wait...
Checking the Makefile in the drivers/watchdog directory:
ifneq (,$(filter $(SOC), mx31 mx35 mx5 mx6 vf610)) obj-y += imx_watchdog.o endif
That is: watchdog is supported for other i.MX families. It is not surprising if it is not working, I am surprised that hw_watchdog_init is called, because imx_watchdog should not be compiled.
I have not checked inside MX23 manual, but if it is as in MX28 you have to enable the watchdog inside the RTC. It works in a different way as in other imx, and the current driver is not suitable for MX23. You have to add support for it.
Best regards, Stefano Babic
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de =====================================================================