cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX not updating framebuffer. (or not running at all)

Leonhardt
Associate

Im new to TouchGFX. Im goung to create my first demostration on a custom setup.

I got a NUCLEO-L4A6ZG board with a display shield using an MCU interface.

This works:

  • Internal frame buffer 320x240x2 bytes
  • Driver for display, bit banging GPIOs for display control
  • Task that maps the frame buffer to the display periodically.
  • When I alter the frame buffer manually it is is shown correctly on the display.

I have no touch controller on the hardware, expecting to use hardware buttons.

This should have been the hard part. But now I have to get TouchGFX working. I got:

  • Two screens defined in the TouchGFX designer with buttons that alters between the screens.
  • Works on simulator
  • Generates code with no warnings/errors.
  • Everything compiles in STM32MXCube IDE.
  • From the main function MX_TouchGFX_Init and MX_TouchGFX_PreOSInit is called, and returned.
  • A second task calls the MX_TouchGFX_Process which does not return ast it should not.

In the project browser I can see code generated for the screens and the buttons on the screens. And I can verify that the code is actually in the elf-file and flashed to the board.

But:

  • The display is blank. Framebuffer never updaded by TouchGFX.
  • I can see that the MX_TouchGFX_Process is calling os_Delay periodically.
  • The code for the screens is never called.
  • When I open CubeMX from the Cube IDE, I got a warning that TouchGFX 4.24.2 is not found.And I should use Embedded Software Packages updates to fix it. But there is not updates. Cube MX allows me to select TouchGFX 4.24.1
  • When start TouchGFX Designer from the Cube IDE by clicking on the thouchgfx file in the project browser, it starts the designer in version 4.24.2. (Same version if I check in windows Add/remove programs)

So here is the questions:

  • How do I fix the version confusion? Should I care?
  • How do I debug TouchGFX?
  • Is there some kind of status function to call? to see whats going on?

Please give some hints. Thanks in advance.

 

Regards

Leonhardt

2 REPLIES 2
MM..1
Chief III

Optimaly start here Framebuffer Strategies | TouchGFX Documentation

and better is connect display to real peripheral bus . Bitbanging is last resort...

Hi

Framebuffer Strategies | TouchGFX Documentation does not help me. I believe that the configuration from CubeMX is done correctly.

From TouchGFXGeneratedHAL.cpp:

 

void TouchGFXGeneratedHAL::initialize()
{
    HAL::initialize();
    registerEventListener(*(Application::getInstance()));
    setFrameBufferStartAddresses((void*)0x2002A800, (void*)0, (void*)0);
}

 

From TouchGFXGeneratedConfiguration.cpp:

 

Snippets:

#include <platform/driver/lcd/LCD16bpp.hpp>

static LCD16bpp display;

static TouchGFXHAL hal(dma, display, tc, 320, 240);

 

And from my display update task I call my display driver:

void StartDefaultTask(void *argument)
{
  /* USER CODE BEGIN 5 */
  memset((uint8_t *)0x2002A800, 0xFF, 320*240*2);
  for(;;)
  {
    ili9341_WriteDisplayBuffer((uint16_t*)0x2002A800);
    osDelay(100);
  }
  /* USER CODE END 5 */
}

Changing the display buffer by the debugger manually, changes the image on the display as it should. 

Here is my configuration from CubeMX:

Leonhardt_0-1736153162180.png

So I believe that there is something in TouchGFX that is not setup correctly. But I cannot locate the problem as the  TouchGFX is a blackbox.

Kasper