Skip to main content
Associate III
September 19, 2023
Solved

Problem when I use external SRAM in touchgfx. Wrong pixels.

  • September 19, 2023
  • 8 replies
  • 12435 views

Hello.

I have made a custom project with STM32H735IGT. I use Touchgfx.

I am using external flash and external RAM. The problem is when I place the framebuffer in external RAM. Some green pixels appear as in image 1. When I place the framebuffer in internal RAM, the image is painted well.

I am using IS66WVH16M8DBLL-100B1LI RAM. I attached hardware configuration, the RAM is OCTOSPI2.

IMG_20230919_174816.jpg

 
video of the problem and .ioc:
 

Where is the problem?

 

 

Best answer by fernandogamax

Hello,

it seems that it is a signal synchronization problem. I have changed the resistances of the CLK and DQS. For resistances of 120. It seems that the problems have been solved. We have ordered the new 4-layer PCB. When I do tests on the new board, I will write to you.

Thank you very much to all.

8 replies

Technical Moderator
September 19, 2023

Hi @fernandogamax,

Have you tried with lower OCTOSPI Clock frequency? It seems you have already exceeded the max frequency as detailed in datasheet. Could explain the use of the MPU configuration for SRAM region (0x30000000)? 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
Associate III
September 19, 2023

Hello.

Yes, I have tried lower clock frequencies OCTOSPI, but the effect is the same.

Could explain the use of the MPU configuration for SRAM region (0x30000000)?

I use that section of RAM to place some buffers that will be sent by DMAUART. And I read in the community that to do it, I had to configure the MPU region.

Thanks for your answer.

Msolinas
Senior
September 20, 2023

hi, this is not a read/write problem in RAM, if you look at your problem you realize that the green pixels are positioned circularly on a shade of the image, therefore typical of a particular color. I believe that you have some problem on the LTDC transmission line of the display or from the RAM to the micro, and that it concerns the low bits of the line itself. Probably the RAM line since the problem is not found on the LTDC when internal.. 

Msolinas
Senior
September 20, 2023

mmm if you put the bitmap in the internal flash and you have the same effect, then it's useless to search on the octospi... without the external RAM everything is perfect, then it's the RAM. Very strange over some colors. I think only can be hardware line frequency problem or DMA data corruption.

Msolinas
Senior
September 20, 2023

please check if in cubemx every ram gpio pin is set to

GPIO_SPEED_FREQ_VERY_HIGH

Msolinas
Senior
September 20, 2023

You have PB8 LTDC_B6 and PB9 LTDC_B7 in fast mode disable in LTDC, why? this is blue region of color, exactly your problem

Associate III
September 20, 2023

I have checked GPIO_SPEED_FREQ_VERY_HIGH, all are fine.

PB8 LTDC_B6 and PB9 LTDC_B7 I have put them in fast mode, without any change

 

Msolinas
Senior
September 20, 2023

I think for hardware problem friend, everyting seems to be ok, try to change RAM chip.

Msolinas
Senior
September 21, 2023

Msolinas_0-1695314850192.png

 

Associate III
September 22, 2023

Are the octospi lines resistor finished?

Yes

Are they the same length? 

Yes

Hi fernando, you do not set MPU, the MPU is very important for RAM settings.

This configuration is copied from the example project of the evaluation board (STM32H735G-DK). However, I have tried to change it, but it does not solve the problem.

Msolinas
Senior
September 22, 2023

hi Fernando, I see all documents, checked datasheets... nothing wrong, a little error is place termination resistors at the end of line, but ST make this abomination in his hardware, but this is only a detail, and not corresponding to your problem, I think many have no idea judging by the fact that everyone is watching and no one is responding. Good luck buddy, it would be nice to know what happened when you figure out the problem.

Richard Lowe
Senior II
September 23, 2023

Could be caching issue with external RAM. Yes, you should configure the MPU, but to test if that is the issue at all, disable caching for the whole system. Test. If the colors are still there, it isn't the MPU configuration.

Associate III
September 25, 2023

I have already performed those tests, everything remains the same.

Associate III
September 25, 2023

I have done more tests.

I have placed the screen all Blue. In debugging I have been looking at the external RAM, and I could see the following errors. And they repeat.

error1.png

error2.png

error3.png

error4.png

Any idea why that could be?

MM..1
Chief III
September 25, 2023

Try direct write to problem place. 

*(0x70000000) = 0x....
and better big rectangle write from c code , not from touchgfx render.
Associate III
September 25, 2023

I can write without problem 0x70000000

 
I have tried with resistance of 0, and resistance of 33
fernandogamaxAuthorBest answer
Associate III
September 26, 2023

Hello,

it seems that it is a signal synchronization problem. I have changed the resistances of the CLK and DQS. For resistances of 120. It seems that the problems have been solved. We have ordered the new 4-layer PCB. When I do tests on the new board, I will write to you.

Thank you very much to all.

Associate II
June 5, 2024

Hello @fernandogamax 
I'm also having the same problem as you. I used STM32H723ZGT6, OSPI PSRAM APS12808L-3OBM, LCD RGB666 LTDC. The image always display noisy green pixels (see image).
My custom board is layout with 2 layers, RAM wires is same length, but I don't add any resistor on any wire (CLK, DQS, DQ0..7). Would adding a 120 ohm resistor on CLK solve the above problem? (Because of budget and time issues, I don't want have to re-layout the circuit board with 4 layers)
Thank you so much.
Untitled.jpg

Associate III
October 6, 2023

Hello. I have designed the PCB with 4 layers, and I have placed the APS12808L-3OBM-BA memory. The board is functioning correctly. However, I need to add a 250-ohm resistor to the clock line, while the other lines have a 33-ohm resistor. Can anyone tell me why this is necessary? Could it be a configuration issue?

Technical Moderator
October 6, 2023

Hello @fernandogamax 

This is due to signal integrity considerations. The clock line typically has a higher frequency and therefore requires a higher impedance to maintain signal integrity. The 250-ohm resistor helps to reduce reflections and noise on the clock line, which can cause signal degradation and errors in data transmission. You can find more details in the datasheet of the memory. Some general guidelines about Interface signal layout are provided in AN4938.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL