Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

reading a WDTCR in AM1808/AM1810

$
0
0

Hi,


I want to check processor is reset by normal reset or by watchdog register(WDTCR).

In data sheet is given that if processor is reset by watchdog(i.e watchdog timeout) than in WDTCR WDFLAG bit is set means WDTCR value is 00008000 because WDFLAG is 15th bit of WDTCR.

I want to read that register value for that i done program for user space.

In that program i open the device /dev/watchdog from ioctl which is useful for get timeout value which is 60 seconds from that after 60 seconds my processor is restart by watchdog.


now i wand to read that register for that in driver file i added drivers/char/watchdog/davinci_wdt.c in that

-in one of ioctl cmd

-res =ioread32(wdt_base + WDTCR);

-than i print res using printk

now from user space whenever i open /dev/watchdog  the watchdog is active state and WDTCR register value is WDTCR=da7e4000 this is right.

now reset is done by watchdog register.

now in davinci_wdt.c file in function davinci_wdt_open() before enable watchdog i use printk to read register.

But now problem is value of WDTCR = 00000000 but it was reset by watchdog so value will be 00008000 but i didn't get this.


so now my method for reading register is wrong or any watchdog reset enable is require in processor and i want this enable???

Thanks

Vijay Ahir


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>