Hello everybody. Using emwin AppWizard with RA6M3 processor, I can successfully run and display my 7" screen. I want to use GT911 as a touchscreen, but there is a problem. External touch interrupt keeps interrupting and I cannot receive touch data. If you want to examine, I attach the project.
On FSP configurations you have set 'Channel 11' while inside the callback you compare the channel to 0.
Is this by design ?
AZ_Renesas Hello. Thank you for your answer. There must be leftovers from the methods I tried to fix the problem. But the same problem persisted when Channel 0. It interrupts as if I'm constantly pressing the touchscreen.
I also share with you the pulse widths of the interrupt pin before touching the touch panel and after touching the touch panel.
I understand that the touch screen is connected with the board with this pin, right ?
Could you explain why the pin is high even when you do not touch the screen ?
Thanks a lot.
AZ_Renesas IK_Renesas Yes, it's the interrupt pin of the touch panel shown in the pictures. Although I do not touch the screen, the relevant pin outputs, but the duration is different. I clearly did not understand this situation. That's why I wanted to share it here.
I understand that your screen sets the pin to high and causes an interrupt even when you do not touch it. This does not seem an RA issue so I suggest that you look into that interrupt pin of the screen which is clearly not behaving as expected.
AZ_Renesas IK_Renesas Hello again, This is the feature of the touch panel. When not pressed, it throws periodic pulses in this way. I tried another panel with the same driver and it behaves the same. How can I create a correct interrupt in this case. It looks like I need to create an interrupt based on the duration of the incoming pulse. How can I configure this state? If you want to examine it, I am sharing the document of the touch panel.
GT911 Programming Guide_v0.1 (4).pdf
An solution could be to use the BSP function calls:
where irq is the interrupt you wish to enable / disable.
That would require that you enable the interrupt after the end of the "small pulse" and before the end of the "big pulse" so it can be triggered. Do you think that it can solve the issue ?
Does these periodical pulses which are created when not touching a panel have a specific duration?
Because in case they do have you could enable digital filtering on the external interrupt and calculate the exact frequency you need and the proper clock divider in order to match the minimum pulse duration you want to reject. Take a look here:
Hope it helps!
IK_Renesas AZ_RenesasHello. Thank you for your suggestions, I tried what you said but no result. In both cases, pulses on the touch panel are periodic. When the panel is touched, the period is 9ms. The period is 11ms when the panel is not touched. I tried all kinds of values of Digital Filtering and changed the PCLKB values, but it still gets interrupted every time.