![Silicon Laboratories EFR32xG14 Wireless Gecko Reference Manual Download Page 46](http://html1.mh-extra.com/html/silicon-laboratories/efr32xg14-wireless-gecko/efr32xg14-wireless-gecko_reference-manual_1271728046.webp)
4.2.3 Peripheral Bit Set and Clear
The EFR32 supports bit set and bit clear access to all peripherals except those listed in
Table 4.1 Peripherals that Do Not Support Bit
. The bit set and bit clear functionality (also called Bit Access) enables modification of bit fields (single bit
or multiple bit wide) without the need to perform a read-modify-write (though it is functionally equivalent). Also, the operation is con-
tained within a single bus access (for HF peripherals), unlike the Bit-banding operation described in section
which
consumes two bus accesses per operation. All AHB masters can utilize this feature.
The bit clear aliasing region starts at 0x44000000 and the bit set aliasing region starts at 0x46000000. Thus, to apply a bit set or clear
operation, write the bit set or clear mask to the following addresses:
bit_clear_address = a 0x04000000
bit_set_address = a 0x06000000
For bit set operations, bit locations that are 1 in the bit mask will be set in the destination register:
register = (register OR mask)
For bit clear operations, bit locations that are 1 in the bit mask will be cleared in the destination register:
register = (register AND (NOT mask))
Note:
It is possible to combine bit clear and bit set operations in order to arbitrarily modify multi-bit register fields, without affecting other
fields in the same register. In this case, care should be taken to ensure that the field does not have intermediate values that can lead to
erroneous behavior. For example, if bit clear and bit set operations are used to change an analog tuning register field from 25 to 26, the
field would initially take on a value of zero. If the analog module is active at the time, this could lead to undesired behavior.
The peripherals listed in
Table 4.1 Peripherals that Do Not Support Bit Set and Bit Clear on page 46
do not support Bit Access for any
registers. All other peripherals do support Bit Access, however, there may be cases of certain registers that do not support it. Such
registers have a note regarding this lack of support.
Table 4.1. Peripherals that Do Not Support Bit Set and Bit Clear
Module
EMU
RMU
CRYOTIMER
TRNG0
Reference Manual
Memory and Bus System
silabs.com
| Building a more connected world.
Rev. 1.1 | 46