22.5.2 Control B
Name: | CTRLB |
Offset: | 0x01 |
Reset: | 0x00 |
Property: | - |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
EVGEN | ASYNC | CCMPINIT | CCMPEN | CNTMODE[2:0] | |||||
Access | R/W | R/W | R/W | R/W | R/W | R/W | R/W | ||
Reset | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Bit 7 – EVGEN Event Generation
1
’ will output the waveform output on the event line instead
of the compare match. The CCMPEN bit is ignored for the event
output.Value | Name | Description |
---|---|---|
0 | PULSE | An event pulse is generated when there is a compare match or capture |
1 | WAVEFORM | The event output is equal to the waveform output for modes where there is waveform output |
Bit 6 – ASYNC Asynchronous Enable
1
’ will allow asynchronous updates of the TCB output signal in
Single-Shot mode.Value | Description |
---|---|
0 | The output will go HIGH when the counter starts after synchronization |
1 | The output will go HIGH when an event arrives |
Bit 5 – CCMPINIT Compare/Capture Pin Initial Value
Value | Description |
---|---|
0 | Initial pin state is LOW |
1 | Initial pin state is HIGH |
Bit 4 – CCMPEN Compare/Capture Output Enable
Value | Description |
---|---|
0 | Waveform output is not enabled on the corresponding pin |
1 | Waveform output is enabled and will be available on the pin corresponding to WO, which will override the configuration in the I/O Configuration (PORT) peripheral, and automatically set the direction of the corresponding pin to output. |
Bits 2:0 – CNTMODE[2:0] Timer Mode
Writing to this bit field selects the Timer mode.
Value | Name | Description |
---|---|---|
0x0 | INT | Periodic Interrupt mode |
0x1 | TIMEOUT | Time-Out Check mode |
0x2 | CAPT | Input Capture on Event mode |
0x3 | FRQ | Input Capture Frequency Measurement mode |
0x4 | PW | Input Capture Pulse-Width Measurement mode |
0x5 | FRQPW | Input Capture Frequency and Pulse-Width Measurement mode |
0x6 | SINGLE | Single-Shot mode |
0x7 | PWM8 | 8-bit PWM mode |