cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX QuadPSI, Designer example vs CubeMX

MEder
Associate III

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);

3 REPLIES 3
Alexandre RENOUX
Principal

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

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
Associate III

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

Sorry for the delay...