Screen touch interrupts

FTDI/Bridgetek EVE2 & EVE3 & EVE4 SPI TFT Series by Matrix Orbital

Moderator: Mods

Post Reply
rascalito
LCD Geek
Posts: 38
Joined: Sat Apr 18, 2020 11:22 pm

Screen touch interrupts

Post by rascalito »

Hello!

I'm trying to configure the screen (EVE70 with BT815) in order to get interrupts when the screen is
touched, instead of polling.
There are 8 flags for interrupts, so I have chosen bit 2 which seems to correspond to screen touch.
So the configuration I use is setting the mask to 0x00000002 and setting the bit of REG_INT_N to 1.

In short, the setup code is like this:

wr32(REG_INT_MASK, 0x00000002);
wr32(REG_INT_EN, 0x00000001);

Does it seem to be right?

Beside this the documentation says that there should be a pullup, so I have used the MCU internal
pullup for this purpose. But I don't get any interrupt.

Could anybody tell me what's wrong?

NB: all the other features work, and the above functions are also used many times to access the
chip, so they are correctly implemented and I suspect some config is missing.

I also read in the documentation that the GPIO has to be tuned for interrupts. But the sample code
showing backlight enable leaves no room for configuration. I'ts set to FFFF, so I guess I can't change
anything.

Any comment welcome.

Ray
Matrix Orbital
Matrix Orbital
Posts: 742
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Re: Screen touch interrupts

Post by Ray »

In short, the setup code is like this:

wr32(REG_INT_MASK, 0x00000002);
wr32(REG_INT_EN, 0x00000001);

Does it seem to be right?
depends a bit on the value you have for REG_INT_MASK, if you use our sample code we define it as 0xb0 which means you'd have to use RAM_REG + REG_INT_MASK to get its final address of 0x3020b0

rascalito
LCD Geek
Posts: 38
Joined: Sat Apr 18, 2020 11:22 pm

Re: Screen touch interrupts

Post by rascalito »

Hello!

Thanks for your reply.
REG_INT_MASK is 0x3020B0, so it includes RAM_REG.
And on the scope, I can clearly see the address sent
B0 20 B0
The first B0 is in fact 30 with the write bit (0x80).

Beside this, as stated above, everything else works,
so the wr32 function works fine.

Thanks for any hint.

Post Reply