N2HET Functional Description
803
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
High-End Timer (N2HET) Module
20.2.3.2.1 Example:
Prescale Factor Register (HETPFR) = 0x0300
—> lr = 8 —> LRP = 8 × HRP
Assumption: HR data field = 0x50 = 1010000b
lr = 8 —> Bits D[3:0] are ignored —> HR delay = 101b = 5 HRPs
or by using the calculation with weight factors:
HR Delay
= lr · (D[6] · 1/2 + D[5] · 1/4 + D[4] · 1/8 + D[3] · 1/16 + D[2] · 1/32 + D[1] · 1/64 + D[0] · 1/128)
= 8 · (1 · 1/2 + 0 · 1/4 + 1 · 1/8 + 0 · 1/16 + 0 · 1/32 + 0 · 1/64 + 0 · 1/128)
= 5 HRPs
20.2.4 Host Interface
The host interface controls all communications between timer-RAM and masters accessing the N2HET
RAM. It includes following components:
20.2.4.1 Host Accesses to N2HET RAM
The host interface supports the following types of accesses to N2HET RAM:
•
Read accesses of 8, 16, or 32 bits
•
Read accesses of 64-bits that follow the shadow register sequence described in
•
Write accesses of 32 bits
Writes of 8 or 16 bits to N2HET RAM by an external host are not supported.
20.2.4.2 64-bit Read Access
The consecutive read of a control field CF(n) and a data field DF(n) of the same instruction (n) performed
by the same master (for example, CPU, DMA, or any other master) is always done as a simultaneous 64-
bit read access. This means that at the same time CF(n) is read, DF(n) is loaded in a shadow register. So
the second access will read DF(n) from the shadow register instead of the N2HET RAM.
In general a 64-bit read access of one master could be interrupted by a 64-bit read access of another
master. A total of three shadow registers are available. Therefore up to three masters can perform 64-bit
reads in an interleaved manner (Master1 CF, Master2 CF, Master3 CF, Master1 DF, Master2 DF, Master3
DF).
If all three shadow registers are activated and a 4th master performs a CF or DF read it will result in an
address error and the RAM access will not happen. Other access types by a fourth master (reads from the
PF field or writes to any of the fields) will occur because these access types do not require an available
shadow register resource to complete.
20.2.4.3 Automatic Read Clear Feature
The N2HET provides a feature allowing to automatically clear the data field immediately after the data field
is read by the external host CPU (or DMA). This feature is implemented via the
control bit
, which is
located in the control field (bit C26). This is a static bit that can be used by any instruction, and specified in
the N2HET program by adding the option (control = ON) to the N2HET instruction. The automatic read
clear feature works for both 32 and 64 bit reads that follow the sequence described in
.
When the host CPU reads the data field of that instruction, the current data value is returned to the host
CPU but the field is cleared automatically as a side effect of the read. In case the master reads data from
an instruction currently executing, any new capture result is stored and this takes priority over the
automatic read clear feature, so that the new capture result is not lost.