
...the world's most energy friendly microcontrollers
synchronization, the write operation requires 3 positive edges of the clock of the Low Energy Peripheral
being accessed. Such registers are marked "Asynchronous" in their description header.
See Figure 5.3 (p. 19) for an overview of the writing operation.
After writing data to a register which value is to be synchronized into the Low Energy clock domain, a
corresponding busy flag in the <module_name>_SYNCBUSY register (e.g. RTC_SYNCBUSY) is set.
This flag is set as long as synchronization is in progress and is cleared upon completion.
Note
Subsequent writes to the same register before the corresponding busy flag is cleared is not
supported. Write before the busy flag is cleared may result in undefined behavior.
In general the SYNCBUSY register only needs to be observed if there is a risk of multiple
write access to a register (which must be prevented). It is not required to wait until the
relevant flag in the SYNCBUSY register is cleared after writing a register. E.g can EM2 be
entered directly after writing a register.
Figure 5.3. Write operation to Low Energy Peripherals
Core Clock Dom ain
Low Frequency Clock Dom ain
Core Clock
Register 0
Register 1
.
.
.
Register n
Freeze
Low Frequency Clock
Synchronizer 0
Synchronizer 1
.
.
.
Synchronizer n
Low Frequency Clock
Register 0 Sync
Register 1 Sync
.
.
.
Register n Sync
Synchronization Done
Write[ 0:n]
Set 0
Set 1
Set n
Syncbusy Register 0
Syncbusy Register 1
.
.
.
Syncbusy Register n
Clear 0
Clear 1
Clear n
5.3.1.2 Reading
When reading from a Low Energy Peripheral, the data read is synchronized regardless if it originates
in the Low Energy clock domain or core clock domain. Registers which are updated/ maintained by the
Low Energy Peripheral are read directly from the Low Energy clock domain. Registers which originate in
the core clock domain, are read from the core clock domain. See Figure 5.4 (p. 20) for an overview
of the reading operation.
Note
Writing a register and then immediately reading the new value of the register may give the
impression that the write operation is complete. This may not be the case. Please refer
to the SYNCBUSY register for correct status of the write operation to the Low Energy
Peripheral.
2011-04-12 - d0001_Rev1.10
19
www.energymicro.com