Skip to main content
Dejan Nedeljkovic
Associate III
July 1, 2019
Question

ISSUE integrating TouchGFX on custom board with external SDRAM

  • July 1, 2019
  • 6 replies
  • 2625 views

Hello everyone

I am integrating TouchGFX on custom board (STM32F767II) with external SDRAM (AS4C16M16SA).

The issue I am trying to solve is the color swapping with external SDRAM. When the internal RAM is used the colors are displayed correct.

I have attached two pictures :

  • external SDRAM : has the colors swapped with some lines
  • internal RAM : has the correct colors and is clear (-> RGB from right to left and from top to bottom)

I have also attached the CubeMX file.

Does anyone have an idea how to solve this?

Regards

Dejan

0690X000009YEHaQAO.jpg0690X000009YEHoQAO.jpg

This topic has been closed for replies.

6 replies

Dejan Nedeljkovic
Associate III
July 1, 2019

@Martin KJELDSEN​ 

Do you have any idea? Does it look like incorrect timing or like a HW problem?

Regards

Dejan

Martin KJELDSEN
Principal III
July 2, 2019

Hi @Dejan Nedeljkovic​,

That looks strange. Can you verify that the contents of the framebuffer when in internal RAM is the same as when it is in external sdram?

Thanks!

Dejan Nedeljkovic
Associate III
July 9, 2019

Hi @Martin KJELDSEN​ 

Thanks for your fast response.

I've found out that the FMC Clock and ClockEnable is not working. The layout of my PCB looks correct. Did I forget to set something in CubeMX?

I've attached the CubeMX file in my first post.

Regards

Dejan

Dejan Nedeljkovic
Associate III
July 10, 2019

Hi @Martin KJELDSEN (ST Employee)​ 

I have an update.

The clock is now working.

But I am still trying to get the ram (FMC) working correctly.

Regards

Dejan

Dejan Nedeljkovic
Associate III
July 10, 2019

Hi @Martin KJELDSEN (ST Employee)​

I've found out what is wrong with my setup.

When I'm using the FMC_SDRAM template of the stm32f746 discovery board on my custom board with a STM32F767II and an external SDRAM AS4C16M16SA then the nibbles are swapped. (STM32Cube\Repository\STM32Cube_FW_F7_V1.15.0\Projects\STM32746G-Discovery\Examples\FMC\FMC_SDRAM)

For example:

I'm writing 0xA244250F to the SDRAM

When I'm reading it back, I get 0x250FA244

Is there a possibility to set this in the CubeMX FMC settings?

Regards

Dejan

kk2
Associate II
October 11, 2019

Hi,

if you setting

CASLatency = FMC_SDRAM_CAS_LATENCY_2;

You need to change

SDRAM_MODEREG_CAS_LATENCY_3

to

SDRAM_MODEREG_CAS_LATENCY_2

in: /* Step 5: Program the external memory mode register */