Atmel Xplained Pro Evaluation Kit ATSAMD20-XPRO ATSAMD20-XPRO Data Sheet

Product codes
ATSAMD20-XPRO
Page of 660
457
Atmel | SMART SAM D20 [DATASHEET]
Atmel-42129K–SAM-D20_datasheet–06/2014
27.8.4 Control B Set
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 (CTRLBCLR) register.
Name:
CTRLBSET
Offset:
0x05
Reset:
0x00
Property:
Write-Protected, Write-Synchronized, Read-Synchronized
z
Bits 7:6 – CMD[1:0]: Command
These bits is used for software control of retriggering and stopping the TC. When a command has been executed, 
the CMD bit group will be read back as zero. The commands are executed on the next prescaled GCLK_TC clock 
cycle.
Writing a zero to one of these bits has no effect.
Writing a one to one of these bits will set a command.
Table 27-9. Command
z
Bits 5:3 – Reserved
These bits are unused and reserved for future use. For compatibility with future devices, always write these bits to 
zero when this register is written. These bits will always return zero when read.
z
Bit 2 – ONESHOT: One-Shot
This bit controls one-shot operation of the TC. When active, the TC will stop counting on the next overflow/under-
flow condition or a stop command.
0: The TC will wrap around and continue counting on an overflow/underflow condition.
1: The timer/counter will wrap around and stop on the next underflow/overflow condition. 
Writing a zero to this bit has no effect.
Writing a one to this bit will enable one-shot operation.
z
Bit 1 – Reserved
This bit is unused and reserved for future use. For compatibility with future devices, always write this bit to zero 
when this register is written. This bit will always return zero when read.
z
Bit 0 – DIR: Counter Direction
This bit is used to change the direction of the counter.
0: The timer/counter is counting up (incrementing).
Bit
7
6
5
4
3
2
1
0
CMD[1:0]
ONESHOT
DIR
Access
R/W
R/W
R
R
R
R/W
R
R/W
Reset
0
0
0
0
0
0
0
0
Value
Name
Description
0x0
NONE
No action
0x1
RETRIGGER
Force a start, restart or retrigger
0x2
STOP
Force a stop
0x3
-
Reserved