at91_rstc.h

Go to the documentation of this file.
00001 
00041 /*
00042  * Copyright (C) 2005-2006 by egnite Software GmbH. All rights reserved.
00043  *
00044  * Redistribution and use in source and binary forms, with or without
00045  * modification, are permitted provided that the following conditions
00046  * are met:
00047  *
00048  * 1. Redistributions of source code must retain the above copyright
00049  *    notice, this list of conditions and the following disclaimer.
00050  * 2. Redistributions in binary form must reproduce the above copyright
00051  *    notice, this list of conditions and the following disclaimer in the
00052  *    documentation and/or other materials provided with the distribution.
00053  * 3. Neither the name of the copyright holders nor the names of
00054  *    contributors may be used to endorse or promote products derived
00055  *    from this software without specific prior written permission.
00056  *
00057  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00058  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00059  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00060  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00061  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00062  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00063  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00064  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00065  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00066  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00067  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00068  * SUCH DAMAGE.
00069  *
00070  * For additional information see http://www.ethernut.de/
00071  */
00072 
00073 #ifndef AT91_RTSC_H
00074 #define AT91_RTSC_H
00075 
00077 /*\{*/
00078 #define RSTC_CR         (*((reg32_t *)(RSTC_BASE + 0x00)))      
00079 #define RSTC_PROCRST                     0  
00080 #define RSTC_PERRST                      2  
00081 #define RSTC_EXTRST                      3  
00082 #define RSTC_KEY                0xA5000000  
00083 /*\}*/
00084 
00086 /*\{*/
00087 #define RSTC_SR         (*((reg32_t *)(RSTC_BASE + 0x04)))      
00088 #define RSTC_URSTS                       0  
00089 #define RSTC_BODSTS                      1  
00090 #define RSTC_RSTTYP_MASK        0x00000700  
00091 #define RSTC_RSTTYP_POWERUP     0x00000000  
00092 //#define RSTC_RSTTYP_WAKEUP      0x00000100      
00093 #define RSTC_RSTTYP_WATCHDOG    0x00000200  
00094 #define RSTC_RSTTYP_SOFTWARE    0x00000300  
00095 #define RSTC_RSTTYP_USER        0x00000400  
00096 #define RSTC_RSTTYP_BROWNOUT    0x00000500  
00097 #define RSTC_NRSTL                      16  
00098 #define RSTC_SRCMP                      17  
00099 /*\}*/
00100 
00102 /*\{*/
00103 #define RSTC_MR         (*((reg32_t *)(RSTC_BASE + 0x08)))      
00104 #define RSTC_URSTEN                      0  
00105 #define RSTC_URSTIEN                     4  
00106 #define RSTC_ERSTL_MASK         0x00000F00  
00107 #define RSTC_ERSTL_SHIFT                 8  
00108 #define RSTC_BODIEN                     16  
00109 /*\}*/
00110 
00111 
00112 #endif /* AT91_RTSC_H */