cancel
Showing results for 
Search instead for 
Did you mean: 

ISSUE integrating TouchGFX on custom board with external SDRAM

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

6 REPLIES 6

@Martin KJELDSEN​ 

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

Regards

Dejan

Martin KJELDSEN
Chief III

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!

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

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

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

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 */