2020-03-19 07:46 AM
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);
2020-03-23 08:00 AM
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
2020-03-26 02:01 AM
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
2020-04-07 12:40 PM
Thanks Guys, I'm now using the TouchGFX designer values.
Sorry for the delay...