15.4.3.11.1 Capture to Trigger
To support LLC Operating mode, a capture to trigger is available. When triggered, hardware will capture the time base value, perform a computation and store the result in one of the PGxTRIGy registers. The feature is enabled with the CAPTREN (PGxIOCON1[19]) bit and the CAPTRSEL[1:0] (PGxIOCON1[17:16]) bits define the PGxTRIGy (where y = C, D, E or F) register to store the result. The feature works in conjunction with the time base capture and stores the time base in the PGxCAP register as defined by its control bits.
The trigger value to be stored in the Trigger register is 50% of the high time value, defined as:
Trigger Value = (PGxCAP - DTH)/2
Further mathematics can be performed on the trigger data using the offset and postscaler features of CAPTROFS[4:0] and CAPTRPS[4:0] in the PGxEVT2 register. The value stored in the PGxTRIGy resgister is:
PGxTRIGy = (Trigger value +CAPTROFS) / CAPTRPS
The CAPTR status bit in PGxSTAT[13] indicates that a new trigger value has been successfully stored in the selected Trigger register. It is cleared when PGxCAP is read or CAPTRSEL[1:0] is written.
Table 15-12 summarizes the operation of the capture features.
LLC Mode (MOD[2:0] = 011) | CAPEN | CAPTREN | Capture Operation |
---|---|---|---|
No | 0 | 0 |
|
0 | 1 |
| |
1 | 0 |
| |
1 | 1 |
| |
Yes | x | 0 |
|
1 |
|