Questions tagged [bit-banding]

For question related to hardware allowing access to individual bits.

Bit banding is a feature of some CPUs which aliases normal byte addressable memory to access an individual bit. These operation turn a regular 'read-modify-write' to a single atomic write at the aliased address.

Typically, the primary byte storage is aliased to eight location where each affects a single bit. This is expensive to address space, so the feature is common to lower end devices (with minimal RAM).

7 questions
5
votes
4 answers

ARM cortex: mutex using bit banding

Given that, on the ARM Cortex M3, I can: atomically read a single bit atomically set a single bit atomically clear a single bit How can I combine these for a mutex style set of operations: try lock take lock release lock It seems that try_lock or…
JeffV
  • 52,985
  • 32
  • 103
  • 124
3
votes
1 answer

how to calculate the bit-band alias fort bit 17 of address 0x4000 0100 in Cortex-M3?

How would one calculate the bit-band alias fort bit 17 of address 0x4000 0100 in Cortex-M3? Is this correct? 0x4200 0000 + 0X100*32 + 17*4 = 0x4200 2044
Collin HU
  • 55
  • 7
3
votes
1 answer

cortex m3, stm32L1XX bit-banding

I'm following the guide given at micromouseonline . com/2010/07/14/bit-banding-in-the-stm32 . I'm using IAR EWARM and Cortex M3. Everything works fine but I'm not able to set the bits in a given address. Im using STM32L151xD and IAR EWARM…
Abhishek Thakur
  • 16,337
  • 15
  • 66
  • 97
1
vote
1 answer

Bit-Band Alias Offset Address for TI MSP432P401 board

Would anyone explain, please, in this formula below for calculating Bit-Band Alias Offset Address for TI MSP432P401R board, why we should add to (addr & 0xF0000000) + BB_OFFSET, this value ((addr & 0xFFFFF) << 5) ? #define TA0CTL_ADDR…
0
votes
0 answers

Some questions about the Cortex-M3 bit-banding feature

(I am new to ARM microcontrollers. Pardon me if this is a naïve question. ) ARM-M3 processor provides a unique bit-banding feature which maps a bit in the first 1M address range of SRAM and peripheral regions to a 32-bit word in another alias…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
0
votes
1 answer

Bitwise AND operation program execution issue

Below is a program in which I am trying to reset a particular bit of a hexadecimal number. The bit location, number of bits to reset, and hexadecimal value all are user inputs. Header file #pragma once int bit0(int i,unsigned int RegA,unsigned int…
vikash23
  • 3
  • 2
0
votes
0 answers

ARM RealView linker: locating in any of several regions

Is there a way of allowing the ARM RealView/Keil linker to select from more than one but not all regions? I can use the .ANY specifier to allow the linker free reign, and I can use a *(section_name) specifier to locate specific objects to a single…
Clifford
  • 88,407
  • 13
  • 85
  • 165