Peripherals—IP2022 User’s Manual 258 www.ubicom.com writing to the TxCAP2H register does not take effect until the end
of the current PWM cycle.
Reading    the    TxCAP2H    or    TxCAP2L    registers    returns    the
previously written value regardless of whether the value stored in
these  registers  has  been  transferred  to  the  internal  compare
register by writing to the TxCAP2H register.
In Capture/Compare mode, this register captures the value of the
counter/timer when the TxCPI2 input is triggered. In this mode,
this register is read-only.
Reading the TxCAP2L register returns the least-significant 8 bits
of an internal capture register and causes the most-significant 8-
bits to be latched into the TxCAP2H register. This allows software
to   read   the   TxCAP2H   register   later   and   still   be   assured   of
atomicity.