— eCos Support for the MCF5272 On-chip Watchdog Device
The Freescale MCF5272 ColdFire processor has a built-in watchdog
device. Once started it will automatically reset the processor unless
software updates the device at regular intervals. The package
CYGPKG_DEVS_WATCHDOG_MCF5272provides an eCos driver
for this device, complementing the generic package
CYGPKG_IO_WATCHDOG. The functionality should be
accessed via the standard eCos watchdog functions
The watchdog driver only supports reset mode. The hardware can also be configured to raise an interrupt when the watchdog times out, but this mode of operation is not supported.
The MCF5272 watchdog driver package should be loaded automatically
when selecting a platform containing an MCF5272 processor, and it
should never be necessary to load it explicitly into the
configuration. The package is inactive unless the generic watchdog
CYGPKG_IO_WATCHDOG is loaded. Depending on
the choice of eCos template it may be necessary to load the latter.
The package provides two main configuration options.
CYGIMP_WATCHDOG_HARDWARE can be used to disable the
use of the hardware watchdog and switch to a software emulation
provided by the generic watchdog package instead. This may prove
useful during debugging.
CYGNUM_DEVS_WATCHDOG_MCF5272_TICKS determines the
timeout before the hardware watchdog resets the processor. It should
be a 15-bit number, with each tick corresponding to 32768 system clock
cycles. For a processor operating at 66MHz each tick is approximately
0.5 milliseconds so the default value of 2000 corresponds to a
one-second timeout. The maximum value of 32767 gives a timeout of
approximately 16 seconds.
The watchdog device driver does not require any platform-specific
support. The only porting effort required is to list
CYGPKG_DEVS_WATCHDOG_MCF5272 as one of the hardware
packages in the ecos.db target entry.
|2018-07-27||Open Publication License|