cancel
Showing results for 
Search instead for 
Did you mean: 

On STM32H743 SPI FRAM is read with errors when LTDC is running

OIrin.1
Associate II

Hello,

I use a custom board with STM32H743. It also includes an SPI FRAM and a display working over LTDC+TouchGFX. When I work with FRAM before TouchGFX task is launched, everything is OK, but after the FreeRTOS scheduler is started reading from FRAM becomes unstable (sometimes it is read correctly, the rest of the time wrong data are read). I tried to read FRAM from the default FreeRTOS task with all possible ways (DMA, interrupts or just polling), but still got wrong data most of the time. If I disable LTDC interrupts I can read FRAM without any problems (I don't understand how LTDC interrupts can influence SPI if it works in polling mode).

Has anyone got any idea of how could I cope the problem and make STM32 read correct data from the FRAM while LTDC is working?.

4 REPLIES 4
SKacp.1
Senior II

Hello,

I use custom board with STM32H743 and SPI connected to memory FRAM. I have connected LCD display over LTDC and TouchGFX. I use also SDRAM and QSPI. My project based on the FreeRTOS and I do not have any problems with writing and reading data from FRAM. Maybe You have problem with noise from LTDC? What You have clock on the SPI? Please share with more information about Your project.

OIrin.1
Associate II

Thank you for the reply. I checked all the signals on the FRAM chip, they are clear. I also have a QSPI chip on the board and it works well, no problems with it.

The device shows on the display some information. I disabled all tasks (except TouchGFX) and left one which included just a FRAM read operation once in a second and it reads wrong data. If I disable LTDC interrupts, the data are read correctly.

What's happening in the LTDC interrupt? Try bisecting calls there to isolate specific sub functions.

Is the FRAM code reentrant and thread safe? Any static variables or buffers?

Perhaps have some mutexs to serialize ​usage / ownership.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
OIrin.1
Associate II

Thank you for the hints.

Still can't figure out the roots of the problems. A temporary workaround is duplicating SPI transactions. I'm going to check the signals with a logic analyzer as my oscilloscope does not allow me to see overall picture.