PSoC 4000 Family: PSoC 4 Architecture TRM, Document No. 001-89309 Rev. *D 67
10. Chip Operational Modes
PSoC
®
4 is capable of executing firmware in four different modes. These modes dictate execution from different locations in
flash and ROM, with different levels of hardware privileges. Only three of these modes are used in end-applications; debug
mode is used exclusively to debug designs during firmware development.
PSoC 4’s operational modes are:
■ Boot
■ User
■ Privileged
■ Debug
10.1 Boot
Boot mode is an operational mode where the device is configured by instructions hard-coded in the device SROM. This mode
is entered after the end of a reset, provided no debug-acquire sequence is received by the device. Boot mode is a privileged
mode; interrupts are disabled in this mode so that the boot firmware can set up the device for operation without being inter-
rupted. During boot mode, hardware trim settings are loaded from flash to guarantee proper operation during power-up.
When boot concludes, the device enters user mode and code execution from flash begins. This code in flash may include
automatically generated instructions from the PSoC Creator IDE that will further configure the device.
10.2 User
User mode is an operational mode where normal user firmware from flash is executed. User mode cannot execute code from
SROM. Firmware execution in this mode includes the automatically generated firmware by the PSoC Creator IDE and the
firmware written by the user. The automatically generated firmware can govern both the firmware startup and portions of nor-
mal operation. The boot process transfers control to this mode after it has completed its tasks.
10.3 Privileged
Privileged mode is an operational mode, which allows execution of special subroutines that are stored in the device ROM.
These subroutines cannot be modified by the user and are used to execute proprietary code that is not meant to be inter-
rupted or observed. Debugging is not allowed in privileged mode.
The CPU can transition to privileged mode through the execution of a system call. For more information on how to perform a
system call, see “Performing a System Call” on page 148. Exit from this mode returns the device to user mode.
10.4 Debug
Debug mode is an operational mode that allows observation of the PSoC 4 operational parameters. This mode is used to
debug the firmware during development. The debug mode is entered when an SWD debugger connects to the device during
the acquire time window, which occurs during the device reset. Debug mode allows IDEs such as PSoC Creator and ARM
MDK to debug the firmware. Debug mode is only available on devices in open mode (one of the four protection modes). For
more details on the debug interface, see the Program and Debug Interface chapter on page 139.
For more details on protection modes, see the Device Security chapter on page 79.