EMERSON KJ3007X1-BA1工控控制卡件
因此,不可能在給定時間內(nèi)捕獲所有四個計時器的值。然而,通過將該位設(shè)置為“1”,所有四個定時器輸出將僅在讀取定時器1和2電流計數(shù)寄存器(TMRCCR12)時被鎖存。因此,為了同時捕獲所有四個計時器的當前計數(shù),首先執(zhí)行對TMRCCR12的讀?。?2位讀取),然后讀取TMRCCR3和TMRCCR4。第一次讀?。ǖ絋MRCCR12寄存器)導致同時鎖存所有四個定時器值。對TMRCCR3和TMRCCR4寄存器的后續(xù)讀取不會鎖存新的計數(shù)值,從而可以獲得同一實例中所有計時器的計數(shù)。定時器1和2加載計數(shù)寄存器(TMLCR12)定時器1和定時器2為16位寬,并從定時器1和2中加載計數(shù)寄存器中獲取其加載計數(shù)(TMRLCR12),該寄存器位于BAR2中地址的偏移0x10處。
As a result, it is not possible to capture the values of all four timers at a given instance in
time. However, by setting this bit to “1”, all four timer outputs will be latched only on
reads to the Timer 1 & 2 Current Count Register (TMRCCR12). Therefore, to capture
the current count of all four timers at the same time, perform a read to the TMRCCR12
first (with a 32-bit read), followed by a read to TMRCCR3 and TMRCCR4. The first
read (to the TMRCCR12 register) causes all four timer values to be latched at the same
time. The subsequent reads to the TMRCCR3 and TMRCCR4 registers do not latch
new count values, allowing the count of all timers at the same instance in time to be
obtained.
Timer 1 & 2 Load Count Register (TMRLCR12)
Timers 1 & 2 are 16-bits wide and obtain their load count from the Timer 1 & 2 Load
Count Register (TMRLCR12), located at offset 0x10 from the address in BAR2.