2009-06-11 02:47:47     Couldn't run watchdog Testprogram in BF527

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-06-11 02:47:47     Couldn't run watchdog Testprogram in BF527

Rekha B (INDIA)

Message: 75491   

 

Hi all,

 

I wasnt able to run the following watchdog- test program in BF527 ,

 

int main(void)

{

    int fd = open("/dev/watchdog", O_WRONLY);

 

    if (fd == -1)

    {

        perror("watchdog");

        exit(EXIT_FAILURE);

    }

 

    while (1)

    {

             ioctl(fd, WDIOC_KEEPALIVE, 0); /* Keep alive*/

            sleep(10);

   }             

    close(fd);

    return 1;

}

 

Log:

 

U-Boot 1.1.6 (ADI-2009R1-pre) (Apr  7 2009 - 16:57:02)

 

CPU:   ADSP bf527-0.2 (Detected Rev: 0.2)

Board: ADI BF527 EZ-Kit board

       Support:   blackfin.uclinux.org/

Clock: VCO: 600 MHz, Core: 600 MHz, System: 120 MHz

RAM:   64 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   00:E0:22:FE:BE:07

Hit any key to stop autoboot:  0

bfin> set serverip 10.142.14.166;set ipaddr 10.142.14.198;set ethaddr 00:11:2:33:44:55;pri                                   ntenv;tftp 0x1000000 uImage_W

bootargs=root=/dev/mtdblock0 rw profile = 2 earlyprintk=serial,uart1,57600 console=tty0 co                                   nsole=ttyBF0,57600

bootdelay=5

baudrate=57600

loads_echo=1

autoload=no

rootpath=/romfs

hostname=bf527-ezkit

loadaddr=0x1000000

ubootfile=u-boot.ldr

update=tftp $(loadaddr) $(ubootfile);protect off 0x20000000 0x2003FFFF;erase 0x20000000 0x                                   2003FFFF;cp.b $(loadaddr) 0x20000000 $(filesize)

addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname                                   ):eth0:off

ramargs=set bootargs root=/dev/mtdblock0 rw profile = 2 earlyprintk=serial,uart1,57600 con                                   sole=tty0 console=ttyBF0,57600

ramboot=tftp $(loadaddr) uImage;run ramargs;run addip;bootm

nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3

nfsboot=tftp $(loadaddr) vmImage;run nfsargs;run addip;bootm

flashboot=bootm 0x20100000

ethact=Blackfin EMAC

gatewayip=172.16.1.1

netmask=255.255.0.0

bootcmd=tftp 0x1200000 svnsankari/uImage ;bootm

stdin=serial

stdout=serial

stderr=serial

serverip=10.142.14.166

ipaddr=10.142.14.198

ethaddr=00:11:2:33:44:55

 

Environment size: 1051/8188 bytes

Using Blackfin EMAC device

TFTP from server 10.142.14.166; our IP address is 10.142.14.198

Filename 'uImage_W'.

Load address: 0x1000000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #############################################################

done

Bytes transferred = 3303408 (3267f0 hex)

bfin>

bootm

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.22.19-ADI-2008R1.5-svn

   Created:      2009-04-22  10:29:41 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3303344 Bytes =  3.2 MB

   Load Address: 00180000

   Entry Point:  0032c000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 32c000

Linux version 2.6.22.19-ADI-2008R1.5-svn (karthi@host_120) (gcc version 4.1.2 (ADI svn)) #76 Wed Apr 22 15:59:35 IST 2009

early printk enabled on early_BFuart0

Hardware Trace Active and Enabled

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF527 Rev any

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 600 MHz core clock and 120 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00180000-0x002ba0f0

  rodata    = 0x002bb000-0x0031779c

  data      = 0x00318000-0x0032c000

    stack   = 0x00318000-0x0031a000

  init      = 0x0032c000-0x0077e000

  bss       = 0x0077e000-0x0078ddb0

  available = 0x0078ddb0-0x03eff000

  DMA Zone  = 0x03f00000-0x04000000

