Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Data Sheet

Product codes
ATSAMD21-XPRO
Page of 1018
681
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
30.8.3 Control B Set
This register allows the user to change the below mentioned functionalities without doing a read-modify-write operation. 
Changes in this register will also be reflected in the Control B Clear (CTRLBCLR) register.
Name:
CTRLBSET
Offset:
0x05
Reset:
0x00
Property:
Write-Protected, Write-Synchronized
z
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 field will be read back as zero. The commands are executed on the next prescaled 
GCLK_TCC clock cycle.
Writing a zero to this bit group has no effect
Writing a valid value into this bit group will set the associated command, as shown in the table below.
Table 30-11. TCC Command
z
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, according to the 
table below. On timer/counter update condition, the command is executed, the IDX flag in STATUS register is 
updated and the IDXCMD command is cleared.
Writing a zero to this field has no effect.
Writing a valid value into this field will set a command.
Table 30-12. Ramp Index Command
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
CMD[2:0]
Name
Description
0x0
NONE
No action
0x1
RETRIGGER
Clear start, restart or retrigger
0x2
STOP
Force stop
0x3
UPDATE
Force update of double buffered registers
0x4
READSYNC
Force COUNT read synchronization
0x5-0x7
Reserved
IDXCMD[1:0]
Name
Description
0x0
DISABLE
Command disabled: Index toggles between cycles A and B