The Great Watchdog Hack

Joel Sherrill joel.sherrill at OARcorp.com
Mon Dec 9 00:02:42 UTC 2002



Paul Evans wrote:
> 
> Hi All,
> 
> I'm looking for a little help with figuring out RTEMS execution profile
> (time wise)
> during boot. Specifically my problem is that my hardware’s watchdog
> trips during boot
> resetting the board. The BSP is a 68ec000 (in 8 bit mode) To give you an
> idea about speed, the watchdog strobe ("kick"?) macro:
> 
> #define WDOG_STROBE __asm__("move.b #0x61, (0xC00000)
> move.b #0x01, (0xC00000)
> move.b #0x61, (0xC00000)")
> 
> executes in about 3.5 microseconds. The board appears to take about
> 2-3 seconds to complete booting, and the watchdog time out is about
> 300ms nominal.
> 
> My approach thus far is to sprinkle the WDOG_STROBE macro
> though exinit.c (start.S, and bsp_start() also strobe the watchdog)
> As in:
> 
> _Debug_Manager_initialization();
> WDOG_STROBE;
> _API_extensions_Initialization();
> WDOG_STROBE;
> _Thread_Dispatch_initialization();
> WDOG_STROBE;
> _Workspace_Handler_initialization(
> 
> This isn't working, so I'm wondering where RTEMS is spending it's time
> during power up. Any ideas?

Zero'ing the workspace could be a huge consumer of time.  This can be
disabled by the BSP via the do_zero_of_workspace of the CPU
Configuration Table.

You could also hook each of the initialization user extension points
and reset it.

> Thanks and here's hoping,
> 
> -Paul
> 
> [apologies if this arrives as HTML]

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985




More information about the users mailing list