Hi,
I'm trying to get around 33.3MHz HWI interrupt interval by using TIMER3 on my evm6657 board with SYS/BIOS.
The real goal of this test is getting minimum time interval to drive a GPIO high/low repeatively.
Firstly, I choose TIMER3 and set its registers to work as 64-bit timer in continuous mode, triggering every 5clock peroid, like below.
a) TIMER3_PRDLO = 4; (5-1)
b) TIMER3_TCR = 0x00880088;
c) TIMER3_INTCTLSTAT = 0x00010001;
d) TIMER3_TGCR = 0x00000003;
e) TIMER3 event (ID:68) connected to CPU Interrupt 5 on the app.cfg file and a HWI ISR handles this interrupt.
My board is using 1GHz CPU clock(default). According to datasheet, C6657 TIMER module run on 166.66 HHz interal system clock(from SYSCLK7, 1GHz / 6) and it has 6ns period. Therefore, by seting period(PRDLO) with 4, I expect to get 30ns((4+1) * 6ns).
I checked that HWI ISR is called in regular interval with TIMER3, very well. However, when I check HWI ISR calling interval , I always got over 732 cycles value(from Timestamp_get32() in ISR). No matter that I put other values under 125 into PRDLO(peroid) register, the results always give me around 732~750 cycles. Based on 1GHz CPU clock(1ns), 732cycles means 732ns. The result is really far from what I expect.
I meassured cycle time at my HWI ISR by calling Timestamp_get32() function in Log_info1() function. For this logging , LoggferBuf and Timestamp has been included in app.cfg(SYS/BIOS) and Build env is SYS/BIOS 6.35.4.50, PDK C6657 1.1.2.6 and XDCTools 3.25.3.72.
Is there any period limitation when using TIMER module under 1us interval or Am I missing something?
- Jun