Reset controller registers. More...
![]() |
Functions | |
void | At91Reset (void) |
System reset. | |
int | At91ResetCause (void) |
Reset Controller Control Register | |
#define | RSTC_CR (RSTC_BASE + 0x00) |
Reset controller control register address. | |
#define | RSTC_PROCRST 0x00000001 |
Processor reset. | |
#define | RSTC_PERRST 0x00000004 |
Peripheral reset. | |
#define | RSTC_EXTRST 0x00000008 |
External reset. | |
#define | RSTC_KEY 0xA5000000 |
Password. | |
Reset Controller Status Register | |
#define | RSTC_SR (RSTC_BASE + 0x04) |
Reset controller status register address. | |
#define | RSTC_URSTS 0x00000001 |
User reset status. | |
#define | RSTC_BODSTS 0x00000002 |
Brownout detection status. | |
#define | RSTC_RSTTYP 0x00000700 |
Reset type. | |
#define | RSTC_RSTTYP_POWERUP 0x00000000 |
Power-up reset. | |
#define | RSTC_RSTTYP_WAKEUP 0x00000100 |
VDDCORE rising. | |
#define | RSTC_RSTTYP_WATCHDOG 0x00000200 |
Watchdog reset. | |
#define | RSTC_RSTTYP_SOFTWARE 0x00000300 |
Software reset. | |
#define | RSTC_RSTTYP_USER 0x00000400 |
User reset. | |
#define | RSTC_RSTTYP_BROWNOUT 0x00000500 |
Brownout reset. | |
#define | RSTC_NRSTL 0x00010000 |
NRST pin level. | |
#define | RSTC_SRCMP 0x00020000 |
Software reset command in progress. | |
Reset Controller Mode Register | |
#define | RSTC_MR (RSTC_BASE + 0x08) |
Reset controller mode register address. | |
#define | RSTC_URSTEN 0x00000001 |
User reset enable. | |
#define | RSTC_URSTIEN 0x00000010 |
User reset interrupt enable. | |
#define | RSTC_ERSTL 0x00000F00 |
External reset length. | |
#define | RSTC_ERSTL_LSB 8 |
Least significant bit of external reset length. | |
#define | RSTC_BODIEN 0x00010000 |
Brown-out detection interrupt enable. | |
#define | RSTC_KEY_MSK 0xFF000000 |
Password mask. |
Reset controller registers.
#define RSTC_CR (RSTC_BASE + 0x00) |
Reset controller control register address.
Definition at line 60 of file at91_rstc.h.
Referenced by At91Reset().
#define RSTC_PROCRST 0x00000001 |
#define RSTC_PERRST 0x00000004 |
#define RSTC_EXTRST 0x00000008 |
#define RSTC_KEY 0xA5000000 |
#define RSTC_SR (RSTC_BASE + 0x04) |
Reset controller status register address.
Definition at line 69 of file at91_rstc.h.
Referenced by At91ResetCause().
#define RSTC_URSTS 0x00000001 |
User reset status.
Definition at line 70 of file at91_rstc.h.
#define RSTC_BODSTS 0x00000002 |
Brownout detection status.
Definition at line 71 of file at91_rstc.h.
#define RSTC_RSTTYP 0x00000700 |
#define RSTC_RSTTYP_POWERUP 0x00000000 |
#define RSTC_RSTTYP_WAKEUP 0x00000100 |
VDDCORE rising.
Definition at line 74 of file at91_rstc.h.
#define RSTC_RSTTYP_WATCHDOG 0x00000200 |
#define RSTC_RSTTYP_SOFTWARE 0x00000300 |
#define RSTC_RSTTYP_USER 0x00000400 |
#define RSTC_RSTTYP_BROWNOUT 0x00000500 |
#define RSTC_NRSTL 0x00010000 |
NRST pin level.
Definition at line 79 of file at91_rstc.h.
#define RSTC_SRCMP 0x00020000 |
Software reset command in progress.
Definition at line 80 of file at91_rstc.h.
#define RSTC_MR (RSTC_BASE + 0x08) |
Reset controller mode register address.
Definition at line 85 of file at91_rstc.h.
Referenced by __init2().
#define RSTC_URSTEN 0x00000001 |
#define RSTC_URSTIEN 0x00000010 |
User reset interrupt enable.
Definition at line 87 of file at91_rstc.h.
#define RSTC_ERSTL 0x00000F00 |
External reset length.
Definition at line 88 of file at91_rstc.h.
#define RSTC_ERSTL_LSB 8 |
Least significant bit of external reset length.
Definition at line 89 of file at91_rstc.h.
#define RSTC_BODIEN 0x00010000 |
Brown-out detection interrupt enable.
Definition at line 90 of file at91_rstc.h.
#define RSTC_KEY_MSK 0xFF000000 |
Password mask.
Definition at line 91 of file at91_rstc.h.
void At91Reset | ( | void | ) |
System reset.
Definition at line 54 of file at91_reset.c.
References At91WatchDogStart(), outr, RSTC_CR, RSTC_EXTRST, RSTC_KEY, RSTC_PERRST, and RSTC_PROCRST.
Referenced by NutReset().
int At91ResetCause | ( | void | ) |
Definition at line 67 of file at91_reset.c.
References inr, NUT_RSTTYP_BROWNOUT, NUT_RSTTYP_EXTERNAL, NUT_RSTTYP_POWERUP, NUT_RSTTYP_SOFTWARE, NUT_RSTTYP_UNKNOWN, NUT_RSTTYP_WATCHDOG, RSTC_RSTTYP, RSTC_RSTTYP_BROWNOUT, RSTC_RSTTYP_POWERUP, RSTC_RSTTYP_SOFTWARE, RSTC_RSTTYP_USER, RSTC_RSTTYP_WATCHDOG, and RSTC_SR.
Referenced by NutResetCause().