at91_rstc.h
Go to the documentation of this file.00001
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 #ifndef AT91_RTSC_H
00073 #define AT91_RTSC_H
00074
00076
00077 #define RSTC_CR (*((reg32_t *)(RSTC_BASE + 0x00))) ///< Reset controller control register address.
00078 #define RSTC_PROCRST 0 ///< Processor reset.
00079 #define RSTC_PERRST 2 ///< Peripheral reset.
00080 #define RSTC_EXTRST 3 ///< External reset.
00081 #define RSTC_KEY 0xA5000000 ///< Password.
00082
00083
00085
00086 #define RSTC_SR (*((reg32_t *)(RSTC_BASE + 0x04))) ///< Reset controller status register address.
00087 #define RSTC_URSTS 0 ///< User reset status.
00088 #define RSTC_BODSTS 1 ///< Brownout detection status.
00089 #define RSTC_RSTTYP_MASK 0x00000700 ///< Reset type.
00090 #define RSTC_RSTTYP_POWERUP 0x00000000 ///< Power-up reset.
00091
00092 #define RSTC_RSTTYP_WATCHDOG 0x00000200 ///< Watchdog reset.
00093 #define RSTC_RSTTYP_SOFTWARE 0x00000300 ///< Software reset.
00094 #define RSTC_RSTTYP_USER 0x00000400 ///< User reset.
00095 #define RSTC_RSTTYP_BROWNOUT 0x00000500 ///< Brownout reset.
00096 #define RSTC_NRSTL 16 ///< NRST pin level.
00097 #define RSTC_SRCMP 17 ///< Software reset command in progress.
00098
00099
00101
00102 #define RSTC_MR (*((reg32_t *)(RSTC_BASE + 0x08))) ///< Reset controller mode register address.
00103 #define RSTC_URSTEN 0 ///< User reset enable.
00104 #define RSTC_URSTIEN 4 ///< User reset interrupt enable.
00105 #define RSTC_ERSTL_MASK 0x00000F00 ///< External reset length.
00106 #define RSTC_ERSTL_SHIFT 8 ///< Least significant bit of external reset length.
00107 #define RSTC_BODIEN 16 ///< Brown-out detection interrupt enable.
00108
00109
00110
00111 #endif