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 ?
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.
I made a quick project that maybe solves the issue. I assumed that the interrupt pin is P105 and width of the small pulse is less than 250 us and falling edge trigger. The idea is to initially disable the interrupt, then wait for the time of the small pulse, then enable the interrupt and then the falling edge of the big pulse triggers the interrupt.
Please review the code and modify accordingly if you think that it can work for you.
Hope it helps.
AZ_Renesas IK_Renesas Dear officials. Hello again. First of all, thank you very much for taking the time to share an example to help me. I will try what you said. I think it will probably work. But will this solution be useful when I use EmWin and RTOS?. There are GT911 threads made with SSP in Synergy form. Frankly, I couldn't understand how they solved the interrupt problem. In those examples, I was not successful in my attempts due to the driver differences. It would be great if I could find an example of FSP for GT911. There would at least be a guide in configuration and software. I tried to convert the drivers made with ST to Renesas, but I was not successful in this regard.
Using RTOS complicates things but you can give it try. Unfortunately, I have not yet found an example of FSP for GT911.
AZ_Renesas IK_RenesasHello again, I am working on a new method for GT911 touch sensing. I am trying to understand whether it is touched by measuring the frequency of the pulses coming from the touch panel with the Timer Input Capture method. But there is a problem. I am using RTOS in my project and switching between threads is not as fast as I want. So I mean, Input Capture doesn't work fast. It has to count 32 bytes counter. Without RTOS it drops to Timer interrupt very quickly, but with RTOS it drops to Timer interrupt too late. Is there any way to speed up this method? I'm attaching the project if you want to review it.
Please take a look on the attached example on input capture that measures a pulse time.
I do not think that input capture can be faster than this. After the capture interrupt occurs, it retrieves GPT information and performs one multiplication and one division.
Thank you for your answer. It's already running through this example. But the frequency of interrupting when measuring the pulse duration varies for the two cases.When RTOS is not used, it enters Input Capture Interrupt continuously and quickly.When RTOS is used, Input Capture Interrupts slower. The time between two interrupts increases.If you look at the example I have attached, you will understand what I mean.