Showing results for 
Search instead for 
Did you mean: 

STM32H750 TouchGFX FreeRTOS problem with flash memory (SST25VF016B) on SPI2 bus


Hello everyone,

I'm facing an issue with STM32H750 and an SPI memory connected to SPI2 peripheral, and I hope someone here can lend a hand or share similar experiences. Currently, I'm dealing with the following problem:


  • STM32H750
  • CubeMX 6.8
  • TouchGFX 4.16
  • Firmware 1.11.1
  • SST25VF016B flash memory (16Mbit R/W speed from CubeMX)

The Problem: We are developing a complex application based on STM32H750 that utilizes nearly all available GPIOs. Our application needs to load data from a flash memory connected to the SPI2 peripheral. In our initial tests on an empty project, the BSP we developed could read and write data without any issues, with a polling read/write time for a 4KB segment being less than a millisecond, just as expected.

However, once we added FreeRTOS and TouchGFX, we encountered the following problems:

  1. The polling read time for a 4KB segment increased to around 200 ms.
  2. The read data is not always correct.
  3. The SPI2 peripheral occasionally times out.

We have tried to address these issues by shifting read and write operations to use interrupts and DMA. While things improved, we still face the following challenges:

  1. The read time for a 4KB sector is still too high, around 2 ms.
  2. Read operations do not always succeed, and we often encounter the "BUSY_RX" error on the DMA.

We even excluded the task related to TouchGFX to see if there was any improvement, but the problem persists. We have considered the possibility of concurrency conditions on the SPI2 peripheral but haven't found evidence of it.

Has anyone faced a similar issue or have ideas on how we can resolve these problems? Any help or suggestions would be greatly appreciated. Thanks in advance!