CNT
WCAP
ECNT
PCNT
2
3
1
2
6
2
3
10
3
4
3
4
5
6
7
8
9
10
11
12
Request
Request
Request
Quiet
Request
Quiet
Request
Quiet
Request
Use Cases
979
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer Transfer Unit (HTU) Module
21.3 Use Cases
21.3.1 Example: Single Element Transfer with One Trigger Request
This example considers the case that the HTU fills a RAM buffer in the main (CPU) data RAM. The HTU
reads from the instruction which generates the HTU requests.
This example uses a PCNT instruction. Every time the PCNT has captured a new pulse or period value, it
will automatically generate a transfer request to the HTU, which then transfers the value from the N2HET
RAM to the buffer RAM. So over time consecutive locations in the RAM buffer can be filled with
consecutive measurement values captured into the N2HET RAM data field of the same PCNT instruction
without loading or interrupting the CPU.
21.3.2 Example: Multiple Element Transfer with One Trigger Request
The following example shows how the HTU could be used to fill a RAM buffer with a data stream including
different types of measurement values belonging to the same N2HET input signal (on one pin): Time
stamp values (WCAP), edge counter values (ECNT) and last period values (PCNT).
shows the timing and
shows the byte addresses of the program- (PF), control-
(CF), data- (DF) and reserved field (res) of the WCAP-ECNT-PCNT instruction block. The timing and code
example assumes that all three instructions are assigned to the same N2HET pin.
Figure 21-13. Timing of the WCAP, ECNT, PCNT Example
Table 21-5. Field Addresses of the WCAP, ECNT, PCNT Example
PF
CF
DF
Res
WCAP
30h
34h
38h
3Ch
ECNT
40h
44h
48h
4Ch
PCNT
50h
54h
58h
5Ch
In the HET code the HTU request is enabled only for the last instruction (PCNT) of the WCAP-ECNT-
PCNT block. When the PCNT condition is true, it will cause the generated HTU frame to perform three
HTU element reads from the data fields of WCAP, ECNT, and PCNT.