Do we need to surround the CLKPR modifying statements with an Atomic Block?
The Atmega328p datasheet states that for security purposes, the CLKPR must be first modified to 0x80 and then within 4 CPU cycles to the desired prescaler value.
Does this "4 cycles" include the Cycles spent due to interrupts as well? Because in that case, if an interrupt occurs between first modification and second modification of the register then more than 4 Cycles might be spent in the Interrupt and thus resulting in failed attempt to change CLKPR.
Please clarify my doubt ( and sorry if it's a very beginner's question, as I am one).