> Hi All,
Some additional information here. I have gotten the failure to happen
on
a development machine running a debug version of the driver. I added
counters to the ISR and DPC for each reason that the ISR or DPC could
be
running, in addition to bringing out the InterruptReason array from
the
devExt.The data at the time of failure looks as follows (these are just
counters):
Error ISR: 3
Dma ISR: 9998
Can ISR: 304900
Error DPC: 3
Dma DPC: 9998
Can DPC: 304900The InterruptReason is all zeros, no interrupts pending from the ISR
for
the DPC.(The 3 error ints and Dpcs are probably red herrings, this is just
saying
that I set up the test generator DMA incorrectly.)
Could you try also adding counters for:
ISR called total count
DPC called total count
ISR called but no reason found for ISR to be called
DPC called but no reason found for DPC to be called
If the first two counts are identical then you know for sure that you
have a 1 for 1 ratio of ISR and DPC calls, which will rule out some of
the corner cases that have been discussed here.
If the second two are != 0 it might tell you something…
Also, it may be diagnostically useful to create a timer which you
schedule from the DPC to run in (say) 500ms time which reports on what
it finds. The idea being that if things get ‘stuck’ then the timer will
report on the contents of your various registers and you could collect
data on the failure. It could even sync with the interrupt and process
the ‘missed’ interrupt if it thinks there is one, allowing the system to
continue and allowing you to collect more data. The only thing to watch
would be the case where there was 500ms of real inactivity and your
timer fired just before the ISR - it would see what looked like a missed
interrupt. You’d need to schedule a second timer or something to rule
that out…
James