From: Erik M. <J.A...@it...> - 2002-04-17 12:22:47
|
On Wed, Apr 17, 2002 at 12:51:38PM +0200, Abraham vd Merwe wrote: > > > I have a watchdog on my board which needs to be strobed at least every > > > 500ms, otherwise it resets the board. Therefore I need to use a timer > > > interrupt. I have a couple of questions to ask though: > > > > > > 1) Interrupts are disabled in blob at the moment right? So I won't be > > > interfering with something else if I setup an interrupt handler? > > > > No. Might be tricky, though. Best way is to modify the irq/firq entries > > in start.S to jump to a known location in trampoline.S, which on its > > turn can do the dirty work and call a C interrupt handling function. > > At the moment, I've just added a hook in my hardware initialization routine > to setup my interrupt handler at 0x0018 and program the OS timer to trigger > irq 26 every 400ms. That way I don't mess around with the generic stuff. The generic code is pretty easy, and the interrupt system works the same on all ARM CPUs anyway, so I'd rather think it belonged there :) > > blob. All watchdog devices I know have an option that they aren't > > enabled at boot time, but only start working after you first use them. > > This one can't be disabled which is as it should be. If you can disable it > in software the whole idea of a watchdog is flawed... No, the watchdog you're using right now is brain damaged. Every watchdog I know is disabled at hardware reset and should be enabled by the OS. The OS just can't *disable* the watchdog, though. This enable-but-can't-disable feature was made exactly because it allows the system to initialise itself. > > It's not that I am against adding features in blob, it's just that I > > don't see a point in adding useless features. > > I totally agree, but in this case it's kind of necessary in order to get a > functional board. Please double check the data sheet. I just can't believe there is such crap watchdog hardware on the market. If you have an option to change the hardware, consider using a better watchdog. Erik -- J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty of Information Technology and Systems, Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |