Skip to main content
Mtopa.1
Associate III
December 3, 2022
Solved

ltdc not working properly with external ram (octoSPI APS6408L-3OBM-BA) on stm32h723 processor

  • December 3, 2022
  • 6 replies
  • 2814 views

Hello everyone.

I have a question. I am using the stm32h723 processor in a project. I keep my image data in octoSPI external ram correctly. When I show OCTOSPI_BASE_ADRES to LTDC peripheral, the screen is distorted, but when I keep the same image in my flash memory, the image is fine. What would be the reason?.Could it be a sync problem between ltdc and octospi?

This topic has been closed for replies.
Best answer by Andreas Bolsch

First point would be to identify the problem. LTDC has status flags (transfer error, underrun), ever checked?

As already mentioned bandwith and latency could be issues: Faster RAM, faster clock for OctoSPI, quad mode, dual quad mode?! Some flash chips have a so-called XIP mode, this would decrease latency, but don't know whether your (secret?) RAM does support it.

6 replies

MM..1
Chief III
December 3, 2022

You copy image from flash into ram and show it over ltdc???

Try show foto

Mtopa.1
Mtopa.1Author
Associate III
December 3, 2022

I read the image from sd card and write it to external ram(octospi ram). Then i show octospi base address to ltdc peripheral

MM..1
Chief III
December 3, 2022

If you setup memory mapped mode properly and place image bytes from sdram into mem ok try read STM32H7A3 OctoSPI Memory Mapped Mode Write Problem to HyperRAM S70KL1282

Tesla DeLorean
Guru
December 3, 2022

>>Could it be a sync problem between ltdc and octospi?

Bandwidth ?

Video has hard deadlines, and failure is very perceptible.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Mtopa.1
Mtopa.1Author
Associate III
December 3, 2022

How can i sync?

Andreas Bolsch
Andreas BolschBest answer
Lead III
December 4, 2022

First point would be to identify the problem. LTDC has status flags (transfer error, underrun), ever checked?

As already mentioned bandwith and latency could be issues: Faster RAM, faster clock for OctoSPI, quad mode, dual quad mode?! Some flash chips have a so-called XIP mode, this would decrease latency, but don't know whether your (secret?) RAM does support it.

MM..1
Chief III
December 4, 2022

Liitle math example about bandwidth, what is your primary issue.

You setup LTDC to show RGB888 from base addr octo SPI. Setup LTDC clock 50MHz.

RGB888 is 3 byte format then your bus OSPI need work on minim 150MHz ...

Mtopa.1
Mtopa.1Author
Associate III
December 5, 2022

I'm running LTDC at 30Mhz and using the RGB565 format. OCTOSPI works at 120Mhz. It's not clear in the picture. Could it be synchronization disorder or latecy at these frequencies. I am sending the image

0693W00000WKGECQA5.jpg 

Andreas Bolsch
Lead III
December 6, 2022

Again, did you check LTDC status flags?

I'd suggest to copy (largest possible part of) the image from the external RAM to the internal static RAM using very same start address, precisely the same (memory mapped?!) mode via DMA burst transfers and verify that contents in external RAM is correct. DMA burst closely resembles the way LTDC accesses display memory.