NOMPU: setting up cplb tables for global access

Instruction Cache Enabled

Data Cache Enabled (write-back)

Built 1 zonelists.  Total pages: 16002

Kernel command line: root=/dev/mtdblock0 rw profile = 2 earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF0,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 56196k/65536k RAM, (4424k init code, 1256k kernel code, 519k data, 1024k dma, 2116k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (15 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (41 KB free)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

Generic PHY: Registered new driver

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, musb-dma, host, debug=0

musb_hdrc: kernel must blacklist external hubs

musb_hdrc: USB Host mode controller at ffc03800 using DMA, IRQ 59

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: Product: MUSB HDRC host driver

usb usb1: Manufacturer: Linux 2.6.22.19-ADI-2008R1.5-svn musb-hcd

usb usb1: SerialNumber: musb_hdrc.0

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

dma_alloc_init: dma_page @ 0x03ed1000 - 256 pages at 0x03f00000

ÿNET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

IR Module enabled

Single Core  Loader Module enabled

bfin-t350mcqb: 320x240 24-bit RGB FrameBuffer initializing...

bfin-otp: initialized

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=23)@sclk=120MHz)

bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

sl811: driver sl811-hcd, 19 May 2005

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

i2c /dev entries driver

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller Driver, Version 1.8, regs_base@ffc01400

usbcore: registered new interface driver usbhid

drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).

ASoC version 0.13.1

dma rx:3 tx:4, err irq:15, regs:ffc00800

ssm2602 Audio Codec 0.1<6>asoc: SSM2602 <-> bf5xx-i2s-0 mapping ok

ALSA device list:

  #0: bf5xx_ssm2602 (SSM2602)

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting the system clock to 1970-02-06 13:33:37 (3159217)

Freeing unused kernel memory: 4424k freed

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.4.1 (2009-04-22 15:57:45 IST) Built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/>

root:/> ifconfig eth0 10.142.14.199;

root:/> route add default gw 10.142.14.2;

root:/> PHY: 0:01 - Link is Up - 100/Full

 

root:/> tftp -g 10.142.14.166 -l EXE -r EXE

root:/> chmod 777 EXE

root:/> ./EXE &  ------------------------------> running my standalone application with above Test Program

144

root:/> watchdog: Device or resource busy

root:/> ps

  PID  Uid        VSZ Stat Command

    1 root        104 S   /init profile = 2

    2 root            SW< [kthreadd]

    3 root            SWN [ksoftirqd/0]

    4 root            SW< [events/0]

    5 root            SW< [khelper]

   32 root            SW< [kblockd/0]

   36 root            SW< [khubd]

   55 root            SW  [pdflush]

   56 root            SW  [pdflush]

   57 root            SW< [kswapd0]

   58 root            SW< [aio/0]

   92 root            SW< [mtdblockd]

   94 root            SW< [bfin-spi.0]

  132 root         40 S   inetd

  134 root        560 S   -/bin/sh

  135 root         32 S   /bin/watchdogd -f -s

  136 root        460 S   /sbin/syslogd -n

  137 root        460 S   /sbin/klogd -n

  145 root        464 R   ps

root:/> kill -9 135

bfin-wdt: Unexpected close, not stopping watchdog!

root:/> ./EXE &

148

root:/> watchdog: Device or resource busy

 

**********************************************************************

 

Even after Klling the watchdog deamon which was running , i wasnt able to run my test program.

 

Kindly help us out.

QuoteReplyEditDelete

 

 

2009-06-11 02:50:56     Re: Couldn't run watchdog Testprogram in BF527

Mike Frysinger (UNITED STATES)

Message: 75492   

 

if you want to write your own watchdog daemon, then dont enable the normal one in the dist and remove it from your /etc/inittab

QuoteReplyEditDelete

Attachments

    Outcomes