From: Abraham vd M. <ab...@2d...> - 2002-04-17 10:51:34
|
Hi Erik! > > 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: > >=20 > > 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? >=20 > 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. > I *hope* that the kernel boots fast enough before the watchdog kicks > in. However, I wonder if you really need to keep the watchdog busy in There's more than enough time. The minimum timeout is 500ms which is longer than what blob takes to boot, but it just makes it and during development, it obviously times out if I have a delay. In the kernel, I can just add a hook to the timer interrupt which gets iniialized pretty early on in the boot process, so that's not a problem either... > 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... > 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. --=20 Regards Abraham The verdict of a jury is the a priori opinion of that juror who smokes the worst cigars. -- H. L. Mencken __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Aintree Park Fax: +27 21 761 7648 Doncaster Road Email: ab...@2d... Kenilworth, 7700 Http: http://www.2d3d.com South Africa |