Skip to main content
MEder
Associate III
March 19, 2020
Question

TouchGFX QuadPSI, Designer example vs CubeMX

  • March 19, 2020
  • 3 replies
  • 767 views

I created a CubeMX Project for the STM32F746G-DISCO board.

- STM32CUBEMX (5.6.0)

- STM32CubeIDE (1.3.0)

- TouchGFX Generator (4.13.0)

I selected the board template,

But the QuadSPI settings are different from the TouchGFX designer examples.

Bug? or minor annoyance?

CubeMX

 /* QUADSPI parameter configuration*/

 hqspi.Instance = QUADSPI;

 hqspi.Init.ClockPrescaler = 255;

 hqspi.Init.FifoThreshold = 1;

 hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_NONE;

 hqspi.Init.FlashSize = 1;

 hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_1_CYCLE;

 hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;

 hqspi.Init.FlashID = QSPI_FLASH_ID_1;

 hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE;

 if (HAL_QSPI_Init(&hqspi) != HAL_OK)

 {

   Error_Handler();

 }

 /* USER CODE BEGIN QUADSPI_Init 2 */

 BSP_QSPI_Init();

 BSP_QSPI_MemoryMappedMode();

 HAL_NVIC_DisableIRQ(QUADSPI_IRQn);

TouchGFX

 /* QUADSPI parameter configuration*/

 hqspi.Instance = QUADSPI;

 hqspi.Init.ClockPrescaler = 1;

 hqspi.Init.FifoThreshold = 4;

 hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;

 hqspi.Init.FlashSize = 24;

 hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_6_CYCLE;

 hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;

 hqspi.Init.FlashID = QSPI_FLASH_ID_1;

 hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE;

 if (HAL_QSPI_Init(&hqspi) != HAL_OK)

 {

   Error_Handler();

 }

 /* USER CODE BEGIN QUADSPI_Init 2 */

 BSP_QSPI_Init();

 BSP_QSPI_MemoryMappedMode();

 HAL_NVIC_DisableIRQ(QUADSPI_IRQn);

This topic has been closed for replies.

3 replies

Alexandre RENOUX
Visitor II
March 23, 2020

Hi,

If you want to use TouchGFX, it is recommended to use the Designer Application Templates as they have been coded and tested to work correctly for TouchGFX Graphics development.

/Alexandre

N. SANTINI
ST Employee
March 26, 2020

Indeed, CubeMX default pinout for ST devkits (discovery and eval boards in particular) should not be considered as a functional starting point for an application that involves a Middleware component (e.g. TouchGFX). For example if the QSPI settings are valid to enable and access the specific memory that is embedded on the chosen board it may not be an optimal configuration to use it for graphic purpose.

The only valid starting point for graphic application should be either the TouchGFX Designer application template or the demo examples provided in the corresponding Cube Firmware package.

Best regards,

Nicolas

MEder
MEderAuthor
Associate III
April 7, 2020

Thanks Guys, I'm now using the TouchGFX designer values.

Sorry for the delay...