
I'm trying in board iMX233-OLinuXino-MICRO ( https://www.olimex.com/Products/OLinuXino/iMX233/iMX233-OLinuXino-MICRO/open... ) setup hardware watchdog in 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
I tested like this:
1. recompile code with calling method hw_watchdog_init 3. upload this file to my SD card with dd command 3. start linux 4. waiting for 128 seconds and I was expecting that the system will berestart but did not.
What to do?
WDOG1_BASE_ADDR -> what is the value of this variable ?
Thank you
2013/11/21 Troy Kisky troy.kisky@boundarydevices.com
On 11/20/2013 3:48 PM, Bojan Buić wrote:
Hello,
I found Your commit in u-boot repository(git://git.denx.de/u-boot.git < http://git.denx.de/u-boot.git%3E).
Can You help me , how can enable hardware watchdog in U-Boot ?
I found imx_watchdog.c class but when I call hw_watcdog_init nothing happened
Can You help me ?
Thank youBojan Buić
What did you expect to happen? Tell me how you are testing it? Also,
please CC the list. u-boot@lists.denx.de
Troy

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

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 =====================================================================

Which register I need set up for hard. watchdog ?
Bojan
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 =====================================================================

On 21/11/2013 15:01, Bojan Buić wrote:
Which register I need set up for hard. watchdog ?
Please read carefully Chapter 23 amn 23.8.6 in the User Manuaal, you will find answer to all your question.
Best regards, Stefano Babic

Sorry for many questions, but I work once with 8 bit ATmega 8 microcontroler and nothing more :(
In manual I found this :
HW_RTC_WATCHDOG 0x050 HW_RTC_WATCHDOG_SET 0x054 HW_RTC_WATCHDOG_CLR 0x058 HW_RTC_WATCHDOG_TOG 0x05C
and now I do not know which register i need setup to enable watchdog ? 0x054? Which value i need write to that register ?
Bojan
2013/11/21 Stefano Babic sbabic@denx.de
On 21/11/2013 15:01, Bojan Buić wrote:
Which register I need set up for hard. watchdog ?
Please read carefully Chapter 23 amn 23.8.6 in the User Manuaal, you will find answer to all your question.
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 =====================================================================

I found address of register HW_RTC_WATCHDOG_SET: 0x8005C054
I need write to that register value 0x054 ?
Bojan
2013/11/21 Bojan Buić bojan.buic@gmail.com
Sorry for many questions, but I work once with 8 bit ATmega 8 microcontroler and nothing more :(
In manual I found this :
HW_RTC_WATCHDOG 0x050 HW_RTC_WATCHDOG_SET 0x054 HW_RTC_WATCHDOG_CLR 0x058 HW_RTC_WATCHDOG_TOG 0x05C
and now I do not know which register i need setup to enable watchdog ? 0x054? Which value i need write to that register ?
Bojan
2013/11/21 Stefano Babic sbabic@denx.de
On 21/11/2013 15:01, Bojan Buić wrote:
Which register I need set up for hard. watchdog ?
Please read carefully Chapter 23 amn 23.8.6 in the User Manuaal, you will find answer to all your question.
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 =====================================================================
-- Bojan Buić

Dear Bojan,
In message CAP8r_=A-vSHTfcbyUeaZfM2Z8=q_-AEMqaaiasPo=kVU5GkfwA@mail.gmail.com you wrote:
I found address of register HW_RTC_WATCHDOG_SET: 0x8005C054
I need write to that register value 0x054 ?
Please don't expect others doing the work for you. Stefano already pointed you to the right section of the manual, so please invest your own time and efforts to read it and to figure out what needs to be done.
If you can't figure out what needs to be done, you might consider hiring an expert.
Best regards,
Wolfgang Denk
participants (3)
-
Bojan Buić
-
Stefano Babic
-
Wolfgang Denk