[Originally posted to FTDI Community; was directed to move post to here]
We have a system using the FT813 display controller with a Newhaven display and capacitive touch screen. At startup, the firmware configures the FT813 to enable touch tag changed interrupt and the swap complete interrupt, so the flags enabled are 0x05. The main screen of the application updates every 100 ms. Logic analyzer traces show the interrupt input from the FT813 to the host microcontroller going active, followed by the host firmware reading the interrupt flags. Ordinarily this works fine, and the FT813 reports SWAP complete after the screen contents have been delivered to the command coprocessor and the swap command is executed and completed. (Incidentally, Command FIFO Flag / CMDFLAG is also set.)
Intermittently, though, the interrupt flags returned are 0x4A, which indicate sound effect ended and touch detected, but the application does not use sound, the screen is not being touched, and none of these interrupts were enabled by the host firmware. The timing of the interrupt is the same as if the screen swap has actually completed, but the swap interrupt flag is not set, so the application is not sure it's safe to write a screen update, and does nothing in response to that interrupt. At this point in the evolution of this application, it just times out and resumes writing updates to the command coprocessor, and everything proceeds normally for a while, but this condition does pop up from time to time.
In earlier application firmware versions, it was (needlessly) rewriting the screen contents to the command coprocessor as soon as the swap was complete. With this firmware, these errant interrupt flags were reported intermittently, but much more frequently.
My question is whether this indicates some sort of fault condition not listed in the documentation. There are scenarios where screen content could actually change every 100 ms, so we would like to keep the capability of using this update frequency. If the application sees this condition, should it go through the fault recovery procedure?
This does not cause a problem if the main screen is just sitting there updating with no user interaction, but when navigating from the main screen and between any of the other screens, the device can eventually stop responding to touch. I have found that at least one cause of this is that the FT813 thinks one screen is displayed, while the screen manager in the application thinks it has moved to a different screen. Touch interrupts are occurring, but the touch tag belongs to the wrong screen from the screen manager's perspective. I'm wondering if this interrupt flag issue could be a cause for the application to get out of sync with the display controller, and so the application needs to treat the invalid interrupt flags as a fault condition.