23.5.19 Compare n Register

The CMPn register is continuously compared to the counter value. Ordinarily, the outputs from the comparators are then used for generating waveforms. The TCEn.CMPn registers are updated with the buffer value from their corresponding TCEn.CMPnBUF register when an UPDATE condition occurs.

The TCEn.CMPnL and TCEn.CMPnH register pair represents the 16-bit value, TCEn.CMPn. The low byte [7:0] (suffix L) is accessible at the original offset. The high byte [15:8] (suffix H) can be accessed at offset + 0x01.

When SCALE bitfield in TCEn.CTRLD is written to ‘1’, the data written to the CMPn register are expected to be in fixed point UQ1.15 notation ranging from 0 to 2 - 2-15. If AMPEN bitfield in TCEn.CTRLD is ‘0’, a write to the TCEn.CMPnH register triggers a multiplication with the Period (TCEn.PER) register, and the resulting data are stored in the CMPn register. When AMPEN = ‘1’, the written value is multiplied by the Amplitude (TCEn.AMP) register, and the Offset (TCEn.OFFSET) register is added.
Note: The data read from the TCEn.CMPn register are the resulting values after multiplication and add operations.
Name: CMPn
Offset: 0x28 + n*0x02 [n=0..3]
Reset: 0x00
Property: -

Bit 15141312111098 
 CMP[15:8] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 
Bit 76543210 
 CMP[7:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 

Bits 15:8 – CMP[15:8] Compare High Byte

This bit field holds the MSB of the 16-bit Compare register.

Bits 7:0 – CMP[7:0] Compare Low Byte

This bit filed holds the LSB of the 16-bit Compare register.