Periphbitgrpsr - Set Bit Group To Given Value; Periphbitgrprs - Set Bit Group To Given Value; Periphbitset Arguments - Freescale Semiconductor DSP56800E User Manual

Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

Core System Infrastructure
2.4.2.6

periphBitGrpSR - set bit group to given value

Call(s):
void periphBitGrpSR(UWord16 GroupMask, UWord16 Mask,
Arguments:
GroupMask
Mask
pAddr
Description: The periphBitGrpSR macro sets the bit group to a given value in a memory location
addressed by parameter pAddr. All bits specified by GroupMask are affected. These bits are
either set if the corresponding bits in Mask value are also set or they are cleared if the
corresponding bits in Mask value are cleared.
The "SR" variant uses two non-interruptible instructions bfset and bfclr to accomplish the
requested operation. The bfset first sets the "one" bits in the destination location, and bfclr then
clears the "zero" bits there.
Caution: This macro is the optimal way how to set the specified group of bits to given value.
However, it must be kept in mind that during the short time between these two bit operations, the
target memory location goes through the third state where the bit group might contain invalid
value ("ones" already set but "zeroes" not yet cleared).
Example 2-23. periphBitGrpSR macro usage
periphBitGrpSR(0x007f, 10, &ArchIO.Pll.plldb);
This code sets the lower 7 bits of PLL Divide-By register to the value 10. Other bits in the register
are not affected.
2.4.2.7

periphBitGrpRS - set bit group to given value

Call(s):
void periphBitGrpRS(UWord16 GroupMask, UWord16 Mask,
Arguments:
GroupMask
2-16
UWord16 *pAddr);
Table 2-8. periphBitSet arguments
in
Group mask
in
"ones" bit mask.
in
The memory address.
UWord16 *pAddr);
Table 2-9. periphBitSet arguments
in
Group mask
Targeting 56F8xxx Platform
FREESCALE SEMICONDUCTOR

Advertisement

Table of Contents
loading

Table of Contents