cancel
Showing results for 
Search instead for 
Did you mean: 

Some questions about the GFX framework

Jack li1
Associate III

Hi @Martin KJELDSEN​ ,

I discovered something rather odd in GFX framework.I suddenly didn't give the GFX framework DSI_IRQHandler when I was using animation.If I restore the interrupt signal after a while,Model::tick() will disappear.The rest of the MCU functions are working, and the graphics frame is no longer refreshed farmbuffer.OSWrappers: : signalVSync () will be invoked, OSWrappers: : giveFrameBufferSemaphore () these will not be invoked.Should I do some protection when GFX loses the trigger signal?

Best regards

Jack li

8 REPLIES 8
Martin KJELDSEN
Chief III

What does this mean? "I suddenly didn't give the GFX framework DSI_IRQHandler when I was using animation"

Note that the DSI interrupts help drive the framework forward. No OSWrappers::signalVSync() signal => no framebuffer update.

		analogClock1.setAnimation(80, EasingEquations::cubicEaseInOut);
		analogClock1.setTime12Hour(hour, min,sec, true);

I use these two functions,the animation should be performed.I suddenly pressed the button to power off the screen to execute the following code.

void MainView::handleUpKeyShortEvent()
{
 if (ELX_LCD_On())																							
 {
  ELX_LCD_Off();
 }
}

OSWrappers::signalVSync() signal is invoked but no Model::tick() is sent

OSWrappers::signalVSync() signals are called, but no model ::tick() is sent.This phenomenon occurs after the screen open

What happens inside LCD_on()/Off() ? What you should probably also do is disable the LCD interrupts in the NVIC table in Off(), then re-enable them in On().

If you're using parallel RGB interface with the Generator in CubeMX you should have these functions generated for you (with correct NVIC calls). Otherwise, you can fill out these functions yourself if you need a good place for that code.

void TouchGFXHAL::enableInterrupts();
void TouchGFXHAL::disableInterrupts();

 /Martin

I'm using a screen with a DSI interface.

@Martin KJELDSEN​  What kind of protection should I do?

An exception is made if the interrupt is not given suddenly during the drawing of the animation or at the beginning