Product Specs

Table Of Contents
15 Peripheral interface
Page
69
Remove any PPI connections set up for the peripheral that is being disabled
Clear all bits in the INTEN register, i.e. INTENCLR = 0xFFFFFFFF.
Explicitly configure the peripheral that you enable and do not rely on configuration values that may be
inherited from the peripheral that was disabled.
Enable the now configured peripheral.
For each of the rows in the following table, the instance ID listed is shared by the peripherals in the same
row.
Table 20: Peripherals sharing an ID
Instance
ID 2 (0x40002000)
UARTE
UART
-
ID 3 (0x40003000)
SPIM
SPIS
SPI
TWIM
TWIS
TWI
ID 4 (0x40004000)
SPIM
SPIS
SPI
TWIM
TWIS
TWI
ID 35 (0x40023000)
SPIM
SPIS
SPI
-
ID 15 (0x4000F000)
AAR
CCM
-
ID 19 (0x40013000)
COMP
LPCOMP
-
ID 20 (0x40014000)
SWI
EGU
ID 21 (0x40015000)
SWI
EGU
ID 22 (0x40016000)
SWI
EGU
ID 23 (0x40017000)
SWI
EGU
ID 24 (0x40018000)
SWI
EGU
ID 25 (0x40019000)
SWI
EGU
15.3 Peripheral registers
Most peripherals feature an ENABLE register. Unless otherwise specified in the relevant chapter, the
peripheral registers (in particular the PSEL registers) must be configured before enabling the peripheral.
Note that the peripheral must be enabled before tasks and events can be used.
15.4 Bit set and clear
Registers with multiple single-bit bit fields may implement the "set-and-clear" pattern. This pattern enables
firmware to set and clear individual bits in a register without having to perform a read-modify-write operation
on the main register.
This pattern is implemented using three consecutive addresses in the register map where the main register
is followed by a dedicated SET and CLR register in that order.
The SET register is used to set individual bits in the main register while the CLR register is used to clear
individual bits in the main register. Writing a '1' to a bit in the SET or CLR register will set or clear the same
bit in the main register respectively. Writing a '0' to a bit in the SET or CLR register has no effect. Reading
the SET or CLR registers returns the value of the main register.
Restriction: The main register may not be visible and hence not directly accessible in all cases.
15.5 Tasks
Tasks are used to trigger actions in a peripheral, for example, to start a particular behavior. A peripheral can
implement multiple tasks with each task having a separate register in that peripheral's task register group.
A task is triggered when firmware writes a '1' to the task register or when the peripheral itself or another
peripheral toggles the corresponding task signal. See Figure 10: Tasks, events, shortcuts, and interrupts on
page 68.