| |||
| Home > Programmer’s Reference > Status and system control registers > Flag registers, SYS_FLAGx and SYS_NVFLAGx | |||
The registers shown in Table 4.11 provide two 32-bit register locations containing general-purpose flags. You can assign any meaning to the flags.
Table 4.11. Flag registers
Register name | Address | Access | Reset by | Description |
|---|---|---|---|---|
| SYS_FLAGS | 0x10000030 | Read-only | Reset | Flag register |
| SYS_FLAGSSET | 0x10000030 | Write-only | Reset | Flag Set register |
| SYS_FLAGSCLR | 0x10000034 | Write-only | Reset | Flag Clear register |
| SYS_NVFLAGS | 0x10000038 | Read-only | POR | Nonvolatile Flag register |
| SYS_NVFLAGSSET | 0x10000038 | Write-only | POR | Nonvolatile Flag Set register |
| SYS_NVFLAGSCLR | 0x1000003C | Write-only | POR | Nonvolatile Flag Clear register |
The board provides two distinct types of flag register:
The SYS_FLAGS Register is cleared by a normal reset, such as a reset caused by pressing the reset button.
The SYS_NVFLAGS Register retains its contents after a normal reset and is only cleared by a Power-On Reset (POR).
The SYS_FLAGS and SYS_NVFLAGS registers contain the current state of the flags.
The SYS_FLAGSSET and SYS_NVFLAGSSET registers are used to set bits in the SYS_FLAGS and SYS_NVFLAGS registers:
write 1 to SET the associated flag
write 0 to leave the associated flag unchanged.