ibwrt() generates INT(TLCINT) for the MCU
ibr() generates INT(DONE) for the MCU
In both interrupts before exiting the ISR, I set the configuration for the next coming string and also use the command GO
to clear stop and halt as well as it clears DONE bit that is set as a result of reading the string from FIFOB.
GPIB registers interrupt flags are cleared with GO command, then I clear MCU hardware interrupt flag.
I clear END-RX by reading ISR1 if the interrupt was TLCINT.
Therefore ibrd() is the only one that would cause hardware interrupt.
I tried to find if DONE interrupt has been serviced before the new lost string arrived. I set a flag, this
flag is cleared if DONE interrupt is serviced. When the problem occurs, I find this flag still set, which means DONE interrupts
didn't occur yet.
When the problem occurs, the last interrupt occurs with both DONE and TLCINT are set. I serve it as TLCINT
and I found number of bytes received is zero. However, the GPIB analyzer shows string has been delivered to the ASIC and waiting
for reply.