cancel
Showing results for 
Search instead for 
Did you mean: 

touchgfx and shared QSPI

MPast.1
Senior II

HI all,

I have a custom board composed by an stm32h743 and 2 QSPI memory (2x 16MB) with different CS. 

The proejct uses only the first memory to access the graphic contents and doesn't use the second memory.

For this reason, I want to use the second memory to store new text and graphic contents

Is it possible to share the external QSPI memory with another task to write data on QSPI while touchgfx is running?

Is it possible to stop Touchgfx_task for the time I need to read or write into the second memory?

There is a more elegant way to do it?

 

thanks

 

1 REPLY 1
Osman SOYKURT
ST Employee

Hello @MPast.1 ,

If your second QSPI chip is not used by TouchGFX, you can access it from another task, as long as the QSPI peripheral is properly configured to switch between the two chips (by toggling the correct CS line) and both TouchGFX and the other task don’t access the QSPI bus at the same time, otherwise, you risk data corruption or bus conflicts.

You could suspend the TouchGFX task (e.g., in FreeRTOS) while accessing QSPI, but this may cause visible glitches or UI delays.

Yes, a better solution would be to use a mutex to ensure only one task accesses the QSPI bus at a time. Additionally, using DMA would also allow data transfers to happen in the background without blocking the CPU, so other tasks can run in parallel without interruption.

Osman SOYKURT
ST Software Developer | TouchGFX