Embedded ARM – What is Bit-Banding?

armembedded

I am reading the ARM Cortex M3 reference manual and the concepts "bit-band", "bit-band region" and "bit-band alias" appear.

What is bit-banding?

Best Answer

The ARM info center refers to bit-banding in their Cortex-M3 and -M4 documentation, compiler docs, and a few other places, like Home > Programmers Model > Bit-banding. From Home > Developing software for Cortex-M3 > Bit-banding:

Bit-banding maps a complete word of memory onto a single bit in the bit-band region. For example, writing to one of the alias words will set or clear the corresponding bit in the bitband region.

It appears to be a way to get single bit atomic operation.

When writing to the alias regions bit 0 of the 32 bit word is used to set the value at the bit-banding region. Reading from the alias address will return the value from the bit-band region in bit 0 and the other bits will be cleared.