From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Coldfire: MCF5271: Periodic HW watchdog petting and sleep function does not work.
Date: Wed, 04 Mar 2009 08:14:00 -0500 [thread overview]
Message-ID: <49AE7E98.8050208@RuggedCom.com> (raw)
In-Reply-To: <a90206390903031515i54c67b46k6ca4404a10386c6@mail.gmail.com>
TC Liew wrote:
> Richard,
>
> Can you be more specific on how the MAX6369 WDO and WDI connects to
> MCF5271's signal? Is it GPIO? ResetIn? Others?
>
> Regards,
> TsiChung
Hi TC,
Thanks for responding,
WDI is connected to a CPU GPIO, PTIMER[3] on our board and WDO is connected to the active low RESETIn of the CPU.
In case it matters, my hw_watchdog_reset function looks like this:
/*
* In <watchdog.h> this function is MACRO-ed to WATCHDOG_RESET
* The watchdog control pins are as follows:
* WDI = PTIMER[3] (DT1IN)
* WD_SET[2:0] = PTIMER[2:0] (DT1OUT, DT1IN, DT0OUT)
*/
void hw_watchdog_reset(void)
{
/* Setup the value first, then make it a GPO to avoid glitches */
/* Any edge is ok to reset watchdog (Bit is XORed each time) */
mbar_writeByte(MCF_GPIO_PODR_TIMER,
(mbar_readByte(MCF_GPIO_PODR_TIMER) ^ 0x08));
/*
* While it is true that seting the WDI as a GPO is only needed once,
* it is so critical for operation, hence it is enforced each time.
*/
/* Setup WDI direction as an output */
mbar_writeByte(MCF_GPIO_PDDR_TIMER,
(mbar_readByte(MCF_GPIO_PDDR_TIMER) | 0x08));
/* Set the pins as GPIO */
mbar_writeShort(MCF_GPIO_PAR_TIMER,
(mbar_readShort(MCF_GPIO_PAR_TIMER) & 0xF3FF));
}
Thanks for your time.
- Richard Retanubun
>
> On Mon, Mar 2, 2009 at 3:05 PM, Richard Retanubun
> <RichardRetanubun at ruggedcom.com <mailto:RichardRetanubun@ruggedcom.com>>
> wrote:
>
> Hi Guys,
>
> I am using u-boot 2009.03-rc1 and a board based on Coldfire
> MC5271EVB eval platform.
> Our external watchdog is a MAX6369.
>
> I have #define CONFIG_HW_WATCHDOG and #undef CONFIG_WATCHDOG in our
> board's config file and
> have created the hw_watchdog_reset function to toggle the WDI line
> to pet the watchdog.
>
> However, my board keeps resetting at the watchdog timeout. Upon
> probing, I found out that
> the watchdog toggle line in not being toggled periodically by
> u-boot. Which means a regular call
> to WATCHDOG_RESET() is not happening. If I execute commands, the WDI
> will get toggled and the watchdog
> will not timeout, which means that the WATCHDOG_RESET() mapping to
> hw_watchdog_reset function is working, it is
> just not being called periodically.
>
> I am looking at the programmable interrupt timer that the
> get_timer() function uses, and so far everything checks out.
>
> I'm also stuck at using u-boot's sleep command, e.g. "sleep 1" will
> never return. Which I suspect may be the same root cause.
> (this can also be observed on the M5271EVB board).
>
> What am I missing here?
>
> Thank you for all your time.
>
> Regards,
>
> - Richard Retanubun.
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de <mailto:U-Boot@lists.denx.de>
> http://lists.denx.de/mailman/listinfo/u-boot
>
>
next prev parent reply other threads:[~2009-03-04 13:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 21:05 [U-Boot] Coldfire: MCF5271: Periodic HW watchdog petting and sleep function does not work Richard Retanubun
2009-03-03 23:15 ` TC Liew
2009-03-04 13:14 ` Richard Retanubun [this message]
[not found] ` <a90206390903050739i2a2f4296l97251d4c1f656551@mail.gmail.com>
[not found] ` <49B0282A.6010203@RuggedCom.com>
2009-03-19 21:15 ` Richard Retanubun
2009-03-26 19:08 ` TC Liew
2009-03-26 19:34 ` Richard Retanubun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49AE7E98.8050208@RuggedCom.com \
--to=richardretanubun@ruggedcom.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox