cancel
Showing results for 
Search instead for 
Did you mean: 

SPI communication gets shifted when TouchGFX is used

JIN3473
Associate III

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!

 

 

 

4 REPLIES 4
mƎALLEm
ST Employee

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 ...

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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?

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 ..

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
JIN3473
Associate III

As a test, I can confirm that the communication works correctly when I run a minimal codebase without any other software active.