2025-07-14 11:15 PM - last edited on 2025-07-15 2:28 AM by mƎALLEm
Hello everyone,
I'm currently working with an stm32f746 chip, using TouchGFX and SPI slave. I am exchanging data via SPI every 10ms.
The communication generally works well, but it sometimes gets shifted or delayed whenever a screen-related action happens in TouchGFX. It wouldn't be a problem if the communication returned to its normal state, but the issue is that it continues to operate in this shifted state permanently.
For example:
Normal communication : AA BB CC DD EE FF GG
Shfited communication : CC DD EE FF GG AA BB
On my receiving end, this is manageable because I buffer the incoming data and reassemble the packet by comparing STX and ETX values. However, I'm not sure how to fix this on the transmission (sending) side.
If you have experienced a similar problem or know a solution, your help would be greatly appreciated.
Have a great day!
2025-07-15 1:20 AM - edited 2025-07-15 1:20 AM
Hello,
Did you try with a very simple code without TouchGFX, RTOS etc ??
You need also to provide your code and more details about the device you are communicating with ...
2025-07-15 1:38 AM
Thank you for the reply. Here is some more detail on my setup and the issue.
My SPI Master is a Zynq CPU, and I am developing the SPI Slave on an STM32F746.
Initially, I started with very simple code. At that stage, the data I received on my slave device was getting shifted, but the data I transmitted was fine. I have since fixed the reception issue on my end.
The current problem occurs when I use it with TouchGFX. The communication works perfectly for a while, but then at some point, the Master (Zynq) starts receiving my transmitted data in a shifted sequence. I would like to solve this on my end (the STM32 slave) if possible.
To help you diagnose the problem, what further details should I provide?
2025-07-15 1:41 AM
We need to know if the communication works well with a very simple code in order to dispatch this thread to the suitable forum board.
So you need to do a test with Tx/Rx with a very simple project without any additional complex software ..
2025-07-15 1:44 AM
As a test, I can confirm that the communication works correctly when I run a minimal codebase without any other software active.