2019-07-01 01:37 AM
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 :
I have also attached the CubeMX file.
Does anyone have an idea how to solve this?
Regards
Dejan
2019-07-01 04:11 AM
@Martin KJELDSEN
Do you have any idea? Does it look like incorrect timing or like a HW problem?
Regards
Dejan
2019-07-02 12:42 AM
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!
2019-07-09 06:07 AM
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
2019-07-10 01:48 AM
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
2019-07-10 03:13 AM
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
2019-10-11 08:22 AM
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 */