Mail Archives: djgpp/2003/07/08/12:30:39
Dear all,
I am trying to find out the hardware interrupt latency in protected
mode. The test is as followings:
1. test program (1) works as a clock generator to make 4Khz square
wave, CPU is P4 Celeron 1.7GHz;
2. test program (2) runs on another computer (PIII 933MHz). It sets
ISR for IRQ7 in protected
mode(_go32_dpmi_set_protected_mode_interrupt_vector(), no interrupt
chain). The square wave from test program (1) connects to its IRQ7,
ISR sets parallel port to 1 when entering, and reset to 0 when
leaving.
Both programs are compiled by DJGPP v2.03, gcc 3.23. DPMI host is
CWSDPMI v5. I use CWSPARAM to disable virtual memory, so no paging
will occur. And in program (2), ALL hareware interrupt are disabled
expect IRQ7, main() is an infinite loop: for (;;) {}. Therefore,
technically, no mode switching will occur in program (2) during test.
I use logical analyzer to capture the interrupt latency (time between
the low-to-high edge of interrupt source signal from program (1) to
low-to-high edge of signal from program (2)). Normally, the latency is
less than 6 microseconds, which is really reasonable. However,
sometimes (in 1 or 2 hours), a very large latency, 30 to 60
microseconds, can be observed. I am not sure if anybody did the same
test in DJGPP. Any similiar or better data? Or anybody find the same
sudden large latency? And what steps should be strictly foloowed to
restrain the latency in an acceptable range, such as < 10
microseconds?
Thanks for your patience and I am looking for your reply.
Sincerely,
Wang Yong
- Raw text -