News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Main Menu

Interrupt masking

Started by jipihorn, October 08, 2026, 01:34:05 PM

Previous topic - Next topic

jipihorn

Hello,

I use the BT817 a lot, without touch screen but this time, it is different.
So I have to use interrupts when touch stuff happen.

I put a mask on the REG_INT_MASK register with 0x86 and enable them with REG_INT_EN  set to 1.
However, whatever value I put here, I still get other interrupts like INT_SWAP or INT_CMDEMPTY.

If I read back the mask register, I read the right value, so it is not resetted by something else...

Is there something else to do to filter interrupts ?

Jerome.

BRT Community

Hello Jerome,

Thank you for your question.

On the following:
Quote from: jipihorn on October 08, 2026, 01:34:05 PMHowever, whatever value I put here, I still get other interrupts like INT_SWAP or INT_CMDEMPTY.

Can I ask if you are seeing the INT_N pin assert for INT_SWAP or INT_CMDEMPTY, or are you simply reading the REG_INT_FLAGS register and seeing these flags are also set when for example a INT_TOUCH interrupt is triggered?

The REG_INT_FLAGS register keeps track of the available interrupt sources on the IC, and will set the flag accordingly for each source irrespective of the flags being masked by REG_INT_MASK. When REG_INT_EN is 1, INT_N is driven low when any of the interrupt flags in REG_INT_FLAGS are high, after masking with REG_INT_MASK. Basically the flag will set for a given interrupt source when the given scenario for that flag happens, the mask is then used to tell the INT_N pin which flags it should assert for.

Best Regards,
BRT Community

Rudolph

Hi,

yes I know, I am not answering the question directly, but I never used interrupts with the EVE chips and never found out what the benefit of using interrupts is supposed to be.

When you use an interrupt, you have to make sure to not disrupt any other on going SPI transfer before reading the touch information.
If you are using DMA to update the display you certainly can not wait in the interrupt function for the DMA transfer to finish.
So the sane option is to set a flag in the interrupt to check in the main loop and read the data when EVE is not busy otherwise.
First you need to find out what the interrupt was about, then read the touch data.

I am just polling REG_TOUCH_TAG every 5ms between display updates, this is fast enough to not lose events and if any change is necessary in the display as a reaction, the display can not be updated immediately anyways, you have to wait for the next update cycle.