49.8.2 Control B Clear
Name: | CTRLBCLR |
Offset: | 0x04 |
Reset: | 0x00 |
Property: | PAC Write-Protection, Write-Synchronized, Read-Synchronized |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
CMD[2:0] | IDXCMD[1:0] | ONESHOT | LUPD | DIR | |||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W | |
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bits 7:5 – CMD[2:0] TCC Command
Writing a ‘0’ to these bits has no effect.
Writing a '1' to any of these bits will clear the pending command.
Bits 4:3 – IDXCMD[1:0] Ramp Index Command
These bits can be used to force cycle A and cycle B changes in RAMP2 and RAMP2A operation. 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.
Value | Name | Description |
---|---|---|
0x0 | DISABLE | DISABLE Command disabled: IDX toggles between cycles A and B |
0x1 | SET | Set IDX: cycle B will be forced in the next cycle |
0x2 | CLEAR | Clear IDX: cycle A will be forced in next cycle |
0x3 | HOLD | Hold IDX: 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.
Value | Description |
---|---|
0 | The TCC will update the counter value on overflow/underflow condition and continue operation. |
1 | The 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 CTRLB.LUPD 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.
Value | Description |
---|---|
0 | The CCBx, PERB, PGVB, and PGEB buffer registers values are copied into the corresponding CCx, PER, PGV, and PGE registers on hardware update condition. |
1 | The CCBx, PERB, PGVB, and PGEB buffer registers values are not copied into the corresponding CCx, PER, PGV, and PGE registers 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.
Value | Description |
---|---|
0 | The timer/counter is counting up (incrementing). |
1 | The timer/counter is counting down (decrementing). |