cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX + CubeMX + CubeIDE integration problems - please help

zak83
Associate II

Hi everyone,

I would be extremely grateful if someone help me to move forward.

I have a STM32F469I-DISCO board and I want to make a simple HMI with few screens. Problem I am having is that I am unable to create project that allows me to use three pieces of software (in topic).

I tried to follow Martin KJELDSEN video on 746G-DISCO but since I don't know what are correct MX settings for 469I board I get stuck.

I have already spent like month trying to move forward and I only managed to use Visual Studio to edit gui files and be able to run simulator to see the HMI. But if I wanted to edit back-end of the application I need the CubeIDE.

I am brand new to STM / ARMs, Eclipse and Touch GFX so this definitely doesn't help.

Is there a step by step guide on how to create project?

Or maybe someone has a template project created in CubeIDE for 469I-DISCO board?

Thank you very much in advance.

Zak83

26 REPLIES 26

Thanks @Martin KJELDSEN​ ,

I will look into this. Quite possibly I have this settings wrong.

I will post an update on this one.

Zak_83

Hi @Martin KJELDSEN​ ,

So I have checked settings for DSI HOST and they match settings from project created with Touch GFX Designer.

I have done following to try to figure out what is an issue:

-> created a new Splash screen and made a fade in widget animation after which screen should change to Home Screen.

This worked fine I believe, logo faded in and screen switched to Home but it was missing slide animation. So it looks like some animations forks fine and some not.

Also I have another problem, screen works fine if I download to it using debug button from within CubeIDE, but once I stop debugging and reset PCB it doesn't start up at all.

I have this code in place to see if my discovery is "alive":

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
  /* USER CODE BEGIN Callback 0 */
	static int i = 0;
  /* USER CODE END Callback 0 */
  if (htim->Instance == TIM6) {
    HAL_IncTick();
    i++;
    if(i >= 1000)
    {
    	i = 0;
    	HAL_GPIO_TogglePin(LED2_GPIO_Port, LED2_Pin);
    }
  }
  /* USER CODE BEGIN Callback 1 */
 
  /* USER CODE END Callback 1 */
}

So i toggle an led to see if code is getting executed but after above mentioned reset that diode does not toggle.

Do you have any idea what could be wrong?

Thank you!

Zak_83

Have you allocated a third buffer when initializing touchgfx? We call it the "animationstorage". If not, this could explain the missing animation.

/**
     * @fn virtual void HAL::setFrameBufferStartAddress(void* adr, uint16_t depth = 16, bool useDoubleBuffering = true, bool useAnimationStorage = true)
     *
     * @brief Sets the address used for frame buffers, usually located in external memory.
     *
     *        Sets the address used for frame buffers, usually located in external memory. Will
     *        reserve memory for one or two frame buffers based on display size. Will optionally
     *        also reserve memory for a third frame buffer used for animationStorage.
     *
     * @param [in] adr                 Starting address to use for frame buffers.
     * @param      depth               (Optional) Depth of each pixel in bits, default is 16.
     * @param      useDoubleBuffering  (Optional) If true, reserve memory for an extra frame buffer.
     * @param      useAnimationStorage (Optional) If true, reserve memory for animation storage.
     *
     * @deprecated Use the setFramaBufferStartAddress with 'format' parameter instead of 'depth'
     */
    virtual void setFrameBufferStartAddress(void* adr, uint16_t depth = 16, bool useDoubleBuffering = true, bool useAnimationStorage = true)
    {
...

/Martin

(I don't believe you can configure this from CubeMX)

Hi @Martin KJELDSEN​ ,

Thanks yet again! Animations are working fine now.

I did a change in BoardConfiguration.cpp file and now it works.

Still have the issue with screen working only during debug but not after reset after finished debug session. It looks like there is something wrong with the FreeRTOS part of it as if I comment osKernelStart(); in my main.cpp file my "debug" led is still toggling.

Zak_83

Good morning @Martin KJELDSEN​ ,

I have narrowed down what is causing my issue with 469I-DISCO board (runs/displays ok while in debug, doesn't run/display when not in debug and after reset/power cycle). So once I remove from linker script the QUADSPI area of external flash everything works fine, I can run the PCB no problem. But once I add it back, board doesn't work without debug mode.

I am afraid I ran out of ideas on this one. Do you have any idea why this is happening?

Thanks

Zak_83

Hi @ScubaBoy​ ,

I am working with the STM32F469I-DISCO, TouchGFX and STMCubeIDE and was struggling to get everything working. Your masterfile helped me a lot, thank you for that.

I still have one issue: Somehow it only debugs succesfully the very first time. When I change something in the TouchGFX project and try to build it again, it gives me a make-error. Is it the same for you? Do you maybe know why?

Kind regards,

Gerda