Bit-Banding - fast and safe bit manipulation
This is short text summary of my Advanced ARM Tips video In your code, sometimes you need to flip a single bit in your flag variable to signal that for example the doors are open or the output LED should be turned on. In this situation you can use typical way of setting a bit with OR command which looks like this: // Set the first bit (1 << 1) in flag variable flag |= 0x02; This can work well but at some circumstances it can cause issues.
Continue Reading