cancel
Showing results for 
Search instead for 
Did you mean: 

Some preparation for GFX's entry into low power

Jack li1
Associate III

I want to get the MCU into low power mode,but I found that entering low power and exiting GFX would not work.So what should I do before going into low power?I used a DSI screen and DMA2D mode

9 REPLIES 9
Martin KJELDSEN
Chief III

Can you elaborate on "would not work" ? Thanks

​modle::Tick () in GFX is not executing.

Then you probably need to manage your interrupts better - Disable and re-enable your interrupts (NVIC) upon exiting low-power mode.

If tick() is not called this is a sign that your interrupts are not triggering OSWrappers::signalVSync()

OSWrappers::signalVSync() is called by interrupt but no other signals are called

What about the Touchgfx task? the main event loop is waiting for signalVSync() to proceed.

I want to know that the GFX framework completes the DMA2D drawing

I have no idea how your project looks, but you may have something like STM32DMA.cpp which has functions to start a copy (from flash to framebuffer) or a fill. You'll also have a handler that signals TouchGFX when the transfer is done (interrupt). You could try breaking in those functions to verify that touchgfx is asking for a transfer and that the transfer completes.

/Martin

I found that the GFX task is not running,but OSWrappers::signalVSync()is called by interrupt 

Back from vacation.

Is the TouchGFX task started? Check your main.cpp . If you're using FreeRTOS from within CubeMX, you need to call the Process function to start TouchGFX manually in the task handler. Here mine is called DefaultTask.

/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
  /* USER CODE BEGIN 5 */
  MX_TouchGFX_Process();
  ..
}