Skip to main content
TLahr.1
Associate II
Feb 24, 2020 9:56 PM UTC
Question

Integrating a Timer Interrupt with TouchGFX Graphics

I'm working with the STM32F769I-DISCO board.

I initialized a timer with an interrupt in main.cpp and I put an infinite while(1) loop before all the TouchGFX graphics initialization functions. The interrupt works fine, toggling an LED every second.

However, when I let the graphics initialize, the interrupt doesn't seem to be working. The LED just remains in it's initial state. Is this because the TouchGFX runs in another thread? Is there a way I can have the timer interrupt working to toggle the LED while the TouchGFX graphics are running?

Thank you

This topic has been closed for replies.

2 replies

Martin KJELDSEN
Principal III
Feb 25, 2020 9:02 AM UTC

Hi @TLahr.1​,

It may be because of the priority of your interrupt in the NVIC settings. TouchGFX uses 2-3 interrupts, primarily, which are configured to have the same priority. In your case DSI, LTDC, DMA2D.

You should be able to toggle an LED from an interrupt while TouchGFX is running. We do it all the time - E.g. all our LTDC interrupt handlers are instrumented with calls to a GPIO class that toggles an led on VSYNC, RENDER_TIME, etc, to make performance visible.

/Martin

TLahr.1
TLahr.1Author
Associate II
Feb 27, 2020 2:43 AM UTC

I tried setting the priority of the timer to different values... I tried greater than, less than, and equal to the priority of the DSI, LTDC, DMA2D.

The timer interrupt still doesn't seem to be working while the TouchGFX is running in any of the above cases.

Is there a particular spot I have to initialize the timer?