add watchdog timer example

This commit is contained in:
Mariano Alvira 2011-03-22 14:51:08 -04:00
parent a8b75286d6
commit 81a0a0356d
3 changed files with 83 additions and 1 deletions

View file

@ -220,6 +220,11 @@ struct CRM_struct {
static volatile struct CRM_struct * const CRM = (void *) (CRM_BASE);
/* COP watchdog timer helpers */
/* set the cop timout in milliseconds */
#define cop_timeout_ms(x) (CRM->COP_CNTLbits.COP_TIMEOUT = x/87)
#define cop_service() (CRM->COP_SERVICE = 0xc0de5afe)
/* Old register definitions, for compatibility */
#ifndef REG_NO_COMPAT