Peripheral Non-Word Access Behavior; Bit-Banding - Silicon Laboratories EFR32xG14 Wireless Gecko Reference Manual

Table of Contents

Advertisement

4.2.1 Peripheral Non-Word Access Behavior

When writing to peripheral registers, all accesses are treated as 32-bit accesses. This means that writes to a register need to be large
enough to cover all bits of register, otherwise, any uncovered bits may become corrupted from the partial-word transfer. Thus, the safest
practice is to always do 32-bit writes to peripheral registers.
When reading, there is generally no issue with partial word accesses, however, note that any read action (e.g. FIFO popping) will be
triggered regardless of whether the actual FIFO bit-field was included in the transfer size.
Note: The implementation of bit-banding in the core is such that bit-band accesses forward the transfer size info into the actual bus
transfer size, so the same restrictions apply to bit-band accesses as apply to normal read/write accesses.

4.2.2 Bit-banding

The SRAM bit-band alias and peripheral bit-band alias regions are located at 0x22000000 and 0x42000000 respectively. Read and
write operations to these regions are converted into masked single-bit reads and atomic single-bit writes to the embedded SRAM and
peripherals of the EFR32.
Note: Bit-banding is only available through the CPU. No other AHB masters (e.g. DMA) can perform Bit-banding operations.
Using a standard approach to modify a single register or SRAM bit in the aliased regions, would require software to read the value of
the byte, half-word or word containing the bit, modify the bit, and then write the byte, half-word or word back to the register or SRAM
address. Using bit-banding, this can be done in a single operation, consuming only two bus cycles. As read-writeback, bit-masking and
bit-shift operations are not necessary in software, code size is reduced and execution speed improved.
The bit-band regions allow each bit in the SRAM and Peripheral areas of the memory map to be addressed. To set or clear a bit in the
embedded SRAM, write a 1 or a 0 to the following address:
where address is the address of the 32-bit word containing the bit to modify, and bit is the index of the bit in the 32-bit word.
To modify a bit in the Peripheral area, use the following address:
silabs.com | Building a more connected world.
bit_address = 0x22000000 + (address – 0x20000000) ∙ 32 + bit ∙ 4
bit_address = 0x42000000 + (address – 0x40000000) ∙ 32 + bit ∙ 4
Reference Manual
Memory and Bus System
Rev. 1.1 | 45

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EFR32xG14 Wireless Gecko and is the answer not in the manual?

Questions and answers

Table of Contents