From owner-freebsd-arm@FreeBSD.ORG Thu Oct 31 19:12:02 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1CFE8420 for ; Thu, 31 Oct 2013 19:12:02 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: from mail-we0-x236.google.com (mail-we0-x236.google.com [IPv6:2a00:1450:400c:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AF00829E8 for ; Thu, 31 Oct 2013 19:12:01 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id t61so3167710wes.13 for ; Thu, 31 Oct 2013 12:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=hATLKZLEuHxocS+WJVX4/3sRVZtYTZk40PJpouvj2nY=; b=UFeqjfwPG5Yjck1kYRIuhMFm37c0c2DIb3ckJS7Lz94SvZZj8NzPex4Q4pUsVPaac8 iR3wuqqpExlKHgZaOCapMEyD5EL4yMYY0e9d98WmMFSzjeE+GAimVieorRxG2l7kvZA+ 5hoyOYskDO0darSnBi1H8+AtrFZamUa+yaoufglgUMY3pb677EUnZDaexaFwi8kfn/KO YwOM71EEK2yronvNaMlglltlN42fEwq7OlqvYvv2MJCKwDELOBDNPfiilO19M1B383Rn 9rd0eB/mzbhi8Qg0KHb/J44H6TSL7N2KeoB/8mviIO3HJNW0cqfoFbomTZtjZc6w5vGR SVuQ== X-Received: by 10.180.24.197 with SMTP id w5mr879657wif.8.1383246720081; Thu, 31 Oct 2013 12:12:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.206.132 with HTTP; Thu, 31 Oct 2013 12:11:29 -0700 (PDT) In-Reply-To: References: <43584768717.406e8ebb@mail.schwarzes.net> From: Jia-Shiun Li Date: Fri, 1 Nov 2013 03:11:29 +0800 Message-ID: Subject: Re: raspberry pi BCM2708 hardware watchdog To: Oleksandr Tymoshenko Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-arm@freebsd.org" , Andreas Schwarz X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 19:12:02 -0000 On Tue, Oct 22, 2013 at 1:24 PM, Oleksandr Tymoshenko wrote: > > Watchdog was used for rebooting device only. I've just committed support for > actual watchdog function: http://svnweb.freebsd.org/changeset/base/256871 > Hi, I tried playing the watchdog for a while, but it does not seem to be set correct timeout. I tried to set timeout to 120 seconds to test with the following command, but get immediate reset after around 1~2 seconds: ---8<--- # watchdogd --debug -t 120 --pretimeout 15 --pretimeout-action log,printf -e 'sleep 60' -w shifted 137438953472 seconds_to_pow2ns: seconds: 120, ns 120000000000, power 37 Timeout for -t is 2^37 nanoseconds (in: 120 sec -> out: 137 sec 438953472 ns -> 13745 ticks) Timeout is 2^37 nanoseconds ---8<--- but if I omit the -e command, rpi will keep running and the watchdog hardware seems correctly being kicked by watchdogd. If I directly test with watchdog -d -t 120 it also reboots almost immediately. It there something wrong or did I misunderstand it? I am running FreeBSD raspberry-pi 11.0-CURRENT FreeBSD 11.0-CURRENT #2 r257094: Sat Oct 26 00:16:37 CST 2013 jsli@4cbsd:/rpi/obj/arm.armv6/usr/src/sys/RPI-B arm Regards, Jia-Shiun.