SAME54P20A Test Project
arch
arm
SAME54
SAME54A
mcu
inc
component
rstc.h
Go to the documentation of this file.
1
30
#ifndef _SAME54_RSTC_COMPONENT_
31
#define _SAME54_RSTC_COMPONENT_
32
33
/* ========================================================================== */
35
/* ========================================================================== */
38
39
#define RSTC_U2239
40
#define REV_RSTC 0x400
41
42
/* -------- RSTC_RCAUSE : (RSTC Offset: 0x00) (R/ 8) Reset Cause -------- */
43
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
44
typedef
union
{
45
struct
{
46
uint8_t
POR
:1;
47
uint8_t
BODCORE
:1;
48
uint8_t
BODVDD
:1;
49
uint8_t
NVM
:1;
50
uint8_t
EXT
:1;
51
uint8_t
WDT
:1;
52
uint8_t
SYST
:1;
53
uint8_t
BACKUP
:1;
54
} bit;
55
uint8_t
reg
;
56
}
RSTC_RCAUSE_Type
;
57
#endif
/* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
58
59
#define RSTC_RCAUSE_OFFSET 0x00
61
#define RSTC_RCAUSE_POR_Pos 0
62
#define RSTC_RCAUSE_POR (_U_(0x1) << RSTC_RCAUSE_POR_Pos)
63
#define RSTC_RCAUSE_BODCORE_Pos 1
64
#define RSTC_RCAUSE_BODCORE (_U_(0x1) << RSTC_RCAUSE_BODCORE_Pos)
65
#define RSTC_RCAUSE_BODVDD_Pos 2
66
#define RSTC_RCAUSE_BODVDD (_U_(0x1) << RSTC_RCAUSE_BODVDD_Pos)
67
#define RSTC_RCAUSE_NVM_Pos 3
68
#define RSTC_RCAUSE_NVM (_U_(0x1) << RSTC_RCAUSE_NVM_Pos)
69
#define RSTC_RCAUSE_EXT_Pos 4
70
#define RSTC_RCAUSE_EXT (_U_(0x1) << RSTC_RCAUSE_EXT_Pos)
71
#define RSTC_RCAUSE_WDT_Pos 5
72
#define RSTC_RCAUSE_WDT (_U_(0x1) << RSTC_RCAUSE_WDT_Pos)
73
#define RSTC_RCAUSE_SYST_Pos 6
74
#define RSTC_RCAUSE_SYST (_U_(0x1) << RSTC_RCAUSE_SYST_Pos)
75
#define RSTC_RCAUSE_BACKUP_Pos 7
76
#define RSTC_RCAUSE_BACKUP (_U_(0x1) << RSTC_RCAUSE_BACKUP_Pos)
77
#define RSTC_RCAUSE_MASK _U_(0xFF)
79
/* -------- RSTC_BKUPEXIT : (RSTC Offset: 0x02) (R/ 8) Backup Exit Source -------- */
80
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
81
typedef
union
{
82
struct
{
83
uint8_t :1;
84
uint8_t
RTC
:1;
85
uint8_t
BBPS
:1;
86
uint8_t :4;
87
uint8_t
HIB
:1;
88
} bit;
89
uint8_t
reg
;
90
}
RSTC_BKUPEXIT_Type
;
91
#endif
/* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
92
93
#define RSTC_BKUPEXIT_OFFSET 0x02
94
#define RSTC_BKUPEXIT_RESETVALUE _U_(0x00)
96
#define RSTC_BKUPEXIT_RTC_Pos 1
97
#define RSTC_BKUPEXIT_RTC (_U_(0x1) << RSTC_BKUPEXIT_RTC_Pos)
98
#define RSTC_BKUPEXIT_BBPS_Pos 2
99
#define RSTC_BKUPEXIT_BBPS (_U_(0x1) << RSTC_BKUPEXIT_BBPS_Pos)
100
#define RSTC_BKUPEXIT_HIB_Pos 7
101
#define RSTC_BKUPEXIT_HIB (_U_(0x1) << RSTC_BKUPEXIT_HIB_Pos)
102
#define RSTC_BKUPEXIT_MASK _U_(0x86)
105
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
106
typedef
struct
{
107
__I
RSTC_RCAUSE_Type
RCAUSE
;
108
RoReg8
Reserved1[0x1];
109
__I
RSTC_BKUPEXIT_Type
BKUPEXIT
;
110
}
Rstc
;
111
#endif
/* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
112
115
#endif
/* _SAME54_RSTC_COMPONENT_ */
RSTC_RCAUSE_Type::EXT
uint8_t EXT
Definition:
rstc.h:50
RSTC_RCAUSE_Type::BACKUP
uint8_t BACKUP
Definition:
rstc.h:53
RSTC_RCAUSE_Type
Definition:
rstc.h:44
RSTC_RCAUSE_Type::SYST
uint8_t SYST
Definition:
rstc.h:52
RSTC_RCAUSE_Type::WDT
uint8_t WDT
Definition:
rstc.h:51
RSTC_BKUPEXIT_Type::reg
uint8_t reg
Definition:
rstc.h:89
RSTC_BKUPEXIT_Type
Definition:
rstc.h:81
RSTC_BKUPEXIT_Type::RTC
uint8_t RTC
Definition:
rstc.h:84
RSTC_RCAUSE_Type::BODVDD
uint8_t BODVDD
Definition:
rstc.h:48
RSTC_BKUPEXIT_Type::HIB
uint8_t HIB
Definition:
rstc.h:87
Rstc::RCAUSE
__I RSTC_RCAUSE_Type RCAUSE
Offset: 0x00 (R/ 8) Reset Cause.
Definition:
rstc.h:107
RSTC_RCAUSE_Type::BODCORE
uint8_t BODCORE
Definition:
rstc.h:47
Rstc
RSTC hardware registers.
Definition:
rstc.h:106
Rstc::BKUPEXIT
__I RSTC_BKUPEXIT_Type BKUPEXIT
Offset: 0x02 (R/ 8) Backup Exit Source.
Definition:
rstc.h:109
RSTC_RCAUSE_Type::reg
uint8_t reg
Definition:
rstc.h:55
RSTC_RCAUSE_Type::POR
uint8_t POR
Definition:
rstc.h:46
RSTC_BKUPEXIT_Type::BBPS
uint8_t BBPS
Definition:
rstc.h:85
RoReg8
volatile const uint8_t RoReg8
Definition:
same54n19a.h:53
RSTC_RCAUSE_Type::NVM
uint8_t NVM
Definition:
rstc.h:49
Generated by
1.8.20