40.7.2 Control B Clear

This register allows the user to change this register without doing a read-modify-write operation. Changes in this register will also be reflected in the Control B Set (CTRLBSET) register.
Table 40-9. Register Bit Attribute Legend
SymbolDescriptionSymbolDescriptionSymbolDescription
RReadable bitHCCleared by Hardware(Grey cell)Unimplemented
WWritable bitHSSet by HardwareXBit is unknown at Reset
KWrite to clearSSoftware settable bit
Name: CTRLBCLR
Offset: 0x04
Reset: 0x00
Property: RW

Bit 76543210 
 CMD[2:0]IDXCMD[1:0]ONESHOTLUPDDIR 
Access  
Reset 00000000 

Bits 7:5 – CMD[2:0] TCC Command

These bits can be used for software control of re-triggering and stop commands of the TCC. When a command has been executed, the CMD bit field will read back zero. The commands are executed on the next prescaled GCLK_TCCx clock cycle.

Writing zero to this bit group has no effect.

Writing a '1' to any of these bits will clear the pending command.

ValueNameDescription
0NONENo action
1RETRIGGERClear start, restart or retrigger
2STOPForce stop
3UPDATEForce update or double buffered registers
4READSYNCForce COUNT read synchronization
5DMAOSOne-shot DMA trigger

Bits 4:3 – IDXCMD[1:0] Ramp Index Command

These bits can be used to force cycle A (Ramp A) and cycle B (Ramp B) changes in all RAMP2x operations. On timer/counter update condition, the command is executed, the IDX flag in STATUS register is updated and the IDXCMD command is cleared.

Writing zero to these bits has no effect.

Writing a '1' to any of these bits will clear the pending command.

ValueNameDescription
0DISABLECommand disabled: Index toggles between cycles A and B
1SETSet index: cycle B will be forced in the next cycle
2CLEARClear index: cycle A will be forced in the next cycle
3HOLDHold index: the next cycle will be the same as the current cycle

Bit 2 – ONESHOT One-Shot

This bit controls one-shot operation of the TCC. When one-shot operation is enabled, the TCC will stop counting on the next overflow/underflow condition or on a stop command.

Writing a '0' to this bit has no effect

Writing a '1' to this bit will disable the one-shot operation.

Reading this bit gives the following status:

ValueDescription
0The TCC will update the counter value on overflow/underflow condition and continue operation.
1The TCC will stop counting on the next underflow/overflow condition.

Bit 1 – LUPD Lock Update

This bit controls the update operation of the TCC buffered registers.

When CTRLBCLR.LUPD (CTRLBCLR<1>) is cleared, the hardware UPDATE registers with value from their buffered registers is enabled.

This bit has no effect when input capture operation is enabled.

Writing a '0' to this bit has no effect.

Writing a '1' to this bit will enable the registers updates on hardware UPDATE condition.

Reading this bit gives the following status:

ValueDescription
0The CCBUFy, PERBUF buffer register bitfields are copied into the corresponding CCy, PER registers and register bitfields on hardware update condition.
1The CCBUFy, PERBUF buffer registers bitfields are not copied into the corresponding CCy, PER registers and register bitfields on hardware update condition.

Bit 0 – DIR Counter Direction

This bit is used to change the direction of the counter.

Writing a '0' to this bit has no effect

Writing a '1' to this bit will clear the bit and make the counter count up. Reading this bit gives the following status:

ValueDescription
0The timer/counter is counting up (incrementing).
1The timer/counter is counting down (decrementing).