Three registers (set, clr, tog) approach is used to optimize bit manipulation.
In order to avoid read – modify – write cycles as separate (non-atomic)
operations (which may be occasionally interrupted), three registers for bit setting,
bit clearing and bit toggle are implemented :
CCM_ANALOG_PLL_ARM register has corresponding SET, CLR and TOG registers,
which provide atomic bit manipulations. As the name of the register implies, a value
written to a SET, CLR or TOG register effectively performs the implied operation, but only
bits specified as ‘1’ are modified. Bits specified as ‘0’ are not modified.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------